From fa2d2a42dd590823cc68811ea71c1975264c1ef3 Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Fri, 13 Dec 2024 11:35:17 -0600 Subject: [PATCH 1/2] Add static event test/sample for WinRT (#3389) --- crates/libs/core/src/event.rs | 2 +- crates/tests/winrt/events/src/bindings.rs | 128 ++++++++++++++++++ crates/tests/winrt/events/src/lib.rs | 39 +++++- crates/tests/winrt/events/src/metadata.idl | 3 + .../tests/winrt/events_client/src/bindings.rs | 63 +++++++++ crates/tests/winrt/events_client/src/lib.rs | 28 ++++ 6 files changed, 256 insertions(+), 7 deletions(-) diff --git a/crates/libs/core/src/event.rs b/crates/libs/core/src/event.rs index c04b2f8352..3951ef2cf8 100644 --- a/crates/libs/core/src/event.rs +++ b/crates/libs/core/src/event.rs @@ -21,7 +21,7 @@ impl Default for Event { impl Event { /// Creates a new, empty `Event`. - pub fn new() -> Self { + pub const fn new() -> Self { Self { delegates: RwLock::new(None), } diff --git a/crates/tests/winrt/events/src/bindings.rs b/crates/tests/winrt/events/src/bindings.rs index fe1d50de91..237df8e6f1 100644 --- a/crates/tests/winrt/events/src/bindings.rs +++ b/crates/tests/winrt/events/src/bindings.rs @@ -61,6 +61,47 @@ impl Class { .ok() } } + pub fn StaticSignal(value: i32) -> windows_core::Result { + Self::IClassStatics(|this| unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(this).StaticSignal)( + windows_core::Interface::as_raw(this), + value, + &mut result__, + ) + .map(|| result__) + }) + } + pub fn StaticEvent(handler: P0) -> windows_core::Result + where + P0: windows_core::Param>, + { + Self::IClassStatics(|this| unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(this).StaticEvent)( + windows_core::Interface::as_raw(this), + handler.param().abi(), + &mut result__, + ) + .map(|| result__) + }) + } + pub fn RemoveStaticEvent(token: i64) -> windows_core::Result<()> { + Self::IClassStatics(|this| unsafe { + (windows_core::Interface::vtable(this).RemoveStaticEvent)( + windows_core::Interface::as_raw(this), + token, + ) + .ok() + }) + } + fn IClassStatics windows_core::Result>( + callback: F, + ) -> windows_core::Result { + static SHARED: windows_core::imp::FactoryCache = + windows_core::imp::FactoryCache::new(); + SHARED.call(callback) + } } impl windows_core::RuntimeType for Class { const SIGNATURE: windows_core::imp::ConstBuffer = @@ -152,3 +193,90 @@ pub struct IClass_Vtbl { pub RemoveEvent: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT, } +windows_core::imp::define_interface!( + IClassStatics, + IClassStatics_Vtbl, + 0x47439b4f_f0b4_5a72_8777_4d60e34ec843 +); +impl windows_core::RuntimeType for IClassStatics { + const SIGNATURE: windows_core::imp::ConstBuffer = + windows_core::imp::ConstBuffer::for_interface::(); +} +impl windows_core::RuntimeName for IClassStatics { + const NAME: &'static str = "test_events.IClassStatics"; +} +pub trait IClassStatics_Impl: windows_core::IUnknownImpl { + fn StaticSignal(&self, value: i32) -> windows_core::Result; + fn StaticEvent( + &self, + handler: windows_core::Ref<'_, windows::Foundation::EventHandler>, + ) -> windows_core::Result; + fn RemoveStaticEvent(&self, token: i64) -> windows_core::Result<()>; +} +impl IClassStatics_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn StaticSignal< + Identity: IClassStatics_Impl, + const OFFSET: isize, + >( + this: *mut core::ffi::c_void, + value: i32, + result__: *mut i32, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IClassStatics_Impl::StaticSignal(this, value) { + Ok(ok__) => { + result__.write(core::mem::transmute_copy(&ok__)); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + unsafe extern "system" fn StaticEvent( + 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 IClassStatics_Impl::StaticEvent(this, core::mem::transmute_copy(&handler)) { + Ok(ok__) => { + result__.write(core::mem::transmute_copy(&ok__)); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + unsafe extern "system" fn RemoveStaticEvent< + Identity: IClassStatics_Impl, + const OFFSET: isize, + >( + this: *mut core::ffi::c_void, + token: i64, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IClassStatics_Impl::RemoveStaticEvent(this, token).into() + } + Self { + base__: windows_core::IInspectable_Vtbl::new::(), + StaticSignal: StaticSignal::, + StaticEvent: StaticEvent::, + RemoveStaticEvent: RemoveStaticEvent::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +#[repr(C)] +pub struct IClassStatics_Vtbl { + pub base__: windows_core::IInspectable_Vtbl, + pub StaticSignal: + unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut i32) -> windows_core::HRESULT, + pub StaticEvent: unsafe extern "system" fn( + *mut core::ffi::c_void, + *mut core::ffi::c_void, + *mut i64, + ) -> windows_core::HRESULT, + pub RemoveStaticEvent: + unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT, +} diff --git a/crates/tests/winrt/events/src/lib.rs b/crates/tests/winrt/events/src/lib.rs index 87b051964c..2cb8ba0d4b 100644 --- a/crates/tests/winrt/events/src/lib.rs +++ b/crates/tests/winrt/events/src/lib.rs @@ -1,6 +1,7 @@ mod bindings; +use windows::{core::*, Foundation::*, Win32::Foundation::*, Win32::System::WinRT::*}; -use windows::{core::*, Win32::Foundation::*, Win32::System::WinRT::*}; +static CLASS_FACTORY: StaticComObject = ClassFactory::new().into_static(); #[no_mangle] unsafe extern "system" fn DllGetActivationFactory( @@ -8,15 +9,41 @@ unsafe extern "system" fn DllGetActivationFactory( factory: OutRef, ) -> HRESULT { if *name == "test_events.Class" { - factory.write(Some(ClassFactory.into())).into() + factory.write(Some(CLASS_FACTORY.to_interface())).into() } else { _ = factory.write(None); CLASS_E_CLASSNOTAVAILABLE } } -#[implement(IActivationFactory)] -struct ClassFactory; +#[implement(IActivationFactory, bindings::IClassStatics)] +struct ClassFactory(Event>); + +impl ClassFactory { + const fn new() -> Self { + Self(Event::new()) + } +} + +impl bindings::IClassStatics_Impl for ClassFactory_Impl { + fn StaticSignal(&self, value: i32) -> Result { + let mut counter = 0; + self.0.call(|delegate| { + counter += 1; + delegate.Invoke(self.as_interface(), value) + }); + Ok(counter) + } + + fn StaticEvent(&self, handler: Ref>) -> Result { + self.0.add(handler.unwrap()) + } + + fn RemoveStaticEvent(&self, token: i64) -> Result<()> { + self.0.remove(token); + Ok(()) + } +} impl IActivationFactory_Impl for ClassFactory_Impl { fn ActivateInstance(&self) -> Result { @@ -25,7 +52,7 @@ impl IActivationFactory_Impl for ClassFactory_Impl { } #[implement(bindings::Class)] -struct Class(Event>); +struct Class(Event>); impl bindings::IClass_Impl for Class_Impl { fn Signal(&self, value: i32) -> Result { @@ -39,7 +66,7 @@ impl bindings::IClass_Impl for Class_Impl { fn Event( &self, - handler: Ref>, + handler: Ref>, ) -> windows_core::Result { self.0.add(handler.unwrap()) } diff --git a/crates/tests/winrt/events/src/metadata.idl b/crates/tests/winrt/events/src/metadata.idl index 97164058f7..e6bff84d3d 100644 --- a/crates/tests/winrt/events/src/metadata.idl +++ b/crates/tests/winrt/events/src/metadata.idl @@ -6,5 +6,8 @@ namespace test_events Int32 Signal(Int32 value); event Windows.Foundation.TypedEventHandler Event; + + static Int32 StaticSignal(Int32 value); + static event Windows.Foundation.EventHandler StaticEvent; } } diff --git a/crates/tests/winrt/events_client/src/bindings.rs b/crates/tests/winrt/events_client/src/bindings.rs index 5756a0eabd..95c5f1ca2b 100644 --- a/crates/tests/winrt/events_client/src/bindings.rs +++ b/crates/tests/winrt/events_client/src/bindings.rs @@ -61,6 +61,47 @@ impl Class { .ok() } } + pub fn StaticSignal(value: i32) -> windows_core::Result { + Self::IClassStatics(|this| unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(this).StaticSignal)( + windows_core::Interface::as_raw(this), + value, + &mut result__, + ) + .map(|| result__) + }) + } + pub fn StaticEvent(handler: P0) -> windows_core::Result + where + P0: windows_core::Param>, + { + Self::IClassStatics(|this| unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(this).StaticEvent)( + windows_core::Interface::as_raw(this), + handler.param().abi(), + &mut result__, + ) + .map(|| result__) + }) + } + pub fn RemoveStaticEvent(token: i64) -> windows_core::Result<()> { + Self::IClassStatics(|this| unsafe { + (windows_core::Interface::vtable(this).RemoveStaticEvent)( + windows_core::Interface::as_raw(this), + token, + ) + .ok() + }) + } + fn IClassStatics windows_core::Result>( + callback: F, + ) -> windows_core::Result { + static SHARED: windows_core::imp::FactoryCache = + windows_core::imp::FactoryCache::new(); + SHARED.call(callback) + } } impl windows_core::RuntimeType for Class { const SIGNATURE: windows_core::imp::ConstBuffer = @@ -93,3 +134,25 @@ pub struct IClass_Vtbl { pub RemoveEvent: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT, } +windows_core::imp::define_interface!( + IClassStatics, + IClassStatics_Vtbl, + 0x47439b4f_f0b4_5a72_8777_4d60e34ec843 +); +impl windows_core::RuntimeType for IClassStatics { + const SIGNATURE: windows_core::imp::ConstBuffer = + windows_core::imp::ConstBuffer::for_interface::(); +} +#[repr(C)] +pub struct IClassStatics_Vtbl { + pub base__: windows_core::IInspectable_Vtbl, + pub StaticSignal: + unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut i32) -> windows_core::HRESULT, + pub StaticEvent: unsafe extern "system" fn( + *mut core::ffi::c_void, + *mut core::ffi::c_void, + *mut i64, + ) -> windows_core::HRESULT, + pub RemoveStaticEvent: + unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT, +} diff --git a/crates/tests/winrt/events_client/src/lib.rs b/crates/tests/winrt/events_client/src/lib.rs index a73648977b..c4b13e67dc 100644 --- a/crates/tests/winrt/events_client/src/lib.rs +++ b/crates/tests/winrt/events_client/src/lib.rs @@ -26,6 +26,7 @@ fn test() -> Result<()> { assert_eq!(0, class.Signal(3)?); class.Event(&TypedEventHandler::new( + // TODO: ideally generics also use Ref here move |sender: &Option, args: &i32| { assert_eq!(sender.as_ref().unwrap(), class); assert_eq!(*args, 4); @@ -44,3 +45,30 @@ fn test() -> Result<()> { assert_eq!(2, class.Signal(4)?); Ok(()) } + +#[test] +fn test_static() -> Result<()> { + assert_eq!(0, Class::StaticSignal(1)?); + + let token = Class::StaticEvent(&EventHandler::new(move |_, args| { + assert_eq!(*args, 2); + Ok(()) + }))?; + + assert_eq!(1, Class::StaticSignal(2)?); + Class::RemoveStaticEvent(token)?; + assert_eq!(0, Class::StaticSignal(3)?); + + Class::StaticEvent(&EventHandler::new(move |_, args| { + assert_eq!(*args, 4); + Ok(()) + }))?; + + Class::StaticEvent(&EventHandler::new(move |_, args| { + assert_eq!(*args, 4); + Ok(()) + }))?; + + assert_eq!(2, Class::StaticSignal(4)?); + Ok(()) +} From 198c61aeda2abd32074b30e9631c4e50c9ed5380 Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Fri, 13 Dec 2024 11:35:56 -0600 Subject: [PATCH 2/2] Verify param direction (#3390) --- crates/libs/bindgen/src/types/cpp_method.rs | 4 +- .../Win32/Devices/PortableDevices/mod.rs | 12 ++--- .../src/Windows/Win32/Graphics/Imaging/mod.rs | 48 +++++++++---------- .../Windows/Win32/System/ClrHosting/mod.rs | 4 +- .../src/Windows/Win32/System/Com/mod.rs | 8 ++-- .../src/Windows/Win32/System/Contacts/mod.rs | 32 ++++++------- .../Diagnostics/Debug/ActiveScript/mod.rs | 16 +++---- .../DistributedTransactionCoordinator/mod.rs | 4 +- .../src/Windows/Win32/System/Iis/mod.rs | 16 +++---- .../src/Windows/Win32/UI/Input/Ime/mod.rs | 8 ++-- .../windows/src/Windows/Win32/UI/Shell/mod.rs | 4 +- 11 files changed, 78 insertions(+), 78 deletions(-) diff --git a/crates/libs/bindgen/src/types/cpp_method.rs b/crates/libs/bindgen/src/types/cpp_method.rs index c9b7564834..b2d0b6975e 100644 --- a/crates/libs/bindgen/src/types/cpp_method.rs +++ b/crates/libs/bindgen/src/types/cpp_method.rs @@ -749,7 +749,7 @@ fn write_produce_type(writer: &Writer, ty: &Type, param: Param) -> TokenStream { } 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) { + } else if !param.flags().contains(ParamAttributes::Out) { if ty.is_primitive() { quote! { #name: #kind, } } else { @@ -766,7 +766,7 @@ fn write_invoke_arg(ty: &Type, param: Param, _hint: ParamHint) -> TokenStream { 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()) + || (!param.flags().contains(ParamAttributes::Out) && !ty.is_primitive()) { quote! { core::mem::transmute(&#name) } } else { 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 bd2d5a8358..198b272283 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/PortableDevices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/PortableDevices/mod.rs @@ -1328,9 +1328,9 @@ pub struct IPortableDeviceManager_Vtbl { pub trait IPortableDeviceManager_Impl: windows_core::IUnknownImpl { fn GetDevices(&self, ppnpdeviceids: *mut windows_core::PWSTR, pcpnpdeviceids: *mut u32) -> windows_core::Result<()>; fn RefreshDeviceList(&self) -> windows_core::Result<()>; - fn GetDeviceFriendlyName(&self, pszpnpdeviceid: &windows_core::PCWSTR, pdevicefriendlyname: &windows_core::PWSTR, pcchdevicefriendlyname: *mut u32) -> windows_core::Result<()>; - fn GetDeviceDescription(&self, pszpnpdeviceid: &windows_core::PCWSTR, pdevicedescription: &windows_core::PWSTR, pcchdevicedescription: *mut u32) -> windows_core::Result<()>; - fn GetDeviceManufacturer(&self, pszpnpdeviceid: &windows_core::PCWSTR, pdevicemanufacturer: &windows_core::PWSTR, pcchdevicemanufacturer: *mut u32) -> windows_core::Result<()>; + fn GetDeviceFriendlyName(&self, pszpnpdeviceid: &windows_core::PCWSTR, pdevicefriendlyname: windows_core::PWSTR, pcchdevicefriendlyname: *mut u32) -> windows_core::Result<()>; + fn GetDeviceDescription(&self, pszpnpdeviceid: &windows_core::PCWSTR, pdevicedescription: windows_core::PWSTR, pcchdevicedescription: *mut u32) -> windows_core::Result<()>; + fn GetDeviceManufacturer(&self, pszpnpdeviceid: &windows_core::PCWSTR, pdevicemanufacturer: windows_core::PWSTR, pcchdevicemanufacturer: *mut u32) -> windows_core::Result<()>; fn GetDeviceProperty(&self, pszpnpdeviceid: &windows_core::PCWSTR, pszdevicepropertyname: &windows_core::PCWSTR, pdata: *mut u8, pcbdata: *mut u32, pdwtype: *mut u32) -> windows_core::Result<()>; fn GetPrivateDevices(&self, ppnpdeviceids: *mut windows_core::PWSTR, pcpnpdeviceids: *mut u32) -> windows_core::Result<()>; } @@ -1346,15 +1346,15 @@ impl IPortableDeviceManager_Vtbl { } unsafe extern "system" fn GetDeviceFriendlyName(this: *mut core::ffi::c_void, pszpnpdeviceid: windows_core::PCWSTR, pdevicefriendlyname: windows_core::PWSTR, pcchdevicefriendlyname: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceManager_Impl::GetDeviceFriendlyName(this, core::mem::transmute(&pszpnpdeviceid), core::mem::transmute(&pdevicefriendlyname), core::mem::transmute_copy(&pcchdevicefriendlyname)).into() + IPortableDeviceManager_Impl::GetDeviceFriendlyName(this, core::mem::transmute(&pszpnpdeviceid), core::mem::transmute_copy(&pdevicefriendlyname), core::mem::transmute_copy(&pcchdevicefriendlyname)).into() } unsafe extern "system" fn GetDeviceDescription(this: *mut core::ffi::c_void, pszpnpdeviceid: windows_core::PCWSTR, pdevicedescription: windows_core::PWSTR, pcchdevicedescription: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceManager_Impl::GetDeviceDescription(this, core::mem::transmute(&pszpnpdeviceid), core::mem::transmute(&pdevicedescription), core::mem::transmute_copy(&pcchdevicedescription)).into() + IPortableDeviceManager_Impl::GetDeviceDescription(this, core::mem::transmute(&pszpnpdeviceid), core::mem::transmute_copy(&pdevicedescription), core::mem::transmute_copy(&pcchdevicedescription)).into() } unsafe extern "system" fn GetDeviceManufacturer(this: *mut core::ffi::c_void, pszpnpdeviceid: windows_core::PCWSTR, pdevicemanufacturer: windows_core::PWSTR, pcchdevicemanufacturer: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceManager_Impl::GetDeviceManufacturer(this, core::mem::transmute(&pszpnpdeviceid), core::mem::transmute(&pdevicemanufacturer), core::mem::transmute_copy(&pcchdevicemanufacturer)).into() + IPortableDeviceManager_Impl::GetDeviceManufacturer(this, core::mem::transmute(&pszpnpdeviceid), core::mem::transmute_copy(&pdevicemanufacturer), core::mem::transmute_copy(&pcchdevicemanufacturer)).into() } unsafe extern "system" fn GetDeviceProperty(this: *mut core::ffi::c_void, pszpnpdeviceid: windows_core::PCWSTR, pszdevicepropertyname: windows_core::PCWSTR, pdata: *mut u8, pcbdata: *mut u32, pdwtype: *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/Graphics/Imaging/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/mod.rs index 9d8399b59a..13a8d3bf27 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/mod.rs @@ -516,11 +516,11 @@ pub struct IWICBitmapCodecInfo_Vtbl { pub trait IWICBitmapCodecInfo_Impl: IWICComponentInfo_Impl { fn GetContainerFormat(&self) -> windows_core::Result; fn GetPixelFormats(&self, cformats: u32, pguidpixelformats: *mut windows_core::GUID, pcactual: *mut u32) -> windows_core::Result<()>; - fn GetColorManagementVersion(&self, cchcolormanagementversion: u32, wzcolormanagementversion: &windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::Result<()>; - fn GetDeviceManufacturer(&self, cchdevicemanufacturer: u32, wzdevicemanufacturer: &windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::Result<()>; - fn GetDeviceModels(&self, cchdevicemodels: u32, wzdevicemodels: &windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::Result<()>; - fn GetMimeTypes(&self, cchmimetypes: u32, wzmimetypes: &windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::Result<()>; - fn GetFileExtensions(&self, cchfileextensions: u32, wzfileextensions: &windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::Result<()>; + fn GetColorManagementVersion(&self, cchcolormanagementversion: u32, wzcolormanagementversion: windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::Result<()>; + fn GetDeviceManufacturer(&self, cchdevicemanufacturer: u32, wzdevicemanufacturer: windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::Result<()>; + fn GetDeviceModels(&self, cchdevicemodels: u32, wzdevicemodels: windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::Result<()>; + fn GetMimeTypes(&self, cchmimetypes: u32, wzmimetypes: windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::Result<()>; + fn GetFileExtensions(&self, cchfileextensions: u32, wzfileextensions: windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::Result<()>; fn DoesSupportAnimation(&self) -> windows_core::Result; fn DoesSupportChromakey(&self) -> windows_core::Result; fn DoesSupportLossless(&self) -> windows_core::Result; @@ -545,23 +545,23 @@ impl IWICBitmapCodecInfo_Vtbl { } unsafe extern "system" fn GetColorManagementVersion(this: *mut core::ffi::c_void, cchcolormanagementversion: u32, wzcolormanagementversion: windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICBitmapCodecInfo_Impl::GetColorManagementVersion(this, core::mem::transmute_copy(&cchcolormanagementversion), core::mem::transmute(&wzcolormanagementversion), core::mem::transmute_copy(&pcchactual)).into() + IWICBitmapCodecInfo_Impl::GetColorManagementVersion(this, core::mem::transmute_copy(&cchcolormanagementversion), core::mem::transmute_copy(&wzcolormanagementversion), core::mem::transmute_copy(&pcchactual)).into() } unsafe extern "system" fn GetDeviceManufacturer(this: *mut core::ffi::c_void, cchdevicemanufacturer: u32, wzdevicemanufacturer: windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICBitmapCodecInfo_Impl::GetDeviceManufacturer(this, core::mem::transmute_copy(&cchdevicemanufacturer), core::mem::transmute(&wzdevicemanufacturer), core::mem::transmute_copy(&pcchactual)).into() + IWICBitmapCodecInfo_Impl::GetDeviceManufacturer(this, core::mem::transmute_copy(&cchdevicemanufacturer), core::mem::transmute_copy(&wzdevicemanufacturer), core::mem::transmute_copy(&pcchactual)).into() } unsafe extern "system" fn GetDeviceModels(this: *mut core::ffi::c_void, cchdevicemodels: u32, wzdevicemodels: windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICBitmapCodecInfo_Impl::GetDeviceModels(this, core::mem::transmute_copy(&cchdevicemodels), core::mem::transmute(&wzdevicemodels), core::mem::transmute_copy(&pcchactual)).into() + IWICBitmapCodecInfo_Impl::GetDeviceModels(this, core::mem::transmute_copy(&cchdevicemodels), core::mem::transmute_copy(&wzdevicemodels), core::mem::transmute_copy(&pcchactual)).into() } unsafe extern "system" fn GetMimeTypes(this: *mut core::ffi::c_void, cchmimetypes: u32, wzmimetypes: windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICBitmapCodecInfo_Impl::GetMimeTypes(this, core::mem::transmute_copy(&cchmimetypes), core::mem::transmute(&wzmimetypes), core::mem::transmute_copy(&pcchactual)).into() + IWICBitmapCodecInfo_Impl::GetMimeTypes(this, core::mem::transmute_copy(&cchmimetypes), core::mem::transmute_copy(&wzmimetypes), core::mem::transmute_copy(&pcchactual)).into() } unsafe extern "system" fn GetFileExtensions(this: *mut core::ffi::c_void, cchfileextensions: u32, wzfileextensions: windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICBitmapCodecInfo_Impl::GetFileExtensions(this, core::mem::transmute_copy(&cchfileextensions), core::mem::transmute(&wzfileextensions), core::mem::transmute_copy(&pcchactual)).into() + IWICBitmapCodecInfo_Impl::GetFileExtensions(this, core::mem::transmute_copy(&cchfileextensions), core::mem::transmute_copy(&wzfileextensions), core::mem::transmute_copy(&pcchactual)).into() } unsafe extern "system" fn DoesSupportAnimation(this: *mut core::ffi::c_void, pfsupportanimation: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2043,11 +2043,11 @@ pub trait IWICComponentInfo_Impl: windows_core::IUnknownImpl { fn GetComponentType(&self) -> windows_core::Result; fn GetCLSID(&self) -> windows_core::Result; fn GetSigningStatus(&self) -> windows_core::Result; - fn GetAuthor(&self, cchauthor: u32, wzauthor: &windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::Result<()>; + fn GetAuthor(&self, cchauthor: u32, wzauthor: windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::Result<()>; fn GetVendorGUID(&self) -> windows_core::Result; - fn GetVersion(&self, cchversion: u32, wzversion: &windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::Result<()>; - fn GetSpecVersion(&self, cchspecversion: u32, wzspecversion: &windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::Result<()>; - fn GetFriendlyName(&self, cchfriendlyname: u32, wzfriendlyname: &windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::Result<()>; + fn GetVersion(&self, cchversion: u32, wzversion: windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::Result<()>; + fn GetSpecVersion(&self, cchspecversion: u32, wzspecversion: windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::Result<()>; + fn GetFriendlyName(&self, cchfriendlyname: u32, wzfriendlyname: windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::Result<()>; } impl IWICComponentInfo_Vtbl { pub const fn new() -> Self { @@ -2083,7 +2083,7 @@ impl IWICComponentInfo_Vtbl { } unsafe extern "system" fn GetAuthor(this: *mut core::ffi::c_void, cchauthor: u32, wzauthor: windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICComponentInfo_Impl::GetAuthor(this, core::mem::transmute_copy(&cchauthor), core::mem::transmute(&wzauthor), core::mem::transmute_copy(&pcchactual)).into() + IWICComponentInfo_Impl::GetAuthor(this, core::mem::transmute_copy(&cchauthor), core::mem::transmute_copy(&wzauthor), core::mem::transmute_copy(&pcchactual)).into() } unsafe extern "system" fn GetVendorGUID(this: *mut core::ffi::c_void, pguidvendor: *mut windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2097,15 +2097,15 @@ impl IWICComponentInfo_Vtbl { } unsafe extern "system" fn GetVersion(this: *mut core::ffi::c_void, cchversion: u32, wzversion: windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICComponentInfo_Impl::GetVersion(this, core::mem::transmute_copy(&cchversion), core::mem::transmute(&wzversion), core::mem::transmute_copy(&pcchactual)).into() + IWICComponentInfo_Impl::GetVersion(this, core::mem::transmute_copy(&cchversion), core::mem::transmute_copy(&wzversion), core::mem::transmute_copy(&pcchactual)).into() } unsafe extern "system" fn GetSpecVersion(this: *mut core::ffi::c_void, cchspecversion: u32, wzspecversion: windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICComponentInfo_Impl::GetSpecVersion(this, core::mem::transmute_copy(&cchspecversion), core::mem::transmute(&wzspecversion), core::mem::transmute_copy(&pcchactual)).into() + IWICComponentInfo_Impl::GetSpecVersion(this, core::mem::transmute_copy(&cchspecversion), core::mem::transmute_copy(&wzspecversion), core::mem::transmute_copy(&pcchactual)).into() } unsafe extern "system" fn GetFriendlyName(this: *mut core::ffi::c_void, cchfriendlyname: u32, wzfriendlyname: windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICComponentInfo_Impl::GetFriendlyName(this, core::mem::transmute_copy(&cchfriendlyname), core::mem::transmute(&wzfriendlyname), core::mem::transmute_copy(&pcchactual)).into() + IWICComponentInfo_Impl::GetFriendlyName(this, core::mem::transmute_copy(&cchfriendlyname), core::mem::transmute_copy(&wzfriendlyname), core::mem::transmute_copy(&pcchactual)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -3959,8 +3959,8 @@ pub struct IWICMetadataHandlerInfo_Vtbl { pub trait IWICMetadataHandlerInfo_Impl: IWICComponentInfo_Impl { fn GetMetadataFormat(&self) -> windows_core::Result; fn GetContainerFormats(&self, ccontainerformats: u32, pguidcontainerformats: *mut windows_core::GUID, pcchactual: *mut u32) -> windows_core::Result<()>; - fn GetDeviceManufacturer(&self, cchdevicemanufacturer: u32, wzdevicemanufacturer: &windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::Result<()>; - fn GetDeviceModels(&self, cchdevicemodels: u32, wzdevicemodels: &windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::Result<()>; + fn GetDeviceManufacturer(&self, cchdevicemanufacturer: u32, wzdevicemanufacturer: windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::Result<()>; + fn GetDeviceModels(&self, cchdevicemodels: u32, wzdevicemodels: windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::Result<()>; fn DoesRequireFullStream(&self) -> windows_core::Result; fn DoesSupportPadding(&self) -> windows_core::Result; fn DoesRequireFixedSize(&self) -> windows_core::Result; @@ -3983,11 +3983,11 @@ impl IWICMetadataHandlerInfo_Vtbl { } unsafe extern "system" fn GetDeviceManufacturer(this: *mut core::ffi::c_void, cchdevicemanufacturer: u32, wzdevicemanufacturer: windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICMetadataHandlerInfo_Impl::GetDeviceManufacturer(this, core::mem::transmute_copy(&cchdevicemanufacturer), core::mem::transmute(&wzdevicemanufacturer), core::mem::transmute_copy(&pcchactual)).into() + IWICMetadataHandlerInfo_Impl::GetDeviceManufacturer(this, core::mem::transmute_copy(&cchdevicemanufacturer), core::mem::transmute_copy(&wzdevicemanufacturer), core::mem::transmute_copy(&pcchactual)).into() } unsafe extern "system" fn GetDeviceModels(this: *mut core::ffi::c_void, cchdevicemodels: u32, wzdevicemodels: windows_core::PWSTR, pcchactual: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICMetadataHandlerInfo_Impl::GetDeviceModels(this, core::mem::transmute_copy(&cchdevicemodels), core::mem::transmute(&wzdevicemodels), core::mem::transmute_copy(&pcchactual)).into() + IWICMetadataHandlerInfo_Impl::GetDeviceModels(this, core::mem::transmute_copy(&cchdevicemodels), core::mem::transmute_copy(&wzdevicemodels), core::mem::transmute_copy(&pcchactual)).into() } unsafe extern "system" fn DoesRequireFullStream(this: *mut core::ffi::c_void, pfrequiresfullstream: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4075,7 +4075,7 @@ pub struct IWICMetadataQueryReader_Vtbl { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub trait IWICMetadataQueryReader_Impl: windows_core::IUnknownImpl { fn GetContainerFormat(&self) -> windows_core::Result; - fn GetLocation(&self, cchmaxlength: u32, wznamespace: &windows_core::PWSTR, pcchactuallength: *mut u32) -> windows_core::Result<()>; + fn GetLocation(&self, cchmaxlength: u32, wznamespace: windows_core::PWSTR, pcchactuallength: *mut u32) -> windows_core::Result<()>; fn GetMetadataByName(&self, wzname: &windows_core::PCWSTR, pvarvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; fn GetEnumerator(&self) -> windows_core::Result; } @@ -4094,7 +4094,7 @@ impl IWICMetadataQueryReader_Vtbl { } unsafe extern "system" fn GetLocation(this: *mut core::ffi::c_void, cchmaxlength: u32, wznamespace: windows_core::PWSTR, pcchactuallength: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICMetadataQueryReader_Impl::GetLocation(this, core::mem::transmute_copy(&cchmaxlength), core::mem::transmute(&wznamespace), core::mem::transmute_copy(&pcchactuallength)).into() + IWICMetadataQueryReader_Impl::GetLocation(this, core::mem::transmute_copy(&cchmaxlength), core::mem::transmute_copy(&wznamespace), core::mem::transmute_copy(&pcchactuallength)).into() } unsafe extern "system" fn GetMetadataByName(this: *mut core::ffi::c_void, wzname: windows_core::PCWSTR, pvarvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> 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 0ba671c0fa..235bc10b0f 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ClrHosting/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ClrHosting/mod.rs @@ -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: 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<()>; + 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), 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() + ICLRMetaHostPolicy_Impl::GetRequestedRuntime(this, core::mem::transmute_copy(&dwpolicyflags), core::mem::transmute(&pwzbinary), core::mem::transmute_copy(&pcfgstream), core::mem::transmute_copy(&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:: } } 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 9148dde27d..f3b09c6b2e 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/mod.rs @@ -9207,8 +9207,8 @@ pub trait ITypeLib_Impl: windows_core::IUnknownImpl { fn GetLibAttr(&self) -> windows_core::Result<*mut TLIBATTR>; 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: windows_core::OutRef<'_, ITypeInfo>, rgmemid: *mut i32, pcfound: *mut u16) -> 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: windows_core::OutRef<'_, ITypeInfo>, rgmemid: *mut i32, pcfound: *mut u16) -> windows_core::Result<()>; fn ReleaseTLibAttr(&self, ptlibattr: *const TLIBATTR); } impl ITypeLib_Vtbl { @@ -9273,11 +9273,11 @@ impl ITypeLib_Vtbl { } unsafe extern "system" fn IsName(this: *mut core::ffi::c_void, sznamebuf: windows_core::PWSTR, lhashval: u32, pfname: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITypeLib_Impl::IsName(this, core::mem::transmute(&sznamebuf), core::mem::transmute_copy(&lhashval), core::mem::transmute_copy(&pfname)).into() + ITypeLib_Impl::IsName(this, core::mem::transmute_copy(&sznamebuf), core::mem::transmute_copy(&lhashval), core::mem::transmute_copy(&pfname)).into() } unsafe extern "system" fn FindName(this: *mut core::ffi::c_void, sznamebuf: windows_core::PWSTR, lhashval: u32, pptinfo: *mut *mut core::ffi::c_void, rgmemid: *mut i32, pcfound: *mut u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITypeLib_Impl::FindName(this, core::mem::transmute(&sznamebuf), core::mem::transmute_copy(&lhashval), core::mem::transmute_copy(&pptinfo), core::mem::transmute_copy(&rgmemid), core::mem::transmute_copy(&pcfound)).into() + ITypeLib_Impl::FindName(this, core::mem::transmute_copy(&sznamebuf), core::mem::transmute_copy(&lhashval), core::mem::transmute_copy(&pptinfo), core::mem::transmute_copy(&rgmemid), core::mem::transmute_copy(&pcfound)).into() } unsafe extern "system" fn ReleaseTLibAttr(this: *mut core::ffi::c_void, ptlibattr: *const TLIBATTR) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); 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 febee86bef..836c03cf05 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Contacts/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Contacts/mod.rs @@ -148,19 +148,19 @@ pub struct IContact_Vtbl { pub CommitChanges: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait IContact_Impl: windows_core::IUnknownImpl { - fn GetContactID(&self, pszcontactid: &windows_core::PWSTR, cchcontactid: u32, pdwcchcontactidrequired: *mut u32) -> windows_core::Result<()>; - fn GetPath(&self, pszpath: &windows_core::PWSTR, cchpath: u32, pdwcchpathrequired: *mut u32) -> windows_core::Result<()>; + fn GetContactID(&self, pszcontactid: windows_core::PWSTR, cchcontactid: u32, pdwcchcontactidrequired: *mut u32) -> windows_core::Result<()>; + fn GetPath(&self, pszpath: windows_core::PWSTR, cchpath: u32, pdwcchpathrequired: *mut u32) -> windows_core::Result<()>; fn CommitChanges(&self, dwcommitflags: u32) -> windows_core::Result<()>; } impl IContact_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetContactID(this: *mut core::ffi::c_void, pszcontactid: windows_core::PWSTR, cchcontactid: u32, pdwcchcontactidrequired: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IContact_Impl::GetContactID(this, core::mem::transmute(&pszcontactid), core::mem::transmute_copy(&cchcontactid), core::mem::transmute_copy(&pdwcchcontactidrequired)).into() + IContact_Impl::GetContactID(this, core::mem::transmute_copy(&pszcontactid), core::mem::transmute_copy(&cchcontactid), core::mem::transmute_copy(&pdwcchcontactidrequired)).into() } unsafe extern "system" fn GetPath(this: *mut core::ffi::c_void, pszpath: windows_core::PWSTR, cchpath: u32, pdwcchpathrequired: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IContact_Impl::GetPath(this, core::mem::transmute(&pszpath), core::mem::transmute_copy(&cchpath), core::mem::transmute_copy(&pdwcchpathrequired)).into() + IContact_Impl::GetPath(this, core::mem::transmute_copy(&pszpath), core::mem::transmute_copy(&cchpath), core::mem::transmute_copy(&pdwcchpathrequired)).into() } unsafe extern "system" fn CommitChanges(this: *mut core::ffi::c_void, dwcommitflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2449,15 +2449,15 @@ pub struct IContactProperties_Vtbl { } #[cfg(feature = "Win32_System_Com")] 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 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: 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 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: 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 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<()>; @@ -2468,7 +2468,7 @@ impl IContactProperties_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetString(this: *mut core::ffi::c_void, pszpropertyname: windows_core::PCWSTR, dwflags: u32, pszvalue: windows_core::PWSTR, cchvalue: u32, pdwcchpropertyvaluerequired: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IContactProperties_Impl::GetString(this, core::mem::transmute(&pszpropertyname), core::mem::transmute_copy(&dwflags), core::mem::transmute(&pszvalue), core::mem::transmute_copy(&cchvalue), core::mem::transmute_copy(&pdwcchpropertyvaluerequired)).into() + IContactProperties_Impl::GetString(this, core::mem::transmute(&pszpropertyname), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pszvalue), core::mem::transmute_copy(&cchvalue), core::mem::transmute_copy(&pdwcchpropertyvaluerequired)).into() } unsafe extern "system" fn GetDate(this: *mut core::ffi::c_void, pszpropertyname: windows_core::PCWSTR, dwflags: u32, pftdatetime: *mut super::super::Foundation::FILETIME) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2476,11 +2476,11 @@ impl IContactProperties_Vtbl { } unsafe extern "system" fn GetBinary(this: *mut core::ffi::c_void, pszpropertyname: windows_core::PCWSTR, dwflags: u32, pszcontenttype: windows_core::PWSTR, cchcontenttype: u32, pdwcchcontenttyperequired: *mut u32, ppstream: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IContactProperties_Impl::GetBinary(this, core::mem::transmute(&pszpropertyname), core::mem::transmute_copy(&dwflags), core::mem::transmute(&pszcontenttype), core::mem::transmute_copy(&cchcontenttype), core::mem::transmute_copy(&pdwcchcontenttyperequired), core::mem::transmute_copy(&ppstream)).into() + IContactProperties_Impl::GetBinary(this, core::mem::transmute(&pszpropertyname), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pszcontenttype), core::mem::transmute_copy(&cchcontenttype), core::mem::transmute_copy(&pdwcchcontenttyperequired), core::mem::transmute_copy(&ppstream)).into() } unsafe extern "system" fn GetLabels(this: *mut core::ffi::c_void, pszarrayelementname: windows_core::PCWSTR, dwflags: u32, pszlabels: windows_core::PWSTR, cchlabels: u32, pdwcchlabelsrequired: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IContactProperties_Impl::GetLabels(this, core::mem::transmute(&pszarrayelementname), core::mem::transmute_copy(&dwflags), core::mem::transmute(&pszlabels), core::mem::transmute_copy(&cchlabels), core::mem::transmute_copy(&pdwcchlabelsrequired)).into() + IContactProperties_Impl::GetLabels(this, core::mem::transmute(&pszarrayelementname), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pszlabels), core::mem::transmute_copy(&cchlabels), core::mem::transmute_copy(&pdwcchlabelsrequired)).into() } unsafe extern "system" fn SetString(this: *mut core::ffi::c_void, pszpropertyname: windows_core::PCWSTR, dwflags: u32, pszvalue: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2500,7 +2500,7 @@ impl IContactProperties_Vtbl { } unsafe extern "system" fn CreateArrayNode(this: *mut core::ffi::c_void, pszarrayname: windows_core::PCWSTR, dwflags: u32, fappend: super::super::Foundation::BOOL, psznewarrayelementname: windows_core::PWSTR, cchnewarrayelementname: u32, pdwcchnewarrayelementnamerequired: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IContactProperties_Impl::CreateArrayNode(this, core::mem::transmute(&pszarrayname), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&fappend), core::mem::transmute(&psznewarrayelementname), core::mem::transmute_copy(&cchnewarrayelementname), core::mem::transmute_copy(&pdwcchnewarrayelementnamerequired)).into() + IContactProperties_Impl::CreateArrayNode(this, core::mem::transmute(&pszarrayname), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&fappend), core::mem::transmute_copy(&psznewarrayelementname), core::mem::transmute_copy(&cchnewarrayelementname), core::mem::transmute_copy(&pdwcchnewarrayelementnamerequired)).into() } unsafe extern "system" fn DeleteProperty(this: *mut core::ffi::c_void, pszpropertyname: windows_core::PCWSTR, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2580,11 +2580,11 @@ pub struct IContactPropertyCollection_Vtbl { pub trait IContactPropertyCollection_Impl: windows_core::IUnknownImpl { fn Reset(&self) -> windows_core::Result<()>; fn Next(&self) -> windows_core::Result<()>; - fn GetPropertyName(&self, pszpropertyname: &windows_core::PWSTR, cchpropertyname: u32, pdwcchpropertynamerequired: *mut u32) -> windows_core::Result<()>; + fn GetPropertyName(&self, pszpropertyname: windows_core::PWSTR, cchpropertyname: u32, pdwcchpropertynamerequired: *mut u32) -> windows_core::Result<()>; fn GetPropertyType(&self, pdwtype: *mut u32) -> windows_core::Result<()>; fn GetPropertyVersion(&self, pdwversion: *mut u32) -> windows_core::Result<()>; fn GetPropertyModificationDate(&self, pftmodificationdate: *mut super::super::Foundation::FILETIME) -> windows_core::Result<()>; - fn GetPropertyArrayElementID(&self, pszarrayelementid: &windows_core::PWSTR, ccharrayelementid: u32, pdwccharrayelementidrequired: *mut u32) -> windows_core::Result<()>; + fn GetPropertyArrayElementID(&self, pszarrayelementid: windows_core::PWSTR, ccharrayelementid: u32, pdwccharrayelementidrequired: *mut u32) -> windows_core::Result<()>; } impl IContactPropertyCollection_Vtbl { pub const fn new() -> Self { @@ -2598,7 +2598,7 @@ impl IContactPropertyCollection_Vtbl { } unsafe extern "system" fn GetPropertyName(this: *mut core::ffi::c_void, pszpropertyname: windows_core::PWSTR, cchpropertyname: u32, pdwcchpropertynamerequired: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IContactPropertyCollection_Impl::GetPropertyName(this, core::mem::transmute(&pszpropertyname), core::mem::transmute_copy(&cchpropertyname), core::mem::transmute_copy(&pdwcchpropertynamerequired)).into() + IContactPropertyCollection_Impl::GetPropertyName(this, core::mem::transmute_copy(&pszpropertyname), core::mem::transmute_copy(&cchpropertyname), core::mem::transmute_copy(&pdwcchpropertynamerequired)).into() } unsafe extern "system" fn GetPropertyType(this: *mut core::ffi::c_void, pdwtype: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2614,7 +2614,7 @@ impl IContactPropertyCollection_Vtbl { } unsafe extern "system" fn GetPropertyArrayElementID(this: *mut core::ffi::c_void, pszarrayelementid: windows_core::PWSTR, ccharrayelementid: u32, pdwccharrayelementidrequired: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IContactPropertyCollection_Impl::GetPropertyArrayElementID(this, core::mem::transmute(&pszarrayelementid), core::mem::transmute_copy(&ccharrayelementid), core::mem::transmute_copy(&pdwccharrayelementidrequired)).into() + IContactPropertyCollection_Impl::GetPropertyArrayElementID(this, core::mem::transmute_copy(&pszarrayelementid), core::mem::transmute_copy(&ccharrayelementid), core::mem::transmute_copy(&pdwccharrayelementidrequired)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), 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 a8962357bb..3e8771366c 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 @@ -901,19 +901,19 @@ pub struct IActiveScriptEncode_Vtbl { pub GetEncodeProgId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IActiveScriptEncode_Impl: windows_core::IUnknownImpl { - fn EncodeSection(&self, pchin: &windows_core::PCWSTR, cchin: u32, pchout: &windows_core::PWSTR, cchout: u32, pcchret: *mut u32) -> windows_core::Result<()>; - fn DecodeScript(&self, pchin: &windows_core::PCWSTR, cchin: u32, pchout: &windows_core::PWSTR, cchout: u32, pcchret: *mut u32) -> windows_core::Result<()>; + fn EncodeSection(&self, pchin: &windows_core::PCWSTR, cchin: u32, pchout: windows_core::PWSTR, cchout: u32, pcchret: *mut u32) -> windows_core::Result<()>; + fn DecodeScript(&self, pchin: &windows_core::PCWSTR, cchin: u32, pchout: windows_core::PWSTR, cchout: u32, pcchret: *mut u32) -> windows_core::Result<()>; fn GetEncodeProgId(&self, pbstrout: *mut windows_core::BSTR) -> windows_core::Result<()>; } impl IActiveScriptEncode_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn EncodeSection(this: *mut core::ffi::c_void, pchin: windows_core::PCWSTR, cchin: u32, pchout: windows_core::PWSTR, cchout: u32, pcchret: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IActiveScriptEncode_Impl::EncodeSection(this, core::mem::transmute(&pchin), core::mem::transmute_copy(&cchin), core::mem::transmute(&pchout), core::mem::transmute_copy(&cchout), core::mem::transmute_copy(&pcchret)).into() + IActiveScriptEncode_Impl::EncodeSection(this, core::mem::transmute(&pchin), core::mem::transmute_copy(&cchin), core::mem::transmute_copy(&pchout), core::mem::transmute_copy(&cchout), core::mem::transmute_copy(&pcchret)).into() } unsafe extern "system" fn DecodeScript(this: *mut core::ffi::c_void, pchin: windows_core::PCWSTR, cchin: u32, pchout: windows_core::PWSTR, cchout: u32, pcchret: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IActiveScriptEncode_Impl::DecodeScript(this, core::mem::transmute(&pchin), core::mem::transmute_copy(&cchin), core::mem::transmute(&pchout), core::mem::transmute_copy(&cchout), core::mem::transmute_copy(&pcchret)).into() + IActiveScriptEncode_Impl::DecodeScript(this, core::mem::transmute(&pchin), core::mem::transmute_copy(&cchin), core::mem::transmute_copy(&pchout), core::mem::transmute_copy(&cchout), core::mem::transmute_copy(&pcchret)).into() } unsafe extern "system" fn GetEncodeProgId(this: *mut core::ffi::c_void, pbstrout: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5133,7 +5133,7 @@ pub struct IDebugDocumentHost_Vtbl { pub NotifyChanged: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDebugDocumentHost_Impl: windows_core::IUnknownImpl { - fn GetDeferredText(&self, dwtextstartcookie: u32, pchartext: &windows_core::PWSTR, pstatextattr: *mut u16, pcnumchars: *mut u32, cmaxchars: u32) -> windows_core::Result<()>; + fn GetDeferredText(&self, dwtextstartcookie: u32, pchartext: windows_core::PWSTR, pstatextattr: *mut u16, pcnumchars: *mut u32, cmaxchars: u32) -> windows_core::Result<()>; fn GetScriptTextAttributes(&self, pstrcode: &windows_core::PCWSTR, unumcodechars: u32, pstrdelimiter: &windows_core::PCWSTR, dwflags: u32, pattr: *mut u16) -> windows_core::Result<()>; fn OnCreateDocumentContext(&self) -> windows_core::Result; fn GetPathName(&self, pbstrlongname: *mut windows_core::BSTR, pfisoriginalfile: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()>; @@ -5144,7 +5144,7 @@ impl IDebugDocumentHost_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetDeferredText(this: *mut core::ffi::c_void, dwtextstartcookie: u32, pchartext: windows_core::PWSTR, pstatextattr: *mut u16, pcnumchars: *mut u32, cmaxchars: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugDocumentHost_Impl::GetDeferredText(this, core::mem::transmute_copy(&dwtextstartcookie), core::mem::transmute(&pchartext), core::mem::transmute_copy(&pstatextattr), core::mem::transmute_copy(&pcnumchars), core::mem::transmute_copy(&cmaxchars)).into() + IDebugDocumentHost_Impl::GetDeferredText(this, core::mem::transmute_copy(&dwtextstartcookie), core::mem::transmute_copy(&pchartext), core::mem::transmute_copy(&pstatextattr), core::mem::transmute_copy(&pcnumchars), core::mem::transmute_copy(&cmaxchars)).into() } unsafe extern "system" fn GetScriptTextAttributes(this: *mut core::ffi::c_void, pstrcode: windows_core::PCWSTR, unumcodechars: u32, pstrdelimiter: windows_core::PCWSTR, dwflags: u32, pattr: *mut u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5342,7 +5342,7 @@ pub trait IDebugDocumentText_Impl: IDebugDocument_Impl { fn GetSize(&self, pcnumlines: *mut u32, pcnumchars: *mut u32) -> windows_core::Result<()>; 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 GetText(&self, ccharacterposition: u32, pchartext: windows_core::PWSTR, pstatextattr: *mut u16, pcnumchars: *mut u32, cmaxchars: 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; } @@ -5378,7 +5378,7 @@ impl IDebugDocumentText_Vtbl { } unsafe extern "system" fn GetText(this: *mut core::ffi::c_void, ccharacterposition: u32, pchartext: windows_core::PWSTR, pstatextattr: *mut u16, pcnumchars: *mut u32, cmaxchars: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugDocumentText_Impl::GetText(this, core::mem::transmute_copy(&ccharacterposition), core::mem::transmute(&pchartext), core::mem::transmute_copy(&pstatextattr), core::mem::transmute_copy(&pcnumchars), core::mem::transmute_copy(&cmaxchars)).into() + IDebugDocumentText_Impl::GetText(this, core::mem::transmute_copy(&ccharacterposition), core::mem::transmute_copy(&pchartext), core::mem::transmute_copy(&pstatextattr), core::mem::transmute_copy(&pcnumchars), core::mem::transmute_copy(&cmaxchars)).into() } 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); 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 2bbfb91955..8e2a4d8175 100644 --- a/crates/libs/windows/src/Windows/Win32/System/DistributedTransactionCoordinator/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/DistributedTransactionCoordinator/mod.rs @@ -2290,7 +2290,7 @@ pub struct ITmNodeName_Vtbl { } pub trait ITmNodeName_Impl: windows_core::IUnknownImpl { fn GetNodeNameSize(&self) -> windows_core::Result; - fn GetNodeName(&self, cbnodenamebuffersize: u32, pnodenamebuffer: &windows_core::PWSTR) -> windows_core::Result<()>; + fn GetNodeName(&self, cbnodenamebuffersize: u32, pnodenamebuffer: windows_core::PWSTR) -> windows_core::Result<()>; } impl ITmNodeName_Vtbl { pub const fn new() -> Self { @@ -2306,7 +2306,7 @@ impl ITmNodeName_Vtbl { } unsafe extern "system" fn GetNodeName(this: *mut core::ffi::c_void, cbnodenamebuffersize: u32, pnodenamebuffer: windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITmNodeName_Impl::GetNodeName(this, core::mem::transmute_copy(&cbnodenamebuffersize), core::mem::transmute(&pnodenamebuffer)).into() + ITmNodeName_Impl::GetNodeName(this, core::mem::transmute_copy(&cbnodenamebuffersize), core::mem::transmute_copy(&pnodenamebuffer)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/System/Iis/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Iis/mod.rs index 75c92deaf5..06ea9af245 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Iis/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Iis/mod.rs @@ -1559,7 +1559,7 @@ pub trait IMSAdminBase2W_Impl: IMSAdminBaseW_Impl { fn Export(&self, pszpasswd: &windows_core::PCWSTR, pszfilename: &windows_core::PCWSTR, pszsourcepath: &windows_core::PCWSTR, dwmdflags: u32) -> windows_core::Result<()>; fn Import(&self, pszpasswd: &windows_core::PCWSTR, pszfilename: &windows_core::PCWSTR, pszsourcepath: &windows_core::PCWSTR, pszdestpath: &windows_core::PCWSTR, dwmdflags: u32) -> windows_core::Result<()>; fn RestoreHistory(&self, pszmdhistorylocation: &windows_core::PCWSTR, dwmdmajorversion: u32, dwmdminorversion: u32, dwmdflags: u32) -> windows_core::Result<()>; - fn EnumHistory(&self, pszmdhistorylocation: &windows_core::PWSTR, pdwmdmajorversion: *mut u32, pdwmdminorversion: *mut u32, pftmdhistorytime: *mut super::super::Foundation::FILETIME, dwmdenumindex: u32) -> windows_core::Result<()>; + fn EnumHistory(&self, pszmdhistorylocation: windows_core::PWSTR, pdwmdmajorversion: *mut u32, pdwmdminorversion: *mut u32, pftmdhistorytime: *mut super::super::Foundation::FILETIME, dwmdenumindex: u32) -> windows_core::Result<()>; } impl IMSAdminBase2W_Vtbl { pub const fn new() -> Self { @@ -1585,7 +1585,7 @@ impl IMSAdminBase2W_Vtbl { } unsafe extern "system" fn EnumHistory(this: *mut core::ffi::c_void, pszmdhistorylocation: windows_core::PWSTR, pdwmdmajorversion: *mut u32, pdwmdminorversion: *mut u32, pftmdhistorytime: *mut super::super::Foundation::FILETIME, dwmdenumindex: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSAdminBase2W_Impl::EnumHistory(this, core::mem::transmute(&pszmdhistorylocation), core::mem::transmute_copy(&pdwmdmajorversion), core::mem::transmute_copy(&pdwmdminorversion), core::mem::transmute_copy(&pftmdhistorytime), core::mem::transmute_copy(&dwmdenumindex)).into() + IMSAdminBase2W_Impl::EnumHistory(this, core::mem::transmute_copy(&pszmdhistorylocation), core::mem::transmute_copy(&pdwmdmajorversion), core::mem::transmute_copy(&pdwmdminorversion), core::mem::transmute_copy(&pftmdhistorytime), core::mem::transmute_copy(&dwmdenumindex)).into() } Self { base__: IMSAdminBaseW_Vtbl::new::(), @@ -1624,13 +1624,13 @@ pub struct IMSAdminBase3W_Vtbl { pub GetChildPaths: unsafe extern "system" fn(*mut core::ffi::c_void, u32, windows_core::PCWSTR, u32, windows_core::PWSTR, *mut u32) -> windows_core::HRESULT, } pub trait IMSAdminBase3W_Impl: IMSAdminBase2W_Impl { - fn GetChildPaths(&self, hmdhandle: u32, pszmdpath: &windows_core::PCWSTR, cchmdbuffersize: u32, pszbuffer: &windows_core::PWSTR, pcchmdrequiredbuffersize: *mut u32) -> windows_core::Result<()>; + fn GetChildPaths(&self, hmdhandle: u32, pszmdpath: &windows_core::PCWSTR, cchmdbuffersize: u32, pszbuffer: windows_core::PWSTR, pcchmdrequiredbuffersize: *mut u32) -> windows_core::Result<()>; } impl IMSAdminBase3W_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetChildPaths(this: *mut core::ffi::c_void, hmdhandle: u32, pszmdpath: windows_core::PCWSTR, cchmdbuffersize: u32, pszbuffer: windows_core::PWSTR, pcchmdrequiredbuffersize: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSAdminBase3W_Impl::GetChildPaths(this, core::mem::transmute_copy(&hmdhandle), core::mem::transmute(&pszmdpath), core::mem::transmute_copy(&cchmdbuffersize), core::mem::transmute(&pszbuffer), core::mem::transmute_copy(&pcchmdrequiredbuffersize)).into() + IMSAdminBase3W_Impl::GetChildPaths(this, core::mem::transmute_copy(&hmdhandle), core::mem::transmute(&pszmdpath), core::mem::transmute_copy(&cchmdbuffersize), core::mem::transmute_copy(&pszbuffer), core::mem::transmute_copy(&pcchmdrequiredbuffersize)).into() } Self { base__: IMSAdminBase2W_Vtbl::new::(), GetChildPaths: GetChildPaths:: } } @@ -1911,7 +1911,7 @@ pub trait IMSAdminBaseW_Impl: windows_core::IUnknownImpl { fn KeyExchangePhase2(&self) -> windows_core::Result<()>; fn Backup(&self, pszmdbackuplocation: &windows_core::PCWSTR, dwmdversion: u32, dwmdflags: u32) -> windows_core::Result<()>; fn Restore(&self, pszmdbackuplocation: &windows_core::PCWSTR, dwmdversion: u32, dwmdflags: u32) -> windows_core::Result<()>; - fn EnumBackups(&self, pszmdbackuplocation: &windows_core::PWSTR, pdwmdversion: *mut u32, pftmdbackuptime: *mut super::super::Foundation::FILETIME, dwmdenumindex: u32) -> windows_core::Result<()>; + fn EnumBackups(&self, pszmdbackuplocation: windows_core::PWSTR, pdwmdversion: *mut u32, pftmdbackuptime: *mut super::super::Foundation::FILETIME, dwmdenumindex: u32) -> windows_core::Result<()>; fn DeleteBackup(&self, pszmdbackuplocation: &windows_core::PCWSTR, dwmdversion: u32) -> windows_core::Result<()>; fn UnmarshalInterface(&self) -> windows_core::Result; fn GetServerGuid(&self) -> windows_core::Result<()>; @@ -2052,7 +2052,7 @@ impl IMSAdminBaseW_Vtbl { } unsafe extern "system" fn EnumBackups(this: *mut core::ffi::c_void, pszmdbackuplocation: windows_core::PWSTR, pdwmdversion: *mut u32, pftmdbackuptime: *mut super::super::Foundation::FILETIME, dwmdenumindex: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSAdminBaseW_Impl::EnumBackups(this, core::mem::transmute(&pszmdbackuplocation), core::mem::transmute_copy(&pdwmdversion), core::mem::transmute_copy(&pftmdbackuptime), core::mem::transmute_copy(&dwmdenumindex)).into() + IMSAdminBaseW_Impl::EnumBackups(this, core::mem::transmute_copy(&pszmdbackuplocation), core::mem::transmute_copy(&pdwmdversion), core::mem::transmute_copy(&pftmdbackuptime), core::mem::transmute_copy(&dwmdenumindex)).into() } unsafe extern "system" fn DeleteBackup(this: *mut core::ffi::c_void, pszmdbackuplocation: windows_core::PCWSTR, dwmdversion: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2129,13 +2129,13 @@ pub struct IMSImpExpHelpW_Vtbl { pub EnumeratePathsInFile: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, windows_core::PCWSTR, u32, windows_core::PWSTR, *mut u32) -> windows_core::HRESULT, } pub trait IMSImpExpHelpW_Impl: windows_core::IUnknownImpl { - fn EnumeratePathsInFile(&self, pszfilename: &windows_core::PCWSTR, pszkeytype: &windows_core::PCWSTR, dwmdbuffersize: u32, pszbuffer: &windows_core::PWSTR, pdwmdrequiredbuffersize: *mut u32) -> windows_core::Result<()>; + fn EnumeratePathsInFile(&self, pszfilename: &windows_core::PCWSTR, pszkeytype: &windows_core::PCWSTR, dwmdbuffersize: u32, pszbuffer: windows_core::PWSTR, pdwmdrequiredbuffersize: *mut u32) -> windows_core::Result<()>; } impl IMSImpExpHelpW_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn EnumeratePathsInFile(this: *mut core::ffi::c_void, pszfilename: windows_core::PCWSTR, pszkeytype: windows_core::PCWSTR, dwmdbuffersize: u32, pszbuffer: windows_core::PWSTR, pdwmdrequiredbuffersize: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSImpExpHelpW_Impl::EnumeratePathsInFile(this, core::mem::transmute(&pszfilename), core::mem::transmute(&pszkeytype), core::mem::transmute_copy(&dwmdbuffersize), core::mem::transmute(&pszbuffer), core::mem::transmute_copy(&pdwmdrequiredbuffersize)).into() + IMSImpExpHelpW_Impl::EnumeratePathsInFile(this, core::mem::transmute(&pszfilename), core::mem::transmute(&pszkeytype), core::mem::transmute_copy(&dwmdbuffersize), core::mem::transmute_copy(&pszbuffer), core::mem::transmute_copy(&pdwmdrequiredbuffersize)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), EnumeratePathsInFile: EnumeratePathsInFile:: } } 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 6b273d1f64..fd4b728592 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 @@ -3913,9 +3913,9 @@ pub struct IFEDictionary_Vtbl { pub ConvertFromUserToSys: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IFEDictionary_Impl: windows_core::IUnknownImpl { - fn Open(&self, pchdictpath: &windows_core::PSTR, pshf: *mut IMESHF) -> windows_core::Result<()>; + fn Open(&self, pchdictpath: windows_core::PSTR, pshf: *mut IMESHF) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; - fn GetHeader(&self, pchdictpath: &windows_core::PSTR, pshf: *mut IMESHF, pjfmt: *mut IMEFMT, pultype: *mut u32) -> windows_core::Result<()>; + fn GetHeader(&self, pchdictpath: windows_core::PSTR, pshf: *mut IMESHF, pjfmt: *mut IMEFMT, pultype: *mut u32) -> windows_core::Result<()>; fn DisplayProperty(&self, hwnd: super::super::super::Foundation::HWND) -> windows_core::Result<()>; fn GetPosTable(&self, prgpostbl: *mut *mut POSTBL, pcpostbl: *mut i32) -> windows_core::Result<()>; fn GetWords(&self, pwchfirst: &windows_core::PCWSTR, pwchlast: &windows_core::PCWSTR, pwchdisplay: &windows_core::PCWSTR, ulpos: u32, ulselect: u32, ulwordsrc: u32, pchbuffer: *mut u8, cbbuffer: u32, pcwrd: *mut u32) -> windows_core::Result<()>; @@ -3935,7 +3935,7 @@ impl IFEDictionary_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Open(this: *mut core::ffi::c_void, pchdictpath: windows_core::PSTR, pshf: *mut IMESHF) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFEDictionary_Impl::Open(this, core::mem::transmute(&pchdictpath), core::mem::transmute_copy(&pshf)).into() + IFEDictionary_Impl::Open(this, core::mem::transmute_copy(&pchdictpath), core::mem::transmute_copy(&pshf)).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); @@ -3943,7 +3943,7 @@ impl IFEDictionary_Vtbl { } unsafe extern "system" fn GetHeader(this: *mut core::ffi::c_void, pchdictpath: windows_core::PSTR, pshf: *mut IMESHF, pjfmt: *mut IMEFMT, pultype: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFEDictionary_Impl::GetHeader(this, core::mem::transmute(&pchdictpath), core::mem::transmute_copy(&pshf), core::mem::transmute_copy(&pjfmt), core::mem::transmute_copy(&pultype)).into() + IFEDictionary_Impl::GetHeader(this, core::mem::transmute_copy(&pchdictpath), core::mem::transmute_copy(&pshf), core::mem::transmute_copy(&pjfmt), core::mem::transmute_copy(&pultype)).into() } unsafe extern "system" fn DisplayProperty(this: *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); 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 47c3688a15..ad9d9d88bb 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Shell/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Shell/mod.rs @@ -42980,7 +42980,7 @@ pub trait ITransferAdviseSink_Impl: windows_core::IUnknownImpl { fn UpdateTransferState(&self, ts: u32) -> 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 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<()>; } @@ -43004,7 +43004,7 @@ impl ITransferAdviseSink_Vtbl { } 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, core::mem::transmute_copy(&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_copy(&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);