diff --git a/crates/libs/bindgen/src/types/cpp_interface.rs b/crates/libs/bindgen/src/types/cpp_interface.rs index da8c6b179e..622f93c296 100644 --- a/crates/libs/bindgen/src/types/cpp_interface.rs +++ b/crates/libs/bindgen/src/types/cpp_interface.rs @@ -369,20 +369,17 @@ impl CppInterface { } } } - #[cfg(feature = "std")] #cfg struct #implvtbl_ident (core::marker::PhantomData); - #[cfg(feature = "std")] #cfg impl #implvtbl_ident { const VTABLE: #vtbl_name = #vtbl_name::new::(); } - #[cfg(feature = "std")] #cfg impl #name { pub fn new<'a, T: #impl_name>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &#implvtbl_ident::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } diff --git a/crates/libs/bindgen/src/types/delegate.rs b/crates/libs/bindgen/src/types/delegate.rs index fc7a2f99fb..1f957e6f9e 100644 --- a/crates/libs/bindgen/src/types/delegate.rs +++ b/crates/libs/bindgen/src/types/delegate.rs @@ -101,7 +101,7 @@ impl Delegate { invoke, }; unsafe { - core::mem::transmute(Box::new(com)) + core::mem::transmute(windows_core::imp::Box::new(com)) } } #invoke @@ -158,7 +158,7 @@ impl Delegate { let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Background/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Background/mod.rs index dae69c05e7..d3dfdc4934 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Background/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Background/mod.rs @@ -584,7 +584,7 @@ impl windows_core::RuntimeType for BackgroundTaskCanceledEventHandler { impl BackgroundTaskCanceledEventHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, reason: BackgroundTaskCancellationReason) -> windows_core::Result<()> where @@ -628,7 +628,7 @@ impl, BackgroundTaskCancellationReason let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -696,7 +696,7 @@ impl windows_core::RuntimeType for BackgroundTaskCompletedEventHandler { impl BackgroundTaskCompletedEventHandler { pub fn new, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, args: P1) -> windows_core::Result<()> where @@ -741,7 +741,7 @@ impl, Option<&BackgroundTaskComplet let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -811,7 +811,7 @@ impl windows_core::RuntimeType for BackgroundTaskProgressEventHandler { impl BackgroundTaskProgressEventHandler { pub fn new, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, args: P1) -> windows_core::Result<()> where @@ -856,7 +856,7 @@ impl, Option<&BackgroundTaskProgres let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/mod.rs index 1dec51a799..abd6f9306f 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/mod.rs @@ -1160,7 +1160,7 @@ impl windows_core::RuntimeType for DataProviderHandler { impl DataProviderHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, request: P0) -> windows_core::Result<()> where @@ -1204,7 +1204,7 @@ impl) -> windows_core::Result<()> + Send + let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -2274,7 +2274,7 @@ impl windows_core::RuntimeType for ShareProviderHandler { impl ShareProviderHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, operation: P0) -> windows_core::Result<()> where @@ -2318,7 +2318,7 @@ impl) -> windows_core::Result<()> + Sen let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Payments/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Payments/mod.rs index 2c823822d3..649c6e87e6 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Payments/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Payments/mod.rs @@ -1431,7 +1431,7 @@ impl windows_core::RuntimeType for PaymentRequestChangedHandler { impl PaymentRequestChangedHandler { pub fn new, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, paymentrequest: P0, args: P1) -> windows_core::Result<()> where @@ -1476,7 +1476,7 @@ impl, Option<&PaymentRequestChangedArgs>) -> wi let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/Data/Text/mod.rs b/crates/libs/windows/src/Windows/Data/Text/mod.rs index d39be272b6..e2df145e96 100644 --- a/crates/libs/windows/src/Windows/Data/Text/mod.rs +++ b/crates/libs/windows/src/Windows/Data/Text/mod.rs @@ -355,7 +355,7 @@ impl windows_core::RuntimeType for SelectableWordSegmentsTokenizingHandler { impl SelectableWordSegmentsTokenizingHandler { pub fn new>, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, precedingwords: P0, words: P1) -> windows_core::Result<()> where @@ -403,7 +403,7 @@ impl>, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, precedingwords: P0, words: P1) -> windows_core::Result<()> where @@ -1082,7 +1082,7 @@ impl, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, request: P1) -> windows_core::Result<()> where @@ -2941,7 +2941,7 @@ impl, Option<&SmartCardPinResetRequest>) let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/Devices/Sms/mod.rs b/crates/libs/windows/src/Windows/Devices/Sms/mod.rs index 044c774f50..50febd76ca 100644 --- a/crates/libs/windows/src/Windows/Devices/Sms/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Sms/mod.rs @@ -2193,7 +2193,7 @@ impl windows_core::RuntimeType for SmsDeviceStatusChangedEventHandler { impl SmsDeviceStatusChangedEventHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0) -> windows_core::Result<()> where @@ -2240,7 +2240,7 @@ impl) -> windows_core::Result<()> + Send + 'static> let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -2574,7 +2574,7 @@ impl windows_core::RuntimeType for SmsMessageReceivedEventHandler { impl SmsMessageReceivedEventHandler { pub fn new, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, e: P1) -> windows_core::Result<()> where @@ -2622,7 +2622,7 @@ impl, Option<&SmsMessageReceivedEventArgs>) -> windo let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/Foundation/Collections/mod.rs b/crates/libs/windows/src/Windows/Foundation/Collections/mod.rs index 17ac361134..a7d2d791ba 100644 --- a/crates/libs/windows/src/Windows/Foundation/Collections/mod.rs +++ b/crates/libs/windows/src/Windows/Foundation/Collections/mod.rs @@ -1698,7 +1698,7 @@ impl MapChangedEventHandler { pub fn new>, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, event: P1) -> windows_core::Result<()> where @@ -1758,7 +1758,7 @@ impl windows_core::RuntimeType for Vecto impl VectorChangedEventHandler { pub fn new>, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, event: P1) -> windows_core::Result<()> where @@ -2156,7 +2156,7 @@ impl, 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, asyncinfo: P0, asyncstatus: AsyncStatus) -> windows_core::Result<()> where @@ -57,7 +57,7 @@ impl, AsyncStatus) -> windows_core::Result<()> + let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -81,7 +81,7 @@ impl windows_core::RuntimeType f impl AsyncActionProgressHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, asyncinfo: P0, progressinfo: P1) -> windows_core::Result<()> where @@ -137,7 +137,7 @@ impl windows_core::RuntimeType f impl AsyncActionWithProgressCompletedHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, asyncinfo: P0, asyncstatus: AsyncStatus) -> windows_core::Result<()> where @@ -216,7 +216,7 @@ impl windows_core::RuntimeType for impl AsyncOperationCompletedHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, asyncinfo: P0, asyncstatus: AsyncStatus) -> windows_core::Result<()> where @@ -295,7 +295,7 @@ impl AsyncOperationProgressHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, asyncinfo: P0, progressinfo: P1) -> windows_core::Result<()> where @@ -380,7 +380,7 @@ impl AsyncOperationWithProgressCompletedHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, asyncinfo: P0, asyncstatus: AsyncStatus) -> windows_core::Result<()> where @@ -464,7 +464,7 @@ impl windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = DeferralCompletedHandlerBox { vtable: &DeferralCompletedHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; - unsafe { core::mem::transmute(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self) -> windows_core::Result<()> { let this = self; @@ -587,7 +587,7 @@ impl windows_core::Result<()> + Send + 'static> DeferralCompletedH let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -611,7 +611,7 @@ impl windows_core::RuntimeType for Event impl EventHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, args: P1) -> windows_core::Result<()> where @@ -667,7 +667,7 @@ impl TypedEventHandler { pub fn new>::Default, &>::Default) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = TypedEventHandlerBox { vtable: &TypedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; - unsafe { core::mem::transmute(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, args: P1) -> windows_core::Result<()> where @@ -3552,7 +3552,7 @@ impl) -> 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, game: P0) -> windows_core::Result<()> where @@ -147,7 +147,7 @@ impl) -> windows_core::Result<()> + Send + 'stat let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -298,7 +298,7 @@ impl windows_core::RuntimeType for GameListRemovedEventHandler { impl GameListRemovedEventHandler { pub fn new windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = GameListRemovedEventHandlerBox { vtable: &GameListRemovedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; - unsafe { core::mem::transmute(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, identifier: &windows_core::HSTRING) -> windows_core::Result<()> { let this = self; @@ -339,7 +339,7 @@ impl windows_core::Result<()> + Send + 'stat let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/Graphics/Display/mod.rs b/crates/libs/windows/src/Windows/Graphics/Display/mod.rs index e689370ab6..df88f95b06 100644 --- a/crates/libs/windows/src/Windows/Graphics/Display/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Display/mod.rs @@ -1012,7 +1012,7 @@ impl windows_core::RuntimeType for DisplayPropertiesEventHandler { impl DisplayPropertiesEventHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0) -> windows_core::Result<()> where @@ -1059,7 +1059,7 @@ impl) -> windows_core::Result<()> + let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/Graphics/Printing/mod.rs b/crates/libs/windows/src/Windows/Graphics/Printing/mod.rs index 3889938b99..3908d78e2d 100644 --- a/crates/libs/windows/src/Windows/Graphics/Printing/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Printing/mod.rs @@ -2004,7 +2004,7 @@ impl windows_core::RuntimeType for PrintTaskSourceRequestedHandler { impl PrintTaskSourceRequestedHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, args: P0) -> windows_core::Result<()> where @@ -2048,7 +2048,7 @@ impl) -> windows_core::Result<()> let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/Graphics/Printing3D/mod.rs b/crates/libs/windows/src/Windows/Graphics/Printing3D/mod.rs index e4e6ca678a..a7bc358e71 100644 --- a/crates/libs/windows/src/Windows/Graphics/Printing3D/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Printing3D/mod.rs @@ -887,7 +887,7 @@ impl windows_core::RuntimeType for Print3DTaskSourceRequestedHandler { impl Print3DTaskSourceRequestedHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, args: P0) -> windows_core::Result<()> where @@ -931,7 +931,7 @@ impl) -> windows_core::Result<( let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/Management/Setup/mod.rs b/crates/libs/windows/src/Windows/Management/Setup/mod.rs index fb5e902a12..b1f4c6e452 100644 --- a/crates/libs/windows/src/Windows/Management/Setup/mod.rs +++ b/crates/libs/windows/src/Windows/Management/Setup/mod.rs @@ -168,7 +168,7 @@ impl windows_core::RuntimeType for DeploymentSessionHeartbeatRequested { impl DeploymentSessionHeartbeatRequested { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, eventargs: P0) -> windows_core::Result<()> where @@ -212,7 +212,7 @@ impl) -> windows_ let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/Media/Capture/mod.rs b/crates/libs/windows/src/Windows/Media/Capture/mod.rs index da2df2a973..125999e196 100644 --- a/crates/libs/windows/src/Windows/Media/Capture/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Capture/mod.rs @@ -7027,7 +7027,7 @@ impl windows_core::RuntimeType for MediaCaptureFailedEventHandler { impl MediaCaptureFailedEventHandler { pub fn new, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, erroreventargs: P1) -> windows_core::Result<()> where @@ -7072,7 +7072,7 @@ impl, Option<&MediaCaptureFailedEventArgs>) -> wi let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -7968,7 +7968,7 @@ impl windows_core::RuntimeType for RecordLimitationExceededEventHandler { impl RecordLimitationExceededEventHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0) -> windows_core::Result<()> where @@ -8012,7 +8012,7 @@ impl) -> windows_core::Result<()> + Send + 'stati let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/Media/Devices/mod.rs b/crates/libs/windows/src/Windows/Media/Devices/mod.rs index b7881f894c..5753266c2a 100644 --- a/crates/libs/windows/src/Windows/Media/Devices/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Devices/mod.rs @@ -506,7 +506,7 @@ impl windows_core::RuntimeType for CallControlEventHandler { impl CallControlEventHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0) -> windows_core::Result<()> where @@ -550,7 +550,7 @@ impl) -> windows_core::Result<()> + Send + 'static let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -847,7 +847,7 @@ impl windows_core::RuntimeType for DialRequestedEventHandler { impl DialRequestedEventHandler { pub fn new, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, e: P1) -> windows_core::Result<()> where @@ -892,7 +892,7 @@ impl, Option<&DialRequestedEventArgs>) -> windows_ let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -3078,7 +3078,7 @@ impl windows_core::RuntimeType for KeypadPressedEventHandler { impl KeypadPressedEventHandler { pub fn new, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, e: P1) -> windows_core::Result<()> where @@ -3123,7 +3123,7 @@ impl, Option<&KeypadPressedEventArgs>) -> windows_ let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -3766,7 +3766,7 @@ impl windows_core::RuntimeType for RedialRequestedEventHandler { impl RedialRequestedEventHandler { pub fn new, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, e: P1) -> windows_core::Result<()> where @@ -3811,7 +3811,7 @@ impl, Option<&RedialRequestedEventArgs>) -> window let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/Media/Protection/mod.rs b/crates/libs/windows/src/Windows/Media/Protection/mod.rs index 9d79f91a49..1dfd0f3d78 100644 --- a/crates/libs/windows/src/Windows/Media/Protection/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Protection/mod.rs @@ -39,7 +39,7 @@ impl windows_core::RuntimeType for ComponentLoadFailedEventHandler { impl ComponentLoadFailedEventHandler { pub fn new, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, e: P1) -> windows_core::Result<()> where @@ -84,7 +84,7 @@ impl, Option<&ComponentLoadFailedEventA let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -618,7 +618,7 @@ impl windows_core::RuntimeType for RebootNeededEventHandler { impl RebootNeededEventHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0) -> windows_core::Result<()> where @@ -662,7 +662,7 @@ impl) -> windows_core::Result<()> + Sen let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -872,7 +872,7 @@ impl windows_core::RuntimeType for ServiceRequestedEventHandler { impl ServiceRequestedEventHandler { pub fn new, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, e: P1) -> windows_core::Result<()> where @@ -917,7 +917,7 @@ impl, Option<&ServiceRequestedEventArgs let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/Networking/Connectivity/mod.rs b/crates/libs/windows/src/Windows/Networking/Connectivity/mod.rs index 061c7b7d2f..60b455480e 100644 --- a/crates/libs/windows/src/Windows/Networking/Connectivity/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/Connectivity/mod.rs @@ -1801,7 +1801,7 @@ impl windows_core::RuntimeType for NetworkStatusChangedEventHandler { impl NetworkStatusChangedEventHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0) -> windows_core::Result<()> where @@ -1845,7 +1845,7 @@ impl) -> windows_core::Result<()> + let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/Networking/Proximity/mod.rs b/crates/libs/windows/src/Windows/Networking/Proximity/mod.rs index a0dc4a37e1..2821d0e368 100644 --- a/crates/libs/windows/src/Windows/Networking/Proximity/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/Proximity/mod.rs @@ -30,7 +30,7 @@ impl windows_core::RuntimeType for DeviceArrivedEventHandler { impl DeviceArrivedEventHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0) -> windows_core::Result<()> where @@ -74,7 +74,7 @@ impl) -> windows_core::Result<()> + Send + 'st let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -90,7 +90,7 @@ impl windows_core::RuntimeType for DeviceDepartedEventHandler { impl DeviceDepartedEventHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0) -> windows_core::Result<()> where @@ -134,7 +134,7 @@ impl) -> windows_core::Result<()> + Send + 'st let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -337,7 +337,7 @@ impl windows_core::RuntimeType for MessageReceivedHandler { impl MessageReceivedHandler { pub fn new, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, message: P1) -> windows_core::Result<()> where @@ -382,7 +382,7 @@ impl, Option<&ProximityMessage>) -> windows_co let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -398,7 +398,7 @@ impl windows_core::RuntimeType for MessageTransmittedHandler { impl MessageTransmittedHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, messageid: i64) -> windows_core::Result<()> where @@ -442,7 +442,7 @@ impl, i64) -> windows_core::Result<()> + Send let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/Security/Isolation/mod.rs b/crates/libs/windows/src/Windows/Security/Isolation/mod.rs index 3fd6e548dc..4c61947960 100644 --- a/crates/libs/windows/src/Windows/Security/Isolation/mod.rs +++ b/crates/libs/windows/src/Windows/Security/Isolation/mod.rs @@ -8,7 +8,7 @@ impl windows_core::RuntimeType for HostMessageReceivedCallback { impl HostMessageReceivedCallback { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, receiverid: windows_core::GUID, message: P1) -> windows_core::Result<()> where @@ -55,7 +55,7 @@ impl>) -> 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, receiverid: windows_core::GUID, message: P1) -> windows_core::Result<()> where @@ -2418,7 +2418,7 @@ impl) -> 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, args: P0) -> windows_core::Result<()> where @@ -1944,7 +1944,7 @@ impl) -> windows_cor let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/Storage/mod.rs b/crates/libs/windows/src/Windows/Storage/mod.rs index b75da213d3..ce3dd81807 100644 --- a/crates/libs/windows/src/Windows/Storage/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/mod.rs @@ -620,7 +620,7 @@ impl windows_core::RuntimeType for ApplicationDataSetVersionHandler { impl ApplicationDataSetVersionHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, setversionrequest: P0) -> windows_core::Result<()> where @@ -664,7 +664,7 @@ impl) -> windows_core::Result<()> + Send + ' let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -5572,7 +5572,7 @@ impl windows_core::RuntimeType for StreamedFileDataRequestedHandler { impl StreamedFileDataRequestedHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, stream: P0) -> windows_core::Result<()> where @@ -5619,7 +5619,7 @@ impl) -> windows_core::Result<()> + Se let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/System/RemoteDesktop/Input/mod.rs b/crates/libs/windows/src/Windows/System/RemoteDesktop/Input/mod.rs index 18db10eb16..07855f96ad 100644 --- a/crates/libs/windows/src/Windows/System/RemoteDesktop/Input/mod.rs +++ b/crates/libs/windows/src/Windows/System/RemoteDesktop/Input/mod.rs @@ -170,7 +170,7 @@ impl windows_core::RuntimeType for RemoteTextConnectionDataHandler { impl RemoteTextConnectionDataHandler { pub fn new windows_core::Result + Send + 'static>(invoke: F) -> Self { let com = RemoteTextConnectionDataHandlerBox { vtable: &RemoteTextConnectionDataHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; - unsafe { core::mem::transmute(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, pdudata: &[u8]) -> windows_core::Result { let this = self; @@ -214,7 +214,7 @@ impl windows_core::Result + Send + 'static> RemoteTextC let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } 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 4ef06959e4..aabaeec4f5 100644 --- a/crates/libs/windows/src/Windows/System/Threading/Core/mod.rs +++ b/crates/libs/windows/src/Windows/System/Threading/Core/mod.rs @@ -103,7 +103,7 @@ impl windows_core::RuntimeType for SignalHandler { impl SignalHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, signalnotifier: P0, timedout: bool) -> windows_core::Result<()> where @@ -147,7 +147,7 @@ impl, bool) -> windows_core::Result<()> + Send let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/System/Threading/mod.rs b/crates/libs/windows/src/Windows/System/Threading/mod.rs index ffcd2795e7..651b36c1f2 100644 --- a/crates/libs/windows/src/Windows/System/Threading/mod.rs +++ b/crates/libs/windows/src/Windows/System/Threading/mod.rs @@ -156,7 +156,7 @@ impl windows_core::RuntimeType for TimerDestroyedHandler { impl TimerDestroyedHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, timer: P0) -> windows_core::Result<()> where @@ -200,7 +200,7 @@ impl) -> windows_core::Result<()> + Send + 'st let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -216,7 +216,7 @@ impl windows_core::RuntimeType for TimerElapsedHandler { impl TimerElapsedHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, timer: P0) -> windows_core::Result<()> where @@ -260,7 +260,7 @@ impl) -> windows_core::Result<()> + Send + 'st let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -276,7 +276,7 @@ impl windows_core::RuntimeType for WorkItemHandler { impl WorkItemHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, operation: P0) -> windows_core::Result<()> where @@ -320,7 +320,7 @@ impl) -> windows_core:: let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/System/mod.rs b/crates/libs/windows/src/Windows/System/mod.rs index 6ed93196ad..68e33c020b 100644 --- a/crates/libs/windows/src/Windows/System/mod.rs +++ b/crates/libs/windows/src/Windows/System/mod.rs @@ -1216,7 +1216,7 @@ impl windows_core::RuntimeType for DispatcherQueueHandler { impl DispatcherQueueHandler { pub fn new windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = DispatcherQueueHandlerBox { vtable: &DispatcherQueueHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; - unsafe { core::mem::transmute(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self) -> windows_core::Result<()> { let this = self; @@ -1257,7 +1257,7 @@ impl windows_core::Result<()> + Send + 'static> DispatcherQueueHan let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/UI/ApplicationSettings/mod.rs b/crates/libs/windows/src/Windows/UI/ApplicationSettings/mod.rs index 8f69818fd0..5af2a64e4a 100644 --- a/crates/libs/windows/src/Windows/UI/ApplicationSettings/mod.rs +++ b/crates/libs/windows/src/Windows/UI/ApplicationSettings/mod.rs @@ -238,7 +238,7 @@ impl windows_core::RuntimeType for CredentialCommandCredentialDeletedHandler { impl CredentialCommandCredentialDeletedHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, command: P0) -> windows_core::Result<()> where @@ -282,7 +282,7 @@ impl) -> windows_core::Result<()> + Send + ' let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -917,7 +917,7 @@ impl windows_core::RuntimeType for WebAccountCommandInvokedHandler { impl WebAccountCommandInvokedHandler { pub fn new, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, command: P0, args: P1) -> windows_core::Result<()> where @@ -962,7 +962,7 @@ impl, Option<&WebAccountInvokedArgs>) -> win let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -1047,7 +1047,7 @@ impl windows_core::RuntimeType for WebAccountProviderCommandInvokedHandler { impl WebAccountProviderCommandInvokedHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, command: P0) -> windows_core::Result<()> where @@ -1091,7 +1091,7 @@ impl) -> windows_core::Result<()> + let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/UI/Core/mod.rs b/crates/libs/windows/src/Windows/UI/Core/mod.rs index d3a2e9f724..71478c0c3e 100644 --- a/crates/libs/windows/src/Windows/UI/Core/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Core/mod.rs @@ -2205,7 +2205,7 @@ impl windows_core::RuntimeType for DispatchedHandler { impl DispatchedHandler { pub fn new windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = DispatchedHandlerBox { vtable: &DispatchedHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; - unsafe { core::mem::transmute(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self) -> windows_core::Result<()> { let this = self; @@ -2246,7 +2246,7 @@ impl windows_core::Result<()> + Send + 'static> DispatchedHandlerB let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -4658,7 +4658,7 @@ impl windows_core::RuntimeType for IdleDispatchedHandler { impl IdleDispatchedHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, e: P0) -> windows_core::Result<()> where @@ -4702,7 +4702,7 @@ impl) -> windows_core::Result<()> + let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/UI/Popups/mod.rs b/crates/libs/windows/src/Windows/UI/Popups/mod.rs index 1cc6d79b2e..8123b61423 100644 --- a/crates/libs/windows/src/Windows/UI/Popups/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Popups/mod.rs @@ -501,7 +501,7 @@ impl windows_core::RuntimeType for UICommandInvokedHandler { impl UICommandInvokedHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, command: P0) -> windows_core::Result<()> where @@ -545,7 +545,7 @@ impl) -> windows_core::Result<()> + Send + 'static> let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } 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 dbe21e2fc9..4363a2e646 100644 --- a/crates/libs/windows/src/Windows/UI/WebUI/Core/mod.rs +++ b/crates/libs/windows/src/Windows/UI/WebUI/Core/mod.rs @@ -179,7 +179,7 @@ impl windows_core::RuntimeType for MenuClosedEventHandler { impl MenuClosedEventHandler { pub fn new windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = MenuClosedEventHandlerBox { vtable: &MenuClosedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; - unsafe { core::mem::transmute(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self) -> windows_core::Result<()> { let this = self; @@ -220,7 +220,7 @@ impl windows_core::Result<()> + Send + 'static> MenuClosedEventHan let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -236,7 +236,7 @@ impl windows_core::RuntimeType for MenuOpenedEventHandler { impl MenuOpenedEventHandler { pub fn new windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = MenuOpenedEventHandlerBox { vtable: &MenuOpenedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; - unsafe { core::mem::transmute(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self) -> windows_core::Result<()> { let this = self; @@ -277,7 +277,7 @@ impl windows_core::Result<()> + Send + 'static> MenuOpenedEventHan let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -293,7 +293,7 @@ impl windows_core::RuntimeType for SizeChangedEventHandler { impl SizeChangedEventHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, eventargs: P0) -> windows_core::Result<()> where @@ -337,7 +337,7 @@ impl) -> windows_core::Res let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/UI/WebUI/mod.rs b/crates/libs/windows/src/Windows/UI/WebUI/mod.rs index 4db7df8308..5c9b101515 100644 --- a/crates/libs/windows/src/Windows/UI/WebUI/mod.rs +++ b/crates/libs/windows/src/Windows/UI/WebUI/mod.rs @@ -30,7 +30,7 @@ impl windows_core::RuntimeType for ActivatedEventHandler { impl ActivatedEventHandler { pub fn new, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, eventargs: P1) -> windows_core::Result<()> where @@ -78,7 +78,7 @@ impl, Option<&super::super::Applica let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -154,7 +154,7 @@ impl windows_core::RuntimeType for BackgroundActivatedEventHandler { impl BackgroundActivatedEventHandler { pub fn new, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, eventargs: P1) -> windows_core::Result<()> where @@ -202,7 +202,7 @@ impl, Option<&super::super::Applica let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -254,7 +254,7 @@ impl windows_core::RuntimeType for EnteredBackgroundEventHandler { impl EnteredBackgroundEventHandler { pub fn new, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, e: P1) -> windows_core::Result<()> where @@ -302,7 +302,7 @@ impl, Option<&super::super::Applica let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -840,7 +840,7 @@ impl windows_core::RuntimeType for LeavingBackgroundEventHandler { impl LeavingBackgroundEventHandler { pub fn new, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, e: P1) -> windows_core::Result<()> where @@ -888,7 +888,7 @@ impl, Option<&super::super::Applica let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -904,7 +904,7 @@ impl windows_core::RuntimeType for NavigatedEventHandler { impl NavigatedEventHandler { pub fn new, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, e: P1) -> windows_core::Result<()> where @@ -949,7 +949,7 @@ impl, Option<&IWebUINavigatedEventA let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -1026,7 +1026,7 @@ impl windows_core::RuntimeType for ResumingEventHandler { impl ResumingEventHandler { 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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0) -> windows_core::Result<()> where @@ -1070,7 +1070,7 @@ impl) -> windows_core::Result<()> + let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } @@ -1145,7 +1145,7 @@ impl windows_core::RuntimeType for SuspendingEventHandler { impl SuspendingEventHandler { pub fn new, Option<&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(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, e: P1) -> windows_core::Result<()> where @@ -1193,7 +1193,7 @@ impl, Option<&super::super::Applica let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/mod.rs index 00dad4cbf7..fc77dd3934 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/mod.rs @@ -886,17 +886,14 @@ impl ID3DInclude_Vtbl { Self { Open: Open::, Close: Close:: } } } -#[cfg(feature = "std")] struct ID3DInclude_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl ID3DInclude_ImplVtbl { const VTABLE: ID3DInclude_Vtbl = ID3DInclude_Vtbl::new::(); } -#[cfg(feature = "std")] impl ID3DInclude { pub fn new<'a, T: ID3DInclude_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3DInclude_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } 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 73f1bde97c..d37c186a77 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D10/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D10/mod.rs @@ -4942,17 +4942,14 @@ impl ID3D10EffectBlendVariable_Vtbl { Self { base__: ID3D10EffectVariable_Vtbl::new::(), GetBlendState: GetBlendState::, GetBackingStore: GetBackingStore:: } } } -#[cfg(feature = "std")] struct ID3D10EffectBlendVariable_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl ID3D10EffectBlendVariable_ImplVtbl { const VTABLE: ID3D10EffectBlendVariable_Vtbl = ID3D10EffectBlendVariable_Vtbl::new::(); } -#[cfg(feature = "std")] impl ID3D10EffectBlendVariable { pub fn new<'a, T: ID3D10EffectBlendVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D10EffectBlendVariable_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -5045,17 +5042,14 @@ impl ID3D10EffectConstantBuffer_Vtbl { } } } -#[cfg(feature = "std")] struct ID3D10EffectConstantBuffer_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl ID3D10EffectConstantBuffer_ImplVtbl { const VTABLE: ID3D10EffectConstantBuffer_Vtbl = ID3D10EffectConstantBuffer_Vtbl::new::(); } -#[cfg(feature = "std")] impl ID3D10EffectConstantBuffer { pub fn new<'a, T: ID3D10EffectConstantBuffer_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D10EffectConstantBuffer_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -5113,17 +5107,14 @@ impl ID3D10EffectDepthStencilVariable_Vtbl { } } } -#[cfg(feature = "std")] struct ID3D10EffectDepthStencilVariable_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl ID3D10EffectDepthStencilVariable_ImplVtbl { const VTABLE: ID3D10EffectDepthStencilVariable_Vtbl = ID3D10EffectDepthStencilVariable_Vtbl::new::(); } -#[cfg(feature = "std")] impl ID3D10EffectDepthStencilVariable { pub fn new<'a, T: ID3D10EffectDepthStencilVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D10EffectDepthStencilVariable_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -5206,17 +5197,14 @@ impl ID3D10EffectDepthStencilViewVariable_Vtbl { } } } -#[cfg(feature = "std")] struct ID3D10EffectDepthStencilViewVariable_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl ID3D10EffectDepthStencilViewVariable_ImplVtbl { const VTABLE: ID3D10EffectDepthStencilViewVariable_Vtbl = ID3D10EffectDepthStencilViewVariable_Vtbl::new::(); } -#[cfg(feature = "std")] impl ID3D10EffectDepthStencilViewVariable { pub fn new<'a, T: ID3D10EffectDepthStencilViewVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D10EffectDepthStencilViewVariable_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -5333,17 +5321,14 @@ impl ID3D10EffectMatrixVariable_Vtbl { } } } -#[cfg(feature = "std")] struct ID3D10EffectMatrixVariable_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl ID3D10EffectMatrixVariable_ImplVtbl { const VTABLE: ID3D10EffectMatrixVariable_Vtbl = ID3D10EffectMatrixVariable_Vtbl::new::(); } -#[cfg(feature = "std")] impl ID3D10EffectMatrixVariable { pub fn new<'a, T: ID3D10EffectMatrixVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D10EffectMatrixVariable_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -5465,17 +5450,14 @@ impl ID3D10EffectPass_Vtbl { } } } -#[cfg(feature = "std")] struct ID3D10EffectPass_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl ID3D10EffectPass_ImplVtbl { const VTABLE: ID3D10EffectPass_Vtbl = ID3D10EffectPass_Vtbl::new::(); } -#[cfg(feature = "std")] impl ID3D10EffectPass { pub fn new<'a, T: ID3D10EffectPass_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D10EffectPass_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -5563,17 +5545,14 @@ impl ID3D10EffectRasterizerVariable_Vtbl { } } } -#[cfg(feature = "std")] struct ID3D10EffectRasterizerVariable_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl ID3D10EffectRasterizerVariable_ImplVtbl { const VTABLE: ID3D10EffectRasterizerVariable_Vtbl = ID3D10EffectRasterizerVariable_Vtbl::new::(); } -#[cfg(feature = "std")] impl ID3D10EffectRasterizerVariable { pub fn new<'a, T: ID3D10EffectRasterizerVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D10EffectRasterizerVariable_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -5656,17 +5635,14 @@ impl ID3D10EffectRenderTargetViewVariable_Vtbl { } } } -#[cfg(feature = "std")] struct ID3D10EffectRenderTargetViewVariable_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl ID3D10EffectRenderTargetViewVariable_ImplVtbl { const VTABLE: ID3D10EffectRenderTargetViewVariable_Vtbl = ID3D10EffectRenderTargetViewVariable_Vtbl::new::(); } -#[cfg(feature = "std")] impl ID3D10EffectRenderTargetViewVariable { pub fn new<'a, T: ID3D10EffectRenderTargetViewVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D10EffectRenderTargetViewVariable_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -5720,17 +5696,14 @@ impl ID3D10EffectSamplerVariable_Vtbl { Self { base__: ID3D10EffectVariable_Vtbl::new::(), GetSampler: GetSampler::, GetBackingStore: GetBackingStore:: } } } -#[cfg(feature = "std")] struct ID3D10EffectSamplerVariable_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl ID3D10EffectSamplerVariable_ImplVtbl { const VTABLE: ID3D10EffectSamplerVariable_Vtbl = ID3D10EffectSamplerVariable_Vtbl::new::(); } -#[cfg(feature = "std")] impl ID3D10EffectSamplerVariable { pub fn new<'a, T: ID3D10EffectSamplerVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D10EffectSamplerVariable_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -5915,17 +5888,14 @@ impl ID3D10EffectScalarVariable_Vtbl { } } } -#[cfg(feature = "std")] struct ID3D10EffectScalarVariable_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl ID3D10EffectScalarVariable_ImplVtbl { const VTABLE: ID3D10EffectScalarVariable_Vtbl = ID3D10EffectScalarVariable_Vtbl::new::(); } -#[cfg(feature = "std")] impl ID3D10EffectScalarVariable { pub fn new<'a, T: ID3D10EffectScalarVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D10EffectScalarVariable_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -6008,17 +5978,14 @@ impl ID3D10EffectShaderResourceVariable_Vtbl { } } } -#[cfg(feature = "std")] struct ID3D10EffectShaderResourceVariable_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl ID3D10EffectShaderResourceVariable_ImplVtbl { const VTABLE: ID3D10EffectShaderResourceVariable_Vtbl = ID3D10EffectShaderResourceVariable_Vtbl::new::(); } -#[cfg(feature = "std")] impl ID3D10EffectShaderResourceVariable { pub fn new<'a, T: ID3D10EffectShaderResourceVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D10EffectShaderResourceVariable_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -6144,20 +6111,17 @@ impl ID3D10EffectShaderVariable_Vtbl { } } } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] struct ID3D10EffectShaderVariable_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D10EffectShaderVariable_ImplVtbl { const VTABLE: ID3D10EffectShaderVariable_Vtbl = ID3D10EffectShaderVariable_Vtbl::new::(); } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D10EffectShaderVariable { pub fn new<'a, T: ID3D10EffectShaderVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D10EffectShaderVariable_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -6213,17 +6177,14 @@ impl ID3D10EffectStringVariable_Vtbl { Self { base__: ID3D10EffectVariable_Vtbl::new::(), GetString: GetString::, GetStringArray: GetStringArray:: } } } -#[cfg(feature = "std")] struct ID3D10EffectStringVariable_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl ID3D10EffectStringVariable_ImplVtbl { const VTABLE: ID3D10EffectStringVariable_Vtbl = ID3D10EffectStringVariable_Vtbl::new::(); } -#[cfg(feature = "std")] impl ID3D10EffectStringVariable { pub fn new<'a, T: ID3D10EffectStringVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D10EffectStringVariable_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -6326,17 +6287,14 @@ impl ID3D10EffectTechnique_Vtbl { } } } -#[cfg(feature = "std")] struct ID3D10EffectTechnique_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl ID3D10EffectTechnique_ImplVtbl { const VTABLE: ID3D10EffectTechnique_Vtbl = ID3D10EffectTechnique_Vtbl::new::(); } -#[cfg(feature = "std")] impl ID3D10EffectTechnique { pub fn new<'a, T: ID3D10EffectTechnique_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D10EffectTechnique_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -6445,20 +6403,17 @@ impl ID3D10EffectType_Vtbl { } } } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] struct ID3D10EffectType_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D10EffectType_ImplVtbl { const VTABLE: ID3D10EffectType_Vtbl = ID3D10EffectType_Vtbl::new::(); } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D10EffectType { pub fn new<'a, T: ID3D10EffectType_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D10EffectType_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -6764,17 +6719,14 @@ impl ID3D10EffectVariable_Vtbl { } } } -#[cfg(feature = "std")] struct ID3D10EffectVariable_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl ID3D10EffectVariable_ImplVtbl { const VTABLE: ID3D10EffectVariable_Vtbl = ID3D10EffectVariable_Vtbl::new::(); } -#[cfg(feature = "std")] impl ID3D10EffectVariable { pub fn new<'a, T: ID3D10EffectVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D10EffectVariable_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -6935,17 +6887,14 @@ impl ID3D10EffectVectorVariable_Vtbl { } } } -#[cfg(feature = "std")] struct ID3D10EffectVectorVariable_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl ID3D10EffectVectorVariable_ImplVtbl { const VTABLE: ID3D10EffectVectorVariable_Vtbl = ID3D10EffectVectorVariable_Vtbl::new::(); } -#[cfg(feature = "std")] impl ID3D10EffectVectorVariable { pub fn new<'a, T: ID3D10EffectVectorVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D10EffectVectorVariable_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -8139,20 +8088,17 @@ impl ID3D10ShaderReflectionConstantBuffer_Vtbl { Self { GetDesc: GetDesc::, GetVariableByIndex: GetVariableByIndex::, GetVariableByName: GetVariableByName:: } } } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] struct ID3D10ShaderReflectionConstantBuffer_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D10ShaderReflectionConstantBuffer_ImplVtbl { const VTABLE: ID3D10ShaderReflectionConstantBuffer_Vtbl = ID3D10ShaderReflectionConstantBuffer_Vtbl::new::(); } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D10ShaderReflectionConstantBuffer { pub fn new<'a, T: ID3D10ShaderReflectionConstantBuffer_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D10ShaderReflectionConstantBuffer_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -8227,20 +8173,17 @@ impl ID3D10ShaderReflectionType_Vtbl { } } } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] struct ID3D10ShaderReflectionType_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D10ShaderReflectionType_ImplVtbl { const VTABLE: ID3D10ShaderReflectionType_Vtbl = ID3D10ShaderReflectionType_Vtbl::new::(); } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D10ShaderReflectionType { pub fn new<'a, T: ID3D10ShaderReflectionType_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D10ShaderReflectionType_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -8281,17 +8224,14 @@ impl ID3D10ShaderReflectionVariable_Vtbl { Self { GetDesc: GetDesc::, GetType: GetType:: } } } -#[cfg(feature = "std")] struct ID3D10ShaderReflectionVariable_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl ID3D10ShaderReflectionVariable_ImplVtbl { const VTABLE: ID3D10ShaderReflectionVariable_Vtbl = ID3D10ShaderReflectionVariable_Vtbl::new::(); } -#[cfg(feature = "std")] impl ID3D10ShaderReflectionVariable { pub fn new<'a, T: ID3D10ShaderReflectionVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D10ShaderReflectionVariable_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } 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 20046c8faa..fe154714c0 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/mod.rs @@ -10768,20 +10768,17 @@ impl ID3D11FunctionParameterReflection_Vtbl { Self { GetDesc: GetDesc:: } } } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] struct ID3D11FunctionParameterReflection_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D11FunctionParameterReflection_ImplVtbl { const VTABLE: ID3D11FunctionParameterReflection_Vtbl = ID3D11FunctionParameterReflection_Vtbl::new::(); } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D11FunctionParameterReflection { pub fn new<'a, T: ID3D11FunctionParameterReflection_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D11FunctionParameterReflection_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -10903,20 +10900,17 @@ impl ID3D11FunctionReflection_Vtbl { } } } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] struct ID3D11FunctionReflection_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D11FunctionReflection_ImplVtbl { const VTABLE: ID3D11FunctionReflection_Vtbl = ID3D11FunctionReflection_Vtbl::new::(); } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D11FunctionReflection { pub fn new<'a, T: ID3D11FunctionReflection_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D11FunctionReflection_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -12566,20 +12560,17 @@ impl ID3D11ShaderReflectionConstantBuffer_Vtbl { Self { GetDesc: GetDesc::, GetVariableByIndex: GetVariableByIndex::, GetVariableByName: GetVariableByName:: } } } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] struct ID3D11ShaderReflectionConstantBuffer_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D11ShaderReflectionConstantBuffer_ImplVtbl { const VTABLE: ID3D11ShaderReflectionConstantBuffer_Vtbl = ID3D11ShaderReflectionConstantBuffer_Vtbl::new::(); } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D11ShaderReflectionConstantBuffer { pub fn new<'a, T: ID3D11ShaderReflectionConstantBuffer_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D11ShaderReflectionConstantBuffer_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -12740,20 +12731,17 @@ impl ID3D11ShaderReflectionType_Vtbl { } } } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] struct ID3D11ShaderReflectionType_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D11ShaderReflectionType_ImplVtbl { const VTABLE: ID3D11ShaderReflectionType_Vtbl = ID3D11ShaderReflectionType_Vtbl::new::(); } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D11ShaderReflectionType { pub fn new<'a, T: ID3D11ShaderReflectionType_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D11ShaderReflectionType_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -12814,17 +12802,14 @@ impl ID3D11ShaderReflectionVariable_Vtbl { Self { GetDesc: GetDesc::, GetType: GetType::, GetBuffer: GetBuffer::, GetInterfaceSlot: GetInterfaceSlot:: } } } -#[cfg(feature = "std")] struct ID3D11ShaderReflectionVariable_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl ID3D11ShaderReflectionVariable_ImplVtbl { const VTABLE: ID3D11ShaderReflectionVariable_Vtbl = ID3D11ShaderReflectionVariable_Vtbl::new::(); } -#[cfg(feature = "std")] impl ID3D11ShaderReflectionVariable { pub fn new<'a, T: ID3D11ShaderReflectionVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D11ShaderReflectionVariable_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } 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 cc1ca3e94f..5a3ff6aa04 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D12/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D12/mod.rs @@ -13570,20 +13570,17 @@ impl ID3D12FunctionParameterReflection_Vtbl { Self { GetDesc: GetDesc:: } } } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] struct ID3D12FunctionParameterReflection_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D12FunctionParameterReflection_ImplVtbl { const VTABLE: ID3D12FunctionParameterReflection_Vtbl = ID3D12FunctionParameterReflection_Vtbl::new::(); } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D12FunctionParameterReflection { pub fn new<'a, T: ID3D12FunctionParameterReflection_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D12FunctionParameterReflection_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -13705,20 +13702,17 @@ impl ID3D12FunctionReflection_Vtbl { } } } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] struct ID3D12FunctionReflection_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D12FunctionReflection_ImplVtbl { const VTABLE: ID3D12FunctionReflection_Vtbl = ID3D12FunctionReflection_Vtbl::new::(); } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D12FunctionReflection { pub fn new<'a, T: ID3D12FunctionReflection_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D12FunctionReflection_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -17007,20 +17001,17 @@ impl ID3D12ShaderReflectionConstantBuffer_Vtbl { Self { GetDesc: GetDesc::, GetVariableByIndex: GetVariableByIndex::, GetVariableByName: GetVariableByName:: } } } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] struct ID3D12ShaderReflectionConstantBuffer_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D12ShaderReflectionConstantBuffer_ImplVtbl { const VTABLE: ID3D12ShaderReflectionConstantBuffer_Vtbl = ID3D12ShaderReflectionConstantBuffer_Vtbl::new::(); } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D12ShaderReflectionConstantBuffer { pub fn new<'a, T: ID3D12ShaderReflectionConstantBuffer_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D12ShaderReflectionConstantBuffer_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -17181,20 +17172,17 @@ impl ID3D12ShaderReflectionType_Vtbl { } } } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] struct ID3D12ShaderReflectionType_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D12ShaderReflectionType_ImplVtbl { const VTABLE: ID3D12ShaderReflectionType_Vtbl = ID3D12ShaderReflectionType_Vtbl::new::(); } -#[cfg(feature = "std")] #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D12ShaderReflectionType { pub fn new<'a, T: ID3D12ShaderReflectionType_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D12ShaderReflectionType_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -17255,17 +17243,14 @@ impl ID3D12ShaderReflectionVariable_Vtbl { Self { GetDesc: GetDesc::, GetType: GetType::, GetBuffer: GetBuffer::, GetInterfaceSlot: GetInterfaceSlot:: } } } -#[cfg(feature = "std")] struct ID3D12ShaderReflectionVariable_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl ID3D12ShaderReflectionVariable_ImplVtbl { const VTABLE: ID3D12ShaderReflectionVariable_Vtbl = ID3D12ShaderReflectionVariable_Vtbl::new::(); } -#[cfg(feature = "std")] impl ID3D12ShaderReflectionVariable { pub fn new<'a, T: ID3D12ShaderReflectionVariable_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ID3D12ShaderReflectionVariable_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/GdiPlus/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/GdiPlus/mod.rs index 99ef0af19c..3353dacf65 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/GdiPlus/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/GdiPlus/mod.rs @@ -4390,17 +4390,14 @@ impl GdiplusAbort_Vtbl { Self { Abort: Abort:: } } } -#[cfg(feature = "std")] struct GdiplusAbort_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl GdiplusAbort_ImplVtbl { const VTABLE: GdiplusAbort_Vtbl = GdiplusAbort_Vtbl::new::(); } -#[cfg(feature = "std")] impl GdiplusAbort { pub fn new<'a, T: GdiplusAbort_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &GdiplusAbort_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } 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 a8853c5266..37aaf459f8 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 @@ -685,17 +685,14 @@ impl IXAudio2EngineCallback_Vtbl { } } } -#[cfg(feature = "std")] struct IXAudio2EngineCallback_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl IXAudio2EngineCallback_ImplVtbl { const VTABLE: IXAudio2EngineCallback_Vtbl = IXAudio2EngineCallback_Vtbl::new::(); } -#[cfg(feature = "std")] impl IXAudio2EngineCallback { pub fn new<'a, T: IXAudio2EngineCallback_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &IXAudio2EngineCallback_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -778,17 +775,14 @@ impl IXAudio2MasteringVoice_Vtbl { Self { base__: IXAudio2Voice_Vtbl::new::(), GetChannelMask: GetChannelMask:: } } } -#[cfg(feature = "std")] struct IXAudio2MasteringVoice_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl IXAudio2MasteringVoice_ImplVtbl { const VTABLE: IXAudio2MasteringVoice_Vtbl = IXAudio2MasteringVoice_Vtbl::new::(); } -#[cfg(feature = "std")] impl IXAudio2MasteringVoice { pub fn new<'a, T: IXAudio2MasteringVoice_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &IXAudio2MasteringVoice_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -927,17 +921,14 @@ impl IXAudio2SourceVoice_Vtbl { } } } -#[cfg(feature = "std")] struct IXAudio2SourceVoice_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl IXAudio2SourceVoice_ImplVtbl { const VTABLE: IXAudio2SourceVoice_Vtbl = IXAudio2SourceVoice_Vtbl::new::(); } -#[cfg(feature = "std")] impl IXAudio2SourceVoice { pub fn new<'a, T: IXAudio2SourceVoice_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &IXAudio2SourceVoice_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -959,17 +950,14 @@ impl IXAudio2SubmixVoice_Vtbl { Self { base__: IXAudio2Voice_Vtbl::new::() } } } -#[cfg(feature = "std")] struct IXAudio2SubmixVoice_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl IXAudio2SubmixVoice_ImplVtbl { const VTABLE: IXAudio2SubmixVoice_Vtbl = IXAudio2SubmixVoice_Vtbl::new::(); } -#[cfg(feature = "std")] impl IXAudio2SubmixVoice { pub fn new<'a, T: IXAudio2SubmixVoice_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &IXAudio2SubmixVoice_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -1220,17 +1208,14 @@ impl IXAudio2Voice_Vtbl { } } } -#[cfg(feature = "std")] struct IXAudio2Voice_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl IXAudio2Voice_ImplVtbl { const VTABLE: IXAudio2Voice_Vtbl = IXAudio2Voice_Vtbl::new::(); } -#[cfg(feature = "std")] impl IXAudio2Voice { pub fn new<'a, T: IXAudio2Voice_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &IXAudio2Voice_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -1325,17 +1310,14 @@ impl IXAudio2VoiceCallback_Vtbl { } } } -#[cfg(feature = "std")] struct IXAudio2VoiceCallback_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl IXAudio2VoiceCallback_ImplVtbl { const VTABLE: IXAudio2VoiceCallback_Vtbl = IXAudio2VoiceCallback_Vtbl::new::(); } -#[cfg(feature = "std")] impl IXAudio2VoiceCallback { pub fn new<'a, T: IXAudio2VoiceCallback_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &IXAudio2VoiceCallback_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } 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 99408440f3..232059c2a7 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Speech/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Speech/mod.rs @@ -1890,17 +1890,14 @@ impl ISpNotifyCallback_Vtbl { Self { NotifyCallback: NotifyCallback:: } } } -#[cfg(feature = "std")] struct ISpNotifyCallback_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl ISpNotifyCallback_ImplVtbl { const VTABLE: ISpNotifyCallback_Vtbl = ISpNotifyCallback_Vtbl::new::(); } -#[cfg(feature = "std")] impl ISpNotifyCallback { pub fn new<'a, T: ISpNotifyCallback_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ISpNotifyCallback_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -6181,17 +6178,14 @@ impl ISpTask_Vtbl { Self { Execute: Execute:: } } } -#[cfg(feature = "std")] struct ISpTask_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl ISpTask_ImplVtbl { const VTABLE: ISpTask_Vtbl = ISpTask_Vtbl::new::(); } -#[cfg(feature = "std")] impl ISpTask { pub fn new<'a, T: ISpTask_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ISpTask_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -6501,17 +6495,14 @@ impl ISpThreadTask_Vtbl { Self { InitThread: InitThread::, ThreadProc: ThreadProc::, WindowMessage: WindowMessage:: } } } -#[cfg(feature = "std")] struct ISpThreadTask_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl ISpThreadTask_ImplVtbl { const VTABLE: ISpThreadTask_Vtbl = ISpThreadTask_Vtbl::new::(); } -#[cfg(feature = "std")] impl ISpThreadTask { pub fn new<'a, T: ISpThreadTask_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &ISpThreadTask_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } 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 8c15798747..8061ed8bdc 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Vss/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Vss/mod.rs @@ -1156,20 +1156,17 @@ impl IVssCreateWriterMetadata_Vtbl { } } } -#[cfg(feature = "std")] #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_System_Com"))] struct IVssCreateWriterMetadata_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_System_Com"))] impl IVssCreateWriterMetadata_ImplVtbl { const VTABLE: IVssCreateWriterMetadata_Vtbl = IVssCreateWriterMetadata_Vtbl::new::(); } -#[cfg(feature = "std")] #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_System_Com"))] impl IVssCreateWriterMetadata { pub fn new<'a, T: IVssCreateWriterMetadata_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &IVssCreateWriterMetadata_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -2561,17 +2558,14 @@ impl IVssWriterComponents_Vtbl { Self { GetComponentCount: GetComponentCount::, GetWriterInfo: GetWriterInfo::, GetComponent: GetComponent:: } } } -#[cfg(feature = "std")] struct IVssWriterComponents_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl IVssWriterComponents_ImplVtbl { const VTABLE: IVssWriterComponents_Vtbl = IVssWriterComponents_Vtbl::new::(); } -#[cfg(feature = "std")] impl IVssWriterComponents { pub fn new<'a, T: IVssWriterComponents_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &IVssWriterComponents_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } 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 5ebd89ca38..57b7e0656f 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 @@ -1800,17 +1800,14 @@ impl IMemoryAllocator_Vtbl { Self { Allocate: Allocate::, Free: Free:: } } } -#[cfg(feature = "std")] struct IMemoryAllocator_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl IMemoryAllocator_ImplVtbl { const VTABLE: IMemoryAllocator_Vtbl = IMemoryAllocator_Vtbl::new::(); } -#[cfg(feature = "std")] impl IMemoryAllocator { pub fn new<'a, T: IMemoryAllocator_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &IMemoryAllocator_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } 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 1b0da2388f..89b2d98659 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 @@ -30530,17 +30530,14 @@ impl IDebugFAEntryTags_Vtbl { } } } -#[cfg(feature = "std")] struct IDebugFAEntryTags_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl IDebugFAEntryTags_ImplVtbl { const VTABLE: IDebugFAEntryTags_Vtbl = IDebugFAEntryTags_Vtbl::new::(); } -#[cfg(feature = "std")] impl IDebugFAEntryTags { pub fn new<'a, T: IDebugFAEntryTags_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &IDebugFAEntryTags_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } 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 1861be809e..054ab0beb4 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Search/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Search/mod.rs @@ -16586,17 +16586,14 @@ impl IUMS_Vtbl { } } } -#[cfg(feature = "std")] struct IUMS_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl IUMS_ImplVtbl { const VTABLE: IUMS_Vtbl = IUMS_Vtbl::new::(); } -#[cfg(feature = "std")] impl IUMS { pub fn new<'a, T: IUMS_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &IUMS_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } 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 ee4585a737..b0723dd7ad 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 @@ -3652,17 +3652,14 @@ impl IRoMetaDataLocator_Vtbl { Self { Locate: Locate:: } } } -#[cfg(feature = "std")] struct IRoMetaDataLocator_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl IRoMetaDataLocator_ImplVtbl { const VTABLE: IRoMetaDataLocator_Vtbl = IRoMetaDataLocator_Vtbl::new::(); } -#[cfg(feature = "std")] impl IRoMetaDataLocator { pub fn new<'a, T: IRoMetaDataLocator_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &IRoMetaDataLocator_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } @@ -3811,17 +3808,14 @@ impl IRoSimpleMetaDataBuilder_Vtbl { } } } -#[cfg(feature = "std")] struct IRoSimpleMetaDataBuilder_ImplVtbl(core::marker::PhantomData); -#[cfg(feature = "std")] impl IRoSimpleMetaDataBuilder_ImplVtbl { const VTABLE: IRoSimpleMetaDataBuilder_Vtbl = IRoSimpleMetaDataBuilder_Vtbl::new::(); } -#[cfg(feature = "std")] impl IRoSimpleMetaDataBuilder { pub fn new<'a, T: IRoSimpleMetaDataBuilder_Impl>(this: &'a T) -> windows_core::ScopedInterface<'a, Self> { let this = windows_core::ScopedHeap { vtable: &IRoSimpleMetaDataBuilder_ImplVtbl::::VTABLE as *const _ as *const _, this: this as *const _ as *const _ }; - let this = core::mem::ManuallyDrop::new(Box::new(this)); + let this = core::mem::ManuallyDrop::new(windows_core::imp::Box::new(this)); unsafe { windows_core::ScopedInterface::new(core::mem::transmute(&this.vtable)) } } } diff --git a/crates/libs/windows/src/extensions/Foundation.rs b/crates/libs/windows/src/extensions/Foundation.rs index d5a5b15380..3e5e5714ae 100644 --- a/crates/libs/windows/src/extensions/Foundation.rs +++ b/crates/libs/windows/src/extensions/Foundation.rs @@ -1,7 +1,10 @@ +#[cfg(feature = "std")] pub mod Async; +#[cfg(feature = "std")] pub mod AsyncReady; +#[cfg(feature = "std")] pub mod AsyncSpawn; -#[cfg(feature = "Foundation_Collections")] +#[cfg(all(feature = "std", feature = "Foundation_Collections"))] pub mod Collections; #[cfg(feature = "Foundation_Numerics")] pub mod Numerics; diff --git a/crates/libs/windows/src/extensions/Foundation/Numerics/Vector2.rs b/crates/libs/windows/src/extensions/Foundation/Numerics/Vector2.rs index f2a1d365c4..62b9907e1c 100644 --- a/crates/libs/windows/src/extensions/Foundation/Numerics/Vector2.rs +++ b/crates/libs/windows/src/extensions/Foundation/Numerics/Vector2.rs @@ -22,15 +22,18 @@ impl Vector2 { pub fn length_squared(&self) -> f32 { self.dot(self) } + #[cfg(feature = "std")] pub fn length(&self) -> f32 { self.length_squared().sqrt() } + #[cfg(feature = "std")] pub fn distance(&self, value: &Self) -> f32 { (self - value).length() } pub fn distance_squared(&self, value: &Self) -> f32 { (self - value).length_squared() } + #[cfg(feature = "std")] pub fn normalize(&self) -> Self { self / self.length() } diff --git a/crates/libs/windows/src/extensions/Foundation/Numerics/Vector3.rs b/crates/libs/windows/src/extensions/Foundation/Numerics/Vector3.rs index a99ba3d9f4..d041951024 100644 --- a/crates/libs/windows/src/extensions/Foundation/Numerics/Vector3.rs +++ b/crates/libs/windows/src/extensions/Foundation/Numerics/Vector3.rs @@ -25,15 +25,18 @@ impl Vector3 { pub fn length_squared(&self) -> f32 { self.dot(self) } + #[cfg(feature = "std")] pub fn length(&self) -> f32 { self.length_squared().sqrt() } + #[cfg(feature = "std")] pub fn distance(&self, value: &Self) -> f32 { (self - value).length() } pub fn distance_squared(&self, value: &Self) -> f32 { (self - value).length_squared() } + #[cfg(feature = "std")] pub fn normalize(&self) -> Self { self / self.length() } diff --git a/crates/libs/windows/src/extensions/Foundation/Numerics/Vector4.rs b/crates/libs/windows/src/extensions/Foundation/Numerics/Vector4.rs index a0e5346b5b..d5b9426799 100644 --- a/crates/libs/windows/src/extensions/Foundation/Numerics/Vector4.rs +++ b/crates/libs/windows/src/extensions/Foundation/Numerics/Vector4.rs @@ -28,15 +28,18 @@ impl Vector4 { pub fn length_squared(&self) -> f32 { self.dot(self) } + #[cfg(feature = "std")] pub fn length(&self) -> f32 { self.length_squared().sqrt() } + #[cfg(feature = "std")] pub fn distance(&self, value: &Self) -> f32 { (self - value).length() } pub fn distance_squared(&self, value: &Self) -> f32 { (self - value).length_squared() } + #[cfg(feature = "std")] pub fn normalize(&self) -> Self { self / self.length() } diff --git a/crates/tests/bindgen/src/class_with_handler.rs b/crates/tests/bindgen/src/class_with_handler.rs index be4a5fd550..a005dcabac 100644 --- a/crates/tests/bindgen/src/class_with_handler.rs +++ b/crates/tests/bindgen/src/class_with_handler.rs @@ -81,7 +81,7 @@ impl DeferralCompletedHandler { count: windows_core::imp::RefCount::new(1), invoke, }; - unsafe { core::mem::transmute(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self) -> windows_core::Result<()> { let this = self; @@ -143,7 +143,7 @@ impl windows_core::Result<()> + Send + 'static> DeferralCompletedH let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/tests/bindgen/src/delegate.rs b/crates/tests/bindgen/src/delegate.rs index f0de083cd8..0a0411d22c 100644 --- a/crates/tests/bindgen/src/delegate.rs +++ b/crates/tests/bindgen/src/delegate.rs @@ -22,7 +22,7 @@ impl DeferralCompletedHandler { count: windows_core::imp::RefCount::new(1), invoke, }; - unsafe { core::mem::transmute(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self) -> windows_core::Result<()> { let this = self; @@ -84,7 +84,7 @@ impl windows_core::Result<()> + Send + 'static> DeferralCompletedH let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/tests/bindgen/src/delegate_generic.rs b/crates/tests/bindgen/src/delegate_generic.rs index a7d1fb4ebe..0b64d43f2f 100644 --- a/crates/tests/bindgen/src/delegate_generic.rs +++ b/crates/tests/bindgen/src/delegate_generic.rs @@ -39,7 +39,7 @@ impl EventHandler { count: windows_core::imp::RefCount::new(1), invoke, }; - unsafe { core::mem::transmute(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, args: P1) -> windows_core::Result<()> where @@ -137,7 +137,7 @@ impl< let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/tests/misc/component/src/bindings.rs b/crates/tests/misc/component/src/bindings.rs index 258bc8916e..bc3b8e3138 100644 --- a/crates/tests/misc/component/src/bindings.rs +++ b/crates/tests/misc/component/src/bindings.rs @@ -22,7 +22,7 @@ impl Callback { count: windows_core::imp::RefCount::new(1), invoke, }; - unsafe { core::mem::transmute(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, a: i32) -> windows_core::Result { let this = self; @@ -93,7 +93,7 @@ impl windows_core::Result + Send + 'static> CallbackBox let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/tests/misc/component_client/src/bindings.rs b/crates/tests/misc/component_client/src/bindings.rs index eb8dd0cd8a..d35d841615 100644 --- a/crates/tests/misc/component_client/src/bindings.rs +++ b/crates/tests/misc/component_client/src/bindings.rs @@ -22,7 +22,7 @@ impl Callback { count: windows_core::imp::RefCount::new(1), invoke, }; - unsafe { core::mem::transmute(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, a: i32) -> windows_core::Result { let this = self; @@ -93,7 +93,7 @@ impl windows_core::Result + Send + 'static> CallbackBox let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/tests/misc/no_std/Cargo.toml b/crates/tests/misc/no_std/Cargo.toml index 87d748c9ae..744ab30390 100644 --- a/crates/tests/misc/no_std/Cargo.toml +++ b/crates/tests/misc/no_std/Cargo.toml @@ -37,6 +37,10 @@ default-features = false [dependencies.windows] path = "../../../libs/windows" default-features = false +features = [ + "Foundation_Collections", + "Win32_Graphics_Direct3D", +] [lints] workspace = true