From 5b0ac9b0aac266f2ca8948254f45dc44aa5e480c Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Tue, 10 Dec 2024 10:21:07 -0600 Subject: [PATCH] windows --- .../Wdk/Devices/HumanInterfaceDevice/mod.rs | 7 +- .../windows/src/Windows/Wdk/Foundation/mod.rs | 132 --- .../Windows/Wdk/NetworkManagement/Ndis/mod.rs | 97 +- .../Wdk/Storage/FileSystem/Minifilters/mod.rs | 65 +- .../src/Windows/Wdk/Storage/FileSystem/mod.rs | 852 +++++------------- .../Windows/Wdk/System/OfflineRegistry/mod.rs | 3 - .../src/Windows/Wdk/System/Registry/mod.rs | 20 +- .../Windows/Wdk/System/SystemServices/mod.rs | 565 ++++-------- .../src/Windows/Wdk/System/Threading/mod.rs | 28 +- .../Win32/AI/MachineLearning/DirectML/mod.rs | 7 +- .../src/Windows/Win32/Data/HtmlHelp/mod.rs | 26 +- .../Win32/Data/RightsManagement/mod.rs | 28 +- .../src/Windows/Win32/Data/Xml/MsXml/mod.rs | 7 +- .../src/Windows/Win32/Data/Xml/XmlLite/mod.rs | 40 +- .../src/Windows/Win32/Devices/AllJoyn/mod.rs | 96 -- .../Win32/Devices/BiometricFramework/mod.rs | 23 +- .../Windows/Win32/Devices/Bluetooth/mod.rs | 23 +- .../DeviceAndDriverInstallation/mod.rs | 27 +- .../Windows/Win32/Devices/DeviceQuery/mod.rs | 3 - .../src/Windows/Win32/Devices/Display/mod.rs | 45 +- .../Win32/Devices/Enumeration/Pnp/mod.rs | 20 +- .../src/Windows/Win32/Devices/Fax/mod.rs | 15 +- .../Win32/Devices/FunctionDiscovery/mod.rs | 10 +- .../Windows/Win32/Devices/Geolocation/mod.rs | 7 +- .../Win32/Devices/HumanInterfaceDevice/mod.rs | 3 - .../Win32/Devices/ImageAcquisition/mod.rs | 38 +- .../Win32/Devices/PortableDevices/mod.rs | 7 +- .../Windows/Win32/Devices/Properties/mod.rs | 3 - .../src/Windows/Win32/Devices/Sensors/mod.rs | 19 +- .../Win32/Devices/SerialCommunication/mod.rs | 10 +- .../src/Windows/Win32/Devices/Tapi/mod.rs | 34 +- .../src/Windows/Win32/Devices/Usb/mod.rs | 27 +- .../Win32/Devices/WebServicesOnDevices/mod.rs | 33 +- .../src/Windows/Win32/Foundation/mod.rs | 70 +- .../windows/src/Windows/Win32/Gaming/mod.rs | 24 +- .../src/Windows/Win32/Globalization/mod.rs | 174 +--- .../Windows/Win32/Graphics/Direct2D/mod.rs | 29 +- .../Win32/Graphics/Direct3D/Fxc/mod.rs | 5 +- .../Windows/Win32/Graphics/Direct3D10/mod.rs | 64 +- .../Windows/Win32/Graphics/Direct3D11/mod.rs | 150 ++- .../Windows/Win32/Graphics/Direct3D12/mod.rs | 98 +- .../Windows/Win32/Graphics/Direct3D9/mod.rs | 70 +- .../Win32/Graphics/DirectComposition/mod.rs | 134 +-- .../Windows/Win32/Graphics/DirectDraw/mod.rs | 12 - .../Win32/Graphics/DirectManipulation/mod.rs | 7 +- .../Windows/Win32/Graphics/DirectWrite/mod.rs | 270 ++---- .../src/Windows/Win32/Graphics/Dwm/mod.rs | 21 +- .../src/Windows/Win32/Graphics/Dxgi/mod.rs | 52 +- .../src/Windows/Win32/Graphics/Gdi/mod.rs | 80 +- .../src/Windows/Win32/Graphics/GdiPlus/mod.rs | 194 +--- .../src/Windows/Win32/Graphics/Imaging/mod.rs | 17 +- .../src/Windows/Win32/Graphics/OpenGL/mod.rs | 19 +- .../Graphics/Printing/PrintTicket/mod.rs | 3 - .../Windows/Win32/Graphics/Printing/mod.rs | 26 +- .../MobileDeviceManagementRegistration/mod.rs | 7 +- .../Win32/Media/Audio/DirectMusic/mod.rs | 28 +- .../Win32/Media/Audio/Endpoints/mod.rs | 24 +- .../Windows/Win32/Media/Audio/XAudio2/mod.rs | 7 +- .../src/Windows/Win32/Media/Audio/mod.rs | 107 +-- .../Windows/Win32/Media/DeviceManager/mod.rs | 7 +- .../Windows/Win32/Media/DirectShow/Tv/mod.rs | 40 +- .../src/Windows/Win32/Media/DirectShow/mod.rs | 355 +++----- .../Win32/Media/KernelStreaming/mod.rs | 5 +- .../Win32/Media/MediaFoundation/mod.rs | 397 +++----- .../Windows/Win32/Media/MediaPlayer/mod.rs | 70 +- .../src/Windows/Win32/Media/Multimedia/mod.rs | 40 +- .../Win32/Media/PictureAcquisition/mod.rs | 45 +- .../src/Windows/Win32/Media/Speech/mod.rs | 146 +-- .../Win32/Media/WindowsMediaFormat/mod.rs | 261 ++---- .../windows/src/Windows/Win32/Media/mod.rs | 3 - .../Win32/NetworkManagement/Dhcp/mod.rs | 83 +- .../Win32/NetworkManagement/Dns/mod.rs | 10 +- .../Win32/NetworkManagement/IpHelper/mod.rs | 144 +-- .../Win32/NetworkManagement/Multicast/mod.rs | 7 +- .../Win32/NetworkManagement/Ndis/mod.rs | 3 - .../NetworkManagement/NetManagement/mod.rs | 27 +- .../NetworkDiagnosticsFramework/mod.rs | 10 +- .../Win32/NetworkManagement/P2P/mod.rs | 31 +- .../Win32/NetworkManagement/QoS/mod.rs | 13 +- .../Win32/NetworkManagement/Rras/mod.rs | 99 +- .../Win32/NetworkManagement/WNet/mod.rs | 30 +- .../Win32/NetworkManagement/WebDav/mod.rs | 5 +- .../Win32/NetworkManagement/WiFi/mod.rs | 51 +- .../WindowsConnectionManager/mod.rs | 7 +- .../NetworkManagement/WindowsFirewall/mod.rs | 12 +- .../Win32/Networking/ActiveDirectory/mod.rs | 20 +- .../mod.rs | 7 +- .../Win32/Networking/Clustering/mod.rs | 237 +---- .../src/Windows/Win32/Networking/Ldap/mod.rs | 52 +- .../RemoteDifferentialCompression/mod.rs | 72 +- .../Windows/Win32/Networking/WebSocket/mod.rs | 3 - .../Windows/Win32/Networking/WinHttp/mod.rs | 20 +- .../Windows/Win32/Networking/WinInet/mod.rs | 85 +- .../Windows/Win32/Networking/WinSock/mod.rs | 74 +- .../Networking/WindowsWebServices/mod.rs | 87 +- .../Windows/Win32/Security/AppLocker/mod.rs | 5 +- .../Security/Authentication/Identity/mod.rs | 55 +- .../Win32/Security/Authorization/UI/mod.rs | 7 +- .../Win32/Security/Authorization/mod.rs | 90 +- .../Windows/Win32/Security/Credentials/mod.rs | 43 +- .../Security/Cryptography/Catalog/mod.rs | 14 +- .../Security/Cryptography/Certificates/mod.rs | 168 +--- .../Win32/Security/Cryptography/mod.rs | 104 +-- .../Win32/Security/DiagnosticDataQuery/mod.rs | 18 - .../Windows/Win32/Security/Isolation/mod.rs | 5 +- .../src/Windows/Win32/Security/Tpm/mod.rs | 15 +- .../Windows/Win32/Security/WinTrust/mod.rs | 14 +- .../windows/src/Windows/Win32/Security/mod.rs | 217 ++--- .../src/Windows/Win32/Storage/Cabinets/mod.rs | 12 +- .../Windows/Win32/Storage/CloudFilters/mod.rs | 3 - .../Windows/Win32/Storage/Compression/mod.rs | 6 - .../Windows/Win32/Storage/FileHistory/mod.rs | 59 +- .../Windows/Win32/Storage/FileSystem/mod.rs | 143 +-- .../src/Windows/Win32/Storage/Imapi/mod.rs | 24 +- .../Storage/InstallableFileSystems/mod.rs | 6 - .../Windows/Win32/Storage/IscsiDisc/mod.rs | 70 +- .../src/Windows/Win32/Storage/Jet/mod.rs | 12 - .../Windows/Win32/Storage/OfflineFiles/mod.rs | 93 +- .../Win32/Storage/Packaging/Appx/mod.rs | 36 +- .../Win32/Storage/ProjectedFileSystem/mod.rs | 6 - .../Win32/Storage/StructuredStorage/mod.rs | 9 - .../Win32/Storage/VirtualDiskService/mod.rs | 123 +-- .../src/Windows/Win32/Storage/Vss/mod.rs | 38 +- .../src/Windows/Win32/Storage/Xps/mod.rs | 134 +-- .../Windows/Win32/System/AddressBook/mod.rs | 10 +- .../Windows/Win32/System/Antimalware/mod.rs | 6 - .../mod.rs | 123 +-- .../Windows/Win32/System/ClrHosting/mod.rs | 59 +- .../Windows/Win32/System/Com/CallObj/mod.rs | 15 +- .../System/Com/ChannelCredentials/mod.rs | 7 +- .../Windows/Win32/System/Com/Events/mod.rs | 49 +- .../Win32/System/Com/StructuredStorage/mod.rs | 45 +- .../Windows/Win32/System/Com/Urlmon/mod.rs | 39 +- .../src/Windows/Win32/System/Com/mod.rs | 166 +--- .../Win32/System/ComponentServices/mod.rs | 179 ++-- .../src/Windows/Win32/System/Console/mod.rs | 38 +- .../src/Windows/Win32/System/Contacts/mod.rs | 24 +- .../Windows/Win32/System/DataExchange/mod.rs | 12 - .../Win32/System/DeploymentServices/mod.rs | 19 +- .../System/Diagnostics/ClrProfiling/mod.rs | 96 +- .../Diagnostics/Debug/ActiveScript/mod.rs | 38 +- .../Diagnostics/Debug/Extensions/mod.rs | 69 +- .../Win32/System/Diagnostics/Debug/mod.rs | 73 +- .../Win32/System/Diagnostics/Etw/mod.rs | 27 +- .../Diagnostics/ProcessSnapshotting/mod.rs | 6 - .../DistributedTransactionCoordinator/mod.rs | 164 +--- .../Windows/Win32/System/Environment/mod.rs | 21 +- .../Win32/System/ErrorReporting/mod.rs | 16 +- .../src/Windows/Win32/System/EventLog/mod.rs | 3 - .../Windows/Win32/System/GroupPolicy/mod.rs | 61 +- .../Windows/Win32/System/HostCompute/mod.rs | 3 - .../Win32/System/HostComputeSystem/mod.rs | 9 - .../Windows/Win32/System/Hypervisor/mod.rs | 22 +- .../src/Windows/Win32/System/IO/mod.rs | 21 +- .../src/Windows/Win32/System/Iis/mod.rs | 24 +- .../Windows/Win32/System/JobObjects/mod.rs | 17 +- .../Windows/Win32/System/LibraryLoader/mod.rs | 24 +- .../src/Windows/Win32/System/Memory/mod.rs | 25 +- .../src/Windows/Win32/System/Mmc/mod.rs | 88 +- .../src/Windows/Win32/System/Ole/mod.rs | 351 +++----- .../Win32/System/PasswordManagement/mod.rs | 10 +- .../Windows/Win32/System/Performance/mod.rs | 63 +- .../src/Windows/Win32/System/Power/mod.rs | 34 +- .../src/Windows/Win32/System/Recovery/mod.rs | 7 +- .../src/Windows/Win32/System/Registry/mod.rs | 11 +- .../Windows/Win32/System/RemoteDesktop/mod.rs | 101 +-- .../Win32/System/RemoteManagement/mod.rs | 39 +- .../src/Windows/Win32/System/Rpc/mod.rs | 36 +- .../src/Windows/Win32/System/Search/mod.rs | 189 ++-- .../Windows/Win32/System/ServerBackup/mod.rs | 10 +- .../src/Windows/Win32/System/Services/mod.rs | 24 +- .../SettingsManagementInfrastructure/mod.rs | 37 +- .../src/Windows/Win32/System/Shutdown/mod.rs | 31 +- .../Win32/System/StationsAndDesktops/mod.rs | 33 +- .../Win32/System/SubsystemForLinux/mod.rs | 10 +- .../Win32/System/SystemInformation/mod.rs | 14 +- .../Windows/Win32/System/TaskScheduler/mod.rs | 7 +- .../src/Windows/Win32/System/Threading/mod.rs | 254 ++---- .../src/Windows/Win32/System/Variant/mod.rs | 7 +- .../Win32/System/WinRT/Composition/mod.rs | 7 +- .../System/WinRT/Graphics/Imaging/mod.rs | 10 +- .../Windows/Win32/System/WinRT/Media/mod.rs | 10 +- .../Win32/System/WinRT/Metadata/mod.rs | 3 - .../src/Windows/Win32/System/WinRT/mod.rs | 9 - .../Win32/System/WindowsProgramming/mod.rs | 76 +- .../Windows/Win32/System/WindowsSync/mod.rs | 19 +- .../src/Windows/Win32/System/Wmi/mod.rs | 3 - .../src/Windows/Win32/UI/Accessibility/mod.rs | 137 +-- .../src/Windows/Win32/UI/Animation/mod.rs | 29 +- .../src/Windows/Win32/UI/ColorSystem/mod.rs | 36 +- .../Windows/Win32/UI/Controls/RichEdit/mod.rs | 110 +-- .../src/Windows/Win32/UI/Controls/mod.rs | 147 +-- .../windows/src/Windows/Win32/UI/HiDpi/mod.rs | 10 +- .../src/Windows/Win32/UI/Input/Ime/mod.rs | 55 +- .../src/Windows/Win32/UI/Input/Ink/mod.rs | 5 +- .../Win32/UI/Input/KeyboardAndMouse/mod.rs | 24 +- .../src/Windows/Win32/UI/Input/Pointer/mod.rs | 7 +- .../src/Windows/Win32/UI/Input/Touch/mod.rs | 6 - .../Win32/UI/Input/XboxController/mod.rs | 7 +- .../windows/src/Windows/Win32/UI/Input/mod.rs | 3 - .../Win32/UI/InteractionContext/mod.rs | 3 - .../src/Windows/Win32/UI/Magnification/mod.rs | 14 +- .../Win32/UI/Shell/PropertiesSystem/mod.rs | 28 +- .../windows/src/Windows/Win32/UI/Shell/mod.rs | 699 +++++--------- .../src/Windows/Win32/UI/TabletPC/mod.rs | 127 +-- .../src/Windows/Win32/UI/TextServices/mod.rs | 87 +- .../Win32/UI/WindowsAndMessaging/mod.rs | 189 +--- .../Windows/Win32/Web/InternetExplorer/mod.rs | 86 +- .../src/extensions/Win32/Foundation/BOOL.rs | 5 - .../extensions/Win32/Foundation/BOOLEAN.rs | 5 - 210 files changed, 3540 insertions(+), 9381 deletions(-) diff --git a/crates/libs/windows/src/Windows/Wdk/Devices/HumanInterfaceDevice/mod.rs b/crates/libs/windows/src/Windows/Wdk/Devices/HumanInterfaceDevice/mod.rs index 57b131bd30..ca550d0f0b 100644 --- a/crates/libs/windows/src/Windows/Wdk/Devices/HumanInterfaceDevice/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/Devices/HumanInterfaceDevice/mod.rs @@ -9,12 +9,9 @@ pub unsafe fn VhfCreate(vhfconfig: *const VHF_CONFIG, vhfhandle: *mut *mut core: VhfCreate(core::mem::transmute(vhfconfig), core::mem::transmute(vhfhandle)) } #[inline] -pub unsafe fn VhfDelete(vhfhandle: *const core::ffi::c_void, wait: P1) -where - P1: windows_core::Param, -{ +pub unsafe fn VhfDelete(vhfhandle: *const core::ffi::c_void, wait: bool) { windows_targets::link!("vhfum.dll" "system" fn VhfDelete(vhfhandle : *const core::ffi::c_void, wait : super::super::super::Win32::Foundation:: BOOLEAN)); - VhfDelete(core::mem::transmute(vhfhandle), wait.param().abi()) + VhfDelete(core::mem::transmute(vhfhandle), wait.into()) } #[inline] pub unsafe fn VhfReadReportSubmit(vhfhandle: *const core::ffi::c_void, hidtransferpacket: *const HID_XFER_PACKET) -> super::super::super::Win32::Foundation::NTSTATUS { diff --git a/crates/libs/windows/src/Windows/Wdk/Foundation/mod.rs b/crates/libs/windows/src/Windows/Wdk/Foundation/mod.rs index bce2b0ce5c..d34b6f1229 100644 --- a/crates/libs/windows/src/Windows/Wdk/Foundation/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/Foundation/mod.rs @@ -399,9 +399,6 @@ impl Default for DISPATCHER_HEADER_0_6 { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct DMA_COMMON_BUFFER_VECTOR(pub isize); -impl windows_core::TypeKind for DMA_COMMON_BUFFER_VECTOR { - type TypeKind = windows_core::CopyType; -} #[cfg(all(feature = "Wdk_Storage_FileSystem", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] pub type DRIVER_ADD_DEVICE = Option super::super::Win32::Foundation::NTSTATUS>; #[cfg(all(feature = "Wdk_Storage_FileSystem", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] @@ -469,15 +466,9 @@ pub const DontUseThisTypeSession: POOL_TYPE = POOL_TYPE(35i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct ECP_HEADER(pub isize); -impl windows_core::TypeKind for ECP_HEADER { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct ECP_LIST(pub isize); -impl windows_core::TypeKind for ECP_LIST { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[cfg(feature = "Win32_System_Kernel")] #[derive(Clone, Copy)] @@ -694,15 +685,9 @@ impl Default for FILE_OBJECT { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct IOMMU_DMA_DEVICE(pub isize); -impl windows_core::TypeKind for IOMMU_DMA_DEVICE { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct IOMMU_DMA_DOMAIN(pub isize); -impl windows_core::TypeKind for IOMMU_DMA_DOMAIN { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct IO_COMPLETION_CONTEXT { @@ -1639,9 +1624,6 @@ impl Default for KDPC_0_0 { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct KENLISTMENT(pub isize); -impl windows_core::TypeKind for KENLISTMENT { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[cfg(feature = "Win32_System_Kernel")] #[derive(Clone, Copy)] @@ -1657,15 +1639,9 @@ impl Default for KEVENT { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct KGDT(pub isize); -impl windows_core::TypeKind for KGDT { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct KIDT(pub isize); -impl windows_core::TypeKind for KIDT { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[cfg(feature = "Win32_System_Kernel")] #[derive(Clone, Copy)] @@ -1710,15 +1686,9 @@ impl Default for KMUTANT_0_0 { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct KPCR(pub isize); -impl windows_core::TypeKind for KPCR { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct KPRCB(pub isize); -impl windows_core::TypeKind for KPRCB { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[cfg(feature = "Win32_System_Kernel")] #[derive(Clone, Copy)] @@ -1738,30 +1708,18 @@ impl Default for KQUEUE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct KRESOURCEMANAGER(pub isize); -impl windows_core::TypeKind for KRESOURCEMANAGER { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct KSPIN_LOCK_QUEUE_NUMBER(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct KTM(pub isize); -impl windows_core::TypeKind for KTM { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct KTRANSACTION(pub isize); -impl windows_core::TypeKind for KTRANSACTION { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct KTSS(pub isize); -impl windows_core::TypeKind for KTSS { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[cfg(feature = "Win32_System_Kernel")] #[derive(Clone, Copy)] @@ -1797,9 +1755,6 @@ impl Default for KWAIT_BLOCK_0 { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct LOADER_PARAMETER_BLOCK(pub isize); -impl windows_core::TypeKind for LOADER_PARAMETER_BLOCK { - type TypeKind = windows_core::CopyType; -} pub const LockQueueAfdWorkQueueLock: KSPIN_LOCK_QUEUE_NUMBER = KSPIN_LOCK_QUEUE_NUMBER(13i32); pub const LockQueueBcbLock: KSPIN_LOCK_QUEUE_NUMBER = KSPIN_LOCK_QUEUE_NUMBER(14i32); pub const LockQueueIoCancelLock: KSPIN_LOCK_QUEUE_NUMBER = KSPIN_LOCK_QUEUE_NUMBER(7i32); @@ -1958,120 +1913,63 @@ pub const ObjectTypeInformation: OBJECT_INFORMATION_CLASS = OBJECT_INFORMATION_C #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PAFFINITY_TOKEN(pub isize); -impl windows_core::TypeKind for PAFFINITY_TOKEN { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PBUS_HANDLER(pub isize); -impl windows_core::TypeKind for PBUS_HANDLER { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PCALLBACK_OBJECT(pub isize); -impl windows_core::TypeKind for PCALLBACK_OBJECT { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PDEVICE_HANDLER_OBJECT(pub isize); -impl windows_core::TypeKind for PDEVICE_HANDLER_OBJECT { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PEJOB(pub isize); -impl windows_core::TypeKind for PEJOB { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PEPROCESS(pub isize); -impl windows_core::TypeKind for PEPROCESS { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PESILO(pub isize); -impl windows_core::TypeKind for PESILO { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PETHREAD(pub isize); -impl windows_core::TypeKind for PETHREAD { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PEX_RUNDOWN_REF_CACHE_AWARE(pub isize); -impl windows_core::TypeKind for PEX_RUNDOWN_REF_CACHE_AWARE { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PEX_TIMER(pub isize); -impl windows_core::TypeKind for PEX_TIMER { - type TypeKind = windows_core::CopyType; -} pub type PFREE_FUNCTION = Option; pub type PIO_COMPLETION_ROUTINE = Option super::super::Win32::Foundation::NTSTATUS>; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PIO_REMOVE_LOCK_TRACKING_BLOCK(pub isize); -impl windows_core::TypeKind for PIO_REMOVE_LOCK_TRACKING_BLOCK { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PIO_TIMER(pub isize); -impl windows_core::TypeKind for PIO_TIMER { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PIO_WORKITEM(pub isize); -impl windows_core::TypeKind for PIO_WORKITEM { - type TypeKind = windows_core::CopyType; -} pub type PKDEFERRED_ROUTINE = Option; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PKINTERRUPT(pub isize); -impl windows_core::TypeKind for PKINTERRUPT { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PKPROCESS(pub isize); -impl windows_core::TypeKind for PKPROCESS { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PKTHREAD(pub isize); -impl windows_core::TypeKind for PKTHREAD { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PNOTIFY_SYNC(pub isize); -impl windows_core::TypeKind for PNOTIFY_SYNC { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct POBJECT_TYPE(pub isize); -impl windows_core::TypeKind for POBJECT_TYPE { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct POHANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for POHANDLE { - type TypeKind = windows_core::CopyType; -} impl POHANDLE { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -2088,39 +1986,21 @@ pub struct POOL_TYPE(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PPCW_BUFFER(pub isize); -impl windows_core::TypeKind for PPCW_BUFFER { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PPCW_INSTANCE(pub isize); -impl windows_core::TypeKind for PPCW_INSTANCE { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PPCW_REGISTRATION(pub isize); -impl windows_core::TypeKind for PPCW_REGISTRATION { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PRKPROCESS(pub isize); -impl windows_core::TypeKind for PRKPROCESS { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PRKTHREAD(pub isize); -impl windows_core::TypeKind for PRKTHREAD { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PSILO_MONITOR(pub isize); -impl windows_core::TypeKind for PSILO_MONITOR { - type TypeKind = windows_core::CopyType; -} pub type PWORKER_THREAD_ROUTINE = Option; pub const PagedPool: POOL_TYPE = POOL_TYPE(1i32); pub const PagedPoolCacheAligned: POOL_TYPE = POOL_TYPE(5i32); @@ -2175,9 +2055,6 @@ pub const STRSAFE_ZERO_LENGTH_ON_FAILURE: u32 = 2048u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct SspiAsyncContext(pub isize); -impl windows_core::TypeKind for SspiAsyncContext { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[cfg(all(feature = "Wdk_Storage_FileSystem", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[derive(Clone, Copy, Debug, PartialEq)] @@ -2232,21 +2109,12 @@ impl Default for WORK_QUEUE_ITEM { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct _DEVICE_OBJECT_POWER_EXTENSION(pub isize); -impl windows_core::TypeKind for _DEVICE_OBJECT_POWER_EXTENSION { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct _IORING_OBJECT(pub isize); -impl windows_core::TypeKind for _IORING_OBJECT { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct _SCSI_REQUEST_BLOCK(pub isize); -impl windows_core::TypeKind for _SCSI_REQUEST_BLOCK { - type TypeKind = windows_core::CopyType; -} pub const __WARNING_BANNED_API_USAGE: u32 = 28719u32; pub const __WARNING_CYCLOMATIC_COMPLEXITY: u32 = 28734u32; pub const __WARNING_DEREF_NULL_PTR: u32 = 6011u32; diff --git a/crates/libs/windows/src/Windows/Wdk/NetworkManagement/Ndis/mod.rs b/crates/libs/windows/src/Windows/Wdk/NetworkManagement/Ndis/mod.rs index af23140442..b46d91896d 100644 --- a/crates/libs/windows/src/Windows/Wdk/NetworkManagement/Ndis/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/NetworkManagement/Ndis/mod.rs @@ -1,10 +1,7 @@ #[inline] -pub unsafe fn NdisAcquireReadWriteLock(lock: *mut NDIS_RW_LOCK, fwrite: P1, lockstate: *mut LOCK_STATE) -where - P1: windows_core::Param, -{ +pub unsafe fn NdisAcquireReadWriteLock(lock: *mut NDIS_RW_LOCK, fwrite: bool, lockstate: *mut LOCK_STATE) { windows_targets::link!("ndis.sys" "system" fn NdisAcquireReadWriteLock(lock : *mut NDIS_RW_LOCK, fwrite : super::super::super::Win32::Foundation:: BOOLEAN, lockstate : *mut LOCK_STATE)); - NdisAcquireReadWriteLock(core::mem::transmute(lock), fwrite.param().abi(), core::mem::transmute(lockstate)) + NdisAcquireReadWriteLock(core::mem::transmute(lock), fwrite.into(), core::mem::transmute(lockstate)) } #[inline] pub unsafe fn NdisAllocateMemoryWithTag(virtualaddress: *mut *mut core::ffi::c_void, length: u32, tag: u32) -> i32 { @@ -181,12 +178,9 @@ pub unsafe fn NdisCoGetTapiCallId(ndisvchandle: *const core::ffi::c_void, tapica } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn NdisCompleteDmaTransfer(status: *mut i32, ndisdmahandle: *mut core::ffi::c_void, buffer: *mut super::super::Foundation::MDL, offset: u32, length: u32, writetodevice: P5) -where - P5: windows_core::Param, -{ +pub unsafe fn NdisCompleteDmaTransfer(status: *mut i32, ndisdmahandle: *mut core::ffi::c_void, buffer: *mut super::super::Foundation::MDL, offset: u32, length: u32, writetodevice: bool) { windows_targets::link!("ndis.sys" "system" fn NdisCompleteDmaTransfer(status : *mut i32, ndisdmahandle : *mut core::ffi::c_void, buffer : *mut super::super::Foundation:: MDL, offset : u32, length : u32, writetodevice : super::super::super::Win32::Foundation:: BOOLEAN)); - NdisCompleteDmaTransfer(core::mem::transmute(status), core::mem::transmute(ndisdmahandle), core::mem::transmute(buffer), core::mem::transmute(offset), core::mem::transmute(length), writetodevice.param().abi()) + NdisCompleteDmaTransfer(core::mem::transmute(status), core::mem::transmute(ndisdmahandle), core::mem::transmute(buffer), core::mem::transmute(offset), core::mem::transmute(length), writetodevice.into()) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -286,20 +280,14 @@ pub unsafe fn NdisInitializeTimer(timer: *mut NDIS_TIMER, timerfunction: PNDIS_T NdisInitializeTimer(core::mem::transmute(timer), core::mem::transmute(timerfunction), core::mem::transmute(functioncontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn NdisMAllocateSharedMemory(miniportadapterhandle: *const core::ffi::c_void, length: u32, cached: P2, virtualaddress: *mut *mut core::ffi::c_void, physicaladdress: *mut i64) -where - P2: windows_core::Param, -{ +pub unsafe fn NdisMAllocateSharedMemory(miniportadapterhandle: *const core::ffi::c_void, length: u32, cached: bool, virtualaddress: *mut *mut core::ffi::c_void, physicaladdress: *mut i64) { windows_targets::link!("ndis.sys" "system" fn NdisMAllocateSharedMemory(miniportadapterhandle : *const core::ffi::c_void, length : u32, cached : super::super::super::Win32::Foundation:: BOOLEAN, virtualaddress : *mut *mut core::ffi::c_void, physicaladdress : *mut i64)); - NdisMAllocateSharedMemory(core::mem::transmute(miniportadapterhandle), core::mem::transmute(length), cached.param().abi(), core::mem::transmute(virtualaddress), core::mem::transmute(physicaladdress)) + NdisMAllocateSharedMemory(core::mem::transmute(miniportadapterhandle), core::mem::transmute(length), cached.into(), core::mem::transmute(virtualaddress), core::mem::transmute(physicaladdress)) } #[inline] -pub unsafe fn NdisMAllocateSharedMemoryAsync(miniportadapterhandle: *const core::ffi::c_void, length: u32, cached: P2, context: *const core::ffi::c_void) -> i32 -where - P2: windows_core::Param, -{ +pub unsafe fn NdisMAllocateSharedMemoryAsync(miniportadapterhandle: *const core::ffi::c_void, length: u32, cached: bool, context: *const core::ffi::c_void) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisMAllocateSharedMemoryAsync(miniportadapterhandle : *const core::ffi::c_void, length : u32, cached : super::super::super::Win32::Foundation:: BOOLEAN, context : *const core::ffi::c_void) -> i32); - NdisMAllocateSharedMemoryAsync(core::mem::transmute(miniportadapterhandle), core::mem::transmute(length), cached.param().abi(), core::mem::transmute(context)) + NdisMAllocateSharedMemoryAsync(core::mem::transmute(miniportadapterhandle), core::mem::transmute(length), cached.into(), core::mem::transmute(context)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_System_Kernel"))] #[inline] @@ -370,12 +358,9 @@ pub unsafe fn NdisMFlushLog(loghandle: *const core::ffi::c_void) { NdisMFlushLog(core::mem::transmute(loghandle)) } #[inline] -pub unsafe fn NdisMFreeSharedMemory(miniportadapterhandle: *const core::ffi::c_void, length: u32, cached: P2, virtualaddress: *const core::ffi::c_void, physicaladdress: i64) -where - P2: windows_core::Param, -{ +pub unsafe fn NdisMFreeSharedMemory(miniportadapterhandle: *const core::ffi::c_void, length: u32, cached: bool, virtualaddress: *const core::ffi::c_void, physicaladdress: i64) { windows_targets::link!("ndis.sys" "system" fn NdisMFreeSharedMemory(miniportadapterhandle : *const core::ffi::c_void, length : u32, cached : super::super::super::Win32::Foundation:: BOOLEAN, virtualaddress : *const core::ffi::c_void, physicaladdress : i64)); - NdisMFreeSharedMemory(core::mem::transmute(miniportadapterhandle), core::mem::transmute(length), cached.param().abi(), core::mem::transmute(virtualaddress), core::mem::transmute(physicaladdress)) + NdisMFreeSharedMemory(core::mem::transmute(miniportadapterhandle), core::mem::transmute(length), cached.into(), core::mem::transmute(virtualaddress), core::mem::transmute(physicaladdress)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -411,12 +396,9 @@ pub unsafe fn NdisMReadDmaCounter(miniportdmahandle: *const core::ffi::c_void) - } #[cfg(feature = "Wdk_System_SystemServices")] #[inline] -pub unsafe fn NdisMRegisterDmaChannel(miniportdmahandle: *mut *mut core::ffi::c_void, miniportadapterhandle: *const core::ffi::c_void, dmachannel: u32, dma32bitaddresses: P3, dmadescription: *const NDIS_DMA_DESCRIPTION, maximumlength: u32) -> i32 -where - P3: windows_core::Param, -{ +pub unsafe fn NdisMRegisterDmaChannel(miniportdmahandle: *mut *mut core::ffi::c_void, miniportadapterhandle: *const core::ffi::c_void, dmachannel: u32, dma32bitaddresses: bool, dmadescription: *const NDIS_DMA_DESCRIPTION, maximumlength: u32) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisMRegisterDmaChannel(miniportdmahandle : *mut *mut core::ffi::c_void, miniportadapterhandle : *const core::ffi::c_void, dmachannel : u32, dma32bitaddresses : super::super::super::Win32::Foundation:: BOOLEAN, dmadescription : *const NDIS_DMA_DESCRIPTION, maximumlength : u32) -> i32); - NdisMRegisterDmaChannel(core::mem::transmute(miniportdmahandle), core::mem::transmute(miniportadapterhandle), core::mem::transmute(dmachannel), dma32bitaddresses.param().abi(), core::mem::transmute(dmadescription), core::mem::transmute(maximumlength)) + NdisMRegisterDmaChannel(core::mem::transmute(miniportdmahandle), core::mem::transmute(miniportadapterhandle), core::mem::transmute(dmachannel), dma32bitaddresses.into(), core::mem::transmute(dmadescription), core::mem::transmute(maximumlength)) } #[inline] pub unsafe fn NdisMRegisterIoPortRange(portoffset: *mut *mut core::ffi::c_void, miniportadapterhandle: *const core::ffi::c_void, initialport: u32, numberofports: u32) -> i32 { @@ -536,12 +518,9 @@ pub unsafe fn NdisSetTimerEx(ndistimer: *const NDIS_TIMER, millisecondstodelay: } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn NdisSetupDmaTransfer(status: *mut i32, ndisdmahandle: *mut core::ffi::c_void, buffer: *mut super::super::Foundation::MDL, offset: u32, length: u32, writetodevice: P5) -where - P5: windows_core::Param, -{ +pub unsafe fn NdisSetupDmaTransfer(status: *mut i32, ndisdmahandle: *mut core::ffi::c_void, buffer: *mut super::super::Foundation::MDL, offset: u32, length: u32, writetodevice: bool) { windows_targets::link!("ndis.sys" "system" fn NdisSetupDmaTransfer(status : *mut i32, ndisdmahandle : *mut core::ffi::c_void, buffer : *mut super::super::Foundation:: MDL, offset : u32, length : u32, writetodevice : super::super::super::Win32::Foundation:: BOOLEAN)); - NdisSetupDmaTransfer(core::mem::transmute(status), core::mem::transmute(ndisdmahandle), core::mem::transmute(buffer), core::mem::transmute(offset), core::mem::transmute(length), writetodevice.param().abi()) + NdisSetupDmaTransfer(core::mem::transmute(status), core::mem::transmute(ndisdmahandle), core::mem::transmute(buffer), core::mem::transmute(offset), core::mem::transmute(length), writetodevice.into()) } #[inline] pub unsafe fn NdisSystemProcessorCount() -> i8 { @@ -687,17 +666,11 @@ impl Default for CO_CALL_MANAGER_PARAMETERS { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct CO_CALL_PARAMETERS(pub isize); -impl windows_core::TypeKind for CO_CALL_PARAMETERS { - type TypeKind = windows_core::CopyType; -} pub type CO_CREATE_VC_HANDLER = Option i32>; pub type CO_DELETE_VC_HANDLER = Option i32>; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct CO_MEDIA_PARAMETERS(pub isize); -impl windows_core::TypeKind for CO_MEDIA_PARAMETERS { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct CO_PVC { @@ -755,9 +728,6 @@ pub const ETHERNET_LENGTH_OF_ADDRESS: u32 = 6u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct ETH_FILTER(pub isize); -impl windows_core::TypeKind for ETH_FILTER { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy)] pub struct FILTERDBS { @@ -1263,9 +1233,6 @@ pub struct NDIS_802_5_RING_STATE(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct NDIS_AF_LIST(pub isize); -impl windows_core::TypeKind for NDIS_AF_LIST { - type TypeKind = windows_core::CopyType; -} pub const NDIS_ANY_NUMBER_OF_NBLS: u32 = 4294967295u32; pub const NDIS_ATTRIBUTE_BUS_MASTER: u32 = 8u32; pub const NDIS_ATTRIBUTE_DESERIALIZE: u32 = 32u32; @@ -1287,9 +1254,6 @@ pub const NDIS_BIND_PARAMETERS_REVISION_4: u32 = 4u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct NDIS_CALL_MANAGER_CHARACTERISTICS(pub isize); -impl windows_core::TypeKind for NDIS_CALL_MANAGER_CHARACTERISTICS { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct NDIS_CLASS_ID(pub i32); @@ -1996,9 +1960,6 @@ pub const NDIS_MINIPORT_ATTRIBUTES_SURPRISE_REMOVE_OK: u32 = 4u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct NDIS_MINIPORT_BLOCK(pub isize); -impl windows_core::TypeKind for NDIS_MINIPORT_BLOCK { - type TypeKind = windows_core::CopyType; -} pub const NDIS_MINIPORT_CO_CHARACTERISTICS_REVISION_1: u32 = 1u32; pub const NDIS_MINIPORT_DRIVER: u32 = 1u32; pub const NDIS_MINIPORT_DRIVER_CHARACTERISTICS_REVISION_1: u32 = 1u32; @@ -2037,9 +1998,6 @@ pub const NDIS_MSIX_CONFIG_PARAMETERS_REVISION_1: u32 = 1u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct NDIS_M_DRIVER_BLOCK(pub isize); -impl windows_core::TypeKind for NDIS_M_DRIVER_BLOCK { - type TypeKind = windows_core::CopyType; -} pub const NDIS_M_MAX_LOOKAHEAD: u32 = 526u32; pub const NDIS_NBL_FLAGS_CAPTURE_TIMESTAMP_ON_TRANSMIT: u32 = 65536u32; pub const NDIS_NBL_FLAGS_HD_SPLIT: u32 = 256u32; @@ -2279,9 +2237,6 @@ pub const NDIS_OID_REQUEST_TIMEOUT_INFINITE: u32 = 0u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct NDIS_OPEN_BLOCK(pub isize); -impl windows_core::TypeKind for NDIS_OPEN_BLOCK { - type TypeKind = windows_core::CopyType; -} pub const NDIS_OPEN_PARAMETERS_REVISION_1: u32 = 1u32; pub const NDIS_OPEN_RECEIVE_NOT_REENTRANT: u32 = 1u32; #[repr(C)] @@ -2388,9 +2343,6 @@ pub const NDIS_PD_CONFIG_REVISION_1: u32 = 1u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct NDIS_PD_COUNTER_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for NDIS_PD_COUNTER_HANDLE { - type TypeKind = windows_core::CopyType; -} impl NDIS_PD_COUNTER_HANDLE { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -2405,9 +2357,6 @@ pub const NDIS_PD_COUNTER_PARAMETERS_REVISION_1: u32 = 1u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct NDIS_PD_FILTER_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for NDIS_PD_FILTER_HANDLE { - type TypeKind = windows_core::CopyType; -} impl NDIS_PD_FILTER_HANDLE { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -2424,9 +2373,6 @@ pub const NDIS_PD_PROVIDER_DISPATCH_REVISION_1: u32 = 1u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct NDIS_PD_PROVIDER_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for NDIS_PD_PROVIDER_HANDLE { - type TypeKind = windows_core::CopyType; -} impl NDIS_PD_PROVIDER_HANDLE { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -2550,9 +2496,6 @@ pub const NDIS_POLL_DATA_REVISION_1: u32 = 1u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct NDIS_POLL_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for NDIS_POLL_HANDLE { - type TypeKind = windows_core::CopyType; -} impl NDIS_POLL_HANDLE { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -2682,9 +2625,6 @@ pub type NDIS_PROC_CALLBACK = Option super } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn FltNotifyFilterChangeDirectory(notifysync: super::super::super::Foundation::PNOTIFY_SYNC, notifylist: *mut super::super::super::super::Win32::System::Kernel::LIST_ENTRY, fscontext: *const core::ffi::c_void, fulldirectoryname: *const super::super::super::super::Win32::System::Kernel::STRING, watchtree: P4, ignorebuffer: P5, completionfilter: u32, notifycallbackdata: *const FLT_CALLBACK_DATA, traversecallback: Option, subjectcontext: Option<*const super::super::super::Foundation::SECURITY_SUBJECT_CONTEXT>, filtercallback: Option) -where - P4: windows_core::Param, - P5: windows_core::Param, -{ +pub unsafe fn FltNotifyFilterChangeDirectory(notifysync: super::super::super::Foundation::PNOTIFY_SYNC, notifylist: *mut super::super::super::super::Win32::System::Kernel::LIST_ENTRY, fscontext: *const core::ffi::c_void, fulldirectoryname: *const super::super::super::super::Win32::System::Kernel::STRING, watchtree: bool, ignorebuffer: bool, completionfilter: u32, notifycallbackdata: *const FLT_CALLBACK_DATA, traversecallback: Option, subjectcontext: Option<*const super::super::super::Foundation::SECURITY_SUBJECT_CONTEXT>, filtercallback: Option) { windows_targets::link!("fltmgr.sys" "system" fn FltNotifyFilterChangeDirectory(notifysync : super::super::super::Foundation:: PNOTIFY_SYNC, notifylist : *mut super::super::super::super::Win32::System::Kernel:: LIST_ENTRY, fscontext : *const core::ffi::c_void, fulldirectoryname : *const super::super::super::super::Win32::System::Kernel:: STRING, watchtree : super::super::super::super::Win32::Foundation:: BOOLEAN, ignorebuffer : super::super::super::super::Win32::Foundation:: BOOLEAN, completionfilter : u32, notifycallbackdata : *const FLT_CALLBACK_DATA, traversecallback : super:: PCHECK_FOR_TRAVERSE_ACCESS, subjectcontext : *const super::super::super::Foundation:: SECURITY_SUBJECT_CONTEXT, filtercallback : super:: PFILTER_REPORT_CHANGE)); - FltNotifyFilterChangeDirectory( - core::mem::transmute(notifysync), - core::mem::transmute(notifylist), - core::mem::transmute(fscontext), - core::mem::transmute(fulldirectoryname), - watchtree.param().abi(), - ignorebuffer.param().abi(), - core::mem::transmute(completionfilter), - core::mem::transmute(notifycallbackdata), - core::mem::transmute(traversecallback.unwrap_or(core::mem::zeroed())), - core::mem::transmute(subjectcontext.unwrap_or(core::mem::zeroed())), - core::mem::transmute(filtercallback.unwrap_or(core::mem::zeroed())), - ) + FltNotifyFilterChangeDirectory(core::mem::transmute(notifysync), core::mem::transmute(notifylist), core::mem::transmute(fscontext), core::mem::transmute(fulldirectoryname), watchtree.into(), ignorebuffer.into(), core::mem::transmute(completionfilter), core::mem::transmute(notifycallbackdata), core::mem::transmute(traversecallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(subjectcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(filtercallback.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn FltObjectDereference(fltobject: *mut core::ffi::c_void) { @@ -1209,13 +1193,9 @@ pub unsafe fn FltPurgeFileNameInformationCache(instance: PFLT_INSTANCE, fileobje } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn FltQueryDirectoryFile(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, fileinformation: *mut core::ffi::c_void, length: u32, fileinformationclass: super::FILE_INFORMATION_CLASS, returnsingleentry: P5, filename: Option<*const super::super::super::super::Win32::Foundation::UNICODE_STRING>, restartscan: P7, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P5: windows_core::Param, - P7: windows_core::Param, -{ +pub unsafe fn FltQueryDirectoryFile(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, fileinformation: *mut core::ffi::c_void, length: u32, fileinformationclass: super::FILE_INFORMATION_CLASS, returnsingleentry: bool, filename: Option<*const super::super::super::super::Win32::Foundation::UNICODE_STRING>, restartscan: bool, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltQueryDirectoryFile(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, fileinformation : *mut core::ffi::c_void, length : u32, fileinformationclass : super:: FILE_INFORMATION_CLASS, returnsingleentry : super::super::super::super::Win32::Foundation:: BOOLEAN, filename : *const super::super::super::super::Win32::Foundation:: UNICODE_STRING, restartscan : super::super::super::super::Win32::Foundation:: BOOLEAN, lengthreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltQueryDirectoryFile(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass), returnsingleentry.param().abi(), core::mem::transmute(filename.unwrap_or(core::mem::zeroed())), restartscan.param().abi(), core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) + FltQueryDirectoryFile(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass), returnsingleentry.into(), core::mem::transmute(filename.unwrap_or(core::mem::zeroed())), restartscan.into(), core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1225,13 +1205,9 @@ pub unsafe fn FltQueryDirectoryFileEx(instance: PFLT_INSTANCE, fileobject: *cons } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn FltQueryEaFile(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, returnedeadata: *mut core::ffi::c_void, length: u32, returnsingleentry: P4, ealist: Option<*const core::ffi::c_void>, ealistlength: u32, eaindex: Option<*const u32>, restartscan: P8, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, - P8: windows_core::Param, -{ +pub unsafe fn FltQueryEaFile(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, returnedeadata: *mut core::ffi::c_void, length: u32, returnsingleentry: bool, ealist: Option<*const core::ffi::c_void>, ealistlength: u32, eaindex: Option<*const u32>, restartscan: bool, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltQueryEaFile(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, returnedeadata : *mut core::ffi::c_void, length : u32, returnsingleentry : super::super::super::super::Win32::Foundation:: BOOLEAN, ealist : *const core::ffi::c_void, ealistlength : u32, eaindex : *const u32, restartscan : super::super::super::super::Win32::Foundation:: BOOLEAN, lengthreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltQueryEaFile(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(returnedeadata), core::mem::transmute(length), returnsingleentry.param().abi(), core::mem::transmute(ealist.unwrap_or(core::mem::zeroed())), core::mem::transmute(ealistlength), core::mem::transmute(eaindex.unwrap_or(core::mem::zeroed())), restartscan.param().abi(), core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) + FltQueryEaFile(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(returnedeadata), core::mem::transmute(length), returnsingleentry.into(), core::mem::transmute(ealist.unwrap_or(core::mem::zeroed())), core::mem::transmute(ealistlength), core::mem::transmute(eaindex.unwrap_or(core::mem::zeroed())), restartscan.into(), core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] @@ -1247,13 +1223,9 @@ pub unsafe fn FltQueryInformationFile(instance: PFLT_INSTANCE, fileobject: *cons } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn FltQueryQuotaInformationFile(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, iostatusblock: *mut super::super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *mut core::ffi::c_void, length: u32, returnsingleentry: P5, sidlist: Option<*const core::ffi::c_void>, sidlistlength: u32, startsid: Option<*const u32>, restartscan: P9, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS -where - P5: windows_core::Param, - P9: windows_core::Param, -{ +pub unsafe fn FltQueryQuotaInformationFile(instance: PFLT_INSTANCE, fileobject: *const super::super::super::Foundation::FILE_OBJECT, iostatusblock: *mut super::super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *mut core::ffi::c_void, length: u32, returnsingleentry: bool, sidlist: Option<*const core::ffi::c_void>, sidlistlength: u32, startsid: Option<*const u32>, restartscan: bool, lengthreturned: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltQueryQuotaInformationFile(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, iostatusblock : *mut super::super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, buffer : *mut core::ffi::c_void, length : u32, returnsingleentry : super::super::super::super::Win32::Foundation:: BOOLEAN, sidlist : *const core::ffi::c_void, sidlistlength : u32, startsid : *const u32, restartscan : super::super::super::super::Win32::Foundation:: BOOLEAN, lengthreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltQueryQuotaInformationFile(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), returnsingleentry.param().abi(), core::mem::transmute(sidlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidlistlength), core::mem::transmute(startsid.unwrap_or(core::mem::zeroed())), restartscan.param().abi(), core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) + FltQueryQuotaInformationFile(core::mem::transmute(instance), core::mem::transmute(fileobject), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), returnsingleentry.into(), core::mem::transmute(sidlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidlistlength), core::mem::transmute(startsid.unwrap_or(core::mem::zeroed())), restartscan.into(), core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -3046,9 +3018,6 @@ pub type PFLT_CONNECT_NOTIFY = Option bool { self.0.is_null() @@ -3066,36 +3035,24 @@ pub type PFLT_CONTEXT_FREE_CALLBACK = Option; pub type PFLT_DISCONNECT_NOTIFY = Option; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PFLT_FILTER(pub isize); -impl windows_core::TypeKind for PFLT_FILTER { - type TypeKind = windows_core::CopyType; -} pub type PFLT_FILTER_UNLOAD_CALLBACK = Option super::super::super::super::Win32::Foundation::NTSTATUS>; #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] pub type PFLT_GENERATE_FILE_NAME = Option super::super::super::super::Win32::Foundation::NTSTATUS>; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PFLT_GENERIC_WORKITEM(pub isize); -impl windows_core::TypeKind for PFLT_GENERIC_WORKITEM { - type TypeKind = windows_core::CopyType; -} pub type PFLT_GENERIC_WORKITEM_ROUTINE = Option; #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] pub type PFLT_GET_OPERATION_STATUS_CALLBACK = Option; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PFLT_INSTANCE(pub isize); -impl windows_core::TypeKind for PFLT_INSTANCE { - type TypeKind = windows_core::CopyType; -} #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] pub type PFLT_INSTANCE_QUERY_TEARDOWN_CALLBACK = Option super::super::super::super::Win32::Foundation::NTSTATUS>; #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_Storage_InstallableFileSystems", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] @@ -3110,9 +3067,6 @@ pub type PFLT_NORMALIZE_NAME_COMPONENT_EX = Option FLT_POSTOP_CALLBACK_STATUS>; #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] @@ -3124,7 +3078,4 @@ pub type PFLT_TRANSACTION_NOTIFICATION_CALLBACK = Option(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: P3, buffer: *mut core::ffi::c_void, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, ioissuerthread: super::super::Foundation::PETHREAD, asyncreadcontext: *const CC_ASYNC_READ_CONTEXT) -> super::super::super::Win32::Foundation::BOOLEAN -where - P3: windows_core::Param, -{ +pub unsafe fn CcAsyncCopyRead(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: bool, buffer: *mut core::ffi::c_void, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, ioissuerthread: super::super::Foundation::PETHREAD, asyncreadcontext: *const CC_ASYNC_READ_CONTEXT) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn CcAsyncCopyRead(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, wait : super::super::super::Win32::Foundation:: BOOLEAN, buffer : *mut core::ffi::c_void, iostatus : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, ioissuerthread : super::super::Foundation:: PETHREAD, asyncreadcontext : *const CC_ASYNC_READ_CONTEXT) -> super::super::super::Win32::Foundation:: BOOLEAN); - CcAsyncCopyRead(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), wait.param().abi(), core::mem::transmute(buffer), core::mem::transmute(iostatus), core::mem::transmute(ioissuerthread), core::mem::transmute(asyncreadcontext)) + CcAsyncCopyRead(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), wait.into(), core::mem::transmute(buffer), core::mem::transmute(iostatus), core::mem::transmute(ioissuerthread), core::mem::transmute(asyncreadcontext)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn CcCanIWrite(fileobject: Option<*const super::super::Foundation::FILE_OBJECT>, bytestowrite: u32, wait: P2, retrying: u8) -> super::super::super::Win32::Foundation::BOOLEAN -where - P2: windows_core::Param, -{ +pub unsafe fn CcCanIWrite(fileobject: Option<*const super::super::Foundation::FILE_OBJECT>, bytestowrite: u32, wait: bool, retrying: u8) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn CcCanIWrite(fileobject : *const super::super::Foundation:: FILE_OBJECT, bytestowrite : u32, wait : super::super::super::Win32::Foundation:: BOOLEAN, retrying : u8) -> super::super::super::Win32::Foundation:: BOOLEAN); - CcCanIWrite(core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(bytestowrite), wait.param().abi(), core::mem::transmute(retrying)) + CcCanIWrite(core::mem::transmute(fileobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(bytestowrite), wait.into(), core::mem::transmute(retrying)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_IO"))] #[inline] @@ -31,39 +25,27 @@ pub unsafe fn CcCoherencyFlushAndPurgeCache(sectionobjectpointer: *const super:: } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn CcCopyRead(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: P3, buffer: *mut core::ffi::c_void, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation::BOOLEAN -where - P3: windows_core::Param, -{ +pub unsafe fn CcCopyRead(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: bool, buffer: *mut core::ffi::c_void, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn CcCopyRead(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, wait : super::super::super::Win32::Foundation:: BOOLEAN, buffer : *mut core::ffi::c_void, iostatus : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation:: BOOLEAN); - CcCopyRead(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), wait.param().abi(), core::mem::transmute(buffer), core::mem::transmute(iostatus)) + CcCopyRead(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), wait.into(), core::mem::transmute(buffer), core::mem::transmute(iostatus)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn CcCopyReadEx(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: P3, buffer: *mut core::ffi::c_void, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, ioissuerthread: super::super::Foundation::PETHREAD) -> super::super::super::Win32::Foundation::BOOLEAN -where - P3: windows_core::Param, -{ +pub unsafe fn CcCopyReadEx(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: bool, buffer: *mut core::ffi::c_void, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, ioissuerthread: super::super::Foundation::PETHREAD) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn CcCopyReadEx(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, wait : super::super::super::Win32::Foundation:: BOOLEAN, buffer : *mut core::ffi::c_void, iostatus : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, ioissuerthread : super::super::Foundation:: PETHREAD) -> super::super::super::Win32::Foundation:: BOOLEAN); - CcCopyReadEx(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), wait.param().abi(), core::mem::transmute(buffer), core::mem::transmute(iostatus), core::mem::transmute(ioissuerthread)) + CcCopyReadEx(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), wait.into(), core::mem::transmute(buffer), core::mem::transmute(iostatus), core::mem::transmute(ioissuerthread)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn CcCopyWrite(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: P3, buffer: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::BOOLEAN -where - P3: windows_core::Param, -{ +pub unsafe fn CcCopyWrite(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: bool, buffer: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn CcCopyWrite(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, wait : super::super::super::Win32::Foundation:: BOOLEAN, buffer : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: BOOLEAN); - CcCopyWrite(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), wait.param().abi(), core::mem::transmute(buffer)) + CcCopyWrite(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), wait.into(), core::mem::transmute(buffer)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn CcCopyWriteEx(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: P3, buffer: *const core::ffi::c_void, ioissuerthread: super::super::Foundation::PETHREAD) -> super::super::super::Win32::Foundation::BOOLEAN -where - P3: windows_core::Param, -{ +pub unsafe fn CcCopyWriteEx(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: bool, buffer: *const core::ffi::c_void, ioissuerthread: super::super::Foundation::PETHREAD) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn CcCopyWriteEx(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, wait : super::super::super::Win32::Foundation:: BOOLEAN, buffer : *const core::ffi::c_void, ioissuerthread : super::super::Foundation:: PETHREAD) -> super::super::super::Win32::Foundation:: BOOLEAN); - CcCopyWriteEx(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), wait.param().abi(), core::mem::transmute(buffer), core::mem::transmute(ioissuerthread)) + CcCopyWriteEx(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), wait.into(), core::mem::transmute(buffer), core::mem::transmute(ioissuerthread)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -73,12 +55,9 @@ pub unsafe fn CcCopyWriteWontFlush(fileobject: *const super::super::Foundation:: } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn CcDeferWrite(fileobject: *const super::super::Foundation::FILE_OBJECT, postroutine: PCC_POST_DEFERRED_WRITE, context1: *const core::ffi::c_void, context2: *const core::ffi::c_void, bytestowrite: u32, retrying: P5) -where - P5: windows_core::Param, -{ +pub unsafe fn CcDeferWrite(fileobject: *const super::super::Foundation::FILE_OBJECT, postroutine: PCC_POST_DEFERRED_WRITE, context1: *const core::ffi::c_void, context2: *const core::ffi::c_void, bytestowrite: u32, retrying: bool) { windows_targets::link!("ntoskrnl.exe" "system" fn CcDeferWrite(fileobject : *const super::super::Foundation:: FILE_OBJECT, postroutine : PCC_POST_DEFERRED_WRITE, context1 : *const core::ffi::c_void, context2 : *const core::ffi::c_void, bytestowrite : u32, retrying : super::super::super::Win32::Foundation:: BOOLEAN)); - CcDeferWrite(core::mem::transmute(fileobject), core::mem::transmute(postroutine), core::mem::transmute(context1), core::mem::transmute(context2), core::mem::transmute(bytestowrite), retrying.param().abi()) + CcDeferWrite(core::mem::transmute(fileobject), core::mem::transmute(postroutine), core::mem::transmute(context1), core::mem::transmute(context2), core::mem::transmute(bytestowrite), retrying.into()) } #[inline] pub unsafe fn CcErrorCallbackRoutine(context: *const CC_ERROR_CALLBACK_CONTEXT) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -129,30 +108,21 @@ pub unsafe fn CcGetFileObjectFromSectionPtrsRef(sectionobjectpointer: *const sup } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn CcGetFlushedValidData(sectionobjectpointer: *const super::super::Foundation::SECTION_OBJECT_POINTERS, bcblistheld: P1) -> i64 -where - P1: windows_core::Param, -{ +pub unsafe fn CcGetFlushedValidData(sectionobjectpointer: *const super::super::Foundation::SECTION_OBJECT_POINTERS, bcblistheld: bool) -> i64 { windows_targets::link!("ntoskrnl.exe" "system" fn CcGetFlushedValidData(sectionobjectpointer : *const super::super::Foundation:: SECTION_OBJECT_POINTERS, bcblistheld : super::super::super::Win32::Foundation:: BOOLEAN) -> i64); - CcGetFlushedValidData(core::mem::transmute(sectionobjectpointer), bcblistheld.param().abi()) + CcGetFlushedValidData(core::mem::transmute(sectionobjectpointer), bcblistheld.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn CcInitializeCacheMap(fileobject: *const super::super::Foundation::FILE_OBJECT, filesizes: *const CC_FILE_SIZES, pinaccess: P2, callbacks: *const CACHE_MANAGER_CALLBACKS, lazywritecontext: *const core::ffi::c_void) -where - P2: windows_core::Param, -{ +pub unsafe fn CcInitializeCacheMap(fileobject: *const super::super::Foundation::FILE_OBJECT, filesizes: *const CC_FILE_SIZES, pinaccess: bool, callbacks: *const CACHE_MANAGER_CALLBACKS, lazywritecontext: *const core::ffi::c_void) { windows_targets::link!("ntoskrnl.exe" "system" fn CcInitializeCacheMap(fileobject : *const super::super::Foundation:: FILE_OBJECT, filesizes : *const CC_FILE_SIZES, pinaccess : super::super::super::Win32::Foundation:: BOOLEAN, callbacks : *const CACHE_MANAGER_CALLBACKS, lazywritecontext : *const core::ffi::c_void)); - CcInitializeCacheMap(core::mem::transmute(fileobject), core::mem::transmute(filesizes), pinaccess.param().abi(), core::mem::transmute(callbacks), core::mem::transmute(lazywritecontext)) + CcInitializeCacheMap(core::mem::transmute(fileobject), core::mem::transmute(filesizes), pinaccess.into(), core::mem::transmute(callbacks), core::mem::transmute(lazywritecontext)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn CcInitializeCacheMapEx(fileobject: *const super::super::Foundation::FILE_OBJECT, filesizes: *const CC_FILE_SIZES, pinaccess: P2, callbacks: *const CACHE_MANAGER_CALLBACKS, lazywritecontext: *const core::ffi::c_void, flags: u32) -where - P2: windows_core::Param, -{ +pub unsafe fn CcInitializeCacheMapEx(fileobject: *const super::super::Foundation::FILE_OBJECT, filesizes: *const CC_FILE_SIZES, pinaccess: bool, callbacks: *const CACHE_MANAGER_CALLBACKS, lazywritecontext: *const core::ffi::c_void, flags: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn CcInitializeCacheMapEx(fileobject : *const super::super::Foundation:: FILE_OBJECT, filesizes : *const CC_FILE_SIZES, pinaccess : super::super::super::Win32::Foundation:: BOOLEAN, callbacks : *const CACHE_MANAGER_CALLBACKS, lazywritecontext : *const core::ffi::c_void, flags : u32)); - CcInitializeCacheMapEx(core::mem::transmute(fileobject), core::mem::transmute(filesizes), pinaccess.param().abi(), core::mem::transmute(callbacks), core::mem::transmute(lazywritecontext), core::mem::transmute(flags)) + CcInitializeCacheMapEx(core::mem::transmute(fileobject), core::mem::transmute(filesizes), pinaccess.into(), core::mem::transmute(callbacks), core::mem::transmute(lazywritecontext), core::mem::transmute(flags)) } #[inline] pub unsafe fn CcIsCacheManagerCallbackNeeded(status: super::super::super::Win32::Foundation::NTSTATUS) -> super::super::super::Win32::Foundation::BOOLEAN { @@ -221,12 +191,9 @@ pub unsafe fn CcPrepareMdlWrite(fileobject: *const super::super::Foundation::FIL } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn CcPreparePinWrite(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, zero: P3, flags: u32, bcb: *mut *mut core::ffi::c_void, buffer: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::BOOLEAN -where - P3: windows_core::Param, -{ +pub unsafe fn CcPreparePinWrite(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, zero: bool, flags: u32, bcb: *mut *mut core::ffi::c_void, buffer: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn CcPreparePinWrite(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, zero : super::super::super::Win32::Foundation:: BOOLEAN, flags : u32, bcb : *mut *mut core::ffi::c_void, buffer : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: BOOLEAN); - CcPreparePinWrite(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), zero.param().abi(), core::mem::transmute(flags), core::mem::transmute(bcb), core::mem::transmute(buffer)) + CcPreparePinWrite(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), zero.into(), core::mem::transmute(flags), core::mem::transmute(bcb), core::mem::transmute(buffer)) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -258,13 +225,9 @@ pub unsafe fn CcScheduleReadAheadEx(fileobject: *const super::super::Foundation: } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn CcSetAdditionalCacheAttributes(fileobject: *const super::super::Foundation::FILE_OBJECT, disablereadahead: P1, disablewritebehind: P2) -where - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn CcSetAdditionalCacheAttributes(fileobject: *const super::super::Foundation::FILE_OBJECT, disablereadahead: bool, disablewritebehind: bool) { windows_targets::link!("ntoskrnl.exe" "system" fn CcSetAdditionalCacheAttributes(fileobject : *const super::super::Foundation:: FILE_OBJECT, disablereadahead : super::super::super::Win32::Foundation:: BOOLEAN, disablewritebehind : super::super::super::Win32::Foundation:: BOOLEAN)); - CcSetAdditionalCacheAttributes(core::mem::transmute(fileobject), disablereadahead.param().abi(), disablewritebehind.param().abi()) + CcSetAdditionalCacheAttributes(core::mem::transmute(fileobject), disablereadahead.into(), disablewritebehind.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -308,12 +271,9 @@ pub unsafe fn CcSetLogHandleForFile(fileobject: *const super::super::Foundation: } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn CcSetParallelFlushFile(fileobject: *const super::super::Foundation::FILE_OBJECT, enableparallelflush: P1) -where - P1: windows_core::Param, -{ +pub unsafe fn CcSetParallelFlushFile(fileobject: *const super::super::Foundation::FILE_OBJECT, enableparallelflush: bool) { windows_targets::link!("ntoskrnl.exe" "system" fn CcSetParallelFlushFile(fileobject : *const super::super::Foundation:: FILE_OBJECT, enableparallelflush : super::super::super::Win32::Foundation:: BOOLEAN)); - CcSetParallelFlushFile(core::mem::transmute(fileobject), enableparallelflush.param().abi()) + CcSetParallelFlushFile(core::mem::transmute(fileobject), enableparallelflush.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -339,13 +299,10 @@ pub unsafe fn CcUnpinDataForThread(bcb: *const core::ffi::c_void, resourcethread } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn CcUnpinRepinnedBcb(bcb: *const core::ffi::c_void, writethrough: P1) -> super::super::super::Win32::System::IO::IO_STATUS_BLOCK -where - P1: windows_core::Param, -{ +pub unsafe fn CcUnpinRepinnedBcb(bcb: *const core::ffi::c_void, writethrough: bool) -> super::super::super::Win32::System::IO::IO_STATUS_BLOCK { windows_targets::link!("ntoskrnl.exe" "system" fn CcUnpinRepinnedBcb(bcb : *const core::ffi::c_void, writethrough : super::super::super::Win32::Foundation:: BOOLEAN, iostatus : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK)); let mut result__ = core::mem::zeroed(); - CcUnpinRepinnedBcb(core::mem::transmute(bcb), writethrough.param().abi(), &mut result__); + CcUnpinRepinnedBcb(core::mem::transmute(bcb), writethrough.into(), &mut result__); result__ } #[inline] @@ -355,12 +312,9 @@ pub unsafe fn CcWaitForCurrentLazyWriterActivity() -> super::super::super::Win32 } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn CcZeroData(fileobject: *const super::super::Foundation::FILE_OBJECT, startoffset: *const i64, endoffset: *const i64, wait: P3) -> super::super::super::Win32::Foundation::BOOLEAN -where - P3: windows_core::Param, -{ +pub unsafe fn CcZeroData(fileobject: *const super::super::Foundation::FILE_OBJECT, startoffset: *const i64, endoffset: *const i64, wait: bool) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn CcZeroData(fileobject : *const super::super::Foundation:: FILE_OBJECT, startoffset : *const i64, endoffset : *const i64, wait : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - CcZeroData(core::mem::transmute(fileobject), core::mem::transmute(startoffset), core::mem::transmute(endoffset), wait.param().abi()) + CcZeroData(core::mem::transmute(fileobject), core::mem::transmute(startoffset), core::mem::transmute(endoffset), wait.into()) } #[inline] pub unsafe fn CompleteAuthToken(phcontext: *const SecHandle, ptoken: *const SecBufferDesc) -> windows_core::Result<()> { @@ -418,12 +372,9 @@ pub unsafe fn FsRtlAddMcbEntry(mcb: *mut MCB, vbn: u32, lbn: u32, sectorcount: u } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn FsRtlAddToTunnelCache(cache: *mut TUNNEL, directorykey: u64, shortname: *const super::super::super::Win32::Foundation::UNICODE_STRING, longname: *const super::super::super::Win32::Foundation::UNICODE_STRING, keybyshortname: P4, datalength: u32, data: *const core::ffi::c_void) -where - P4: windows_core::Param, -{ +pub unsafe fn FsRtlAddToTunnelCache(cache: *mut TUNNEL, directorykey: u64, shortname: *const super::super::super::Win32::Foundation::UNICODE_STRING, longname: *const super::super::super::Win32::Foundation::UNICODE_STRING, keybyshortname: bool, datalength: u32, data: *const core::ffi::c_void) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlAddToTunnelCache(cache : *mut TUNNEL, directorykey : u64, shortname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, longname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, keybyshortname : super::super::super::Win32::Foundation:: BOOLEAN, datalength : u32, data : *const core::ffi::c_void)); - FsRtlAddToTunnelCache(core::mem::transmute(cache), core::mem::transmute(directorykey), core::mem::transmute(shortname), core::mem::transmute(longname), keybyshortname.param().abi(), core::mem::transmute(datalength), core::mem::transmute(data)) + FsRtlAddToTunnelCache(core::mem::transmute(cache), core::mem::transmute(directorykey), core::mem::transmute(shortname), core::mem::transmute(longname), keybyshortname.into(), core::mem::transmute(datalength), core::mem::transmute(data)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -466,12 +417,9 @@ pub unsafe fn FsRtlAllocateResource() -> *mut super::super::Foundation::ERESOURC FsRtlAllocateResource() } #[inline] -pub unsafe fn FsRtlAreNamesEqual(constantnamea: *const super::super::super::Win32::Foundation::UNICODE_STRING, constantnameb: *const super::super::super::Win32::Foundation::UNICODE_STRING, ignorecase: P2, upcasetable: Option<*const u16>) -> super::super::super::Win32::Foundation::BOOLEAN -where - P2: windows_core::Param, -{ +pub unsafe fn FsRtlAreNamesEqual(constantnamea: *const super::super::super::Win32::Foundation::UNICODE_STRING, constantnameb: *const super::super::super::Win32::Foundation::UNICODE_STRING, ignorecase: bool, upcasetable: Option<*const u16>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlAreNamesEqual(constantnamea : *const super::super::super::Win32::Foundation:: UNICODE_STRING, constantnameb : *const super::super::super::Win32::Foundation:: UNICODE_STRING, ignorecase : super::super::super::Win32::Foundation:: BOOLEAN, upcasetable : *const u16) -> super::super::super::Win32::Foundation:: BOOLEAN); - FsRtlAreNamesEqual(core::mem::transmute(constantnamea), core::mem::transmute(constantnameb), ignorecase.param().abi(), core::mem::transmute(upcasetable.unwrap_or(core::mem::zeroed()))) + FsRtlAreNamesEqual(core::mem::transmute(constantnamea), core::mem::transmute(constantnameb), ignorecase.into(), core::mem::transmute(upcasetable.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -569,21 +517,15 @@ pub unsafe fn FsRtlCheckUpperOplock(oplock: *const *const core::ffi::c_void, new } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn FsRtlCopyRead(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: P3, lockkey: u32, buffer: *mut core::ffi::c_void, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, deviceobject: *const super::super::Foundation::DEVICE_OBJECT) -> super::super::super::Win32::Foundation::BOOLEAN -where - P3: windows_core::Param, -{ +pub unsafe fn FsRtlCopyRead(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: bool, lockkey: u32, buffer: *mut core::ffi::c_void, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, deviceobject: *const super::super::Foundation::DEVICE_OBJECT) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlCopyRead(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, wait : super::super::super::Win32::Foundation:: BOOLEAN, lockkey : u32, buffer : *mut core::ffi::c_void, iostatus : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT) -> super::super::super::Win32::Foundation:: BOOLEAN); - FsRtlCopyRead(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), wait.param().abi(), core::mem::transmute(lockkey), core::mem::transmute(buffer), core::mem::transmute(iostatus), core::mem::transmute(deviceobject)) + FsRtlCopyRead(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), wait.into(), core::mem::transmute(lockkey), core::mem::transmute(buffer), core::mem::transmute(iostatus), core::mem::transmute(deviceobject)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn FsRtlCopyWrite(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: P3, lockkey: u32, buffer: *const core::ffi::c_void, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, deviceobject: *const super::super::Foundation::DEVICE_OBJECT) -> super::super::super::Win32::Foundation::BOOLEAN -where - P3: windows_core::Param, -{ +pub unsafe fn FsRtlCopyWrite(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, wait: bool, lockkey: u32, buffer: *const core::ffi::c_void, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, deviceobject: *const super::super::Foundation::DEVICE_OBJECT) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlCopyWrite(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, wait : super::super::super::Win32::Foundation:: BOOLEAN, lockkey : u32, buffer : *const core::ffi::c_void, iostatus : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT) -> super::super::super::Win32::Foundation:: BOOLEAN); - FsRtlCopyWrite(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), wait.param().abi(), core::mem::transmute(lockkey), core::mem::transmute(buffer), core::mem::transmute(iostatus), core::mem::transmute(deviceobject)) + FsRtlCopyWrite(core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), wait.into(), core::mem::transmute(lockkey), core::mem::transmute(buffer), core::mem::transmute(iostatus), core::mem::transmute(deviceobject)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -682,12 +624,9 @@ pub unsafe fn FsRtlFastUnlockAllByKey(filelock: *const FILE_LOCK, fileobject: *c } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn FsRtlFastUnlockSingle(filelock: *const FILE_LOCK, fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: *const i64, processid: super::super::Foundation::PEPROCESS, key: u32, context: Option<*const core::ffi::c_void>, alreadysynchronized: P7) -> super::super::super::Win32::Foundation::NTSTATUS -where - P7: windows_core::Param, -{ +pub unsafe fn FsRtlFastUnlockSingle(filelock: *const FILE_LOCK, fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: *const i64, processid: super::super::Foundation::PEPROCESS, key: u32, context: Option<*const core::ffi::c_void>, alreadysynchronized: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlFastUnlockSingle(filelock : *const FILE_LOCK, fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : *const i64, processid : super::super::Foundation:: PEPROCESS, key : u32, context : *const core::ffi::c_void, alreadysynchronized : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlFastUnlockSingle(core::mem::transmute(filelock), core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), core::mem::transmute(processid), core::mem::transmute(key), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), alreadysynchronized.param().abi()) + FsRtlFastUnlockSingle(core::mem::transmute(filelock), core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), core::mem::transmute(processid), core::mem::transmute(key), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), alreadysynchronized.into()) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -760,12 +699,9 @@ pub unsafe fn FsRtlGetNextExtraCreateParameter(ecplist: *const super::super::Fou } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn FsRtlGetNextFileLock(filelock: *const FILE_LOCK, restart: P1) -> *mut FILE_LOCK_INFO -where - P1: windows_core::Param, -{ +pub unsafe fn FsRtlGetNextFileLock(filelock: *const FILE_LOCK, restart: bool) -> *mut FILE_LOCK_INFO { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlGetNextFileLock(filelock : *const FILE_LOCK, restart : super::super::super::Win32::Foundation:: BOOLEAN) -> *mut FILE_LOCK_INFO); - FsRtlGetNextFileLock(core::mem::transmute(filelock), restart.param().abi()) + FsRtlGetNextFileLock(core::mem::transmute(filelock), restart.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -939,25 +875,15 @@ pub unsafe fn FsRtlIsExtentDangling(startpage: u32, numberofpages: u32, flags: u } #[cfg(feature = "Win32_System_Kernel")] #[inline] -pub unsafe fn FsRtlIsFatDbcsLegal(dbcsname: super::super::super::Win32::System::Kernel::STRING, wildcardspermissible: P1, pathnamepermissible: P2, leadingbackslashpermissible: P3) -> super::super::super::Win32::Foundation::BOOLEAN -where - P1: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn FsRtlIsFatDbcsLegal(dbcsname: super::super::super::Win32::System::Kernel::STRING, wildcardspermissible: bool, pathnamepermissible: bool, leadingbackslashpermissible: bool) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlIsFatDbcsLegal(dbcsname : super::super::super::Win32::System::Kernel:: STRING, wildcardspermissible : super::super::super::Win32::Foundation:: BOOLEAN, pathnamepermissible : super::super::super::Win32::Foundation:: BOOLEAN, leadingbackslashpermissible : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - FsRtlIsFatDbcsLegal(core::mem::transmute(dbcsname), wildcardspermissible.param().abi(), pathnamepermissible.param().abi(), leadingbackslashpermissible.param().abi()) + FsRtlIsFatDbcsLegal(core::mem::transmute(dbcsname), wildcardspermissible.into(), pathnamepermissible.into(), leadingbackslashpermissible.into()) } #[cfg(feature = "Win32_System_Kernel")] #[inline] -pub unsafe fn FsRtlIsHpfsDbcsLegal(dbcsname: super::super::super::Win32::System::Kernel::STRING, wildcardspermissible: P1, pathnamepermissible: P2, leadingbackslashpermissible: P3) -> super::super::super::Win32::Foundation::BOOLEAN -where - P1: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn FsRtlIsHpfsDbcsLegal(dbcsname: super::super::super::Win32::System::Kernel::STRING, wildcardspermissible: bool, pathnamepermissible: bool, leadingbackslashpermissible: bool) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlIsHpfsDbcsLegal(dbcsname : super::super::super::Win32::System::Kernel:: STRING, wildcardspermissible : super::super::super::Win32::Foundation:: BOOLEAN, pathnamepermissible : super::super::super::Win32::Foundation:: BOOLEAN, leadingbackslashpermissible : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - FsRtlIsHpfsDbcsLegal(core::mem::transmute(dbcsname), wildcardspermissible.param().abi(), pathnamepermissible.param().abi(), leadingbackslashpermissible.param().abi()) + FsRtlIsHpfsDbcsLegal(core::mem::transmute(dbcsname), wildcardspermissible.into(), pathnamepermissible.into(), leadingbackslashpermissible.into()) } #[inline] pub unsafe fn FsRtlIsMobileOS() -> super::super::super::Win32::Foundation::BOOLEAN { @@ -965,22 +891,20 @@ pub unsafe fn FsRtlIsMobileOS() -> super::super::super::Win32::Foundation::BOOLE FsRtlIsMobileOS() } #[inline] -pub unsafe fn FsRtlIsNameInExpression(expression: *const super::super::super::Win32::Foundation::UNICODE_STRING, name: *const super::super::super::Win32::Foundation::UNICODE_STRING, ignorecase: P2, upcasetable: P3) -> super::super::super::Win32::Foundation::BOOLEAN +pub unsafe fn FsRtlIsNameInExpression(expression: *const super::super::super::Win32::Foundation::UNICODE_STRING, name: *const super::super::super::Win32::Foundation::UNICODE_STRING, ignorecase: bool, upcasetable: P3) -> super::super::super::Win32::Foundation::BOOLEAN where - P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlIsNameInExpression(expression : *const super::super::super::Win32::Foundation:: UNICODE_STRING, name : *const super::super::super::Win32::Foundation:: UNICODE_STRING, ignorecase : super::super::super::Win32::Foundation:: BOOLEAN, upcasetable : windows_core::PCWSTR) -> super::super::super::Win32::Foundation:: BOOLEAN); - FsRtlIsNameInExpression(core::mem::transmute(expression), core::mem::transmute(name), ignorecase.param().abi(), upcasetable.param().abi()) + FsRtlIsNameInExpression(core::mem::transmute(expression), core::mem::transmute(name), ignorecase.into(), upcasetable.param().abi()) } #[inline] -pub unsafe fn FsRtlIsNameInUnUpcasedExpression(expression: *const super::super::super::Win32::Foundation::UNICODE_STRING, name: *const super::super::super::Win32::Foundation::UNICODE_STRING, ignorecase: P2, upcasetable: P3) -> super::super::super::Win32::Foundation::BOOLEAN +pub unsafe fn FsRtlIsNameInUnUpcasedExpression(expression: *const super::super::super::Win32::Foundation::UNICODE_STRING, name: *const super::super::super::Win32::Foundation::UNICODE_STRING, ignorecase: bool, upcasetable: P3) -> super::super::super::Win32::Foundation::BOOLEAN where - P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlIsNameInUnUpcasedExpression(expression : *const super::super::super::Win32::Foundation:: UNICODE_STRING, name : *const super::super::super::Win32::Foundation:: UNICODE_STRING, ignorecase : super::super::super::Win32::Foundation:: BOOLEAN, upcasetable : windows_core::PCWSTR) -> super::super::super::Win32::Foundation:: BOOLEAN); - FsRtlIsNameInUnUpcasedExpression(core::mem::transmute(expression), core::mem::transmute(name), ignorecase.param().abi(), upcasetable.param().abi()) + FsRtlIsNameInUnUpcasedExpression(core::mem::transmute(expression), core::mem::transmute(name), ignorecase.into(), upcasetable.param().abi()) } #[inline] pub unsafe fn FsRtlIsNonEmptyDirectoryReparsePointAllowed(reparsetag: u32) -> super::super::super::Win32::Foundation::BOOLEAN { @@ -1139,19 +1063,15 @@ pub unsafe fn FsRtlNotifyCleanupAll(notifysync: super::super::Foundation::PNOTIF } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn FsRtlNotifyFilterChangeDirectory(notifysync: super::super::Foundation::PNOTIFY_SYNC, notifylist: *const super::super::super::Win32::System::Kernel::LIST_ENTRY, fscontext: *const core::ffi::c_void, fulldirectoryname: *const super::super::super::Win32::System::Kernel::STRING, watchtree: P4, ignorebuffer: P5, completionfilter: u32, notifyirp: Option<*const super::super::Foundation::IRP>, traversecallback: Option, subjectcontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>, filtercallback: Option) -where - P4: windows_core::Param, - P5: windows_core::Param, -{ +pub unsafe fn FsRtlNotifyFilterChangeDirectory(notifysync: super::super::Foundation::PNOTIFY_SYNC, notifylist: *const super::super::super::Win32::System::Kernel::LIST_ENTRY, fscontext: *const core::ffi::c_void, fulldirectoryname: *const super::super::super::Win32::System::Kernel::STRING, watchtree: bool, ignorebuffer: bool, completionfilter: u32, notifyirp: Option<*const super::super::Foundation::IRP>, traversecallback: Option, subjectcontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>, filtercallback: Option) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlNotifyFilterChangeDirectory(notifysync : super::super::Foundation:: PNOTIFY_SYNC, notifylist : *const super::super::super::Win32::System::Kernel:: LIST_ENTRY, fscontext : *const core::ffi::c_void, fulldirectoryname : *const super::super::super::Win32::System::Kernel:: STRING, watchtree : super::super::super::Win32::Foundation:: BOOLEAN, ignorebuffer : super::super::super::Win32::Foundation:: BOOLEAN, completionfilter : u32, notifyirp : *const super::super::Foundation:: IRP, traversecallback : PCHECK_FOR_TRAVERSE_ACCESS, subjectcontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT, filtercallback : PFILTER_REPORT_CHANGE)); FsRtlNotifyFilterChangeDirectory( core::mem::transmute(notifysync), core::mem::transmute(notifylist), core::mem::transmute(fscontext), core::mem::transmute(fulldirectoryname), - watchtree.param().abi(), - ignorebuffer.param().abi(), + watchtree.into(), + ignorebuffer.into(), core::mem::transmute(completionfilter), core::mem::transmute(notifyirp.unwrap_or(core::mem::zeroed())), core::mem::transmute(traversecallback.unwrap_or(core::mem::zeroed())), @@ -1178,13 +1098,9 @@ pub unsafe fn FsRtlNotifyFilterReportChange(notifysync: super::super::Foundation } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn FsRtlNotifyFullChangeDirectory(notifysync: super::super::Foundation::PNOTIFY_SYNC, notifylist: *const super::super::super::Win32::System::Kernel::LIST_ENTRY, fscontext: *const core::ffi::c_void, fulldirectoryname: *mut super::super::super::Win32::System::Kernel::STRING, watchtree: P4, ignorebuffer: P5, completionfilter: u32, notifyirp: Option<*const super::super::Foundation::IRP>, traversecallback: Option, subjectcontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>) -where - P4: windows_core::Param, - P5: windows_core::Param, -{ +pub unsafe fn FsRtlNotifyFullChangeDirectory(notifysync: super::super::Foundation::PNOTIFY_SYNC, notifylist: *const super::super::super::Win32::System::Kernel::LIST_ENTRY, fscontext: *const core::ffi::c_void, fulldirectoryname: *mut super::super::super::Win32::System::Kernel::STRING, watchtree: bool, ignorebuffer: bool, completionfilter: u32, notifyirp: Option<*const super::super::Foundation::IRP>, traversecallback: Option, subjectcontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlNotifyFullChangeDirectory(notifysync : super::super::Foundation:: PNOTIFY_SYNC, notifylist : *const super::super::super::Win32::System::Kernel:: LIST_ENTRY, fscontext : *const core::ffi::c_void, fulldirectoryname : *mut super::super::super::Win32::System::Kernel:: STRING, watchtree : super::super::super::Win32::Foundation:: BOOLEAN, ignorebuffer : super::super::super::Win32::Foundation:: BOOLEAN, completionfilter : u32, notifyirp : *const super::super::Foundation:: IRP, traversecallback : PCHECK_FOR_TRAVERSE_ACCESS, subjectcontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT)); - FsRtlNotifyFullChangeDirectory(core::mem::transmute(notifysync), core::mem::transmute(notifylist), core::mem::transmute(fscontext), core::mem::transmute(fulldirectoryname), watchtree.param().abi(), ignorebuffer.param().abi(), core::mem::transmute(completionfilter), core::mem::transmute(notifyirp.unwrap_or(core::mem::zeroed())), core::mem::transmute(traversecallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(subjectcontext.unwrap_or(core::mem::zeroed()))) + FsRtlNotifyFullChangeDirectory(core::mem::transmute(notifysync), core::mem::transmute(notifylist), core::mem::transmute(fscontext), core::mem::transmute(fulldirectoryname), watchtree.into(), ignorebuffer.into(), core::mem::transmute(completionfilter), core::mem::transmute(notifyirp.unwrap_or(core::mem::zeroed())), core::mem::transmute(traversecallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(subjectcontext.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -1325,14 +1241,9 @@ pub unsafe fn FsRtlPrepareToReuseEcp(ecpcontext: *const core::ffi::c_void) { } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn FsRtlPrivateLock(filelock: *const FILE_LOCK, fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: *const i64, processid: super::super::Foundation::PEPROCESS, key: u32, failimmediately: P6, exclusivelock: P7, iosb: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, irp: Option<*const super::super::Foundation::IRP>, context: Option<*const core::ffi::c_void>, alreadysynchronized: P11) -> super::super::super::Win32::Foundation::BOOLEAN -where - P6: windows_core::Param, - P7: windows_core::Param, - P11: windows_core::Param, -{ +pub unsafe fn FsRtlPrivateLock(filelock: *const FILE_LOCK, fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: *const i64, processid: super::super::Foundation::PEPROCESS, key: u32, failimmediately: bool, exclusivelock: bool, iosb: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, irp: Option<*const super::super::Foundation::IRP>, context: Option<*const core::ffi::c_void>, alreadysynchronized: bool) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlPrivateLock(filelock : *const FILE_LOCK, fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : *const i64, processid : super::super::Foundation:: PEPROCESS, key : u32, failimmediately : super::super::super::Win32::Foundation:: BOOLEAN, exclusivelock : super::super::super::Win32::Foundation:: BOOLEAN, iosb : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, irp : *const super::super::Foundation:: IRP, context : *const core::ffi::c_void, alreadysynchronized : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - FsRtlPrivateLock(core::mem::transmute(filelock), core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), core::mem::transmute(processid), core::mem::transmute(key), failimmediately.param().abi(), exclusivelock.param().abi(), core::mem::transmute(iosb), core::mem::transmute(irp.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), alreadysynchronized.param().abi()) + FsRtlPrivateLock(core::mem::transmute(filelock), core::mem::transmute(fileobject), core::mem::transmute(fileoffset), core::mem::transmute(length), core::mem::transmute(processid), core::mem::transmute(key), failimmediately.into(), exclusivelock.into(), core::mem::transmute(iosb), core::mem::transmute(irp.unwrap_or(core::mem::zeroed())), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), alreadysynchronized.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1354,13 +1265,9 @@ pub unsafe fn FsRtlQueryInformationFile(fileobject: *const super::super::Foundat } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn FsRtlQueryKernelEaFile(fileobject: *const super::super::Foundation::FILE_OBJECT, returnedeadata: *mut core::ffi::c_void, length: u32, returnsingleentry: P3, ealist: Option<*const core::ffi::c_void>, ealistlength: u32, eaindex: Option<*const u32>, restartscan: P7, lengthreturned: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P3: windows_core::Param, - P7: windows_core::Param, -{ +pub unsafe fn FsRtlQueryKernelEaFile(fileobject: *const super::super::Foundation::FILE_OBJECT, returnedeadata: *mut core::ffi::c_void, length: u32, returnsingleentry: bool, ealist: Option<*const core::ffi::c_void>, ealistlength: u32, eaindex: Option<*const u32>, restartscan: bool, lengthreturned: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlQueryKernelEaFile(fileobject : *const super::super::Foundation:: FILE_OBJECT, returnedeadata : *mut core::ffi::c_void, length : u32, returnsingleentry : super::super::super::Win32::Foundation:: BOOLEAN, ealist : *const core::ffi::c_void, ealistlength : u32, eaindex : *const u32, restartscan : super::super::super::Win32::Foundation:: BOOLEAN, lengthreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlQueryKernelEaFile(core::mem::transmute(fileobject), core::mem::transmute(returnedeadata), core::mem::transmute(length), returnsingleentry.param().abi(), core::mem::transmute(ealist.unwrap_or(core::mem::zeroed())), core::mem::transmute(ealistlength), core::mem::transmute(eaindex.unwrap_or(core::mem::zeroed())), restartscan.param().abi(), core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) + FsRtlQueryKernelEaFile(core::mem::transmute(fileobject), core::mem::transmute(returnedeadata), core::mem::transmute(length), returnsingleentry.into(), core::mem::transmute(ealist.unwrap_or(core::mem::zeroed())), core::mem::transmute(ealistlength), core::mem::transmute(eaindex.unwrap_or(core::mem::zeroed())), restartscan.into(), core::mem::transmute(lengthreturned.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn FsRtlQueryMaximumVirtualDiskNestingLevel() -> u32 { @@ -1374,12 +1281,9 @@ pub unsafe fn FsRtlRegisterFileSystemFilterCallbacks(filterdriverobject: *const FsRtlRegisterFileSystemFilterCallbacks(core::mem::transmute(filterdriverobject), core::mem::transmute(callbacks)) } #[inline] -pub unsafe fn FsRtlRegisterUncProvider(muphandle: *mut super::super::super::Win32::Foundation::HANDLE, redirectordevicename: *const super::super::super::Win32::Foundation::UNICODE_STRING, mailslotssupported: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn FsRtlRegisterUncProvider(muphandle: *mut super::super::super::Win32::Foundation::HANDLE, redirectordevicename: *const super::super::super::Win32::Foundation::UNICODE_STRING, mailslotssupported: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlRegisterUncProvider(muphandle : *mut super::super::super::Win32::Foundation:: HANDLE, redirectordevicename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, mailslotssupported : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlRegisterUncProvider(core::mem::transmute(muphandle), core::mem::transmute(redirectordevicename), mailslotssupported.param().abi()) + FsRtlRegisterUncProvider(core::mem::transmute(muphandle), core::mem::transmute(redirectordevicename), mailslotssupported.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1454,12 +1358,9 @@ pub unsafe fn FsRtlResetBaseMcb() -> BASE_MCB { } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn FsRtlResetLargeMcb(mcb: *mut LARGE_MCB, selfsynchronized: P1) -where - P1: windows_core::Param, -{ +pub unsafe fn FsRtlResetLargeMcb(mcb: *mut LARGE_MCB, selfsynchronized: bool) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlResetLargeMcb(mcb : *mut LARGE_MCB, selfsynchronized : super::super::super::Win32::Foundation:: BOOLEAN)); - FsRtlResetLargeMcb(core::mem::transmute(mcb), selfsynchronized.param().abi()) + FsRtlResetLargeMcb(core::mem::transmute(mcb), selfsynchronized.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1603,20 +1504,14 @@ pub unsafe fn IoCheckFunctionAccess(grantedaccess: u32, majorfunction: u8, minor IoCheckFunctionAccess(core::mem::transmute(grantedaccess), core::mem::transmute(majorfunction), core::mem::transmute(minorfunction), core::mem::transmute(iocontrolcode), core::mem::transmute(arg1.unwrap_or(core::mem::zeroed())), core::mem::transmute(arg2.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn IoCheckQuerySetFileInformation(fileinformationclass: FILE_INFORMATION_CLASS, length: u32, setoperation: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn IoCheckQuerySetFileInformation(fileinformationclass: FILE_INFORMATION_CLASS, length: u32, setoperation: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCheckQuerySetFileInformation(fileinformationclass : FILE_INFORMATION_CLASS, length : u32, setoperation : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoCheckQuerySetFileInformation(core::mem::transmute(fileinformationclass), core::mem::transmute(length), setoperation.param().abi()) + IoCheckQuerySetFileInformation(core::mem::transmute(fileinformationclass), core::mem::transmute(length), setoperation.into()) } #[inline] -pub unsafe fn IoCheckQuerySetVolumeInformation(fsinformationclass: FS_INFORMATION_CLASS, length: u32, setoperation: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn IoCheckQuerySetVolumeInformation(fsinformationclass: FS_INFORMATION_CLASS, length: u32, setoperation: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCheckQuerySetVolumeInformation(fsinformationclass : FS_INFORMATION_CLASS, length : u32, setoperation : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoCheckQuerySetVolumeInformation(core::mem::transmute(fsinformationclass), core::mem::transmute(length), setoperation.param().abi()) + IoCheckQuerySetVolumeInformation(core::mem::transmute(fsinformationclass), core::mem::transmute(length), setoperation.into()) } #[cfg(feature = "Win32_Security")] #[inline] @@ -1812,12 +1707,9 @@ pub unsafe fn IoRegisterFsRegistrationChange(driverobject: *const super::super:: } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn IoRegisterFsRegistrationChangeMountAware(driverobject: *const super::super::Foundation::DRIVER_OBJECT, drivernotificationroutine: super::super::Foundation::DRIVER_FS_NOTIFICATION, synchronizewithmounts: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn IoRegisterFsRegistrationChangeMountAware(driverobject: *const super::super::Foundation::DRIVER_OBJECT, drivernotificationroutine: super::super::Foundation::DRIVER_FS_NOTIFICATION, synchronizewithmounts: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoRegisterFsRegistrationChangeMountAware(driverobject : *const super::super::Foundation:: DRIVER_OBJECT, drivernotificationroutine : super::super::Foundation:: DRIVER_FS_NOTIFICATION, synchronizewithmounts : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoRegisterFsRegistrationChangeMountAware(core::mem::transmute(driverobject), core::mem::transmute(drivernotificationroutine), synchronizewithmounts.param().abi()) + IoRegisterFsRegistrationChangeMountAware(core::mem::transmute(driverobject), core::mem::transmute(drivernotificationroutine), synchronizewithmounts.into()) } #[inline] pub unsafe fn IoReleaseVpbSpinLock(irql: u8) { @@ -1889,12 +1781,9 @@ pub unsafe fn IoUnregisterFsRegistrationChange(driverobject: *const super::super } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn IoVerifyVolume(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, allowrawmount: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn IoVerifyVolume(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, allowrawmount: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoVerifyVolume(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, allowrawmount : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoVerifyVolume(core::mem::transmute(deviceobject), allowrawmount.param().abi()) + IoVerifyVolume(core::mem::transmute(deviceobject), allowrawmount.into()) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -1920,12 +1809,9 @@ pub unsafe fn KeDetachProcess() { } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn KeInitializeMutant(mutant: *mut super::super::Foundation::KMUTANT, initialowner: P1) -where - P1: windows_core::Param, -{ +pub unsafe fn KeInitializeMutant(mutant: *mut super::super::Foundation::KMUTANT, initialowner: bool) { windows_targets::link!("ntoskrnl.exe" "system" fn KeInitializeMutant(mutant : *mut super::super::Foundation:: KMUTANT, initialowner : super::super::super::Win32::Foundation:: BOOLEAN)); - KeInitializeMutant(core::mem::transmute(mutant), initialowner.param().abi()) + KeInitializeMutant(core::mem::transmute(mutant), initialowner.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -1959,13 +1845,9 @@ pub unsafe fn KeReadStateQueue(queue: *const super::super::Foundation::KQUEUE) - } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn KeReleaseMutant(mutant: *mut super::super::Foundation::KMUTANT, increment: i32, abandoned: P2, wait: P3) -> i32 -where - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn KeReleaseMutant(mutant: *mut super::super::Foundation::KMUTANT, increment: i32, abandoned: bool, wait: bool) -> i32 { windows_targets::link!("ntoskrnl.exe" "system" fn KeReleaseMutant(mutant : *mut super::super::Foundation:: KMUTANT, increment : i32, abandoned : super::super::super::Win32::Foundation:: BOOLEAN, wait : super::super::super::Win32::Foundation:: BOOLEAN) -> i32); - KeReleaseMutant(core::mem::transmute(mutant), core::mem::transmute(increment), abandoned.param().abi(), wait.param().abi()) + KeReleaseMutant(core::mem::transmute(mutant), core::mem::transmute(increment), abandoned.into(), wait.into()) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -1981,12 +1863,9 @@ pub unsafe fn KeRemoveQueue(queue: *mut super::super::Foundation::KQUEUE, waitmo } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn KeRemoveQueueEx(queue: *mut super::super::Foundation::KQUEUE, waitmode: i8, alertable: P2, timeout: Option<*const i64>, entryarray: &mut [*mut super::super::super::Win32::System::Kernel::LIST_ENTRY]) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn KeRemoveQueueEx(queue: *mut super::super::Foundation::KQUEUE, waitmode: i8, alertable: bool, timeout: Option<*const i64>, entryarray: &mut [*mut super::super::super::Win32::System::Kernel::LIST_ENTRY]) -> u32 { windows_targets::link!("ntoskrnl.exe" "system" fn KeRemoveQueueEx(queue : *mut super::super::Foundation:: KQUEUE, waitmode : i8, alertable : super::super::super::Win32::Foundation:: BOOLEAN, timeout : *const i64, entryarray : *mut *mut super::super::super::Win32::System::Kernel:: LIST_ENTRY, count : u32) -> u32); - KeRemoveQueueEx(core::mem::transmute(queue), core::mem::transmute(waitmode), alertable.param().abi(), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(entryarray.as_ptr()), entryarray.len().try_into().unwrap()) + KeRemoveQueueEx(core::mem::transmute(queue), core::mem::transmute(waitmode), alertable.into(), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(entryarray.as_ptr()), entryarray.len().try_into().unwrap()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -2001,12 +1880,9 @@ pub unsafe fn KeSetIdealProcessorThread(thread: super::super::Foundation::PKTHRE KeSetIdealProcessorThread(core::mem::transmute(thread), core::mem::transmute(processor)) } #[inline] -pub unsafe fn KeSetKernelStackSwapEnable(enable: P0) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn KeSetKernelStackSwapEnable(enable: bool) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn KeSetKernelStackSwapEnable(enable : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - KeSetKernelStackSwapEnable(enable.param().abi()) + KeSetKernelStackSwapEnable(enable.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -2056,12 +1932,9 @@ pub unsafe fn MmFlushImageSection(sectionobjectpointer: *const super::super::Fou } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn MmForceSectionClosed(sectionobjectpointer: *const super::super::Foundation::SECTION_OBJECT_POINTERS, delayclose: P1) -> super::super::super::Win32::Foundation::BOOLEAN -where - P1: windows_core::Param, -{ +pub unsafe fn MmForceSectionClosed(sectionobjectpointer: *const super::super::Foundation::SECTION_OBJECT_POINTERS, delayclose: bool) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn MmForceSectionClosed(sectionobjectpointer : *const super::super::Foundation:: SECTION_OBJECT_POINTERS, delayclose : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - MmForceSectionClosed(core::mem::transmute(sectionobjectpointer), delayclose.param().abi()) + MmForceSectionClosed(core::mem::transmute(sectionobjectpointer), delayclose.into()) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2104,16 +1977,13 @@ pub unsafe fn MmSetAddressRangeModified(address: *const core::ffi::c_void, lengt } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtAccessCheckAndAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, desiredaccess: u32, genericmapping: *const super::super::super::Win32::Security::GENERIC_MAPPING, objectcreation: P7, grantedaccess: *mut u32, accessstatus: *mut i32, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS -where - P7: windows_core::Param, -{ +pub unsafe fn NtAccessCheckAndAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, desiredaccess: u32, genericmapping: *const super::super::super::Win32::Security::GENERIC_MAPPING, objectcreation: bool, grantedaccess: *mut u32, accessstatus: *mut i32, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtAccessCheckAndAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, objectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, desiredaccess : u32, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, objectcreation : super::super::super::Win32::Foundation:: BOOLEAN, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtAccessCheckAndAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypename), core::mem::transmute(objectname), core::mem::transmute(securitydescriptor), core::mem::transmute(desiredaccess), core::mem::transmute(genericmapping), objectcreation.param().abi(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(generateonclose)) + NtAccessCheckAndAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypename), core::mem::transmute(objectname), core::mem::transmute(securitydescriptor), core::mem::transmute(desiredaccess), core::mem::transmute(genericmapping), objectcreation.into(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(generateonclose)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtAccessCheckByTypeAndAuditAlarm( +pub unsafe fn NtAccessCheckByTypeAndAuditAlarm( subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, @@ -2125,14 +1995,11 @@ pub unsafe fn NtAccessCheckByTypeAndAuditAlarm( flags: u32, objecttypelist: Option<&[super::super::super::Win32::Security::OBJECT_TYPE_LIST]>, genericmapping: *const super::super::super::Win32::Security::GENERIC_MAPPING, - objectcreation: P12, + objectcreation: bool, grantedaccess: *mut u32, accessstatus: *mut i32, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN, -) -> super::super::super::Win32::Foundation::NTSTATUS -where - P12: windows_core::Param, -{ +) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtAccessCheckByTypeAndAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, objectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, principalselfsid : super::super::super::Win32::Security:: PSID, desiredaccess : u32, audittype : super::super::super::Win32::Security:: AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *const super::super::super::Win32::Security:: OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, objectcreation : super::super::super::Win32::Foundation:: BOOLEAN, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); NtAccessCheckByTypeAndAuditAlarm( core::mem::transmute(subsystemname), @@ -2147,7 +2014,7 @@ where core::mem::transmute(objecttypelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), objecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(genericmapping), - objectcreation.param().abi(), + objectcreation.into(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(generateonclose), @@ -2155,7 +2022,7 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtAccessCheckByTypeResultListAndAuditAlarm( +pub unsafe fn NtAccessCheckByTypeResultListAndAuditAlarm( subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, @@ -2168,14 +2035,11 @@ pub unsafe fn NtAccessCheckByTypeResultListAndAuditAlarm( objecttypelist: Option<*const super::super::super::Win32::Security::OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const super::super::super::Win32::Security::GENERIC_MAPPING, - objectcreation: P12, + objectcreation: bool, grantedaccess: *mut u32, accessstatus: *mut i32, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN, -) -> super::super::super::Win32::Foundation::NTSTATUS -where - P12: windows_core::Param, -{ +) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtAccessCheckByTypeResultListAndAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, objectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, principalselfsid : super::super::super::Win32::Security:: PSID, desiredaccess : u32, audittype : super::super::super::Win32::Security:: AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *const super::super::super::Win32::Security:: OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, objectcreation : super::super::super::Win32::Foundation:: BOOLEAN, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); NtAccessCheckByTypeResultListAndAuditAlarm( core::mem::transmute(subsystemname), @@ -2190,7 +2054,7 @@ where core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypelistlength), core::mem::transmute(genericmapping), - objectcreation.param().abi(), + objectcreation.into(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(generateonclose), @@ -2198,7 +2062,7 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtAccessCheckByTypeResultListAndAuditAlarmByHandle( +pub unsafe fn NtAccessCheckByTypeResultListAndAuditAlarmByHandle( subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, clienttoken: super::super::super::Win32::Foundation::HANDLE, @@ -2212,14 +2076,11 @@ pub unsafe fn NtAccessCheckByTypeResultListAndAuditAlarmByHandle( objecttypelist: Option<*const super::super::super::Win32::Security::OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const super::super::super::Win32::Security::GENERIC_MAPPING, - objectcreation: P13, + objectcreation: bool, grantedaccess: *mut u32, accessstatus: *mut i32, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN, -) -> super::super::super::Win32::Foundation::NTSTATUS -where - P13: windows_core::Param, -{ +) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtAccessCheckByTypeResultListAndAuditAlarmByHandle(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, clienttoken : super::super::super::Win32::Foundation:: HANDLE, objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, objectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, principalselfsid : super::super::super::Win32::Security:: PSID, desiredaccess : u32, audittype : super::super::super::Win32::Security:: AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *const super::super::super::Win32::Security:: OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, objectcreation : super::super::super::Win32::Foundation:: BOOLEAN, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); NtAccessCheckByTypeResultListAndAuditAlarmByHandle( core::mem::transmute(subsystemname), @@ -2235,7 +2096,7 @@ where core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypelistlength), core::mem::transmute(genericmapping), - objectcreation.param().abi(), + objectcreation.into(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(generateonclose), @@ -2243,21 +2104,15 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtAdjustGroupsToken(tokenhandle: super::super::super::Win32::Foundation::HANDLE, resettodefault: P1, newstate: Option<*const super::super::super::Win32::Security::TOKEN_GROUPS>, bufferlength: u32, previousstate: Option<*mut super::super::super::Win32::Security::TOKEN_GROUPS>, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn NtAdjustGroupsToken(tokenhandle: super::super::super::Win32::Foundation::HANDLE, resettodefault: bool, newstate: Option<*const super::super::super::Win32::Security::TOKEN_GROUPS>, bufferlength: u32, previousstate: Option<*mut super::super::super::Win32::Security::TOKEN_GROUPS>, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtAdjustGroupsToken(tokenhandle : super::super::super::Win32::Foundation:: HANDLE, resettodefault : super::super::super::Win32::Foundation:: BOOLEAN, newstate : *const super::super::super::Win32::Security:: TOKEN_GROUPS, bufferlength : u32, previousstate : *mut super::super::super::Win32::Security:: TOKEN_GROUPS, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtAdjustGroupsToken(core::mem::transmute(tokenhandle), resettodefault.param().abi(), core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength)) + NtAdjustGroupsToken(core::mem::transmute(tokenhandle), resettodefault.into(), core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtAdjustPrivilegesToken(tokenhandle: super::super::super::Win32::Foundation::HANDLE, disableallprivileges: P1, newstate: Option<*const super::super::super::Win32::Security::TOKEN_PRIVILEGES>, bufferlength: u32, previousstate: Option<*mut super::super::super::Win32::Security::TOKEN_PRIVILEGES>, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn NtAdjustPrivilegesToken(tokenhandle: super::super::super::Win32::Foundation::HANDLE, disableallprivileges: bool, newstate: Option<*const super::super::super::Win32::Security::TOKEN_PRIVILEGES>, bufferlength: u32, previousstate: Option<*mut super::super::super::Win32::Security::TOKEN_PRIVILEGES>, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtAdjustPrivilegesToken(tokenhandle : super::super::super::Win32::Foundation:: HANDLE, disableallprivileges : super::super::super::Win32::Foundation:: BOOLEAN, newstate : *const super::super::super::Win32::Security:: TOKEN_PRIVILEGES, bufferlength : u32, previousstate : *mut super::super::super::Win32::Security:: TOKEN_PRIVILEGES, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtAdjustPrivilegesToken(core::mem::transmute(tokenhandle), disableallprivileges.param().abi(), core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) + NtAdjustPrivilegesToken(core::mem::transmute(tokenhandle), disableallprivileges.into(), core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NtAllocateVirtualMemory(processhandle: super::super::super::Win32::Foundation::HANDLE, baseaddress: *mut *mut core::ffi::c_void, zerobits: usize, regionsize: *mut usize, allocationtype: u32, protect: u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -2277,12 +2132,9 @@ pub unsafe fn NtCancelIoFileEx(filehandle: super::super::super::Win32::Foundatio NtCancelIoFileEx(core::mem::transmute(filehandle), core::mem::transmute(iorequesttocancel.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock)) } #[inline] -pub unsafe fn NtCloseObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, generateonclose: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn NtCloseObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, generateonclose: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtCloseObjectAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, generateonclose : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCloseObjectAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), generateonclose.param().abi()) + NtCloseObjectAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), generateonclose.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -2292,12 +2144,9 @@ pub unsafe fn NtCreateDirectoryObject(directoryhandle: *mut super::super::super: } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn NtCreateEvent(eventhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, eventtype: super::super::super::Win32::System::Kernel::EVENT_TYPE, initialstate: P4) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, -{ +pub unsafe fn NtCreateEvent(eventhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, eventtype: super::super::super::Win32::System::Kernel::EVENT_TYPE, initialstate: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtCreateEvent(eventhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, eventtype : super::super::super::Win32::System::Kernel:: EVENT_TYPE, initialstate : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCreateEvent(core::mem::transmute(eventhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventtype), initialstate.param().abi()) + NtCreateEvent(core::mem::transmute(eventhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventtype), initialstate.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_Storage_FileSystem", feature = "Win32_System_IO"))] #[inline] @@ -2334,12 +2183,9 @@ pub unsafe fn NtDeleteFile(objectattributes: *const super::super::Foundation::OB NtDeleteFile(core::mem::transmute(objectattributes)) } #[inline] -pub unsafe fn NtDeleteObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, generateonclose: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn NtDeleteObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, generateonclose: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtDeleteObjectAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, generateonclose : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtDeleteObjectAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), generateonclose.param().abi()) + NtDeleteObjectAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), generateonclose.into()) } #[inline] pub unsafe fn NtDuplicateObject(sourceprocesshandle: super::super::super::Win32::Foundation::HANDLE, sourcehandle: super::super::super::Win32::Foundation::HANDLE, targetprocesshandle: Option, targethandle: Option<*mut super::super::super::Win32::Foundation::HANDLE>, desiredaccess: u32, handleattributes: u32, options: u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -2348,12 +2194,9 @@ pub unsafe fn NtDuplicateObject(sourceprocesshandle: super::super::super::Win32: } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn NtDuplicateToken(existingtokenhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, effectiveonly: P3, tokentype: super::super::super::Win32::Security::TOKEN_TYPE, newtokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P3: windows_core::Param, -{ +pub unsafe fn NtDuplicateToken(existingtokenhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, effectiveonly: bool, tokentype: super::super::super::Win32::Security::TOKEN_TYPE, newtokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtDuplicateToken(existingtokenhandle : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, effectiveonly : super::super::super::Win32::Foundation:: BOOLEAN, tokentype : super::super::super::Win32::Security:: TOKEN_TYPE, newtokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtDuplicateToken(core::mem::transmute(existingtokenhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), effectiveonly.param().abi(), core::mem::transmute(tokentype), core::mem::transmute(newtokenhandle)) + NtDuplicateToken(core::mem::transmute(existingtokenhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), effectiveonly.into(), core::mem::transmute(tokentype), core::mem::transmute(newtokenhandle)) } #[cfg(feature = "Win32_Security")] #[inline] @@ -2408,23 +2251,15 @@ pub unsafe fn NtImpersonateAnonymousToken(threadhandle: super::super::super::Win } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtLockFile(filehandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, byteoffset: *const i64, length: *const i64, key: u32, failimmediately: P8, exclusivelock: P9) -> super::super::super::Win32::Foundation::NTSTATUS -where - P8: windows_core::Param, - P9: windows_core::Param, -{ +pub unsafe fn NtLockFile(filehandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, byteoffset: *const i64, length: *const i64, key: u32, failimmediately: bool, exclusivelock: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtLockFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, byteoffset : *const i64, length : *const i64, key : u32, failimmediately : super::super::super::Win32::Foundation:: BOOLEAN, exclusivelock : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtLockFile(core::mem::transmute(filehandle), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(byteoffset), core::mem::transmute(length), core::mem::transmute(key), failimmediately.param().abi(), exclusivelock.param().abi()) + NtLockFile(core::mem::transmute(filehandle), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(byteoffset), core::mem::transmute(length), core::mem::transmute(key), failimmediately.into(), exclusivelock.into()) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtNotifyChangeKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, completionfilter: u32, watchtree: P6, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, asynchronous: P9) -> super::super::super::Win32::Foundation::NTSTATUS -where - P6: windows_core::Param, - P9: windows_core::Param, -{ +pub unsafe fn NtNotifyChangeKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, completionfilter: u32, watchtree: bool, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, asynchronous: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtNotifyChangeKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, completionfilter : u32, watchtree : super::super::super::Win32::Foundation:: BOOLEAN, buffer : *mut core::ffi::c_void, buffersize : u32, asynchronous : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtNotifyChangeKey(core::mem::transmute(keyhandle), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(completionfilter), watchtree.param().abi(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), asynchronous.param().abi()) + NtNotifyChangeKey(core::mem::transmute(keyhandle), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(completionfilter), watchtree.into(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), asynchronous.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -2440,11 +2275,7 @@ pub unsafe fn NtOpenFile(filehandle: *mut super::super::super::Win32::Foundation } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtOpenObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING, securitydescriptor: Option, clienttoken: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, grantedaccess: u32, privileges: Option<*const super::super::super::Win32::Security::PRIVILEGE_SET>, objectcreation: P9, accessgranted: P10, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS -where - P9: windows_core::Param, - P10: windows_core::Param, -{ +pub unsafe fn NtOpenObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING, securitydescriptor: Option, clienttoken: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, grantedaccess: u32, privileges: Option<*const super::super::super::Win32::Security::PRIVILEGE_SET>, objectcreation: bool, accessgranted: bool, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtOpenObjectAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, objectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, clienttoken : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, grantedaccess : u32, privileges : *const super::super::super::Win32::Security:: PRIVILEGE_SET, objectcreation : super::super::super::Win32::Foundation:: BOOLEAN, accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); NtOpenObjectAuditAlarm( core::mem::transmute(subsystemname), @@ -2456,8 +2287,8 @@ where core::mem::transmute(desiredaccess), core::mem::transmute(grantedaccess), core::mem::transmute(privileges.unwrap_or(core::mem::zeroed())), - objectcreation.param().abi(), - accessgranted.param().abi(), + objectcreation.into(), + accessgranted.into(), core::mem::transmute(generateonclose), ) } @@ -2478,20 +2309,14 @@ pub unsafe fn NtOpenSymbolicLinkObject(linkhandle: *mut super::super::super::Win NtOpenSymbolicLinkObject(core::mem::transmute(linkhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes)) } #[inline] -pub unsafe fn NtOpenThreadToken(threadhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, openasself: P2, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn NtOpenThreadToken(threadhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, openasself: bool, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtOpenThreadToken(threadhandle : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, openasself : super::super::super::Win32::Foundation:: BOOLEAN, tokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtOpenThreadToken(core::mem::transmute(threadhandle), core::mem::transmute(desiredaccess), openasself.param().abi(), core::mem::transmute(tokenhandle)) + NtOpenThreadToken(core::mem::transmute(threadhandle), core::mem::transmute(desiredaccess), openasself.into(), core::mem::transmute(tokenhandle)) } #[inline] -pub unsafe fn NtOpenThreadTokenEx(threadhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, openasself: P2, handleattributes: u32, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn NtOpenThreadTokenEx(threadhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, openasself: bool, handleattributes: u32, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtOpenThreadTokenEx(threadhandle : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, openasself : super::super::super::Win32::Foundation:: BOOLEAN, handleattributes : u32, tokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtOpenThreadTokenEx(core::mem::transmute(threadhandle), core::mem::transmute(desiredaccess), openasself.param().abi(), core::mem::transmute(handleattributes), core::mem::transmute(tokenhandle)) + NtOpenThreadTokenEx(core::mem::transmute(threadhandle), core::mem::transmute(desiredaccess), openasself.into(), core::mem::transmute(handleattributes), core::mem::transmute(tokenhandle)) } #[cfg(feature = "Win32_Security")] #[inline] @@ -2501,29 +2326,19 @@ pub unsafe fn NtPrivilegeCheck(clienttoken: super::super::super::Win32::Foundati } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtPrivilegeObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, clienttoken: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, privileges: *const super::super::super::Win32::Security::PRIVILEGE_SET, accessgranted: P5) -> super::super::super::Win32::Foundation::NTSTATUS -where - P5: windows_core::Param, -{ +pub unsafe fn NtPrivilegeObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, clienttoken: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, privileges: *const super::super::super::Win32::Security::PRIVILEGE_SET, accessgranted: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtPrivilegeObjectAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, clienttoken : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, privileges : *const super::super::super::Win32::Security:: PRIVILEGE_SET, accessgranted : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtPrivilegeObjectAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), core::mem::transmute(clienttoken), core::mem::transmute(desiredaccess), core::mem::transmute(privileges), accessgranted.param().abi()) + NtPrivilegeObjectAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), core::mem::transmute(clienttoken), core::mem::transmute(desiredaccess), core::mem::transmute(privileges), accessgranted.into()) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NtPrivilegedServiceAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, servicename: *const super::super::super::Win32::Foundation::UNICODE_STRING, clienttoken: super::super::super::Win32::Foundation::HANDLE, privileges: *const super::super::super::Win32::Security::PRIVILEGE_SET, accessgranted: P4) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, -{ +pub unsafe fn NtPrivilegedServiceAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, servicename: *const super::super::super::Win32::Foundation::UNICODE_STRING, clienttoken: super::super::super::Win32::Foundation::HANDLE, privileges: *const super::super::super::Win32::Security::PRIVILEGE_SET, accessgranted: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtPrivilegedServiceAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, servicename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, clienttoken : super::super::super::Win32::Foundation:: HANDLE, privileges : *const super::super::super::Win32::Security:: PRIVILEGE_SET, accessgranted : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtPrivilegedServiceAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(servicename), core::mem::transmute(clienttoken), core::mem::transmute(privileges), accessgranted.param().abi()) + NtPrivilegedServiceAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(servicename), core::mem::transmute(clienttoken), core::mem::transmute(privileges), accessgranted.into()) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtQueryDirectoryFile(filehandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fileinformation: *mut core::ffi::c_void, length: u32, fileinformationclass: FILE_INFORMATION_CLASS, returnsingleentry: P8, filename: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, restartscan: P10) -> super::super::super::Win32::Foundation::NTSTATUS -where - P8: windows_core::Param, - P10: windows_core::Param, -{ +pub unsafe fn NtQueryDirectoryFile(filehandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fileinformation: *mut core::ffi::c_void, length: u32, fileinformationclass: FILE_INFORMATION_CLASS, returnsingleentry: bool, filename: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, restartscan: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtQueryDirectoryFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, fileinformation : *mut core::ffi::c_void, length : u32, fileinformationclass : FILE_INFORMATION_CLASS, returnsingleentry : super::super::super::Win32::Foundation:: BOOLEAN, filename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, restartscan : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); NtQueryDirectoryFile( core::mem::transmute(filehandle), @@ -2534,9 +2349,9 @@ where core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass), - returnsingleentry.param().abi(), + returnsingleentry.into(), core::mem::transmute(filename.unwrap_or(core::mem::zeroed())), - restartscan.param().abi(), + restartscan.into(), ) } #[cfg(feature = "Win32_System_IO")] @@ -2546,23 +2361,15 @@ pub unsafe fn NtQueryDirectoryFileEx(filehandle: super::super::super::Win32::Fou NtQueryDirectoryFileEx(core::mem::transmute(filehandle), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass), core::mem::transmute(queryflags), core::mem::transmute(filename.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn NtQueryDirectoryObject(directoryhandle: super::super::super::Win32::Foundation::HANDLE, buffer: Option<*mut core::ffi::c_void>, length: u32, returnsingleentry: P3, restartscan: P4, context: *mut u32, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P3: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn NtQueryDirectoryObject(directoryhandle: super::super::super::Win32::Foundation::HANDLE, buffer: Option<*mut core::ffi::c_void>, length: u32, returnsingleentry: bool, restartscan: bool, context: *mut u32, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtQueryDirectoryObject(directoryhandle : super::super::super::Win32::Foundation:: HANDLE, buffer : *mut core::ffi::c_void, length : u32, returnsingleentry : super::super::super::Win32::Foundation:: BOOLEAN, restartscan : super::super::super::Win32::Foundation:: BOOLEAN, context : *mut u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtQueryDirectoryObject(core::mem::transmute(directoryhandle), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), returnsingleentry.param().abi(), restartscan.param().abi(), core::mem::transmute(context), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) + NtQueryDirectoryObject(core::mem::transmute(directoryhandle), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), returnsingleentry.into(), restartscan.into(), core::mem::transmute(context), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn NtQueryEaFile(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *mut core::ffi::c_void, length: u32, returnsingleentry: P4, ealist: Option<*const core::ffi::c_void>, ealistlength: u32, eaindex: Option<*const u32>, restartscan: P8) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, - P8: windows_core::Param, -{ +pub unsafe fn NtQueryEaFile(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *mut core::ffi::c_void, length: u32, returnsingleentry: bool, ealist: Option<*const core::ffi::c_void>, ealistlength: u32, eaindex: Option<*const u32>, restartscan: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtQueryEaFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, buffer : *mut core::ffi::c_void, length : u32, returnsingleentry : super::super::super::Win32::Foundation:: BOOLEAN, ealist : *const core::ffi::c_void, ealistlength : u32, eaindex : *const u32, restartscan : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtQueryEaFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), returnsingleentry.param().abi(), core::mem::transmute(ealist.unwrap_or(core::mem::zeroed())), core::mem::transmute(ealistlength), core::mem::transmute(eaindex.unwrap_or(core::mem::zeroed())), restartscan.param().abi()) + NtQueryEaFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), returnsingleentry.into(), core::mem::transmute(ealist.unwrap_or(core::mem::zeroed())), core::mem::transmute(ealistlength), core::mem::transmute(eaindex.unwrap_or(core::mem::zeroed())), restartscan.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -2590,13 +2397,9 @@ pub unsafe fn NtQueryInformationToken(tokenhandle: super::super::super::Win32::F } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn NtQueryQuotaInformationFile(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *mut core::ffi::c_void, length: u32, returnsingleentry: P4, sidlist: Option<*const core::ffi::c_void>, sidlistlength: u32, startsid: Option, restartscan: P8) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, - P8: windows_core::Param, -{ +pub unsafe fn NtQueryQuotaInformationFile(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *mut core::ffi::c_void, length: u32, returnsingleentry: bool, sidlist: Option<*const core::ffi::c_void>, sidlistlength: u32, startsid: Option, restartscan: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtQueryQuotaInformationFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, buffer : *mut core::ffi::c_void, length : u32, returnsingleentry : super::super::super::Win32::Foundation:: BOOLEAN, sidlist : *const core::ffi::c_void, sidlistlength : u32, startsid : super::super::super::Win32::Security:: PSID, restartscan : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtQueryQuotaInformationFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), returnsingleentry.param().abi(), core::mem::transmute(sidlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidlistlength), core::mem::transmute(startsid.unwrap_or(core::mem::zeroed())), restartscan.param().abi()) + NtQueryQuotaInformationFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), returnsingleentry.into(), core::mem::transmute(sidlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidlistlength), core::mem::transmute(startsid.unwrap_or(core::mem::zeroed())), restartscan.into()) } #[cfg(feature = "Win32_Security")] #[inline] @@ -2802,13 +2605,9 @@ pub unsafe fn PsGetThreadProcess(thread: super::super::Foundation::PETHREAD) -> } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn PsImpersonateClient(thread: super::super::Foundation::PETHREAD, token: Option<*const core::ffi::c_void>, copyonopen: P2, effectiveonly: P3, impersonationlevel: super::super::super::Win32::Security::SECURITY_IMPERSONATION_LEVEL) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn PsImpersonateClient(thread: super::super::Foundation::PETHREAD, token: Option<*const core::ffi::c_void>, copyonopen: bool, effectiveonly: bool, impersonationlevel: super::super::super::Win32::Security::SECURITY_IMPERSONATION_LEVEL) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsImpersonateClient(thread : super::super::Foundation:: PETHREAD, token : *const core::ffi::c_void, copyonopen : super::super::super::Win32::Foundation:: BOOLEAN, effectiveonly : super::super::super::Win32::Foundation:: BOOLEAN, impersonationlevel : super::super::super::Win32::Security:: SECURITY_IMPERSONATION_LEVEL) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsImpersonateClient(core::mem::transmute(thread), core::mem::transmute(token.unwrap_or(core::mem::zeroed())), copyonopen.param().abi(), effectiveonly.param().abi(), core::mem::transmute(impersonationlevel)) + PsImpersonateClient(core::mem::transmute(thread), core::mem::transmute(token.unwrap_or(core::mem::zeroed())), copyonopen.into(), effectiveonly.into(), core::mem::transmute(impersonationlevel)) } #[inline] pub unsafe fn PsIsDiskCountersEnabled() -> super::super::super::Win32::Foundation::BOOLEAN { @@ -3053,12 +2852,9 @@ where RtlDosPathNameToNtPathName_U_WithStatus(dosfilename.param().abi(), core::mem::transmute(ntfilename), core::mem::transmute(filepart.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn RtlDowncaseUnicodeString(destinationstring: *mut super::super::super::Win32::Foundation::UNICODE_STRING, sourcestring: *const super::super::super::Win32::Foundation::UNICODE_STRING, allocatedestinationstring: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn RtlDowncaseUnicodeString(destinationstring: *mut super::super::super::Win32::Foundation::UNICODE_STRING, sourcestring: *const super::super::super::Win32::Foundation::UNICODE_STRING, allocatedestinationstring: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlDowncaseUnicodeString(destinationstring : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, sourcestring : *const super::super::super::Win32::Foundation:: UNICODE_STRING, allocatedestinationstring : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlDowncaseUnicodeString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.param().abi()) + RtlDowncaseUnicodeString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.into()) } #[inline] pub unsafe fn RtlDuplicateUnicodeString(flags: u32, stringin: *const super::super::super::Win32::Foundation::UNICODE_STRING, stringout: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3095,12 +2891,9 @@ pub unsafe fn RtlFreeSid(sid: super::super::super::Win32::Security::PSID) -> *mu RtlFreeSid(core::mem::transmute(sid)) } #[inline] -pub unsafe fn RtlGenerate8dot3Name(name: *const super::super::super::Win32::Foundation::UNICODE_STRING, allowextendedcharacters: P1, context: *mut GENERATE_NAME_CONTEXT, name8dot3: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn RtlGenerate8dot3Name(name: *const super::super::super::Win32::Foundation::UNICODE_STRING, allowextendedcharacters: bool, context: *mut GENERATE_NAME_CONTEXT, name8dot3: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlGenerate8dot3Name(name : *const super::super::super::Win32::Foundation:: UNICODE_STRING, allowextendedcharacters : super::super::super::Win32::Foundation:: BOOLEAN, context : *mut GENERATE_NAME_CONTEXT, name8dot3 : *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlGenerate8dot3Name(core::mem::transmute(name), allowextendedcharacters.param().abi(), core::mem::transmute(context), core::mem::transmute(name8dot3)) + RtlGenerate8dot3Name(core::mem::transmute(name), allowextendedcharacters.into(), core::mem::transmute(context), core::mem::transmute(name8dot3)) } #[cfg(feature = "Win32_Security")] #[inline] @@ -3281,12 +3074,9 @@ pub unsafe fn RtlMultiByteToUnicodeSize(bytesinunicodestring: *mut u32, multibyt } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn RtlNextUnicodePrefix(prefixtable: *const UNICODE_PREFIX_TABLE, restart: P1) -> *mut UNICODE_PREFIX_TABLE_ENTRY -where - P1: windows_core::Param, -{ +pub unsafe fn RtlNextUnicodePrefix(prefixtable: *const UNICODE_PREFIX_TABLE, restart: bool) -> *mut UNICODE_PREFIX_TABLE_ENTRY { windows_targets::link!("ntoskrnl.exe" "system" fn RtlNextUnicodePrefix(prefixtable : *const UNICODE_PREFIX_TABLE, restart : super::super::super::Win32::Foundation:: BOOLEAN) -> *mut UNICODE_PREFIX_TABLE_ENTRY); - RtlNextUnicodePrefix(core::mem::transmute(prefixtable), restart.param().abi()) + RtlNextUnicodePrefix(core::mem::transmute(prefixtable), restart.into()) } #[inline] pub unsafe fn RtlNormalizeString(normform: u32, sourcestring: P1, sourcestringlength: i32, destinationstring: windows_core::PWSTR, destinationstringlength: *mut i32) -> super::super::super::Win32::Foundation::NTSTATUS @@ -3303,21 +3093,15 @@ pub unsafe fn RtlNtStatusToDosErrorNoTeb(status: super::super::super::Win32::Fou } #[cfg(feature = "Win32_System_Kernel")] #[inline] -pub unsafe fn RtlOemStringToCountedUnicodeString(destinationstring: *mut super::super::super::Win32::Foundation::UNICODE_STRING, sourcestring: *const super::super::super::Win32::System::Kernel::STRING, allocatedestinationstring: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn RtlOemStringToCountedUnicodeString(destinationstring: *mut super::super::super::Win32::Foundation::UNICODE_STRING, sourcestring: *const super::super::super::Win32::System::Kernel::STRING, allocatedestinationstring: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn RtlOemStringToCountedUnicodeString(destinationstring : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, sourcestring : *const super::super::super::Win32::System::Kernel:: STRING, allocatedestinationstring : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlOemStringToCountedUnicodeString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.param().abi()) + RtlOemStringToCountedUnicodeString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.into()) } #[cfg(feature = "Win32_System_Kernel")] #[inline] -pub unsafe fn RtlOemStringToUnicodeString(destinationstring: *mut super::super::super::Win32::Foundation::UNICODE_STRING, sourcestring: *const super::super::super::Win32::System::Kernel::STRING, allocatedestinationstring: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn RtlOemStringToUnicodeString(destinationstring: *mut super::super::super::Win32::Foundation::UNICODE_STRING, sourcestring: *const super::super::super::Win32::System::Kernel::STRING, allocatedestinationstring: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlOemStringToUnicodeString(destinationstring : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, sourcestring : *const super::super::super::Win32::System::Kernel:: STRING, allocatedestinationstring : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlOemStringToUnicodeString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.param().abi()) + RtlOemStringToUnicodeString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.into()) } #[inline] pub unsafe fn RtlOemToUnicodeN(unicodestring: windows_core::PWSTR, maxbytesinunicodestring: u32, bytesinunicodestring: Option<*mut u32>, oemstring: &[u8]) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3326,12 +3110,9 @@ pub unsafe fn RtlOemToUnicodeN(unicodestring: windows_core::PWSTR, maxbytesinuni } #[cfg(feature = "Win32_System_Kernel")] #[inline] -pub unsafe fn RtlPrefixString(string1: *const super::super::super::Win32::System::Kernel::STRING, string2: *const super::super::super::Win32::System::Kernel::STRING, caseinsensitive: P2) -> super::super::super::Win32::Foundation::BOOLEAN -where - P2: windows_core::Param, -{ +pub unsafe fn RtlPrefixString(string1: *const super::super::super::Win32::System::Kernel::STRING, string2: *const super::super::super::Win32::System::Kernel::STRING, caseinsensitive: bool) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntdll.dll" "system" fn RtlPrefixString(string1 : *const super::super::super::Win32::System::Kernel:: STRING, string2 : *const super::super::super::Win32::System::Kernel:: STRING, caseinsensitive : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - RtlPrefixString(core::mem::transmute(string1), core::mem::transmute(string2), caseinsensitive.param().abi()) + RtlPrefixString(core::mem::transmute(string1), core::mem::transmute(string2), caseinsensitive.into()) } #[inline] pub unsafe fn RtlQueryPackageIdentity(tokenobject: *const core::ffi::c_void, packagefullname: windows_core::PWSTR, packagesize: *mut usize, appid: Option, appidsize: Option<*mut usize>, packaged: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3414,21 +3195,15 @@ pub unsafe fn RtlSelfRelativeToAbsoluteSD(selfrelativesecuritydescriptor: super: } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlSetGroupSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, group: Option, groupdefaulted: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn RtlSetGroupSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, group: Option, groupdefaulted: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlSetGroupSecurityDescriptor(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, group : super::super::super::Win32::Security:: PSID, groupdefaulted : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlSetGroupSecurityDescriptor(core::mem::transmute(securitydescriptor), core::mem::transmute(group.unwrap_or(core::mem::zeroed())), groupdefaulted.param().abi()) + RtlSetGroupSecurityDescriptor(core::mem::transmute(securitydescriptor), core::mem::transmute(group.unwrap_or(core::mem::zeroed())), groupdefaulted.into()) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlSetOwnerSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, owner: Option, ownerdefaulted: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn RtlSetOwnerSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, owner: Option, ownerdefaulted: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlSetOwnerSecurityDescriptor(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, owner : super::super::super::Win32::Security:: PSID, ownerdefaulted : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlSetOwnerSecurityDescriptor(core::mem::transmute(securitydescriptor), core::mem::transmute(owner.unwrap_or(core::mem::zeroed())), ownerdefaulted.param().abi()) + RtlSetOwnerSecurityDescriptor(core::mem::transmute(securitydescriptor), core::mem::transmute(owner.unwrap_or(core::mem::zeroed())), ownerdefaulted.into()) } #[inline] pub unsafe fn RtlSetProcessPlaceholderCompatibilityMode(mode: i8) -> i8 { @@ -3459,12 +3234,9 @@ pub unsafe fn RtlTimeToSecondsSince1980(time: *const i64, elapsedseconds: *mut u } #[cfg(feature = "Win32_System_Kernel")] #[inline] -pub unsafe fn RtlUnicodeStringToCountedOemString(destinationstring: *mut super::super::super::Win32::System::Kernel::STRING, sourcestring: *const super::super::super::Win32::Foundation::UNICODE_STRING, allocatedestinationstring: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn RtlUnicodeStringToCountedOemString(destinationstring: *mut super::super::super::Win32::System::Kernel::STRING, sourcestring: *const super::super::super::Win32::Foundation::UNICODE_STRING, allocatedestinationstring: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUnicodeStringToCountedOemString(destinationstring : *mut super::super::super::Win32::System::Kernel:: STRING, sourcestring : *const super::super::super::Win32::Foundation:: UNICODE_STRING, allocatedestinationstring : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlUnicodeStringToCountedOemString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.param().abi()) + RtlUnicodeStringToCountedOemString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.into()) } #[inline] pub unsafe fn RtlUnicodeToCustomCPN(customcp: *const CPTABLEINFO, customcpstring: &mut [u8], bytesincustomcpstring: Option<*mut u32>, unicodestring: P4, bytesinunicodestring: u32) -> super::super::super::Win32::Foundation::NTSTATUS @@ -3486,21 +3258,15 @@ pub unsafe fn RtlUnicodeToOemN(oemstring: &mut [u8], bytesinoemstring: Option<*m } #[cfg(feature = "Win32_System_Kernel")] #[inline] -pub unsafe fn RtlUpcaseUnicodeStringToCountedOemString(destinationstring: *mut super::super::super::Win32::System::Kernel::STRING, sourcestring: *const super::super::super::Win32::Foundation::UNICODE_STRING, allocatedestinationstring: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn RtlUpcaseUnicodeStringToCountedOemString(destinationstring: *mut super::super::super::Win32::System::Kernel::STRING, sourcestring: *const super::super::super::Win32::Foundation::UNICODE_STRING, allocatedestinationstring: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUpcaseUnicodeStringToCountedOemString(destinationstring : *mut super::super::super::Win32::System::Kernel:: STRING, sourcestring : *const super::super::super::Win32::Foundation:: UNICODE_STRING, allocatedestinationstring : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlUpcaseUnicodeStringToCountedOemString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.param().abi()) + RtlUpcaseUnicodeStringToCountedOemString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.into()) } #[cfg(feature = "Win32_System_Kernel")] #[inline] -pub unsafe fn RtlUpcaseUnicodeStringToOemString(destinationstring: *mut super::super::super::Win32::System::Kernel::STRING, sourcestring: *const super::super::super::Win32::Foundation::UNICODE_STRING, allocatedestinationstring: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn RtlUpcaseUnicodeStringToOemString(destinationstring: *mut super::super::super::Win32::System::Kernel::STRING, sourcestring: *const super::super::super::Win32::Foundation::UNICODE_STRING, allocatedestinationstring: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUpcaseUnicodeStringToOemString(destinationstring : *mut super::super::super::Win32::System::Kernel:: STRING, sourcestring : *const super::super::super::Win32::Foundation:: UNICODE_STRING, allocatedestinationstring : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlUpcaseUnicodeStringToOemString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.param().abi()) + RtlUpcaseUnicodeStringToOemString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.into()) } #[inline] pub unsafe fn RtlUpcaseUnicodeToCustomCPN(customcp: *const CPTABLEINFO, customcpstring: &mut [u8], bytesincustomcpstring: Option<*mut u32>, unicodestring: P4, bytesinunicodestring: u32) -> super::super::super::Win32::Foundation::NTSTATUS @@ -3579,28 +3345,19 @@ pub unsafe fn SeAppendPrivileges(accessstate: *mut super::super::Foundation::ACC SeAppendPrivileges(core::mem::transmute(accessstate), core::mem::transmute(privileges)) } #[inline] -pub unsafe fn SeAuditFipsCryptoSelftests(bsuccess: P0, selftestcode: u32) -where - P0: windows_core::Param, -{ +pub unsafe fn SeAuditFipsCryptoSelftests(bsuccess: bool, selftestcode: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn SeAuditFipsCryptoSelftests(bsuccess : super::super::super::Win32::Foundation:: BOOLEAN, selftestcode : u32)); - SeAuditFipsCryptoSelftests(bsuccess.param().abi(), core::mem::transmute(selftestcode)) + SeAuditFipsCryptoSelftests(bsuccess.into(), core::mem::transmute(selftestcode)) } #[inline] -pub unsafe fn SeAuditHardLinkCreation(filename: *const super::super::super::Win32::Foundation::UNICODE_STRING, linkname: *const super::super::super::Win32::Foundation::UNICODE_STRING, bsuccess: P2) -where - P2: windows_core::Param, -{ +pub unsafe fn SeAuditHardLinkCreation(filename: *const super::super::super::Win32::Foundation::UNICODE_STRING, linkname: *const super::super::super::Win32::Foundation::UNICODE_STRING, bsuccess: bool) { windows_targets::link!("ntoskrnl.exe" "system" fn SeAuditHardLinkCreation(filename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, linkname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, bsuccess : super::super::super::Win32::Foundation:: BOOLEAN)); - SeAuditHardLinkCreation(core::mem::transmute(filename), core::mem::transmute(linkname), bsuccess.param().abi()) + SeAuditHardLinkCreation(core::mem::transmute(filename), core::mem::transmute(linkname), bsuccess.into()) } #[inline] -pub unsafe fn SeAuditHardLinkCreationWithTransaction(filename: *const super::super::super::Win32::Foundation::UNICODE_STRING, linkname: *const super::super::super::Win32::Foundation::UNICODE_STRING, bsuccess: P2, transactionid: Option<*const windows_core::GUID>) -where - P2: windows_core::Param, -{ +pub unsafe fn SeAuditHardLinkCreationWithTransaction(filename: *const super::super::super::Win32::Foundation::UNICODE_STRING, linkname: *const super::super::super::Win32::Foundation::UNICODE_STRING, bsuccess: bool, transactionid: Option<*const windows_core::GUID>) { windows_targets::link!("ntoskrnl.exe" "system" fn SeAuditHardLinkCreationWithTransaction(filename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, linkname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, bsuccess : super::super::super::Win32::Foundation:: BOOLEAN, transactionid : *const windows_core::GUID)); - SeAuditHardLinkCreationWithTransaction(core::mem::transmute(filename), core::mem::transmute(linkname), bsuccess.param().abi(), core::mem::transmute(transactionid.unwrap_or(core::mem::zeroed()))) + SeAuditHardLinkCreationWithTransaction(core::mem::transmute(filename), core::mem::transmute(linkname), bsuccess.into(), core::mem::transmute(transactionid.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn SeAuditTransactionStateChange(transactionid: *const windows_core::GUID, resourcemanagerid: *const windows_core::GUID, newtransactionstate: u32) { @@ -3621,57 +3378,39 @@ pub unsafe fn SeAuditingAnyFileEventsWithContextEx(securitydescriptor: super::su } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn SeAuditingFileEvents(accessgranted: P0, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn SeAuditingFileEvents(accessgranted: bool, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn SeAuditingFileEvents(accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: BOOLEAN); - SeAuditingFileEvents(accessgranted.param().abi(), core::mem::transmute(securitydescriptor)) + SeAuditingFileEvents(accessgranted.into(), core::mem::transmute(securitydescriptor)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeAuditingFileEventsWithContext(accessgranted: P0, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn SeAuditingFileEventsWithContext(accessgranted: bool, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn SeAuditingFileEventsWithContext(accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, subjectsecuritycontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT) -> super::super::super::Win32::Foundation:: BOOLEAN); - SeAuditingFileEventsWithContext(accessgranted.param().abi(), core::mem::transmute(securitydescriptor), core::mem::transmute(subjectsecuritycontext.unwrap_or(core::mem::zeroed()))) + SeAuditingFileEventsWithContext(accessgranted.into(), core::mem::transmute(securitydescriptor), core::mem::transmute(subjectsecuritycontext.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeAuditingFileEventsWithContextEx(accessgranted: P0, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>, stagingenabled: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn SeAuditingFileEventsWithContextEx(accessgranted: bool, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>, stagingenabled: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn SeAuditingFileEventsWithContextEx(accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, subjectsecuritycontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT, stagingenabled : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - SeAuditingFileEventsWithContextEx(accessgranted.param().abi(), core::mem::transmute(securitydescriptor), core::mem::transmute(subjectsecuritycontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(stagingenabled.unwrap_or(core::mem::zeroed()))) + SeAuditingFileEventsWithContextEx(accessgranted.into(), core::mem::transmute(securitydescriptor), core::mem::transmute(subjectsecuritycontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(stagingenabled.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeAuditingFileOrGlobalEvents(accessgranted: P0, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: *const super::super::Foundation::SECURITY_SUBJECT_CONTEXT) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn SeAuditingFileOrGlobalEvents(accessgranted: bool, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: *const super::super::Foundation::SECURITY_SUBJECT_CONTEXT) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn SeAuditingFileOrGlobalEvents(accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, subjectsecuritycontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT) -> super::super::super::Win32::Foundation:: BOOLEAN); - SeAuditingFileOrGlobalEvents(accessgranted.param().abi(), core::mem::transmute(securitydescriptor), core::mem::transmute(subjectsecuritycontext)) + SeAuditingFileOrGlobalEvents(accessgranted.into(), core::mem::transmute(securitydescriptor), core::mem::transmute(subjectsecuritycontext)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn SeAuditingHardLinkEvents(accessgranted: P0, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn SeAuditingHardLinkEvents(accessgranted: bool, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn SeAuditingHardLinkEvents(accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: BOOLEAN); - SeAuditingHardLinkEvents(accessgranted.param().abi(), core::mem::transmute(securitydescriptor)) + SeAuditingHardLinkEvents(accessgranted.into(), core::mem::transmute(securitydescriptor)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeAuditingHardLinkEventsWithContext(accessgranted: P0, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn SeAuditingHardLinkEventsWithContext(accessgranted: bool, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn SeAuditingHardLinkEventsWithContext(accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, subjectsecuritycontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT) -> super::super::super::Win32::Foundation:: BOOLEAN); - SeAuditingHardLinkEventsWithContext(accessgranted.param().abi(), core::mem::transmute(securitydescriptor), core::mem::transmute(subjectsecuritycontext.unwrap_or(core::mem::zeroed()))) + SeAuditingHardLinkEventsWithContext(accessgranted.into(), core::mem::transmute(securitydescriptor), core::mem::transmute(subjectsecuritycontext.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -3691,21 +3430,15 @@ pub unsafe fn SeCheckForCriticalAceRemoval(currentdescriptor: super::super::supe } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeCreateClientSecurity(clientthread: super::super::Foundation::PETHREAD, clientsecurityqos: *const super::super::super::Win32::Security::SECURITY_QUALITY_OF_SERVICE, remotesession: P2, clientcontext: *mut SECURITY_CLIENT_CONTEXT) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn SeCreateClientSecurity(clientthread: super::super::Foundation::PETHREAD, clientsecurityqos: *const super::super::super::Win32::Security::SECURITY_QUALITY_OF_SERVICE, remotesession: bool, clientcontext: *mut SECURITY_CLIENT_CONTEXT) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeCreateClientSecurity(clientthread : super::super::Foundation:: PETHREAD, clientsecurityqos : *const super::super::super::Win32::Security:: SECURITY_QUALITY_OF_SERVICE, remotesession : super::super::super::Win32::Foundation:: BOOLEAN, clientcontext : *mut SECURITY_CLIENT_CONTEXT) -> super::super::super::Win32::Foundation:: NTSTATUS); - SeCreateClientSecurity(core::mem::transmute(clientthread), core::mem::transmute(clientsecurityqos), remotesession.param().abi(), core::mem::transmute(clientcontext)) + SeCreateClientSecurity(core::mem::transmute(clientthread), core::mem::transmute(clientsecurityqos), remotesession.into(), core::mem::transmute(clientcontext)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeCreateClientSecurityFromSubjectContext(subjectcontext: *const super::super::Foundation::SECURITY_SUBJECT_CONTEXT, clientsecurityqos: *const super::super::super::Win32::Security::SECURITY_QUALITY_OF_SERVICE, serverisremote: P2, clientcontext: *mut SECURITY_CLIENT_CONTEXT) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn SeCreateClientSecurityFromSubjectContext(subjectcontext: *const super::super::Foundation::SECURITY_SUBJECT_CONTEXT, clientsecurityqos: *const super::super::super::Win32::Security::SECURITY_QUALITY_OF_SERVICE, serverisremote: bool, clientcontext: *mut SECURITY_CLIENT_CONTEXT) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeCreateClientSecurityFromSubjectContext(subjectcontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT, clientsecurityqos : *const super::super::super::Win32::Security:: SECURITY_QUALITY_OF_SERVICE, serverisremote : super::super::super::Win32::Foundation:: BOOLEAN, clientcontext : *mut SECURITY_CLIENT_CONTEXT) -> super::super::super::Win32::Foundation:: NTSTATUS); - SeCreateClientSecurityFromSubjectContext(core::mem::transmute(subjectcontext), core::mem::transmute(clientsecurityqos), serverisremote.param().abi(), core::mem::transmute(clientcontext)) + SeCreateClientSecurityFromSubjectContext(core::mem::transmute(subjectcontext), core::mem::transmute(clientsecurityqos), serverisremote.into(), core::mem::transmute(clientcontext)) } #[cfg(feature = "Win32_Security")] #[inline] @@ -3725,12 +3458,9 @@ pub unsafe fn SeDeleteObjectAuditAlarmWithTransaction(object: *const core::ffi:: } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn SeExamineSacl(sacl: *const super::super::super::Win32::Security::ACL, resourcesacl: *const super::super::super::Win32::Security::ACL, token: *const core::ffi::c_void, desiredaccess: u32, accessgranted: P4, generateaudit: *mut super::super::super::Win32::Foundation::BOOLEAN, generatealarm: *mut super::super::super::Win32::Foundation::BOOLEAN) -where - P4: windows_core::Param, -{ +pub unsafe fn SeExamineSacl(sacl: *const super::super::super::Win32::Security::ACL, resourcesacl: *const super::super::super::Win32::Security::ACL, token: *const core::ffi::c_void, desiredaccess: u32, accessgranted: bool, generateaudit: *mut super::super::super::Win32::Foundation::BOOLEAN, generatealarm: *mut super::super::super::Win32::Foundation::BOOLEAN) { windows_targets::link!("ntoskrnl.exe" "system" fn SeExamineSacl(sacl : *const super::super::super::Win32::Security:: ACL, resourcesacl : *const super::super::super::Win32::Security:: ACL, token : *const core::ffi::c_void, desiredaccess : u32, accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, generateaudit : *mut super::super::super::Win32::Foundation:: BOOLEAN, generatealarm : *mut super::super::super::Win32::Foundation:: BOOLEAN)); - SeExamineSacl(core::mem::transmute(sacl), core::mem::transmute(resourcesacl), core::mem::transmute(token), core::mem::transmute(desiredaccess), accessgranted.param().abi(), core::mem::transmute(generateaudit), core::mem::transmute(generatealarm)) + SeExamineSacl(core::mem::transmute(sacl), core::mem::transmute(resourcesacl), core::mem::transmute(token), core::mem::transmute(desiredaccess), accessgranted.into(), core::mem::transmute(generateaudit), core::mem::transmute(generatealarm)) } #[cfg(feature = "Win32_Security")] #[inline] @@ -3775,50 +3505,34 @@ pub unsafe fn SeMarkLogonSessionForTerminationNotificationEx(logonid: *const sup } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeOpenObjectAuditAlarm(objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, object: Option<*const core::ffi::c_void>, absoluteobjectname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, accessstate: *const super::super::Foundation::ACCESS_STATE, objectcreated: P5, accessgranted: P6, accessmode: i8) -> super::super::super::Win32::Foundation::BOOLEAN -where - P5: windows_core::Param, - P6: windows_core::Param, -{ +pub unsafe fn SeOpenObjectAuditAlarm(objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, object: Option<*const core::ffi::c_void>, absoluteobjectname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, accessstate: *const super::super::Foundation::ACCESS_STATE, objectcreated: bool, accessgranted: bool, accessmode: i8) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn SeOpenObjectAuditAlarm(objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, object : *const core::ffi::c_void, absoluteobjectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, accessstate : *const super::super::Foundation:: ACCESS_STATE, objectcreated : super::super::super::Win32::Foundation:: BOOLEAN, accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, accessmode : i8, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN)); let mut result__ = core::mem::zeroed(); - SeOpenObjectAuditAlarm(core::mem::transmute(objecttypename), core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(absoluteobjectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(securitydescriptor), core::mem::transmute(accessstate), objectcreated.param().abi(), accessgranted.param().abi(), core::mem::transmute(accessmode), &mut result__); + SeOpenObjectAuditAlarm(core::mem::transmute(objecttypename), core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(absoluteobjectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(securitydescriptor), core::mem::transmute(accessstate), objectcreated.into(), accessgranted.into(), core::mem::transmute(accessmode), &mut result__); result__ } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeOpenObjectAuditAlarmWithTransaction(objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, object: Option<*const core::ffi::c_void>, absoluteobjectname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, accessstate: *const super::super::Foundation::ACCESS_STATE, objectcreated: P5, accessgranted: P6, accessmode: i8, transactionid: Option<*const windows_core::GUID>) -> super::super::super::Win32::Foundation::BOOLEAN -where - P5: windows_core::Param, - P6: windows_core::Param, -{ +pub unsafe fn SeOpenObjectAuditAlarmWithTransaction(objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, object: Option<*const core::ffi::c_void>, absoluteobjectname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, accessstate: *const super::super::Foundation::ACCESS_STATE, objectcreated: bool, accessgranted: bool, accessmode: i8, transactionid: Option<*const windows_core::GUID>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn SeOpenObjectAuditAlarmWithTransaction(objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, object : *const core::ffi::c_void, absoluteobjectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, accessstate : *const super::super::Foundation:: ACCESS_STATE, objectcreated : super::super::super::Win32::Foundation:: BOOLEAN, accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, accessmode : i8, transactionid : *const windows_core::GUID, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN)); let mut result__ = core::mem::zeroed(); - SeOpenObjectAuditAlarmWithTransaction(core::mem::transmute(objecttypename), core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(absoluteobjectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(securitydescriptor), core::mem::transmute(accessstate), objectcreated.param().abi(), accessgranted.param().abi(), core::mem::transmute(accessmode), core::mem::transmute(transactionid.unwrap_or(core::mem::zeroed())), &mut result__); + SeOpenObjectAuditAlarmWithTransaction(core::mem::transmute(objecttypename), core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(absoluteobjectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(securitydescriptor), core::mem::transmute(accessstate), objectcreated.into(), accessgranted.into(), core::mem::transmute(accessmode), core::mem::transmute(transactionid.unwrap_or(core::mem::zeroed())), &mut result__); result__ } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeOpenObjectForDeleteAuditAlarm(objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, object: Option<*const core::ffi::c_void>, absoluteobjectname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, accessstate: *const super::super::Foundation::ACCESS_STATE, objectcreated: P5, accessgranted: P6, accessmode: i8) -> super::super::super::Win32::Foundation::BOOLEAN -where - P5: windows_core::Param, - P6: windows_core::Param, -{ +pub unsafe fn SeOpenObjectForDeleteAuditAlarm(objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, object: Option<*const core::ffi::c_void>, absoluteobjectname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, accessstate: *const super::super::Foundation::ACCESS_STATE, objectcreated: bool, accessgranted: bool, accessmode: i8) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn SeOpenObjectForDeleteAuditAlarm(objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, object : *const core::ffi::c_void, absoluteobjectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, accessstate : *const super::super::Foundation:: ACCESS_STATE, objectcreated : super::super::super::Win32::Foundation:: BOOLEAN, accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, accessmode : i8, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN)); let mut result__ = core::mem::zeroed(); - SeOpenObjectForDeleteAuditAlarm(core::mem::transmute(objecttypename), core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(absoluteobjectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(securitydescriptor), core::mem::transmute(accessstate), objectcreated.param().abi(), accessgranted.param().abi(), core::mem::transmute(accessmode), &mut result__); + SeOpenObjectForDeleteAuditAlarm(core::mem::transmute(objecttypename), core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(absoluteobjectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(securitydescriptor), core::mem::transmute(accessstate), objectcreated.into(), accessgranted.into(), core::mem::transmute(accessmode), &mut result__); result__ } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeOpenObjectForDeleteAuditAlarmWithTransaction(objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, object: Option<*const core::ffi::c_void>, absoluteobjectname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, accessstate: *const super::super::Foundation::ACCESS_STATE, objectcreated: P5, accessgranted: P6, accessmode: i8, transactionid: Option<*const windows_core::GUID>) -> super::super::super::Win32::Foundation::BOOLEAN -where - P5: windows_core::Param, - P6: windows_core::Param, -{ +pub unsafe fn SeOpenObjectForDeleteAuditAlarmWithTransaction(objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, object: Option<*const core::ffi::c_void>, absoluteobjectname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, accessstate: *const super::super::Foundation::ACCESS_STATE, objectcreated: bool, accessgranted: bool, accessmode: i8, transactionid: Option<*const windows_core::GUID>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn SeOpenObjectForDeleteAuditAlarmWithTransaction(objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, object : *const core::ffi::c_void, absoluteobjectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, accessstate : *const super::super::Foundation:: ACCESS_STATE, objectcreated : super::super::super::Win32::Foundation:: BOOLEAN, accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, accessmode : i8, transactionid : *const windows_core::GUID, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN)); let mut result__ = core::mem::zeroed(); - SeOpenObjectForDeleteAuditAlarmWithTransaction(core::mem::transmute(objecttypename), core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(absoluteobjectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(securitydescriptor), core::mem::transmute(accessstate), objectcreated.param().abi(), accessgranted.param().abi(), core::mem::transmute(accessmode), core::mem::transmute(transactionid.unwrap_or(core::mem::zeroed())), &mut result__); + SeOpenObjectForDeleteAuditAlarmWithTransaction(core::mem::transmute(objecttypename), core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(absoluteobjectname.unwrap_or(core::mem::zeroed())), core::mem::transmute(securitydescriptor), core::mem::transmute(accessstate), objectcreated.into(), accessgranted.into(), core::mem::transmute(accessmode), core::mem::transmute(transactionid.unwrap_or(core::mem::zeroed())), &mut result__); result__ } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] @@ -3956,29 +3670,19 @@ pub unsafe fn SecLookupWellKnownSid(sidtype: super::super::super::Win32::Securit SecLookupWellKnownSid(core::mem::transmute(sidtype), core::mem::transmute(sid), core::mem::transmute(sidbuffersize), core::mem::transmute(sidsize.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SecMakeSPN(serviceclass: *mut super::super::super::Win32::Foundation::UNICODE_STRING, servicename: *mut super::super::super::Win32::Foundation::UNICODE_STRING, instancename: *mut super::super::super::Win32::Foundation::UNICODE_STRING, instanceport: u16, referrer: *mut super::super::super::Win32::Foundation::UNICODE_STRING, spn: *mut super::super::super::Win32::Foundation::UNICODE_STRING, length: *mut u32, allocate: P7) -> super::super::super::Win32::Foundation::NTSTATUS -where - P7: windows_core::Param, -{ +pub unsafe fn SecMakeSPN(serviceclass: *mut super::super::super::Win32::Foundation::UNICODE_STRING, servicename: *mut super::super::super::Win32::Foundation::UNICODE_STRING, instancename: *mut super::super::super::Win32::Foundation::UNICODE_STRING, instanceport: u16, referrer: *mut super::super::super::Win32::Foundation::UNICODE_STRING, spn: *mut super::super::super::Win32::Foundation::UNICODE_STRING, length: *mut u32, allocate: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ksecdd.sys" "system" fn SecMakeSPN(serviceclass : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, servicename : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, instancename : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, instanceport : u16, referrer : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, spn : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, length : *mut u32, allocate : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - SecMakeSPN(core::mem::transmute(serviceclass), core::mem::transmute(servicename), core::mem::transmute(instancename), core::mem::transmute(instanceport), core::mem::transmute(referrer), core::mem::transmute(spn), core::mem::transmute(length), allocate.param().abi()) + SecMakeSPN(core::mem::transmute(serviceclass), core::mem::transmute(servicename), core::mem::transmute(instancename), core::mem::transmute(instanceport), core::mem::transmute(referrer), core::mem::transmute(spn), core::mem::transmute(length), allocate.into()) } #[inline] -pub unsafe fn SecMakeSPNEx(serviceclass: *mut super::super::super::Win32::Foundation::UNICODE_STRING, servicename: *mut super::super::super::Win32::Foundation::UNICODE_STRING, instancename: *mut super::super::super::Win32::Foundation::UNICODE_STRING, instanceport: u16, referrer: *mut super::super::super::Win32::Foundation::UNICODE_STRING, targetinfo: *mut super::super::super::Win32::Foundation::UNICODE_STRING, spn: *mut super::super::super::Win32::Foundation::UNICODE_STRING, length: *mut u32, allocate: P8) -> super::super::super::Win32::Foundation::NTSTATUS -where - P8: windows_core::Param, -{ +pub unsafe fn SecMakeSPNEx(serviceclass: *mut super::super::super::Win32::Foundation::UNICODE_STRING, servicename: *mut super::super::super::Win32::Foundation::UNICODE_STRING, instancename: *mut super::super::super::Win32::Foundation::UNICODE_STRING, instanceport: u16, referrer: *mut super::super::super::Win32::Foundation::UNICODE_STRING, targetinfo: *mut super::super::super::Win32::Foundation::UNICODE_STRING, spn: *mut super::super::super::Win32::Foundation::UNICODE_STRING, length: *mut u32, allocate: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ksecdd.sys" "system" fn SecMakeSPNEx(serviceclass : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, servicename : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, instancename : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, instanceport : u16, referrer : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, targetinfo : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, spn : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, length : *mut u32, allocate : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - SecMakeSPNEx(core::mem::transmute(serviceclass), core::mem::transmute(servicename), core::mem::transmute(instancename), core::mem::transmute(instanceport), core::mem::transmute(referrer), core::mem::transmute(targetinfo), core::mem::transmute(spn), core::mem::transmute(length), allocate.param().abi()) + SecMakeSPNEx(core::mem::transmute(serviceclass), core::mem::transmute(servicename), core::mem::transmute(instancename), core::mem::transmute(instanceport), core::mem::transmute(referrer), core::mem::transmute(targetinfo), core::mem::transmute(spn), core::mem::transmute(length), allocate.into()) } #[inline] -pub unsafe fn SecMakeSPNEx2(serviceclass: *mut super::super::super::Win32::Foundation::UNICODE_STRING, servicename: *mut super::super::super::Win32::Foundation::UNICODE_STRING, instancename: *mut super::super::super::Win32::Foundation::UNICODE_STRING, instanceport: u16, referrer: *mut super::super::super::Win32::Foundation::UNICODE_STRING, intargetinfo: *mut super::super::super::Win32::Foundation::UNICODE_STRING, spn: *mut super::super::super::Win32::Foundation::UNICODE_STRING, totalsize: *mut u32, allocate: P8, istargetinfomarshaled: P9) -> super::super::super::Win32::Foundation::NTSTATUS -where - P8: windows_core::Param, - P9: windows_core::Param, -{ +pub unsafe fn SecMakeSPNEx2(serviceclass: *mut super::super::super::Win32::Foundation::UNICODE_STRING, servicename: *mut super::super::super::Win32::Foundation::UNICODE_STRING, instancename: *mut super::super::super::Win32::Foundation::UNICODE_STRING, instanceport: u16, referrer: *mut super::super::super::Win32::Foundation::UNICODE_STRING, intargetinfo: *mut super::super::super::Win32::Foundation::UNICODE_STRING, spn: *mut super::super::super::Win32::Foundation::UNICODE_STRING, totalsize: *mut u32, allocate: bool, istargetinfomarshaled: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ksecdd.sys" "system" fn SecMakeSPNEx2(serviceclass : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, servicename : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, instancename : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, instanceport : u16, referrer : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, intargetinfo : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, spn : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, totalsize : *mut u32, allocate : super::super::super::Win32::Foundation:: BOOLEAN, istargetinfomarshaled : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - SecMakeSPNEx2(core::mem::transmute(serviceclass), core::mem::transmute(servicename), core::mem::transmute(instancename), core::mem::transmute(instanceport), core::mem::transmute(referrer), core::mem::transmute(intargetinfo), core::mem::transmute(spn), core::mem::transmute(totalsize), allocate.param().abi(), istargetinfomarshaled.param().abi()) + SecMakeSPNEx2(core::mem::transmute(serviceclass), core::mem::transmute(servicename), core::mem::transmute(instancename), core::mem::transmute(instanceport), core::mem::transmute(referrer), core::mem::transmute(intargetinfo), core::mem::transmute(spn), core::mem::transmute(totalsize), allocate.into(), istargetinfomarshaled.into()) } #[inline] pub unsafe fn SetContextAttributesW(phcontext: *const SecHandle, ulattribute: u32, pbuffer: *const core::ffi::c_void, cbbuffer: u32) -> windows_core::Result<()> { @@ -4138,16 +3842,13 @@ pub unsafe fn VerifySignature(phcontext: *const SecHandle, pmessage: *const SecB } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwAccessCheckAndAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, desiredaccess: u32, genericmapping: *const super::super::super::Win32::Security::GENERIC_MAPPING, objectcreation: P7, grantedaccess: *mut u32, accessstatus: *mut i32, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS -where - P7: windows_core::Param, -{ +pub unsafe fn ZwAccessCheckAndAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING, securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, desiredaccess: u32, genericmapping: *const super::super::super::Win32::Security::GENERIC_MAPPING, objectcreation: bool, grantedaccess: *mut u32, accessstatus: *mut i32, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwAccessCheckAndAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, objectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, desiredaccess : u32, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, objectcreation : super::super::super::Win32::Foundation:: BOOLEAN, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwAccessCheckAndAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypename), core::mem::transmute(objectname), core::mem::transmute(securitydescriptor), core::mem::transmute(desiredaccess), core::mem::transmute(genericmapping), objectcreation.param().abi(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(generateonclose)) + ZwAccessCheckAndAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypename), core::mem::transmute(objectname), core::mem::transmute(securitydescriptor), core::mem::transmute(desiredaccess), core::mem::transmute(genericmapping), objectcreation.into(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(generateonclose)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwAccessCheckByTypeAndAuditAlarm( +pub unsafe fn ZwAccessCheckByTypeAndAuditAlarm( subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, @@ -4159,14 +3860,11 @@ pub unsafe fn ZwAccessCheckByTypeAndAuditAlarm( flags: u32, objecttypelist: Option<&[super::super::super::Win32::Security::OBJECT_TYPE_LIST]>, genericmapping: *const super::super::super::Win32::Security::GENERIC_MAPPING, - objectcreation: P12, + objectcreation: bool, grantedaccess: *mut u32, accessstatus: *mut i32, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN, -) -> super::super::super::Win32::Foundation::NTSTATUS -where - P12: windows_core::Param, -{ +) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwAccessCheckByTypeAndAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, objectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, principalselfsid : super::super::super::Win32::Security:: PSID, desiredaccess : u32, audittype : super::super::super::Win32::Security:: AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *const super::super::super::Win32::Security:: OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, objectcreation : super::super::super::Win32::Foundation:: BOOLEAN, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); ZwAccessCheckByTypeAndAuditAlarm( core::mem::transmute(subsystemname), @@ -4181,7 +3879,7 @@ where core::mem::transmute(objecttypelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), objecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(genericmapping), - objectcreation.param().abi(), + objectcreation.into(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(generateonclose), @@ -4189,7 +3887,7 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwAccessCheckByTypeResultListAndAuditAlarm( +pub unsafe fn ZwAccessCheckByTypeResultListAndAuditAlarm( subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, @@ -4202,14 +3900,11 @@ pub unsafe fn ZwAccessCheckByTypeResultListAndAuditAlarm( objecttypelist: Option<*const super::super::super::Win32::Security::OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const super::super::super::Win32::Security::GENERIC_MAPPING, - objectcreation: P12, + objectcreation: bool, grantedaccess: *mut u32, accessstatus: *mut i32, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN, -) -> super::super::super::Win32::Foundation::NTSTATUS -where - P12: windows_core::Param, -{ +) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwAccessCheckByTypeResultListAndAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, objectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, principalselfsid : super::super::super::Win32::Security:: PSID, desiredaccess : u32, audittype : super::super::super::Win32::Security:: AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *const super::super::super::Win32::Security:: OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, objectcreation : super::super::super::Win32::Foundation:: BOOLEAN, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); ZwAccessCheckByTypeResultListAndAuditAlarm( core::mem::transmute(subsystemname), @@ -4224,7 +3919,7 @@ where core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypelistlength), core::mem::transmute(genericmapping), - objectcreation.param().abi(), + objectcreation.into(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(generateonclose), @@ -4232,7 +3927,7 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwAccessCheckByTypeResultListAndAuditAlarmByHandle( +pub unsafe fn ZwAccessCheckByTypeResultListAndAuditAlarmByHandle( subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, clienttoken: super::super::super::Win32::Foundation::HANDLE, @@ -4246,14 +3941,11 @@ pub unsafe fn ZwAccessCheckByTypeResultListAndAuditAlarmByHandle( objecttypelist: Option<*const super::super::super::Win32::Security::OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const super::super::super::Win32::Security::GENERIC_MAPPING, - objectcreation: P13, + objectcreation: bool, grantedaccess: *mut u32, accessstatus: *mut i32, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN, -) -> super::super::super::Win32::Foundation::NTSTATUS -where - P13: windows_core::Param, -{ +) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwAccessCheckByTypeResultListAndAuditAlarmByHandle(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, clienttoken : super::super::super::Win32::Foundation:: HANDLE, objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, objectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, principalselfsid : super::super::super::Win32::Security:: PSID, desiredaccess : u32, audittype : super::super::super::Win32::Security:: AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *const super::super::super::Win32::Security:: OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, objectcreation : super::super::super::Win32::Foundation:: BOOLEAN, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); ZwAccessCheckByTypeResultListAndAuditAlarmByHandle( core::mem::transmute(subsystemname), @@ -4269,7 +3961,7 @@ where core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypelistlength), core::mem::transmute(genericmapping), - objectcreation.param().abi(), + objectcreation.into(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(generateonclose), @@ -4277,21 +3969,15 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwAdjustGroupsToken(tokenhandle: super::super::super::Win32::Foundation::HANDLE, resettodefault: P1, newstate: Option<*const super::super::super::Win32::Security::TOKEN_GROUPS>, bufferlength: u32, previousstate: Option<*mut super::super::super::Win32::Security::TOKEN_GROUPS>, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn ZwAdjustGroupsToken(tokenhandle: super::super::super::Win32::Foundation::HANDLE, resettodefault: bool, newstate: Option<*const super::super::super::Win32::Security::TOKEN_GROUPS>, bufferlength: u32, previousstate: Option<*mut super::super::super::Win32::Security::TOKEN_GROUPS>, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwAdjustGroupsToken(tokenhandle : super::super::super::Win32::Foundation:: HANDLE, resettodefault : super::super::super::Win32::Foundation:: BOOLEAN, newstate : *const super::super::super::Win32::Security:: TOKEN_GROUPS, bufferlength : u32, previousstate : *mut super::super::super::Win32::Security:: TOKEN_GROUPS, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwAdjustGroupsToken(core::mem::transmute(tokenhandle), resettodefault.param().abi(), core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength)) + ZwAdjustGroupsToken(core::mem::transmute(tokenhandle), resettodefault.into(), core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength)) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwAdjustPrivilegesToken(tokenhandle: super::super::super::Win32::Foundation::HANDLE, disableallprivileges: P1, newstate: Option<*const super::super::super::Win32::Security::TOKEN_PRIVILEGES>, bufferlength: u32, previousstate: Option<*mut super::super::super::Win32::Security::TOKEN_PRIVILEGES>, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn ZwAdjustPrivilegesToken(tokenhandle: super::super::super::Win32::Foundation::HANDLE, disableallprivileges: bool, newstate: Option<*const super::super::super::Win32::Security::TOKEN_PRIVILEGES>, bufferlength: u32, previousstate: Option<*mut super::super::super::Win32::Security::TOKEN_PRIVILEGES>, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwAdjustPrivilegesToken(tokenhandle : super::super::super::Win32::Foundation:: HANDLE, disableallprivileges : super::super::super::Win32::Foundation:: BOOLEAN, newstate : *const super::super::super::Win32::Security:: TOKEN_PRIVILEGES, bufferlength : u32, previousstate : *mut super::super::super::Win32::Security:: TOKEN_PRIVILEGES, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwAdjustPrivilegesToken(core::mem::transmute(tokenhandle), disableallprivileges.param().abi(), core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) + ZwAdjustPrivilegesToken(core::mem::transmute(tokenhandle), disableallprivileges.into(), core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ZwAllocateVirtualMemory(processhandle: super::super::super::Win32::Foundation::HANDLE, baseaddress: *mut *mut core::ffi::c_void, zerobits: usize, regionsize: *mut usize, allocationtype: u32, protect: u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -4311,12 +3997,9 @@ pub unsafe fn ZwCancelIoFileEx(filehandle: super::super::super::Win32::Foundatio ZwCancelIoFileEx(core::mem::transmute(filehandle), core::mem::transmute(iorequesttocancel.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock)) } #[inline] -pub unsafe fn ZwCloseObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, generateonclose: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn ZwCloseObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, generateonclose: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwCloseObjectAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, generateonclose : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwCloseObjectAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), generateonclose.param().abi()) + ZwCloseObjectAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), generateonclose.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -4326,12 +4009,9 @@ pub unsafe fn ZwCreateDirectoryObject(directoryhandle: *mut super::super::super: } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn ZwCreateEvent(eventhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, eventtype: super::super::super::Win32::System::Kernel::EVENT_TYPE, initialstate: P4) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, -{ +pub unsafe fn ZwCreateEvent(eventhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, eventtype: super::super::super::Win32::System::Kernel::EVENT_TYPE, initialstate: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwCreateEvent(eventhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, eventtype : super::super::super::Win32::System::Kernel:: EVENT_TYPE, initialstate : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwCreateEvent(core::mem::transmute(eventhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventtype), initialstate.param().abi()) + ZwCreateEvent(core::mem::transmute(eventhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(eventtype), initialstate.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_Memory"))] #[inline] @@ -4356,12 +4036,9 @@ pub unsafe fn ZwDeleteFile(objectattributes: *const super::super::Foundation::OB ZwDeleteFile(core::mem::transmute(objectattributes)) } #[inline] -pub unsafe fn ZwDeleteObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, generateonclose: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn ZwDeleteObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, generateonclose: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwDeleteObjectAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, generateonclose : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwDeleteObjectAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), generateonclose.param().abi()) + ZwDeleteObjectAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), generateonclose.into()) } #[inline] pub unsafe fn ZwDuplicateObject(sourceprocesshandle: super::super::super::Win32::Foundation::HANDLE, sourcehandle: super::super::super::Win32::Foundation::HANDLE, targetprocesshandle: Option, targethandle: Option<*mut super::super::super::Win32::Foundation::HANDLE>, desiredaccess: u32, handleattributes: u32, options: u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -4370,12 +4047,9 @@ pub unsafe fn ZwDuplicateObject(sourceprocesshandle: super::super::super::Win32: } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ZwDuplicateToken(existingtokenhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, effectiveonly: P3, tokentype: super::super::super::Win32::Security::TOKEN_TYPE, newtokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P3: windows_core::Param, -{ +pub unsafe fn ZwDuplicateToken(existingtokenhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, effectiveonly: bool, tokentype: super::super::super::Win32::Security::TOKEN_TYPE, newtokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwDuplicateToken(existingtokenhandle : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, effectiveonly : super::super::super::Win32::Foundation:: BOOLEAN, tokentype : super::super::super::Win32::Security:: TOKEN_TYPE, newtokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwDuplicateToken(core::mem::transmute(existingtokenhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), effectiveonly.param().abi(), core::mem::transmute(tokentype), core::mem::transmute(newtokenhandle)) + ZwDuplicateToken(core::mem::transmute(existingtokenhandle), core::mem::transmute(desiredaccess), core::mem::transmute(objectattributes.unwrap_or(core::mem::zeroed())), effectiveonly.into(), core::mem::transmute(tokentype), core::mem::transmute(newtokenhandle)) } #[cfg(feature = "Win32_Security")] #[inline] @@ -4430,23 +4104,15 @@ pub unsafe fn ZwImpersonateAnonymousToken(threadhandle: super::super::super::Win } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ZwLockFile(filehandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, byteoffset: *const i64, length: *const i64, key: u32, failimmediately: P8, exclusivelock: P9) -> super::super::super::Win32::Foundation::NTSTATUS -where - P8: windows_core::Param, - P9: windows_core::Param, -{ +pub unsafe fn ZwLockFile(filehandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, byteoffset: *const i64, length: *const i64, key: u32, failimmediately: bool, exclusivelock: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwLockFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, byteoffset : *const i64, length : *const i64, key : u32, failimmediately : super::super::super::Win32::Foundation:: BOOLEAN, exclusivelock : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwLockFile(core::mem::transmute(filehandle), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(byteoffset), core::mem::transmute(length), core::mem::transmute(key), failimmediately.param().abi(), exclusivelock.param().abi()) + ZwLockFile(core::mem::transmute(filehandle), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(byteoffset), core::mem::transmute(length), core::mem::transmute(key), failimmediately.into(), exclusivelock.into()) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ZwNotifyChangeKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, completionfilter: u32, watchtree: P6, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, asynchronous: P9) -> super::super::super::Win32::Foundation::NTSTATUS -where - P6: windows_core::Param, - P9: windows_core::Param, -{ +pub unsafe fn ZwNotifyChangeKey(keyhandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, completionfilter: u32, watchtree: bool, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, asynchronous: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwNotifyChangeKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, completionfilter : u32, watchtree : super::super::super::Win32::Foundation:: BOOLEAN, buffer : *mut core::ffi::c_void, buffersize : u32, asynchronous : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwNotifyChangeKey(core::mem::transmute(keyhandle), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(completionfilter), watchtree.param().abi(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), asynchronous.param().abi()) + ZwNotifyChangeKey(core::mem::transmute(keyhandle), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(completionfilter), watchtree.into(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), asynchronous.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -4456,11 +4122,7 @@ pub unsafe fn ZwOpenDirectoryObject(directoryhandle: *mut super::super::super::W } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwOpenObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING, securitydescriptor: Option, clienttoken: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, grantedaccess: u32, privileges: Option<*const super::super::super::Win32::Security::PRIVILEGE_SET>, objectcreation: P9, accessgranted: P10, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS -where - P9: windows_core::Param, - P10: windows_core::Param, -{ +pub unsafe fn ZwOpenObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, objecttypename: *const super::super::super::Win32::Foundation::UNICODE_STRING, objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING, securitydescriptor: Option, clienttoken: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, grantedaccess: u32, privileges: Option<*const super::super::super::Win32::Security::PRIVILEGE_SET>, objectcreation: bool, accessgranted: bool, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwOpenObjectAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, objectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, clienttoken : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, grantedaccess : u32, privileges : *const super::super::super::Win32::Security:: PRIVILEGE_SET, objectcreation : super::super::super::Win32::Foundation:: BOOLEAN, accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); ZwOpenObjectAuditAlarm( core::mem::transmute(subsystemname), @@ -4472,8 +4134,8 @@ where core::mem::transmute(desiredaccess), core::mem::transmute(grantedaccess), core::mem::transmute(privileges.unwrap_or(core::mem::zeroed())), - objectcreation.param().abi(), - accessgranted.param().abi(), + objectcreation.into(), + accessgranted.into(), core::mem::transmute(generateonclose), ) } @@ -4488,20 +4150,14 @@ pub unsafe fn ZwOpenProcessTokenEx(processhandle: super::super::super::Win32::Fo ZwOpenProcessTokenEx(core::mem::transmute(processhandle), core::mem::transmute(desiredaccess), core::mem::transmute(handleattributes), core::mem::transmute(tokenhandle)) } #[inline] -pub unsafe fn ZwOpenThreadToken(threadhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, openasself: P2, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn ZwOpenThreadToken(threadhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, openasself: bool, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwOpenThreadToken(threadhandle : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, openasself : super::super::super::Win32::Foundation:: BOOLEAN, tokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwOpenThreadToken(core::mem::transmute(threadhandle), core::mem::transmute(desiredaccess), openasself.param().abi(), core::mem::transmute(tokenhandle)) + ZwOpenThreadToken(core::mem::transmute(threadhandle), core::mem::transmute(desiredaccess), openasself.into(), core::mem::transmute(tokenhandle)) } #[inline] -pub unsafe fn ZwOpenThreadTokenEx(threadhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, openasself: P2, handleattributes: u32, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn ZwOpenThreadTokenEx(threadhandle: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, openasself: bool, handleattributes: u32, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwOpenThreadTokenEx(threadhandle : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, openasself : super::super::super::Win32::Foundation:: BOOLEAN, handleattributes : u32, tokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwOpenThreadTokenEx(core::mem::transmute(threadhandle), core::mem::transmute(desiredaccess), openasself.param().abi(), core::mem::transmute(handleattributes), core::mem::transmute(tokenhandle)) + ZwOpenThreadTokenEx(core::mem::transmute(threadhandle), core::mem::transmute(desiredaccess), openasself.into(), core::mem::transmute(handleattributes), core::mem::transmute(tokenhandle)) } #[cfg(feature = "Win32_Security")] #[inline] @@ -4511,29 +4167,19 @@ pub unsafe fn ZwPrivilegeCheck(clienttoken: super::super::super::Win32::Foundati } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwPrivilegeObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, clienttoken: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, privileges: *const super::super::super::Win32::Security::PRIVILEGE_SET, accessgranted: P5) -> super::super::super::Win32::Foundation::NTSTATUS -where - P5: windows_core::Param, -{ +pub unsafe fn ZwPrivilegeObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, clienttoken: super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, privileges: *const super::super::super::Win32::Security::PRIVILEGE_SET, accessgranted: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwPrivilegeObjectAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, clienttoken : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, privileges : *const super::super::super::Win32::Security:: PRIVILEGE_SET, accessgranted : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwPrivilegeObjectAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), core::mem::transmute(clienttoken), core::mem::transmute(desiredaccess), core::mem::transmute(privileges), accessgranted.param().abi()) + ZwPrivilegeObjectAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), core::mem::transmute(clienttoken), core::mem::transmute(desiredaccess), core::mem::transmute(privileges), accessgranted.into()) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ZwPrivilegedServiceAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, servicename: *const super::super::super::Win32::Foundation::UNICODE_STRING, clienttoken: super::super::super::Win32::Foundation::HANDLE, privileges: *const super::super::super::Win32::Security::PRIVILEGE_SET, accessgranted: P4) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, -{ +pub unsafe fn ZwPrivilegedServiceAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, servicename: *const super::super::super::Win32::Foundation::UNICODE_STRING, clienttoken: super::super::super::Win32::Foundation::HANDLE, privileges: *const super::super::super::Win32::Security::PRIVILEGE_SET, accessgranted: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwPrivilegedServiceAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, servicename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, clienttoken : super::super::super::Win32::Foundation:: HANDLE, privileges : *const super::super::super::Win32::Security:: PRIVILEGE_SET, accessgranted : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwPrivilegedServiceAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(servicename), core::mem::transmute(clienttoken), core::mem::transmute(privileges), accessgranted.param().abi()) + ZwPrivilegedServiceAuditAlarm(core::mem::transmute(subsystemname), core::mem::transmute(servicename), core::mem::transmute(clienttoken), core::mem::transmute(privileges), accessgranted.into()) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ZwQueryDirectoryFile(filehandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fileinformation: *mut core::ffi::c_void, length: u32, fileinformationclass: FILE_INFORMATION_CLASS, returnsingleentry: P8, filename: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, restartscan: P10) -> super::super::super::Win32::Foundation::NTSTATUS -where - P8: windows_core::Param, - P10: windows_core::Param, -{ +pub unsafe fn ZwQueryDirectoryFile(filehandle: super::super::super::Win32::Foundation::HANDLE, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fileinformation: *mut core::ffi::c_void, length: u32, fileinformationclass: FILE_INFORMATION_CLASS, returnsingleentry: bool, filename: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, restartscan: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwQueryDirectoryFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, fileinformation : *mut core::ffi::c_void, length : u32, fileinformationclass : FILE_INFORMATION_CLASS, returnsingleentry : super::super::super::Win32::Foundation:: BOOLEAN, filename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, restartscan : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); ZwQueryDirectoryFile( core::mem::transmute(filehandle), @@ -4544,9 +4190,9 @@ where core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass), - returnsingleentry.param().abi(), + returnsingleentry.into(), core::mem::transmute(filename.unwrap_or(core::mem::zeroed())), - restartscan.param().abi(), + restartscan.into(), ) } #[cfg(feature = "Win32_System_IO")] @@ -4556,23 +4202,15 @@ pub unsafe fn ZwQueryDirectoryFileEx(filehandle: super::super::super::Win32::Fou ZwQueryDirectoryFileEx(core::mem::transmute(filehandle), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(apcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(fileinformation), core::mem::transmute(length), core::mem::transmute(fileinformationclass), core::mem::transmute(queryflags), core::mem::transmute(filename.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ZwQueryDirectoryObject(directoryhandle: super::super::super::Win32::Foundation::HANDLE, buffer: Option<*mut core::ffi::c_void>, length: u32, returnsingleentry: P3, restartscan: P4, context: *mut u32, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P3: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn ZwQueryDirectoryObject(directoryhandle: super::super::super::Win32::Foundation::HANDLE, buffer: Option<*mut core::ffi::c_void>, length: u32, returnsingleentry: bool, restartscan: bool, context: *mut u32, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwQueryDirectoryObject(directoryhandle : super::super::super::Win32::Foundation:: HANDLE, buffer : *mut core::ffi::c_void, length : u32, returnsingleentry : super::super::super::Win32::Foundation:: BOOLEAN, restartscan : super::super::super::Win32::Foundation:: BOOLEAN, context : *mut u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQueryDirectoryObject(core::mem::transmute(directoryhandle), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), returnsingleentry.param().abi(), restartscan.param().abi(), core::mem::transmute(context), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) + ZwQueryDirectoryObject(core::mem::transmute(directoryhandle), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), returnsingleentry.into(), restartscan.into(), core::mem::transmute(context), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ZwQueryEaFile(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *mut core::ffi::c_void, length: u32, returnsingleentry: P4, ealist: Option<*const core::ffi::c_void>, ealistlength: u32, eaindex: Option<*const u32>, restartscan: P8) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, - P8: windows_core::Param, -{ +pub unsafe fn ZwQueryEaFile(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *mut core::ffi::c_void, length: u32, returnsingleentry: bool, ealist: Option<*const core::ffi::c_void>, ealistlength: u32, eaindex: Option<*const u32>, restartscan: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwQueryEaFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, buffer : *mut core::ffi::c_void, length : u32, returnsingleentry : super::super::super::Win32::Foundation:: BOOLEAN, ealist : *const core::ffi::c_void, ealistlength : u32, eaindex : *const u32, restartscan : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQueryEaFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), returnsingleentry.param().abi(), core::mem::transmute(ealist.unwrap_or(core::mem::zeroed())), core::mem::transmute(ealistlength), core::mem::transmute(eaindex.unwrap_or(core::mem::zeroed())), restartscan.param().abi()) + ZwQueryEaFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), returnsingleentry.into(), core::mem::transmute(ealist.unwrap_or(core::mem::zeroed())), core::mem::transmute(ealistlength), core::mem::transmute(eaindex.unwrap_or(core::mem::zeroed())), restartscan.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -4594,13 +4232,9 @@ pub unsafe fn ZwQueryObject(handle: Option(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *mut core::ffi::c_void, length: u32, returnsingleentry: P4, sidlist: Option<*const core::ffi::c_void>, sidlistlength: u32, startsid: Option, restartscan: P8) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, - P8: windows_core::Param, -{ +pub unsafe fn ZwQueryQuotaInformationFile(filehandle: super::super::super::Win32::Foundation::HANDLE, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, buffer: *mut core::ffi::c_void, length: u32, returnsingleentry: bool, sidlist: Option<*const core::ffi::c_void>, sidlistlength: u32, startsid: Option, restartscan: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwQueryQuotaInformationFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, buffer : *mut core::ffi::c_void, length : u32, returnsingleentry : super::super::super::Win32::Foundation:: BOOLEAN, sidlist : *const core::ffi::c_void, sidlistlength : u32, startsid : super::super::super::Win32::Security:: PSID, restartscan : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQueryQuotaInformationFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), returnsingleentry.param().abi(), core::mem::transmute(sidlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidlistlength), core::mem::transmute(startsid.unwrap_or(core::mem::zeroed())), restartscan.param().abi()) + ZwQueryQuotaInformationFile(core::mem::transmute(filehandle), core::mem::transmute(iostatusblock), core::mem::transmute(buffer), core::mem::transmute(length), returnsingleentry.into(), core::mem::transmute(sidlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(sidlistlength), core::mem::transmute(startsid.unwrap_or(core::mem::zeroed())), restartscan.into()) } #[cfg(feature = "Win32_Security")] #[inline] diff --git a/crates/libs/windows/src/Windows/Wdk/System/OfflineRegistry/mod.rs b/crates/libs/windows/src/Windows/Wdk/System/OfflineRegistry/mod.rs index c7069461d8..f527682e05 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/OfflineRegistry/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/OfflineRegistry/mod.rs @@ -165,9 +165,6 @@ pub unsafe fn ORStart() -> super::super::super::Win32::Foundation::WIN32_ERROR { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct ORHKEY(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for ORHKEY { - type TypeKind = windows_core::CopyType; -} impl ORHKEY { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Wdk/System/Registry/mod.rs b/crates/libs/windows/src/Windows/Wdk/System/Registry/mod.rs index 519c54f36a..7ea8c72e34 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/Registry/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/Registry/mod.rs @@ -48,11 +48,7 @@ pub unsafe fn NtFlushKey(keyhandle: super::super::super::Win32::Foundation::HAND } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn NtNotifyChangeMultipleKeys(masterkeyhandle: super::super::super::Win32::Foundation::HANDLE, subordinateobjects: Option<&[super::super::Foundation::OBJECT_ATTRIBUTES]>, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, completionfilter: u32, watchtree: P8, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, asynchronous: P11) -> super::super::super::Win32::Foundation::NTSTATUS -where - P8: windows_core::Param, - P11: windows_core::Param, -{ +pub unsafe fn NtNotifyChangeMultipleKeys(masterkeyhandle: super::super::super::Win32::Foundation::HANDLE, subordinateobjects: Option<&[super::super::Foundation::OBJECT_ATTRIBUTES]>, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, completionfilter: u32, watchtree: bool, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, asynchronous: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtNotifyChangeMultipleKeys(masterkeyhandle : super::super::super::Win32::Foundation:: HANDLE, count : u32, subordinateobjects : *const super::super::Foundation:: OBJECT_ATTRIBUTES, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, completionfilter : u32, watchtree : super::super::super::Win32::Foundation:: BOOLEAN, buffer : *mut core::ffi::c_void, buffersize : u32, asynchronous : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); NtNotifyChangeMultipleKeys( core::mem::transmute(masterkeyhandle), @@ -63,10 +59,10 @@ where core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(completionfilter), - watchtree.param().abi(), + watchtree.into(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), - asynchronous.param().abi(), + asynchronous.into(), ) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] @@ -199,11 +195,7 @@ pub unsafe fn ZwFlushKey(keyhandle: super::super::super::Win32::Foundation::HAND } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn ZwNotifyChangeMultipleKeys(masterkeyhandle: super::super::super::Win32::Foundation::HANDLE, subordinateobjects: Option<&[super::super::Foundation::OBJECT_ATTRIBUTES]>, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, completionfilter: u32, watchtree: P8, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, asynchronous: P11) -> super::super::super::Win32::Foundation::NTSTATUS -where - P8: windows_core::Param, - P11: windows_core::Param, -{ +pub unsafe fn ZwNotifyChangeMultipleKeys(masterkeyhandle: super::super::super::Win32::Foundation::HANDLE, subordinateobjects: Option<&[super::super::Foundation::OBJECT_ATTRIBUTES]>, event: Option, apcroutine: Option, apccontext: Option<*const core::ffi::c_void>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, completionfilter: u32, watchtree: bool, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, asynchronous: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwNotifyChangeMultipleKeys(masterkeyhandle : super::super::super::Win32::Foundation:: HANDLE, count : u32, subordinateobjects : *const super::super::Foundation:: OBJECT_ATTRIBUTES, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, completionfilter : u32, watchtree : super::super::super::Win32::Foundation:: BOOLEAN, buffer : *mut core::ffi::c_void, buffersize : u32, asynchronous : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); ZwNotifyChangeMultipleKeys( core::mem::transmute(masterkeyhandle), @@ -214,10 +206,10 @@ where core::mem::transmute(apccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock), core::mem::transmute(completionfilter), - watchtree.param().abi(), + watchtree.into(), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(buffersize), - asynchronous.param().abi(), + asynchronous.into(), ) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] diff --git a/crates/libs/windows/src/Windows/Wdk/System/SystemServices/mod.rs b/crates/libs/windows/src/Windows/Wdk/System/SystemServices/mod.rs index 7aab562bde..fc8e02430e 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/SystemServices/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/SystemServices/mod.rs @@ -277,21 +277,15 @@ pub unsafe fn ClfsReadRestartArea(pvmarshalcontext: *mut core::ffi::c_void, ppvr } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn ClfsRemoveLogContainer(plfolog: *const super::super::Foundation::FILE_OBJECT, puszcontainerpath: *const super::super::super::Win32::Foundation::UNICODE_STRING, fforce: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn ClfsRemoveLogContainer(plfolog: *const super::super::Foundation::FILE_OBJECT, puszcontainerpath: *const super::super::super::Win32::Foundation::UNICODE_STRING, fforce: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsRemoveLogContainer(plfolog : *const super::super::Foundation:: FILE_OBJECT, puszcontainerpath : *const super::super::super::Win32::Foundation:: UNICODE_STRING, fforce : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ClfsRemoveLogContainer(core::mem::transmute(plfolog), core::mem::transmute(puszcontainerpath), fforce.param().abi()) + ClfsRemoveLogContainer(core::mem::transmute(plfolog), core::mem::transmute(puszcontainerpath), fforce.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn ClfsRemoveLogContainerSet(plfolog: *const super::super::Foundation::FILE_OBJECT, rgwszcontainerpath: &[super::super::super::Win32::Foundation::UNICODE_STRING], fforce: P3) -> super::super::super::Win32::Foundation::NTSTATUS -where - P3: windows_core::Param, -{ +pub unsafe fn ClfsRemoveLogContainerSet(plfolog: *const super::super::Foundation::FILE_OBJECT, rgwszcontainerpath: &[super::super::super::Win32::Foundation::UNICODE_STRING], fforce: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsRemoveLogContainerSet(plfolog : *const super::super::Foundation:: FILE_OBJECT, ccontainers : u16, rgwszcontainerpath : *const super::super::super::Win32::Foundation:: UNICODE_STRING, fforce : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ClfsRemoveLogContainerSet(core::mem::transmute(plfolog), rgwszcontainerpath.len().try_into().unwrap(), core::mem::transmute(rgwszcontainerpath.as_ptr()), fforce.param().abi()) + ClfsRemoveLogContainerSet(core::mem::transmute(plfolog), rgwszcontainerpath.len().try_into().unwrap(), core::mem::transmute(rgwszcontainerpath.as_ptr()), fforce.into()) } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] @@ -449,21 +443,15 @@ pub unsafe fn DbgQueryDebugFilterState(componentid: u32, level: u32) -> super::s DbgQueryDebugFilterState(core::mem::transmute(componentid), core::mem::transmute(level)) } #[inline] -pub unsafe fn DbgSetDebugFilterState(componentid: u32, level: u32, state: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn DbgSetDebugFilterState(componentid: u32, level: u32, state: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn DbgSetDebugFilterState(componentid : u32, level : u32, state : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - DbgSetDebugFilterState(core::mem::transmute(componentid), core::mem::transmute(level), state.param().abi()) + DbgSetDebugFilterState(core::mem::transmute(componentid), core::mem::transmute(level), state.into()) } #[cfg(feature = "Win32_System_Kernel")] #[inline] -pub unsafe fn DbgSetDebugPrintCallback(debugprintcallback: PDEBUG_PRINT_CALLBACK, enable: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn DbgSetDebugPrintCallback(debugprintcallback: PDEBUG_PRINT_CALLBACK, enable: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn DbgSetDebugPrintCallback(debugprintcallback : PDEBUG_PRINT_CALLBACK, enable : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - DbgSetDebugPrintCallback(core::mem::transmute(debugprintcallback), enable.param().abi()) + DbgSetDebugPrintCallback(core::mem::transmute(debugprintcallback), enable.into()) } #[inline] pub unsafe fn EtwActivityIdControl(controlcode: u32, activityid: *mut windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -551,21 +539,15 @@ pub unsafe fn ExAcquirePushLockSharedEx(pushlock: *mut usize, flags: u32) { } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn ExAcquireResourceExclusiveLite(resource: *mut super::super::Foundation::ERESOURCE, wait: P1) -> super::super::super::Win32::Foundation::BOOLEAN -where - P1: windows_core::Param, -{ +pub unsafe fn ExAcquireResourceExclusiveLite(resource: *mut super::super::Foundation::ERESOURCE, wait: bool) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn ExAcquireResourceExclusiveLite(resource : *mut super::super::Foundation:: ERESOURCE, wait : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - ExAcquireResourceExclusiveLite(core::mem::transmute(resource), wait.param().abi()) + ExAcquireResourceExclusiveLite(core::mem::transmute(resource), wait.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn ExAcquireResourceSharedLite(resource: *mut super::super::Foundation::ERESOURCE, wait: P1) -> super::super::super::Win32::Foundation::BOOLEAN -where - P1: windows_core::Param, -{ +pub unsafe fn ExAcquireResourceSharedLite(resource: *mut super::super::Foundation::ERESOURCE, wait: bool) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn ExAcquireResourceSharedLite(resource : *mut super::super::Foundation:: ERESOURCE, wait : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - ExAcquireResourceSharedLite(core::mem::transmute(resource), wait.param().abi()) + ExAcquireResourceSharedLite(core::mem::transmute(resource), wait.into()) } #[inline] pub unsafe fn ExAcquireRundownProtection(runref: *mut EX_RUNDOWN_REF) -> super::super::super::Win32::Foundation::BOOLEAN { @@ -591,21 +573,15 @@ pub unsafe fn ExAcquireRundownProtectionEx(runref: *mut EX_RUNDOWN_REF, count: u } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn ExAcquireSharedStarveExclusive(resource: *mut super::super::Foundation::ERESOURCE, wait: P1) -> super::super::super::Win32::Foundation::BOOLEAN -where - P1: windows_core::Param, -{ +pub unsafe fn ExAcquireSharedStarveExclusive(resource: *mut super::super::Foundation::ERESOURCE, wait: bool) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn ExAcquireSharedStarveExclusive(resource : *mut super::super::Foundation:: ERESOURCE, wait : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - ExAcquireSharedStarveExclusive(core::mem::transmute(resource), wait.param().abi()) + ExAcquireSharedStarveExclusive(core::mem::transmute(resource), wait.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn ExAcquireSharedWaitForExclusive(resource: *mut super::super::Foundation::ERESOURCE, wait: P1) -> super::super::super::Win32::Foundation::BOOLEAN -where - P1: windows_core::Param, -{ +pub unsafe fn ExAcquireSharedWaitForExclusive(resource: *mut super::super::Foundation::ERESOURCE, wait: bool) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn ExAcquireSharedWaitForExclusive(resource : *mut super::super::Foundation:: ERESOURCE, wait : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - ExAcquireSharedWaitForExclusive(core::mem::transmute(resource), wait.param().abi()) + ExAcquireSharedWaitForExclusive(core::mem::transmute(resource), wait.into()) } #[inline] pub unsafe fn ExAcquireSpinLockExclusive(spinlock: *mut i32) -> u8 { @@ -699,13 +675,9 @@ pub unsafe fn ExConvertExclusiveToSharedLite(resource: *mut super::super::Founda } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ExCreateCallback(callbackobject: *mut super::super::Foundation::PCALLBACK_OBJECT, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, create: P2, allowmultiplecallbacks: P3) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn ExCreateCallback(callbackobject: *mut super::super::Foundation::PCALLBACK_OBJECT, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, create: bool, allowmultiplecallbacks: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ExCreateCallback(callbackobject : *mut super::super::Foundation:: PCALLBACK_OBJECT, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, create : super::super::super::Win32::Foundation:: BOOLEAN, allowmultiplecallbacks : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ExCreateCallback(core::mem::transmute(callbackobject), core::mem::transmute(objectattributes), create.param().abi(), allowmultiplecallbacks.param().abi()) + ExCreateCallback(core::mem::transmute(callbackobject), core::mem::transmute(objectattributes), create.into(), allowmultiplecallbacks.into()) } #[inline] pub unsafe fn ExCreatePool(flags: u32, tag: usize, params: Option<*const POOL_CREATE_EXTENDED_PARAMS>, poolhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -720,13 +692,9 @@ pub unsafe fn ExDeleteResourceLite(resource: *mut super::super::Foundation::ERES } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn ExDeleteTimer(timer: super::super::Foundation::PEX_TIMER, cancel: P1, wait: P2, parameters: Option<*const EXT_DELETE_PARAMETERS>) -> super::super::super::Win32::Foundation::BOOLEAN -where - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn ExDeleteTimer(timer: super::super::Foundation::PEX_TIMER, cancel: bool, wait: bool, parameters: Option<*const EXT_DELETE_PARAMETERS>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn ExDeleteTimer(timer : super::super::Foundation:: PEX_TIMER, cancel : super::super::super::Win32::Foundation:: BOOLEAN, wait : super::super::super::Win32::Foundation:: BOOLEAN, parameters : *const EXT_DELETE_PARAMETERS) -> super::super::super::Win32::Foundation:: BOOLEAN); - ExDeleteTimer(core::mem::transmute(timer), cancel.param().abi(), wait.param().abi(), core::mem::transmute(parameters.unwrap_or(core::mem::zeroed()))) + ExDeleteTimer(core::mem::transmute(timer), cancel.into(), wait.into(), core::mem::transmute(parameters.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ExDestroyPool(poolhandle: super::super::super::Win32::Foundation::HANDLE) { @@ -1082,12 +1050,9 @@ pub unsafe fn ExSetTimer(timer: super::super::Foundation::PEX_TIMER, duetime: i6 ExSetTimer(core::mem::transmute(timer), core::mem::transmute(duetime), core::mem::transmute(period), core::mem::transmute(parameters.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ExSetTimerResolution(desiredtime: u32, setresolution: P1) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn ExSetTimerResolution(desiredtime: u32, setresolution: bool) -> u32 { windows_targets::link!("ntoskrnl.exe" "system" fn ExSetTimerResolution(desiredtime : u32, setresolution : super::super::super::Win32::Foundation:: BOOLEAN) -> u32); - ExSetTimerResolution(core::mem::transmute(desiredtime), setresolution.param().abi()) + ExSetTimerResolution(core::mem::transmute(desiredtime), setresolution.into()) } #[inline] pub unsafe fn ExSizeOfRundownProtectionCacheAware() -> usize { @@ -1167,12 +1132,9 @@ pub unsafe fn HalAllocateAdapterChannel(adapterobject: *const super::super::supe } #[cfg(feature = "Win32_Storage_IscsiDisc")] #[inline] -pub unsafe fn HalAllocateCommonBuffer(adapterobject: *const super::super::super::Win32::Storage::IscsiDisc::_ADAPTER_OBJECT, length: u32, logicaladdress: *mut i64, cacheenabled: P3) -> *mut core::ffi::c_void -where - P3: windows_core::Param, -{ +pub unsafe fn HalAllocateCommonBuffer(adapterobject: *const super::super::super::Win32::Storage::IscsiDisc::_ADAPTER_OBJECT, length: u32, logicaladdress: *mut i64, cacheenabled: bool) -> *mut core::ffi::c_void { windows_targets::link!("hal.dll" "system" fn HalAllocateCommonBuffer(adapterobject : *const super::super::super::Win32::Storage::IscsiDisc:: _ADAPTER_OBJECT, length : u32, logicaladdress : *mut i64, cacheenabled : super::super::super::Win32::Foundation:: BOOLEAN) -> *mut core::ffi::c_void); - HalAllocateCommonBuffer(core::mem::transmute(adapterobject), core::mem::transmute(length), core::mem::transmute(logicaladdress), cacheenabled.param().abi()) + HalAllocateCommonBuffer(core::mem::transmute(adapterobject), core::mem::transmute(length), core::mem::transmute(logicaladdress), cacheenabled.into()) } #[cfg(feature = "Win32_Storage_IscsiDisc")] #[inline] @@ -1218,12 +1180,9 @@ pub unsafe fn HalExamineMBR(deviceobject: *const super::super::Foundation::DEVIC } #[cfg(feature = "Win32_Storage_IscsiDisc")] #[inline] -pub unsafe fn HalFreeCommonBuffer(adapterobject: *const super::super::super::Win32::Storage::IscsiDisc::_ADAPTER_OBJECT, length: u32, logicaladdress: i64, virtualaddress: *const core::ffi::c_void, cacheenabled: P4) -where - P4: windows_core::Param, -{ +pub unsafe fn HalFreeCommonBuffer(adapterobject: *const super::super::super::Win32::Storage::IscsiDisc::_ADAPTER_OBJECT, length: u32, logicaladdress: i64, virtualaddress: *const core::ffi::c_void, cacheenabled: bool) { windows_targets::link!("hal.dll" "system" fn HalFreeCommonBuffer(adapterobject : *const super::super::super::Win32::Storage::IscsiDisc:: _ADAPTER_OBJECT, length : u32, logicaladdress : i64, virtualaddress : *const core::ffi::c_void, cacheenabled : super::super::super::Win32::Foundation:: BOOLEAN)); - HalFreeCommonBuffer(core::mem::transmute(adapterobject), core::mem::transmute(length), core::mem::transmute(logicaladdress), core::mem::transmute(virtualaddress), cacheenabled.param().abi()) + HalFreeCommonBuffer(core::mem::transmute(adapterobject), core::mem::transmute(length), core::mem::transmute(logicaladdress), core::mem::transmute(virtualaddress), cacheenabled.into()) } #[inline] pub unsafe fn HalFreeHardwareCounters(countersethandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -1340,31 +1299,21 @@ pub unsafe fn IoAllocateErrorLogEntry(ioobject: *const core::ffi::c_void, entrys } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn IoAllocateIrp(stacksize: i8, chargequota: P1) -> *mut super::super::Foundation::IRP -where - P1: windows_core::Param, -{ +pub unsafe fn IoAllocateIrp(stacksize: i8, chargequota: bool) -> *mut super::super::Foundation::IRP { windows_targets::link!("ntoskrnl.exe" "system" fn IoAllocateIrp(stacksize : i8, chargequota : super::super::super::Win32::Foundation:: BOOLEAN) -> *mut super::super::Foundation:: IRP); - IoAllocateIrp(core::mem::transmute(stacksize), chargequota.param().abi()) + IoAllocateIrp(core::mem::transmute(stacksize), chargequota.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn IoAllocateIrpEx(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, stacksize: i8, chargequota: P2) -> *mut super::super::Foundation::IRP -where - P2: windows_core::Param, -{ +pub unsafe fn IoAllocateIrpEx(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, stacksize: i8, chargequota: bool) -> *mut super::super::Foundation::IRP { windows_targets::link!("ntoskrnl.exe" "system" fn IoAllocateIrpEx(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, stacksize : i8, chargequota : super::super::super::Win32::Foundation:: BOOLEAN) -> *mut super::super::Foundation:: IRP); - IoAllocateIrpEx(core::mem::transmute(deviceobject), core::mem::transmute(stacksize), chargequota.param().abi()) + IoAllocateIrpEx(core::mem::transmute(deviceobject), core::mem::transmute(stacksize), chargequota.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn IoAllocateMdl(virtualaddress: Option<*const core::ffi::c_void>, length: u32, secondarybuffer: P2, chargequota: P3, irp: Option<*mut super::super::Foundation::IRP>) -> *mut super::super::Foundation::MDL -where - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn IoAllocateMdl(virtualaddress: Option<*const core::ffi::c_void>, length: u32, secondarybuffer: bool, chargequota: bool, irp: Option<*mut super::super::Foundation::IRP>) -> *mut super::super::Foundation::MDL { windows_targets::link!("ntoskrnl.exe" "system" fn IoAllocateMdl(virtualaddress : *const core::ffi::c_void, length : u32, secondarybuffer : super::super::super::Win32::Foundation:: BOOLEAN, chargequota : super::super::super::Win32::Foundation:: BOOLEAN, irp : *mut super::super::Foundation:: IRP) -> *mut super::super::Foundation:: MDL); - IoAllocateMdl(core::mem::transmute(virtualaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), secondarybuffer.param().abi(), chargequota.param().abi(), core::mem::transmute(irp.unwrap_or(core::mem::zeroed()))) + IoAllocateMdl(core::mem::transmute(virtualaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(length), secondarybuffer.into(), chargequota.into(), core::mem::transmute(irp.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1416,12 +1365,9 @@ pub unsafe fn IoBuildAsynchronousFsdRequest(majorfunction: u32, deviceobject: *c } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn IoBuildDeviceIoControlRequest(iocontrolcode: u32, deviceobject: *const super::super::Foundation::DEVICE_OBJECT, inputbuffer: Option<*const core::ffi::c_void>, inputbufferlength: u32, outputbuffer: Option<*mut core::ffi::c_void>, outputbufferlength: u32, internaldeviceiocontrol: P6, event: Option<*const super::super::Foundation::KEVENT>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> *mut super::super::Foundation::IRP -where - P6: windows_core::Param, -{ +pub unsafe fn IoBuildDeviceIoControlRequest(iocontrolcode: u32, deviceobject: *const super::super::Foundation::DEVICE_OBJECT, inputbuffer: Option<*const core::ffi::c_void>, inputbufferlength: u32, outputbuffer: Option<*mut core::ffi::c_void>, outputbufferlength: u32, internaldeviceiocontrol: bool, event: Option<*const super::super::Foundation::KEVENT>, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> *mut super::super::Foundation::IRP { windows_targets::link!("ntoskrnl.exe" "system" fn IoBuildDeviceIoControlRequest(iocontrolcode : u32, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, inputbuffer : *const core::ffi::c_void, inputbufferlength : u32, outputbuffer : *mut core::ffi::c_void, outputbufferlength : u32, internaldeviceiocontrol : super::super::super::Win32::Foundation:: BOOLEAN, event : *const super::super::Foundation:: KEVENT, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK) -> *mut super::super::Foundation:: IRP); - IoBuildDeviceIoControlRequest(core::mem::transmute(iocontrolcode), core::mem::transmute(deviceobject), core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(inputbufferlength), core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(outputbufferlength), internaldeviceiocontrol.param().abi(), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock)) + IoBuildDeviceIoControlRequest(core::mem::transmute(iocontrolcode), core::mem::transmute(deviceobject), core::mem::transmute(inputbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(inputbufferlength), core::mem::transmute(outputbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(outputbufferlength), internaldeviceiocontrol.into(), core::mem::transmute(event.unwrap_or(core::mem::zeroed())), core::mem::transmute(iostatusblock)) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -1455,21 +1401,15 @@ pub unsafe fn IoCheckLinkShareAccess(desiredaccess: u32, desiredshareaccess: u32 } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn IoCheckShareAccess(desiredaccess: u32, desiredshareaccess: u32, fileobject: *mut super::super::Foundation::FILE_OBJECT, shareaccess: *mut SHARE_ACCESS, update: P4) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, -{ +pub unsafe fn IoCheckShareAccess(desiredaccess: u32, desiredshareaccess: u32, fileobject: *mut super::super::Foundation::FILE_OBJECT, shareaccess: *mut SHARE_ACCESS, update: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCheckShareAccess(desiredaccess : u32, desiredshareaccess : u32, fileobject : *mut super::super::Foundation:: FILE_OBJECT, shareaccess : *mut SHARE_ACCESS, update : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoCheckShareAccess(core::mem::transmute(desiredaccess), core::mem::transmute(desiredshareaccess), core::mem::transmute(fileobject), core::mem::transmute(shareaccess), update.param().abi()) + IoCheckShareAccess(core::mem::transmute(desiredaccess), core::mem::transmute(desiredshareaccess), core::mem::transmute(fileobject), core::mem::transmute(shareaccess), update.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn IoCheckShareAccessEx(desiredaccess: u32, desiredshareaccess: u32, fileobject: *mut super::super::Foundation::FILE_OBJECT, shareaccess: *mut SHARE_ACCESS, update: P4, writepermission: Option<*const super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, -{ +pub unsafe fn IoCheckShareAccessEx(desiredaccess: u32, desiredshareaccess: u32, fileobject: *mut super::super::Foundation::FILE_OBJECT, shareaccess: *mut SHARE_ACCESS, update: bool, writepermission: Option<*const super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCheckShareAccessEx(desiredaccess : u32, desiredshareaccess : u32, fileobject : *mut super::super::Foundation:: FILE_OBJECT, shareaccess : *mut SHARE_ACCESS, update : super::super::super::Win32::Foundation:: BOOLEAN, writepermission : *const super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoCheckShareAccessEx(core::mem::transmute(desiredaccess), core::mem::transmute(desiredshareaccess), core::mem::transmute(fileobject), core::mem::transmute(shareaccess), update.param().abi(), core::mem::transmute(writepermission.unwrap_or(core::mem::zeroed()))) + IoCheckShareAccessEx(core::mem::transmute(desiredaccess), core::mem::transmute(desiredshareaccess), core::mem::transmute(fileobject), core::mem::transmute(shareaccess), update.into(), core::mem::transmute(writepermission.unwrap_or(core::mem::zeroed()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1490,13 +1430,9 @@ pub unsafe fn IoClearIrpExtraCreateParameter(irp: *mut super::super::Foundation: } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn IoConnectInterrupt(interruptobject: *mut super::super::Foundation::PKINTERRUPT, serviceroutine: PKSERVICE_ROUTINE, servicecontext: Option<*const core::ffi::c_void>, spinlock: Option<*const usize>, vector: u32, irql: u8, synchronizeirql: u8, interruptmode: KINTERRUPT_MODE, sharevector: P8, processorenablemask: usize, floatingsave: P10) -> super::super::super::Win32::Foundation::NTSTATUS -where - P8: windows_core::Param, - P10: windows_core::Param, -{ +pub unsafe fn IoConnectInterrupt(interruptobject: *mut super::super::Foundation::PKINTERRUPT, serviceroutine: PKSERVICE_ROUTINE, servicecontext: Option<*const core::ffi::c_void>, spinlock: Option<*const usize>, vector: u32, irql: u8, synchronizeirql: u8, interruptmode: KINTERRUPT_MODE, sharevector: bool, processorenablemask: usize, floatingsave: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoConnectInterrupt(interruptobject : *mut super::super::Foundation:: PKINTERRUPT, serviceroutine : PKSERVICE_ROUTINE, servicecontext : *const core::ffi::c_void, spinlock : *const usize, vector : u32, irql : u8, synchronizeirql : u8, interruptmode : KINTERRUPT_MODE, sharevector : super::super::super::Win32::Foundation:: BOOLEAN, processorenablemask : usize, floatingsave : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoConnectInterrupt(core::mem::transmute(interruptobject), core::mem::transmute(serviceroutine), core::mem::transmute(servicecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(spinlock.unwrap_or(core::mem::zeroed())), core::mem::transmute(vector), core::mem::transmute(irql), core::mem::transmute(synchronizeirql), core::mem::transmute(interruptmode), sharevector.param().abi(), core::mem::transmute(processorenablemask), floatingsave.param().abi()) + IoConnectInterrupt(core::mem::transmute(interruptobject), core::mem::transmute(serviceroutine), core::mem::transmute(servicecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(spinlock.unwrap_or(core::mem::zeroed())), core::mem::transmute(vector), core::mem::transmute(irql), core::mem::transmute(synchronizeirql), core::mem::transmute(interruptmode), sharevector.into(), core::mem::transmute(processorenablemask), floatingsave.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1512,12 +1448,9 @@ pub unsafe fn IoCreateController(size: u32) -> *mut CONTROLLER_OBJECT { } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn IoCreateDevice(driverobject: *const super::super::Foundation::DRIVER_OBJECT, deviceextensionsize: u32, devicename: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, devicetype: u32, devicecharacteristics: u32, exclusive: P5, deviceobject: *mut *mut super::super::Foundation::DEVICE_OBJECT) -> super::super::super::Win32::Foundation::NTSTATUS -where - P5: windows_core::Param, -{ +pub unsafe fn IoCreateDevice(driverobject: *const super::super::Foundation::DRIVER_OBJECT, deviceextensionsize: u32, devicename: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, devicetype: u32, devicecharacteristics: u32, exclusive: bool, deviceobject: *mut *mut super::super::Foundation::DEVICE_OBJECT) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCreateDevice(driverobject : *const super::super::Foundation:: DRIVER_OBJECT, deviceextensionsize : u32, devicename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, devicetype : u32, devicecharacteristics : u32, exclusive : super::super::super::Win32::Foundation:: BOOLEAN, deviceobject : *mut *mut super::super::Foundation:: DEVICE_OBJECT) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoCreateDevice(core::mem::transmute(driverobject), core::mem::transmute(deviceextensionsize), core::mem::transmute(devicename.unwrap_or(core::mem::zeroed())), core::mem::transmute(devicetype), core::mem::transmute(devicecharacteristics), exclusive.param().abi(), core::mem::transmute(deviceobject)) + IoCreateDevice(core::mem::transmute(driverobject), core::mem::transmute(deviceextensionsize), core::mem::transmute(devicename.unwrap_or(core::mem::zeroed())), core::mem::transmute(devicetype), core::mem::transmute(devicecharacteristics), exclusive.into(), core::mem::transmute(deviceobject)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Ioctl", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1703,12 +1636,9 @@ pub unsafe fn IoEnumerateKsrPersistentMemoryEx(driverobject: *const super::super } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Storage_IscsiDisc"))] #[inline] -pub unsafe fn IoFlushAdapterBuffers(adapterobject: *const super::super::super::Win32::Storage::IscsiDisc::_ADAPTER_OBJECT, mdl: *const super::super::Foundation::MDL, mapregisterbase: *const core::ffi::c_void, currentva: *const core::ffi::c_void, length: u32, writetodevice: P5) -> super::super::super::Win32::Foundation::BOOLEAN -where - P5: windows_core::Param, -{ +pub unsafe fn IoFlushAdapterBuffers(adapterobject: *const super::super::super::Win32::Storage::IscsiDisc::_ADAPTER_OBJECT, mdl: *const super::super::Foundation::MDL, mapregisterbase: *const core::ffi::c_void, currentva: *const core::ffi::c_void, length: u32, writetodevice: bool) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("hal.dll" "system" fn IoFlushAdapterBuffers(adapterobject : *const super::super::super::Win32::Storage::IscsiDisc:: _ADAPTER_OBJECT, mdl : *const super::super::Foundation:: MDL, mapregisterbase : *const core::ffi::c_void, currentva : *const core::ffi::c_void, length : u32, writetodevice : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - IoFlushAdapterBuffers(core::mem::transmute(adapterobject), core::mem::transmute(mdl), core::mem::transmute(mapregisterbase), core::mem::transmute(currentva), core::mem::transmute(length), writetodevice.param().abi()) + IoFlushAdapterBuffers(core::mem::transmute(adapterobject), core::mem::transmute(mdl), core::mem::transmute(mapregisterbase), core::mem::transmute(currentva), core::mem::transmute(length), writetodevice.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2076,12 +2006,9 @@ pub unsafe fn IoMakeAssociatedIrpEx(irp: *const super::super::Foundation::IRP, d } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Storage_IscsiDisc"))] #[inline] -pub unsafe fn IoMapTransfer(adapterobject: *const super::super::super::Win32::Storage::IscsiDisc::_ADAPTER_OBJECT, mdl: *const super::super::Foundation::MDL, mapregisterbase: *const core::ffi::c_void, currentva: *const core::ffi::c_void, length: *mut u32, writetodevice: P5) -> i64 -where - P5: windows_core::Param, -{ +pub unsafe fn IoMapTransfer(adapterobject: *const super::super::super::Win32::Storage::IscsiDisc::_ADAPTER_OBJECT, mdl: *const super::super::Foundation::MDL, mapregisterbase: *const core::ffi::c_void, currentva: *const core::ffi::c_void, length: *mut u32, writetodevice: bool) -> i64 { windows_targets::link!("hal.dll" "system" fn IoMapTransfer(adapterobject : *const super::super::super::Win32::Storage::IscsiDisc:: _ADAPTER_OBJECT, mdl : *const super::super::Foundation:: MDL, mapregisterbase : *const core::ffi::c_void, currentva : *const core::ffi::c_void, length : *mut u32, writetodevice : super::super::super::Win32::Foundation:: BOOLEAN) -> i64); - IoMapTransfer(core::mem::transmute(adapterobject), core::mem::transmute(mdl), core::mem::transmute(mapregisterbase), core::mem::transmute(currentva), core::mem::transmute(length), writetodevice.param().abi()) + IoMapTransfer(core::mem::transmute(adapterobject), core::mem::transmute(mdl), core::mem::transmute(mapregisterbase), core::mem::transmute(currentva), core::mem::transmute(length), writetodevice.into()) } #[inline] pub unsafe fn IoOpenDeviceInterfaceRegistryKey(symboliclinkname: *const super::super::super::Win32::Foundation::UNICODE_STRING, desiredaccess: u32, deviceinterfaceregkey: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -2176,12 +2103,9 @@ pub unsafe fn IoReadDiskSignature(deviceobject: *const super::super::Foundation: } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Ioctl", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn IoReadPartitionTable(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, sectorsize: u32, returnrecognizedpartitions: P2, partitionbuffer: *mut *mut super::super::super::Win32::System::Ioctl::DRIVE_LAYOUT_INFORMATION) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn IoReadPartitionTable(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, sectorsize: u32, returnrecognizedpartitions: bool, partitionbuffer: *mut *mut super::super::super::Win32::System::Ioctl::DRIVE_LAYOUT_INFORMATION) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoReadPartitionTable(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, sectorsize : u32, returnrecognizedpartitions : super::super::super::Win32::Foundation:: BOOLEAN, partitionbuffer : *mut *mut super::super::super::Win32::System::Ioctl:: DRIVE_LAYOUT_INFORMATION) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoReadPartitionTable(core::mem::transmute(deviceobject), core::mem::transmute(sectorsize), returnrecognizedpartitions.param().abi(), core::mem::transmute(partitionbuffer)) + IoReadPartitionTable(core::mem::transmute(deviceobject), core::mem::transmute(sectorsize), returnrecognizedpartitions.into(), core::mem::transmute(partitionbuffer)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Ioctl", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2283,12 +2207,9 @@ pub unsafe fn IoReplacePartitionUnit(targetpdo: *const super::super::Foundation: } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn IoReportDetectedDevice(driverobject: *const super::super::Foundation::DRIVER_OBJECT, legacybustype: INTERFACE_TYPE, busnumber: u32, slotnumber: u32, resourcelist: Option<*const CM_RESOURCE_LIST>, resourcerequirements: Option<*const IO_RESOURCE_REQUIREMENTS_LIST>, resourceassigned: P6, deviceobject: *mut *mut super::super::Foundation::DEVICE_OBJECT) -> super::super::super::Win32::Foundation::NTSTATUS -where - P6: windows_core::Param, -{ +pub unsafe fn IoReportDetectedDevice(driverobject: *const super::super::Foundation::DRIVER_OBJECT, legacybustype: INTERFACE_TYPE, busnumber: u32, slotnumber: u32, resourcelist: Option<*const CM_RESOURCE_LIST>, resourcerequirements: Option<*const IO_RESOURCE_REQUIREMENTS_LIST>, resourceassigned: bool, deviceobject: *mut *mut super::super::Foundation::DEVICE_OBJECT) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoReportDetectedDevice(driverobject : *const super::super::Foundation:: DRIVER_OBJECT, legacybustype : INTERFACE_TYPE, busnumber : u32, slotnumber : u32, resourcelist : *const CM_RESOURCE_LIST, resourcerequirements : *const IO_RESOURCE_REQUIREMENTS_LIST, resourceassigned : super::super::super::Win32::Foundation:: BOOLEAN, deviceobject : *mut *mut super::super::Foundation:: DEVICE_OBJECT) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoReportDetectedDevice(core::mem::transmute(driverobject), core::mem::transmute(legacybustype), core::mem::transmute(busnumber), core::mem::transmute(slotnumber), core::mem::transmute(resourcelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(resourcerequirements.unwrap_or(core::mem::zeroed())), resourceassigned.param().abi(), core::mem::transmute(deviceobject)) + IoReportDetectedDevice(core::mem::transmute(driverobject), core::mem::transmute(legacybustype), core::mem::transmute(busnumber), core::mem::transmute(slotnumber), core::mem::transmute(resourcelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(resourcerequirements.unwrap_or(core::mem::zeroed())), resourceassigned.into(), core::mem::transmute(deviceobject)) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2310,10 +2231,7 @@ pub unsafe fn IoReportResourceForDetection(driverobject: *const super::super::Fo } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn IoReportResourceUsage(driverclassname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, driverobject: *const super::super::Foundation::DRIVER_OBJECT, driverlist: Option<*const CM_RESOURCE_LIST>, driverlistsize: Option, deviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, devicelist: Option<*const CM_RESOURCE_LIST>, devicelistsize: Option, overrideconflict: P7, conflictdetected: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS -where - P7: windows_core::Param, -{ +pub unsafe fn IoReportResourceUsage(driverclassname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, driverobject: *const super::super::Foundation::DRIVER_OBJECT, driverlist: Option<*const CM_RESOURCE_LIST>, driverlistsize: Option, deviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, devicelist: Option<*const CM_RESOURCE_LIST>, devicelistsize: Option, overrideconflict: bool, conflictdetected: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoReportResourceUsage(driverclassname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, driverobject : *const super::super::Foundation:: DRIVER_OBJECT, driverlist : *const CM_RESOURCE_LIST, driverlistsize : u32, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, devicelist : *const CM_RESOURCE_LIST, devicelistsize : u32, overrideconflict : super::super::super::Win32::Foundation:: BOOLEAN, conflictdetected : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); IoReportResourceUsage( core::mem::transmute(driverclassname.unwrap_or(core::mem::zeroed())), @@ -2323,7 +2241,7 @@ where core::mem::transmute(deviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(devicelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(devicelistsize.unwrap_or(core::mem::zeroed())), - overrideconflict.param().abi(), + overrideconflict.into(), core::mem::transmute(conflictdetected), ) } @@ -2388,14 +2306,9 @@ pub unsafe fn IoSetActivityIdThread(activityid: *const windows_core::GUID) -> *m } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn IoSetCompletionRoutineEx(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, irp: *const super::super::Foundation::IRP, completionroutine: super::super::Foundation::PIO_COMPLETION_ROUTINE, context: Option<*const core::ffi::c_void>, invokeonsuccess: P4, invokeonerror: P5, invokeoncancel: P6) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, - P5: windows_core::Param, - P6: windows_core::Param, -{ +pub unsafe fn IoSetCompletionRoutineEx(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, irp: *const super::super::Foundation::IRP, completionroutine: super::super::Foundation::PIO_COMPLETION_ROUTINE, context: Option<*const core::ffi::c_void>, invokeonsuccess: bool, invokeonerror: bool, invokeoncancel: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoSetCompletionRoutineEx(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, irp : *const super::super::Foundation:: IRP, completionroutine : super::super::Foundation:: PIO_COMPLETION_ROUTINE, context : *const core::ffi::c_void, invokeonsuccess : super::super::super::Win32::Foundation:: BOOLEAN, invokeonerror : super::super::super::Win32::Foundation:: BOOLEAN, invokeoncancel : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoSetCompletionRoutineEx(core::mem::transmute(deviceobject), core::mem::transmute(irp), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), invokeonsuccess.param().abi(), invokeonerror.param().abi(), invokeoncancel.param().abi()) + IoSetCompletionRoutineEx(core::mem::transmute(deviceobject), core::mem::transmute(irp), core::mem::transmute(completionroutine), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), invokeonsuccess.into(), invokeonerror.into(), invokeoncancel.into()) } #[inline] pub unsafe fn IoSetDeviceInterfacePropertyData(symboliclinkname: *const super::super::super::Win32::Foundation::UNICODE_STRING, propertykey: *const super::super::super::Win32::Foundation::DEVPROPKEY, lcid: u32, flags: u32, r#type: u32, size: u32, data: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -2403,12 +2316,9 @@ pub unsafe fn IoSetDeviceInterfacePropertyData(symboliclinkname: *const super::s IoSetDeviceInterfacePropertyData(core::mem::transmute(symboliclinkname), core::mem::transmute(propertykey), core::mem::transmute(lcid), core::mem::transmute(flags), core::mem::transmute(r#type), core::mem::transmute(size), core::mem::transmute(data.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn IoSetDeviceInterfaceState(symboliclinkname: *const super::super::super::Win32::Foundation::UNICODE_STRING, enable: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn IoSetDeviceInterfaceState(symboliclinkname: *const super::super::super::Win32::Foundation::UNICODE_STRING, enable: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoSetDeviceInterfaceState(symboliclinkname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, enable : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoSetDeviceInterfaceState(core::mem::transmute(symboliclinkname), enable.param().abi()) + IoSetDeviceInterfaceState(core::mem::transmute(symboliclinkname), enable.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2424,12 +2334,9 @@ pub unsafe fn IoSetFileObjectIgnoreSharing(fileobject: *const super::super::Foun } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn IoSetFileOrigin(fileobject: *const super::super::Foundation::FILE_OBJECT, remote: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn IoSetFileOrigin(fileobject: *const super::super::Foundation::FILE_OBJECT, remote: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoSetFileOrigin(fileobject : *const super::super::Foundation:: FILE_OBJECT, remote : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoSetFileOrigin(core::mem::transmute(fileobject), remote.param().abi()) + IoSetFileOrigin(core::mem::transmute(fileobject), remote.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2505,13 +2412,9 @@ pub unsafe fn IoSetShareAccessEx(desiredaccess: u32, desiredshareaccess: u32, fi } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn IoSetStartIoAttributes(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, deferredstartio: P1, noncancelable: P2) -where - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn IoSetStartIoAttributes(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, deferredstartio: bool, noncancelable: bool) { windows_targets::link!("ntoskrnl.exe" "system" fn IoSetStartIoAttributes(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, deferredstartio : super::super::super::Win32::Foundation:: BOOLEAN, noncancelable : super::super::super::Win32::Foundation:: BOOLEAN)); - IoSetStartIoAttributes(core::mem::transmute(deviceobject), deferredstartio.param().abi(), noncancelable.param().abi()) + IoSetStartIoAttributes(core::mem::transmute(deviceobject), deferredstartio.into(), noncancelable.into()) } #[inline] pub unsafe fn IoSetSystemPartition(volumenamestring: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -2519,12 +2422,9 @@ pub unsafe fn IoSetSystemPartition(volumenamestring: *const super::super::super: IoSetSystemPartition(core::mem::transmute(volumenamestring)) } #[inline] -pub unsafe fn IoSetThreadHardErrorMode(enableharderrors: P0) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn IoSetThreadHardErrorMode(enableharderrors: bool) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn IoSetThreadHardErrorMode(enableharderrors : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - IoSetThreadHardErrorMode(enableharderrors.param().abi()) + IoSetThreadHardErrorMode(enableharderrors.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2545,21 +2445,15 @@ pub unsafe fn IoSizeofWorkItem() -> u32 { } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn IoStartNextPacket(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, cancelable: P1) -where - P1: windows_core::Param, -{ +pub unsafe fn IoStartNextPacket(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, cancelable: bool) { windows_targets::link!("ntoskrnl.exe" "system" fn IoStartNextPacket(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, cancelable : super::super::super::Win32::Foundation:: BOOLEAN)); - IoStartNextPacket(core::mem::transmute(deviceobject), cancelable.param().abi()) + IoStartNextPacket(core::mem::transmute(deviceobject), cancelable.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn IoStartNextPacketByKey(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, cancelable: P1, key: u32) -where - P1: windows_core::Param, -{ +pub unsafe fn IoStartNextPacketByKey(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, cancelable: bool, key: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn IoStartNextPacketByKey(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, cancelable : super::super::super::Win32::Foundation:: BOOLEAN, key : u32)); - IoStartNextPacketByKey(core::mem::transmute(deviceobject), cancelable.param().abi(), core::mem::transmute(key)) + IoStartNextPacketByKey(core::mem::transmute(deviceobject), cancelable.into(), core::mem::transmute(key)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2659,12 +2553,9 @@ pub unsafe fn IoValidateDeviceIoControlAccess(irp: *const super::super::Foundati } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn IoVerifyPartitionTable(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, fixerrors: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn IoVerifyPartitionTable(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, fixerrors: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoVerifyPartitionTable(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, fixerrors : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoVerifyPartitionTable(core::mem::transmute(deviceobject), fixerrors.param().abi()) + IoVerifyPartitionTable(core::mem::transmute(deviceobject), fixerrors.into()) } #[inline] pub unsafe fn IoVolumeDeviceNameToGuid(volumedevicename: *const super::super::super::Win32::Foundation::UNICODE_STRING, guid: *mut windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -2760,12 +2651,9 @@ pub unsafe fn IoWMISetSingleItem(datablockobject: *const core::ffi::c_void, inst } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn IoWMISuggestInstanceName(physicaldeviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, symboliclinkname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, combinenames: P2, suggestedinstancename: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn IoWMISuggestInstanceName(physicaldeviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, symboliclinkname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, combinenames: bool, suggestedinstancename: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoWMISuggestInstanceName(physicaldeviceobject : *const super::super::Foundation:: DEVICE_OBJECT, symboliclinkname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, combinenames : super::super::super::Win32::Foundation:: BOOLEAN, suggestedinstancename : *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoWMISuggestInstanceName(core::mem::transmute(physicaldeviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(symboliclinkname.unwrap_or(core::mem::zeroed())), combinenames.param().abi(), core::mem::transmute(suggestedinstancename)) + IoWMISuggestInstanceName(core::mem::transmute(physicaldeviceobject.unwrap_or(core::mem::zeroed())), core::mem::transmute(symboliclinkname.unwrap_or(core::mem::zeroed())), combinenames.into(), core::mem::transmute(suggestedinstancename)) } #[inline] pub unsafe fn IoWMIWriteEvent(wnodeeventitem: *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -2920,12 +2808,9 @@ pub unsafe fn KeConvertPerformanceCounterToAuxiliaryCounter(performancecounterva KeConvertPerformanceCounterToAuxiliaryCounter(core::mem::transmute(performancecountervalue), core::mem::transmute(auxiliarycountervalue), core::mem::transmute(conversionerror.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn KeDelayExecutionThread(waitmode: i8, alertable: P1, interval: *const i64) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn KeDelayExecutionThread(waitmode: i8, alertable: bool, interval: *const i64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn KeDelayExecutionThread(waitmode : i8, alertable : super::super::super::Win32::Foundation:: BOOLEAN, interval : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - KeDelayExecutionThread(core::mem::transmute(waitmode), alertable.param().abi(), core::mem::transmute(interval)) + KeDelayExecutionThread(core::mem::transmute(waitmode), alertable.into(), core::mem::transmute(interval)) } #[inline] pub unsafe fn KeDeregisterBoundCallback(handle: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -2970,22 +2855,15 @@ pub unsafe fn KeExpandKernelStackAndCallout(callout: PEXPAND_STACK_CALLOUT, para KeExpandKernelStackAndCallout(core::mem::transmute(callout), core::mem::transmute(parameter.unwrap_or(core::mem::zeroed())), core::mem::transmute(size)) } #[inline] -pub unsafe fn KeExpandKernelStackAndCalloutEx(callout: PEXPAND_STACK_CALLOUT, parameter: Option<*const core::ffi::c_void>, size: usize, wait: P3, context: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P3: windows_core::Param, -{ +pub unsafe fn KeExpandKernelStackAndCalloutEx(callout: PEXPAND_STACK_CALLOUT, parameter: Option<*const core::ffi::c_void>, size: usize, wait: bool, context: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn KeExpandKernelStackAndCalloutEx(callout : PEXPAND_STACK_CALLOUT, parameter : *const core::ffi::c_void, size : usize, wait : super::super::super::Win32::Foundation:: BOOLEAN, context : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - KeExpandKernelStackAndCalloutEx(core::mem::transmute(callout), core::mem::transmute(parameter.unwrap_or(core::mem::zeroed())), core::mem::transmute(size), wait.param().abi(), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) + KeExpandKernelStackAndCalloutEx(core::mem::transmute(callout), core::mem::transmute(parameter.unwrap_or(core::mem::zeroed())), core::mem::transmute(size), wait.into(), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn KeFlushIoBuffers(mdl: *const super::super::Foundation::MDL, readoperation: P1, dmaoperation: P2) -where - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn KeFlushIoBuffers(mdl: *const super::super::Foundation::MDL, readoperation: bool, dmaoperation: bool) { windows_targets::link!("ntoskrnl.exe" "system" fn KeFlushIoBuffers(mdl : *const super::super::Foundation:: MDL, readoperation : super::super::super::Win32::Foundation:: BOOLEAN, dmaoperation : super::super::super::Win32::Foundation:: BOOLEAN)); - KeFlushIoBuffers(core::mem::transmute(mdl), readoperation.param().abi(), dmaoperation.param().abi()) + KeFlushIoBuffers(core::mem::transmute(mdl), readoperation.into(), dmaoperation.into()) } #[inline] pub unsafe fn KeFlushQueuedDpcs() { @@ -3049,12 +2927,9 @@ pub unsafe fn KeInitializeDpc(dpc: *mut super::super::Foundation::KDPC, deferred } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn KeInitializeEvent(event: *mut super::super::Foundation::KEVENT, r#type: super::super::super::Win32::System::Kernel::EVENT_TYPE, state: P2) -where - P2: windows_core::Param, -{ +pub unsafe fn KeInitializeEvent(event: *mut super::super::Foundation::KEVENT, r#type: super::super::super::Win32::System::Kernel::EVENT_TYPE, state: bool) { windows_targets::link!("ntoskrnl.exe" "system" fn KeInitializeEvent(event : *mut super::super::Foundation:: KEVENT, r#type : super::super::super::Win32::System::Kernel:: EVENT_TYPE, state : super::super::super::Win32::Foundation:: BOOLEAN)); - KeInitializeEvent(core::mem::transmute(event), core::mem::transmute(r#type), state.param().abi()) + KeInitializeEvent(core::mem::transmute(event), core::mem::transmute(r#type), state.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -3155,12 +3030,9 @@ pub unsafe fn KeLeaveGuardedRegion() { } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn KePulseEvent(event: *mut super::super::Foundation::KEVENT, increment: i32, wait: P2) -> i32 -where - P2: windows_core::Param, -{ +pub unsafe fn KePulseEvent(event: *mut super::super::Foundation::KEVENT, increment: i32, wait: bool) -> i32 { windows_targets::link!("ntoskrnl.exe" "system" fn KePulseEvent(event : *mut super::super::Foundation:: KEVENT, increment : i32, wait : super::super::super::Win32::Foundation:: BOOLEAN) -> i32); - KePulseEvent(core::mem::transmute(event), core::mem::transmute(increment), wait.param().abi()) + KePulseEvent(core::mem::transmute(event), core::mem::transmute(increment), wait.into()) } #[inline] pub unsafe fn KeQueryActiveGroupCount() -> u16 { @@ -3386,21 +3258,15 @@ pub unsafe fn KeReleaseInterruptSpinLock(interrupt: super::super::Foundation::PK } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn KeReleaseMutex(mutex: *mut super::super::Foundation::KMUTANT, wait: P1) -> i32 -where - P1: windows_core::Param, -{ +pub unsafe fn KeReleaseMutex(mutex: *mut super::super::Foundation::KMUTANT, wait: bool) -> i32 { windows_targets::link!("ntoskrnl.exe" "system" fn KeReleaseMutex(mutex : *mut super::super::Foundation:: KMUTANT, wait : super::super::super::Win32::Foundation:: BOOLEAN) -> i32); - KeReleaseMutex(core::mem::transmute(mutex), wait.param().abi()) + KeReleaseMutex(core::mem::transmute(mutex), wait.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn KeReleaseSemaphore(semaphore: *mut KSEMAPHORE, increment: i32, adjustment: i32, wait: P3) -> i32 -where - P3: windows_core::Param, -{ +pub unsafe fn KeReleaseSemaphore(semaphore: *mut KSEMAPHORE, increment: i32, adjustment: i32, wait: bool) -> i32 { windows_targets::link!("ntoskrnl.exe" "system" fn KeReleaseSemaphore(semaphore : *mut KSEMAPHORE, increment : i32, adjustment : i32, wait : super::super::super::Win32::Foundation:: BOOLEAN) -> i32); - KeReleaseSemaphore(core::mem::transmute(semaphore), core::mem::transmute(increment), core::mem::transmute(adjustment), wait.param().abi()) + KeReleaseSemaphore(core::mem::transmute(semaphore), core::mem::transmute(increment), core::mem::transmute(adjustment), wait.into()) } #[inline] pub unsafe fn KeReleaseSpinLockForDpc(spinlock: *mut usize, oldirql: u8) { @@ -3439,12 +3305,9 @@ pub unsafe fn KeRemoveQueueDpc(dpc: *mut super::super::Foundation::KDPC) -> supe } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn KeRemoveQueueDpcEx(dpc: *mut super::super::Foundation::KDPC, waitifactive: P1) -> super::super::super::Win32::Foundation::BOOLEAN -where - P1: windows_core::Param, -{ +pub unsafe fn KeRemoveQueueDpcEx(dpc: *mut super::super::Foundation::KDPC, waitifactive: bool) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn KeRemoveQueueDpcEx(dpc : *mut super::super::Foundation:: KDPC, waitifactive : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - KeRemoveQueueDpcEx(core::mem::transmute(dpc), waitifactive.param().abi()) + KeRemoveQueueDpcEx(core::mem::transmute(dpc), waitifactive.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -3494,12 +3357,9 @@ pub unsafe fn KeSetCoalescableTimer(timer: *mut KTIMER, duetime: i64, period: u3 } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn KeSetEvent(event: *mut super::super::Foundation::KEVENT, increment: i32, wait: P2) -> i32 -where - P2: windows_core::Param, -{ +pub unsafe fn KeSetEvent(event: *mut super::super::Foundation::KEVENT, increment: i32, wait: bool) -> i32 { windows_targets::link!("ntoskrnl.exe" "system" fn KeSetEvent(event : *mut super::super::Foundation:: KEVENT, increment : i32, wait : super::super::super::Win32::Foundation:: BOOLEAN) -> i32); - KeSetEvent(core::mem::transmute(event), core::mem::transmute(increment), wait.param().abi()) + KeSetEvent(core::mem::transmute(event), core::mem::transmute(increment), wait.into()) } #[inline] pub unsafe fn KeSetHardwareCounterConfiguration(counterarray: &[HARDWARE_COUNTER]) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3592,20 +3452,14 @@ pub unsafe fn KeTryToAcquireSpinLockAtDpcLevel(spinlock: *mut usize) -> super::s } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn KeWaitForMultipleObjects(object: &[*const core::ffi::c_void], waittype: super::super::super::Win32::System::Kernel::WAIT_TYPE, waitreason: KWAIT_REASON, waitmode: i8, alertable: P5, timeout: Option<*const i64>, waitblockarray: Option<*mut super::super::Foundation::KWAIT_BLOCK>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P5: windows_core::Param, -{ +pub unsafe fn KeWaitForMultipleObjects(object: &[*const core::ffi::c_void], waittype: super::super::super::Win32::System::Kernel::WAIT_TYPE, waitreason: KWAIT_REASON, waitmode: i8, alertable: bool, timeout: Option<*const i64>, waitblockarray: Option<*mut super::super::Foundation::KWAIT_BLOCK>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn KeWaitForMultipleObjects(count : u32, object : *const *const core::ffi::c_void, waittype : super::super::super::Win32::System::Kernel:: WAIT_TYPE, waitreason : KWAIT_REASON, waitmode : i8, alertable : super::super::super::Win32::Foundation:: BOOLEAN, timeout : *const i64, waitblockarray : *mut super::super::Foundation:: KWAIT_BLOCK) -> super::super::super::Win32::Foundation:: NTSTATUS); - KeWaitForMultipleObjects(object.len().try_into().unwrap(), core::mem::transmute(object.as_ptr()), core::mem::transmute(waittype), core::mem::transmute(waitreason), core::mem::transmute(waitmode), alertable.param().abi(), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(waitblockarray.unwrap_or(core::mem::zeroed()))) + KeWaitForMultipleObjects(object.len().try_into().unwrap(), core::mem::transmute(object.as_ptr()), core::mem::transmute(waittype), core::mem::transmute(waitreason), core::mem::transmute(waitmode), alertable.into(), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed())), core::mem::transmute(waitblockarray.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn KeWaitForSingleObject(object: *const core::ffi::c_void, waitreason: KWAIT_REASON, waitmode: i8, alertable: P3, timeout: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P3: windows_core::Param, -{ +pub unsafe fn KeWaitForSingleObject(object: *const core::ffi::c_void, waitreason: KWAIT_REASON, waitmode: i8, alertable: bool, timeout: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn KeWaitForSingleObject(object : *const core::ffi::c_void, waitreason : KWAIT_REASON, waitmode : i8, alertable : super::super::super::Win32::Foundation:: BOOLEAN, timeout : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - KeWaitForSingleObject(core::mem::transmute(object), core::mem::transmute(waitreason), core::mem::transmute(waitmode), alertable.param().abi(), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed()))) + KeWaitForSingleObject(core::mem::transmute(object), core::mem::transmute(waitreason), core::mem::transmute(waitmode), alertable.into(), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn KfRaiseIrql(newirql: u8) -> u8 { @@ -4070,12 +3924,9 @@ pub unsafe fn NtCommitEnlistment(enlistmenthandle: super::super::super::Win32::F NtCommitEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn NtCommitTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, wait: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn NtCommitTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, wait: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtCommitTransaction(transactionhandle : super::super::super::Win32::Foundation:: HANDLE, wait : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCommitTransaction(core::mem::transmute(transactionhandle), wait.param().abi()) + NtCommitTransaction(core::mem::transmute(transactionhandle), wait.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -4269,12 +4120,9 @@ pub unsafe fn NtRollbackEnlistment(enlistmenthandle: super::super::super::Win32: NtRollbackEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn NtRollbackTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, wait: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn NtRollbackTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, wait: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtRollbackTransaction(transactionhandle : super::super::super::Win32::Foundation:: HANDLE, wait : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtRollbackTransaction(core::mem::transmute(transactionhandle), wait.param().abi()) + NtRollbackTransaction(core::mem::transmute(transactionhandle), wait.into()) } #[inline] pub unsafe fn NtRollforwardTransactionManager(transactionmanagerhandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -4383,12 +4231,9 @@ pub unsafe fn ObRegisterCallbacks(callbackregistration: *const OB_CALLBACK_REGIS } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn ObReleaseObjectSecurity(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, memoryallocated: P1) -where - P1: windows_core::Param, -{ +pub unsafe fn ObReleaseObjectSecurity(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, memoryallocated: bool) { windows_targets::link!("ntoskrnl.exe" "system" fn ObReleaseObjectSecurity(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, memoryallocated : super::super::super::Win32::Foundation:: BOOLEAN)); - ObReleaseObjectSecurity(core::mem::transmute(securitydescriptor), memoryallocated.param().abi()) + ObReleaseObjectSecurity(core::mem::transmute(securitydescriptor), memoryallocated.into()) } #[inline] pub unsafe fn ObUnRegisterCallbacks(registrationhandle: *const core::ffi::c_void) { @@ -4576,12 +4421,9 @@ pub unsafe fn PoFxRegisterDevice(pdo: *const super::super::Foundation::DEVICE_OB } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] -pub unsafe fn PoFxRegisterDripsWatchdogCallback(handle: super::super::Foundation::POHANDLE, callback: PPO_FX_DRIPS_WATCHDOG_CALLBACK, includechilddevices: P2, matchingdriverobject: Option<*const super::super::Foundation::DRIVER_OBJECT>) -where - P2: windows_core::Param, -{ +pub unsafe fn PoFxRegisterDripsWatchdogCallback(handle: super::super::Foundation::POHANDLE, callback: PPO_FX_DRIPS_WATCHDOG_CALLBACK, includechilddevices: bool, matchingdriverobject: Option<*const super::super::Foundation::DRIVER_OBJECT>) { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxRegisterDripsWatchdogCallback(handle : super::super::Foundation:: POHANDLE, callback : PPO_FX_DRIPS_WATCHDOG_CALLBACK, includechilddevices : super::super::super::Win32::Foundation:: BOOLEAN, matchingdriverobject : *const super::super::Foundation:: DRIVER_OBJECT)); - PoFxRegisterDripsWatchdogCallback(core::mem::transmute(handle), core::mem::transmute(callback), includechilddevices.param().abi(), core::mem::transmute(matchingdriverobject.unwrap_or(core::mem::zeroed()))) + PoFxRegisterDripsWatchdogCallback(core::mem::transmute(handle), core::mem::transmute(callback), includechilddevices.into(), core::mem::transmute(matchingdriverobject.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4603,12 +4445,9 @@ pub unsafe fn PoFxSetComponentResidency(handle: super::super::Foundation::POHAND } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn PoFxSetComponentWake(handle: super::super::Foundation::POHANDLE, component: u32, wakehint: P2) -where - P2: windows_core::Param, -{ +pub unsafe fn PoFxSetComponentWake(handle: super::super::Foundation::POHANDLE, component: u32, wakehint: bool) { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxSetComponentWake(handle : super::super::Foundation:: POHANDLE, component : u32, wakehint : super::super::super::Win32::Foundation:: BOOLEAN)); - PoFxSetComponentWake(core::mem::transmute(handle), core::mem::transmute(component), wakehint.param().abi()) + PoFxSetComponentWake(core::mem::transmute(handle), core::mem::transmute(component), wakehint.into()) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4714,12 +4553,9 @@ pub unsafe fn PoSetSystemWakeDevice(deviceobject: *const super::super::Foundatio PoSetSystemWakeDevice(core::mem::transmute(deviceobject)) } #[inline] -pub unsafe fn PoSetThermalActiveCooling(thermalrequest: *mut core::ffi::c_void, engaged: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn PoSetThermalActiveCooling(thermalrequest: *mut core::ffi::c_void, engaged: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PoSetThermalActiveCooling(thermalrequest : *mut core::ffi::c_void, engaged : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - PoSetThermalActiveCooling(core::mem::transmute(thermalrequest), engaged.param().abi()) + PoSetThermalActiveCooling(core::mem::transmute(thermalrequest), engaged.into()) } #[inline] pub unsafe fn PoSetThermalPassiveCooling(thermalrequest: *mut core::ffi::c_void, throttle: u8) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -5057,29 +4893,20 @@ pub unsafe fn PsRevertToUserMultipleGroupAffinityThread(affinitytoken: super::su PsRevertToUserMultipleGroupAffinityThread(core::mem::transmute(affinitytoken)) } #[inline] -pub unsafe fn PsSetCreateProcessNotifyRoutine(notifyroutine: PCREATE_PROCESS_NOTIFY_ROUTINE, remove: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn PsSetCreateProcessNotifyRoutine(notifyroutine: PCREATE_PROCESS_NOTIFY_ROUTINE, remove: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsSetCreateProcessNotifyRoutine(notifyroutine : PCREATE_PROCESS_NOTIFY_ROUTINE, remove : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsSetCreateProcessNotifyRoutine(core::mem::transmute(notifyroutine), remove.param().abi()) + PsSetCreateProcessNotifyRoutine(core::mem::transmute(notifyroutine), remove.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power", feature = "Win32_System_WindowsProgramming"))] #[inline] -pub unsafe fn PsSetCreateProcessNotifyRoutineEx(notifyroutine: PCREATE_PROCESS_NOTIFY_ROUTINE_EX, remove: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn PsSetCreateProcessNotifyRoutineEx(notifyroutine: PCREATE_PROCESS_NOTIFY_ROUTINE_EX, remove: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsSetCreateProcessNotifyRoutineEx(notifyroutine : PCREATE_PROCESS_NOTIFY_ROUTINE_EX, remove : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsSetCreateProcessNotifyRoutineEx(core::mem::transmute(notifyroutine), remove.param().abi()) + PsSetCreateProcessNotifyRoutineEx(core::mem::transmute(notifyroutine), remove.into()) } #[inline] -pub unsafe fn PsSetCreateProcessNotifyRoutineEx2(notifytype: PSCREATEPROCESSNOTIFYTYPE, notifyinformation: *const core::ffi::c_void, remove: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn PsSetCreateProcessNotifyRoutineEx2(notifytype: PSCREATEPROCESSNOTIFYTYPE, notifyinformation: *const core::ffi::c_void, remove: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PsSetCreateProcessNotifyRoutineEx2(notifytype : PSCREATEPROCESSNOTIFYTYPE, notifyinformation : *const core::ffi::c_void, remove : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsSetCreateProcessNotifyRoutineEx2(core::mem::transmute(notifytype), core::mem::transmute(notifyinformation), remove.param().abi()) + PsSetCreateProcessNotifyRoutineEx2(core::mem::transmute(notifytype), core::mem::transmute(notifyinformation), remove.into()) } #[inline] pub unsafe fn PsSetCreateThreadNotifyRoutine(notifyroutine: PCREATE_THREAD_NOTIFY_ROUTINE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -5092,12 +4919,9 @@ pub unsafe fn PsSetCreateThreadNotifyRoutineEx(notifytype: PSCREATETHREADNOTIFYT PsSetCreateThreadNotifyRoutineEx(core::mem::transmute(notifytype), core::mem::transmute(notifyinformation)) } #[inline] -pub unsafe fn PsSetCurrentThreadPrefetching(prefetching: P0) -> super::super::super::Win32::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn PsSetCurrentThreadPrefetching(prefetching: bool) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn PsSetCurrentThreadPrefetching(prefetching : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - PsSetCurrentThreadPrefetching(prefetching.param().abi()) + PsSetCurrentThreadPrefetching(prefetching.into()) } #[inline] pub unsafe fn PsSetLoadImageNotifyRoutine(notifyroutine: PLOAD_IMAGE_NOTIFY_ROUTINE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -5241,28 +5065,19 @@ pub unsafe fn RtlCmEncodeMemIoResource(descriptor: *const CM_PARTIAL_RESOURCE_DE } #[cfg(feature = "Win32_System_Kernel")] #[inline] -pub unsafe fn RtlCompareString(string1: *const super::super::super::Win32::System::Kernel::STRING, string2: *const super::super::super::Win32::System::Kernel::STRING, caseinsensitive: P2) -> i32 -where - P2: windows_core::Param, -{ +pub unsafe fn RtlCompareString(string1: *const super::super::super::Win32::System::Kernel::STRING, string2: *const super::super::super::Win32::System::Kernel::STRING, caseinsensitive: bool) -> i32 { windows_targets::link!("ntdll.dll" "system" fn RtlCompareString(string1 : *const super::super::super::Win32::System::Kernel:: STRING, string2 : *const super::super::super::Win32::System::Kernel:: STRING, caseinsensitive : super::super::super::Win32::Foundation:: BOOLEAN) -> i32); - RtlCompareString(core::mem::transmute(string1), core::mem::transmute(string2), caseinsensitive.param().abi()) + RtlCompareString(core::mem::transmute(string1), core::mem::transmute(string2), caseinsensitive.into()) } #[inline] -pub unsafe fn RtlCompareUnicodeString(string1: *const super::super::super::Win32::Foundation::UNICODE_STRING, string2: *const super::super::super::Win32::Foundation::UNICODE_STRING, caseinsensitive: P2) -> i32 -where - P2: windows_core::Param, -{ +pub unsafe fn RtlCompareUnicodeString(string1: *const super::super::super::Win32::Foundation::UNICODE_STRING, string2: *const super::super::super::Win32::Foundation::UNICODE_STRING, caseinsensitive: bool) -> i32 { windows_targets::link!("ntdll.dll" "system" fn RtlCompareUnicodeString(string1 : *const super::super::super::Win32::Foundation:: UNICODE_STRING, string2 : *const super::super::super::Win32::Foundation:: UNICODE_STRING, caseinsensitive : super::super::super::Win32::Foundation:: BOOLEAN) -> i32); - RtlCompareUnicodeString(core::mem::transmute(string1), core::mem::transmute(string2), caseinsensitive.param().abi()) + RtlCompareUnicodeString(core::mem::transmute(string1), core::mem::transmute(string2), caseinsensitive.into()) } #[inline] -pub unsafe fn RtlCompareUnicodeStrings(string1: &[u16], string2: &[u16], caseinsensitive: P4) -> i32 -where - P4: windows_core::Param, -{ +pub unsafe fn RtlCompareUnicodeStrings(string1: &[u16], string2: &[u16], caseinsensitive: bool) -> i32 { windows_targets::link!("ntdll.dll" "system" fn RtlCompareUnicodeStrings(string1 : *const u16, string1length : usize, string2 : *const u16, string2length : usize, caseinsensitive : super::super::super::Win32::Foundation:: BOOLEAN) -> i32); - RtlCompareUnicodeStrings(core::mem::transmute(string1.as_ptr()), string1.len().try_into().unwrap(), core::mem::transmute(string2.as_ptr()), string2.len().try_into().unwrap(), caseinsensitive.param().abi()) + RtlCompareUnicodeStrings(core::mem::transmute(string1.as_ptr()), string1.len().try_into().unwrap(), core::mem::transmute(string2.as_ptr()), string2.len().try_into().unwrap(), caseinsensitive.into()) } #[inline] pub unsafe fn RtlContractHashTable(hashtable: *const RTL_DYNAMIC_HASH_TABLE) -> super::super::super::Win32::Foundation::BOOLEAN { @@ -5382,20 +5197,14 @@ pub unsafe fn RtlEnumerateEntryHashTable(hashtable: *const RTL_DYNAMIC_HASH_TABL } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn RtlEnumerateGenericTable(table: *const RTL_GENERIC_TABLE, restart: P1) -> *mut core::ffi::c_void -where - P1: windows_core::Param, -{ +pub unsafe fn RtlEnumerateGenericTable(table: *const RTL_GENERIC_TABLE, restart: bool) -> *mut core::ffi::c_void { windows_targets::link!("ntdll.dll" "system" fn RtlEnumerateGenericTable(table : *const RTL_GENERIC_TABLE, restart : super::super::super::Win32::Foundation:: BOOLEAN) -> *mut core::ffi::c_void); - RtlEnumerateGenericTable(core::mem::transmute(table), restart.param().abi()) + RtlEnumerateGenericTable(core::mem::transmute(table), restart.into()) } #[inline] -pub unsafe fn RtlEnumerateGenericTableAvl(table: *const RTL_AVL_TABLE, restart: P1) -> *mut core::ffi::c_void -where - P1: windows_core::Param, -{ +pub unsafe fn RtlEnumerateGenericTableAvl(table: *const RTL_AVL_TABLE, restart: bool) -> *mut core::ffi::c_void { windows_targets::link!("ntdll.dll" "system" fn RtlEnumerateGenericTableAvl(table : *const RTL_AVL_TABLE, restart : super::super::super::Win32::Foundation:: BOOLEAN) -> *mut core::ffi::c_void); - RtlEnumerateGenericTableAvl(core::mem::transmute(table), restart.param().abi()) + RtlEnumerateGenericTableAvl(core::mem::transmute(table), restart.into()) } #[inline] pub unsafe fn RtlEnumerateGenericTableLikeADirectory(table: *const RTL_AVL_TABLE, matchfunction: Option, matchdata: Option<*const core::ffi::c_void>, nextflag: u32, restartkey: *mut *mut core::ffi::c_void, deletecount: *mut u32, buffer: *const core::ffi::c_void) -> *mut core::ffi::c_void { @@ -5415,20 +5224,14 @@ pub unsafe fn RtlEnumerateGenericTableWithoutSplayingAvl(table: *const RTL_AVL_T } #[cfg(feature = "Win32_System_Kernel")] #[inline] -pub unsafe fn RtlEqualString(string1: *const super::super::super::Win32::System::Kernel::STRING, string2: *const super::super::super::Win32::System::Kernel::STRING, caseinsensitive: P2) -> super::super::super::Win32::Foundation::BOOLEAN -where - P2: windows_core::Param, -{ +pub unsafe fn RtlEqualString(string1: *const super::super::super::Win32::System::Kernel::STRING, string2: *const super::super::super::Win32::System::Kernel::STRING, caseinsensitive: bool) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntdll.dll" "system" fn RtlEqualString(string1 : *const super::super::super::Win32::System::Kernel:: STRING, string2 : *const super::super::super::Win32::System::Kernel:: STRING, caseinsensitive : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - RtlEqualString(core::mem::transmute(string1), core::mem::transmute(string2), caseinsensitive.param().abi()) + RtlEqualString(core::mem::transmute(string1), core::mem::transmute(string2), caseinsensitive.into()) } #[inline] -pub unsafe fn RtlEqualUnicodeString(string1: *const super::super::super::Win32::Foundation::UNICODE_STRING, string2: *const super::super::super::Win32::Foundation::UNICODE_STRING, caseinsensitive: P2) -> super::super::super::Win32::Foundation::BOOLEAN -where - P2: windows_core::Param, -{ +pub unsafe fn RtlEqualUnicodeString(string1: *const super::super::super::Win32::Foundation::UNICODE_STRING, string2: *const super::super::super::Win32::Foundation::UNICODE_STRING, caseinsensitive: bool) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntdll.dll" "system" fn RtlEqualUnicodeString(string1 : *const super::super::super::Win32::Foundation:: UNICODE_STRING, string2 : *const super::super::super::Win32::Foundation:: UNICODE_STRING, caseinsensitive : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - RtlEqualUnicodeString(core::mem::transmute(string1), core::mem::transmute(string2), caseinsensitive.param().abi()) + RtlEqualUnicodeString(core::mem::transmute(string1), core::mem::transmute(string2), caseinsensitive.into()) } #[inline] pub unsafe fn RtlExpandHashTable(hashtable: *const RTL_DYNAMIC_HASH_TABLE) -> super::super::super::Win32::Foundation::BOOLEAN { @@ -5451,12 +5254,9 @@ pub unsafe fn RtlFindClearBitsAndSet(bitmapheader: *const RTL_BITMAP, numbertofi RtlFindClearBitsAndSet(core::mem::transmute(bitmapheader), core::mem::transmute(numbertofind), core::mem::transmute(hintindex)) } #[inline] -pub unsafe fn RtlFindClearRuns(bitmapheader: *const RTL_BITMAP, runarray: &mut [RTL_BITMAP_RUN], locatelongestruns: P3) -> u32 -where - P3: windows_core::Param, -{ +pub unsafe fn RtlFindClearRuns(bitmapheader: *const RTL_BITMAP, runarray: &mut [RTL_BITMAP_RUN], locatelongestruns: bool) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlFindClearRuns(bitmapheader : *const RTL_BITMAP, runarray : *mut RTL_BITMAP_RUN, sizeofrunarray : u32, locatelongestruns : super::super::super::Win32::Foundation:: BOOLEAN) -> u32); - RtlFindClearRuns(core::mem::transmute(bitmapheader), core::mem::transmute(runarray.as_ptr()), runarray.len().try_into().unwrap(), locatelongestruns.param().abi()) + RtlFindClearRuns(core::mem::transmute(bitmapheader), core::mem::transmute(runarray.as_ptr()), runarray.len().try_into().unwrap(), locatelongestruns.into()) } #[inline] pub unsafe fn RtlFindClosestEncodableLength(sourcelength: u64, targetlength: *mut u64) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -5589,12 +5389,9 @@ pub unsafe fn RtlGetVersion(lpversioninformation: *mut super::super::super::Win3 RtlGetVersion(core::mem::transmute(lpversioninformation)) } #[inline] -pub unsafe fn RtlHashUnicodeString(string: *const super::super::super::Win32::Foundation::UNICODE_STRING, caseinsensitive: P1, hashalgorithm: u32, hashvalue: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn RtlHashUnicodeString(string: *const super::super::super::Win32::Foundation::UNICODE_STRING, caseinsensitive: bool, hashalgorithm: u32, hashvalue: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlHashUnicodeString(string : *const super::super::super::Win32::Foundation:: UNICODE_STRING, caseinsensitive : super::super::super::Win32::Foundation:: BOOLEAN, hashalgorithm : u32, hashvalue : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlHashUnicodeString(core::mem::transmute(string), caseinsensitive.param().abi(), core::mem::transmute(hashalgorithm), core::mem::transmute(hashvalue)) + RtlHashUnicodeString(core::mem::transmute(string), caseinsensitive.into(), core::mem::transmute(hashalgorithm), core::mem::transmute(hashvalue)) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -5786,12 +5583,9 @@ pub unsafe fn RtlMapGenericMask(accessmask: *mut u32, genericmapping: *const sup } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlNormalizeSecurityDescriptor(securitydescriptor: *mut super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, securitydescriptorlength: u32, newsecuritydescriptor: Option<*mut super::super::super::Win32::Security::PSECURITY_DESCRIPTOR>, newsecuritydescriptorlength: Option<*mut u32>, checkonly: P4) -> super::super::super::Win32::Foundation::BOOLEAN -where - P4: windows_core::Param, -{ +pub unsafe fn RtlNormalizeSecurityDescriptor(securitydescriptor: *mut super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, securitydescriptorlength: u32, newsecuritydescriptor: Option<*mut super::super::super::Win32::Security::PSECURITY_DESCRIPTOR>, newsecuritydescriptorlength: Option<*mut u32>, checkonly: bool) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntdll.dll" "system" fn RtlNormalizeSecurityDescriptor(securitydescriptor : *mut super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, securitydescriptorlength : u32, newsecuritydescriptor : *mut super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, newsecuritydescriptorlength : *mut u32, checkonly : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - RtlNormalizeSecurityDescriptor(core::mem::transmute(securitydescriptor), core::mem::transmute(securitydescriptorlength), core::mem::transmute(newsecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(newsecuritydescriptorlength.unwrap_or(core::mem::zeroed())), checkonly.param().abi()) + RtlNormalizeSecurityDescriptor(core::mem::transmute(securitydescriptor), core::mem::transmute(securitydescriptorlength), core::mem::transmute(newsecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(newsecuritydescriptorlength.unwrap_or(core::mem::zeroed())), checkonly.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -5835,12 +5629,9 @@ pub unsafe fn RtlPrefetchMemoryNonTemporal(source: *const core::ffi::c_void, len RtlPrefetchMemoryNonTemporal(core::mem::transmute(source), core::mem::transmute(length)) } #[inline] -pub unsafe fn RtlPrefixUnicodeString(string1: *const super::super::super::Win32::Foundation::UNICODE_STRING, string2: *const super::super::super::Win32::Foundation::UNICODE_STRING, caseinsensitive: P2) -> super::super::super::Win32::Foundation::BOOLEAN -where - P2: windows_core::Param, -{ +pub unsafe fn RtlPrefixUnicodeString(string1: *const super::super::super::Win32::Foundation::UNICODE_STRING, string2: *const super::super::super::Win32::Foundation::UNICODE_STRING, caseinsensitive: bool) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntdll.dll" "system" fn RtlPrefixUnicodeString(string1 : *const super::super::super::Win32::Foundation:: UNICODE_STRING, string2 : *const super::super::super::Win32::Foundation:: UNICODE_STRING, caseinsensitive : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - RtlPrefixUnicodeString(core::mem::transmute(string1), core::mem::transmute(string2), caseinsensitive.param().abi()) + RtlPrefixUnicodeString(core::mem::transmute(string1), core::mem::transmute(string2), caseinsensitive.into()) } #[inline] pub unsafe fn RtlQueryRegistryValueWithFallback(primaryhandle: Option, fallbackhandle: Option, valuename: *const super::super::super::Win32::Foundation::UNICODE_STRING, valuelength: u32, valuetype: Option<*mut u32>, valuedata: *mut core::ffi::c_void, resultlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -5921,13 +5712,9 @@ pub unsafe fn RtlSetBits(bitmapheader: *const RTL_BITMAP, startingindex: u32, nu } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn RtlSetDaclSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, daclpresent: P1, dacl: Option<*const super::super::super::Win32::Security::ACL>, dacldefaulted: P3) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn RtlSetDaclSecurityDescriptor(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, daclpresent: bool, dacl: Option<*const super::super::super::Win32::Security::ACL>, dacldefaulted: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlSetDaclSecurityDescriptor(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, daclpresent : super::super::super::Win32::Foundation:: BOOLEAN, dacl : *const super::super::super::Win32::Security:: ACL, dacldefaulted : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlSetDaclSecurityDescriptor(core::mem::transmute(securitydescriptor), daclpresent.param().abi(), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), dacldefaulted.param().abi()) + RtlSetDaclSecurityDescriptor(core::mem::transmute(securitydescriptor), daclpresent.into(), core::mem::transmute(dacl.unwrap_or(core::mem::zeroed())), dacldefaulted.into()) } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] @@ -5965,12 +5752,9 @@ pub unsafe fn RtlSubtreeSuccessor(links: *const super::super::Foundation::RTL_SP RtlSubtreeSuccessor(core::mem::transmute(links)) } #[inline] -pub unsafe fn RtlSuffixUnicodeString(string1: *const super::super::super::Win32::Foundation::UNICODE_STRING, string2: *const super::super::super::Win32::Foundation::UNICODE_STRING, caseinsensitive: P2) -> super::super::super::Win32::Foundation::BOOLEAN -where - P2: windows_core::Param, -{ +pub unsafe fn RtlSuffixUnicodeString(string1: *const super::super::super::Win32::Foundation::UNICODE_STRING, string2: *const super::super::super::Win32::Foundation::UNICODE_STRING, caseinsensitive: bool) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn RtlSuffixUnicodeString(string1 : *const super::super::super::Win32::Foundation:: UNICODE_STRING, string2 : *const super::super::super::Win32::Foundation:: UNICODE_STRING, caseinsensitive : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - RtlSuffixUnicodeString(core::mem::transmute(string1), core::mem::transmute(string2), caseinsensitive.param().abi()) + RtlSuffixUnicodeString(core::mem::transmute(string1), core::mem::transmute(string2), caseinsensitive.into()) } #[inline] pub unsafe fn RtlTestBit(bitmapheader: *const RTL_BITMAP, bitnumber: u32) -> super::super::super::Win32::Foundation::BOOLEAN { @@ -5991,12 +5775,9 @@ pub unsafe fn RtlTimeToTimeFields(time: *const i64) -> TIME_FIELDS { } #[cfg(feature = "Win32_System_Kernel")] #[inline] -pub unsafe fn RtlUTF8StringToUnicodeString(destinationstring: *mut super::super::super::Win32::Foundation::UNICODE_STRING, sourcestring: *const super::super::super::Win32::System::Kernel::STRING, allocatedestinationstring: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn RtlUTF8StringToUnicodeString(destinationstring: *mut super::super::super::Win32::Foundation::UNICODE_STRING, sourcestring: *const super::super::super::Win32::System::Kernel::STRING, allocatedestinationstring: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUTF8StringToUnicodeString(destinationstring : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, sourcestring : *const super::super::super::Win32::System::Kernel:: STRING, allocatedestinationstring : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlUTF8StringToUnicodeString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.param().abi()) + RtlUTF8StringToUnicodeString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.into()) } #[inline] pub unsafe fn RtlUTF8ToUnicodeN(unicodestringdestination: windows_core::PWSTR, unicodestringmaxbytecount: u32, unicodestringactualbytecount: *mut u32, utf8stringsource: &[u8]) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -6015,12 +5796,9 @@ pub unsafe fn RtlUnicodeStringToInteger(string: *const super::super::super::Win3 } #[cfg(feature = "Win32_System_Kernel")] #[inline] -pub unsafe fn RtlUnicodeStringToUTF8String(destinationstring: *mut super::super::super::Win32::System::Kernel::STRING, sourcestring: *const super::super::super::Win32::Foundation::UNICODE_STRING, allocatedestinationstring: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn RtlUnicodeStringToUTF8String(destinationstring: *mut super::super::super::Win32::System::Kernel::STRING, sourcestring: *const super::super::super::Win32::Foundation::UNICODE_STRING, allocatedestinationstring: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUnicodeStringToUTF8String(destinationstring : *mut super::super::super::Win32::System::Kernel:: STRING, sourcestring : *const super::super::super::Win32::Foundation:: UNICODE_STRING, allocatedestinationstring : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlUnicodeStringToUTF8String(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.param().abi()) + RtlUnicodeStringToUTF8String(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.into()) } #[inline] pub unsafe fn RtlUnicodeToUTF8N(utf8stringdestination: &mut [u8], utf8stringactualbytecount: *mut u32, unicodestringsource: *const u16, unicodestringbytecount: u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -6033,12 +5811,9 @@ pub unsafe fn RtlUpcaseUnicodeChar(sourcecharacter: u16) -> u16 { RtlUpcaseUnicodeChar(core::mem::transmute(sourcecharacter)) } #[inline] -pub unsafe fn RtlUpcaseUnicodeString(destinationstring: *mut super::super::super::Win32::Foundation::UNICODE_STRING, sourcestring: *const super::super::super::Win32::Foundation::UNICODE_STRING, allocatedestinationstring: P2) -> super::super::super::Win32::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn RtlUpcaseUnicodeString(destinationstring: *mut super::super::super::Win32::Foundation::UNICODE_STRING, sourcestring: *const super::super::super::Win32::Foundation::UNICODE_STRING, allocatedestinationstring: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUpcaseUnicodeString(destinationstring : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, sourcestring : *const super::super::super::Win32::Foundation:: UNICODE_STRING, allocatedestinationstring : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlUpcaseUnicodeString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.param().abi()) + RtlUpcaseUnicodeString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.into()) } #[inline] pub unsafe fn RtlUpperChar(character: i8) -> i8 { @@ -6107,30 +5882,21 @@ pub unsafe fn RtlxUnicodeStringToAnsiSize(unicodestring: *const super::super::su } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeAccessCheck(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: *const super::super::Foundation::SECURITY_SUBJECT_CONTEXT, subjectcontextlocked: P2, desiredaccess: u32, previouslygrantedaccess: u32, privileges: Option<*mut *mut super::super::super::Win32::Security::PRIVILEGE_SET>, genericmapping: *const super::super::super::Win32::Security::GENERIC_MAPPING, accessmode: i8, grantedaccess: *mut u32, accessstatus: *mut i32) -> super::super::super::Win32::Foundation::BOOLEAN -where - P2: windows_core::Param, -{ +pub unsafe fn SeAccessCheck(securitydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, subjectsecuritycontext: *const super::super::Foundation::SECURITY_SUBJECT_CONTEXT, subjectcontextlocked: bool, desiredaccess: u32, previouslygrantedaccess: u32, privileges: Option<*mut *mut super::super::super::Win32::Security::PRIVILEGE_SET>, genericmapping: *const super::super::super::Win32::Security::GENERIC_MAPPING, accessmode: i8, grantedaccess: *mut u32, accessstatus: *mut i32) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn SeAccessCheck(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, subjectsecuritycontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT, subjectcontextlocked : super::super::super::Win32::Foundation:: BOOLEAN, desiredaccess : u32, previouslygrantedaccess : u32, privileges : *mut *mut super::super::super::Win32::Security:: PRIVILEGE_SET, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, accessmode : i8, grantedaccess : *mut u32, accessstatus : *mut i32) -> super::super::super::Win32::Foundation:: BOOLEAN); - SeAccessCheck(core::mem::transmute(securitydescriptor), core::mem::transmute(subjectsecuritycontext), subjectcontextlocked.param().abi(), core::mem::transmute(desiredaccess), core::mem::transmute(previouslygrantedaccess), core::mem::transmute(privileges.unwrap_or(core::mem::zeroed())), core::mem::transmute(genericmapping), core::mem::transmute(accessmode), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus)) + SeAccessCheck(core::mem::transmute(securitydescriptor), core::mem::transmute(subjectsecuritycontext), subjectcontextlocked.into(), core::mem::transmute(desiredaccess), core::mem::transmute(previouslygrantedaccess), core::mem::transmute(privileges.unwrap_or(core::mem::zeroed())), core::mem::transmute(genericmapping), core::mem::transmute(accessmode), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeAssignSecurity(parentdescriptor: Option, explicitdescriptor: Option, newdescriptor: *mut super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, isdirectoryobject: P3, subjectcontext: *const super::super::Foundation::SECURITY_SUBJECT_CONTEXT, genericmapping: *const super::super::super::Win32::Security::GENERIC_MAPPING, pooltype: super::super::Foundation::POOL_TYPE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P3: windows_core::Param, -{ +pub unsafe fn SeAssignSecurity(parentdescriptor: Option, explicitdescriptor: Option, newdescriptor: *mut super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, isdirectoryobject: bool, subjectcontext: *const super::super::Foundation::SECURITY_SUBJECT_CONTEXT, genericmapping: *const super::super::super::Win32::Security::GENERIC_MAPPING, pooltype: super::super::Foundation::POOL_TYPE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeAssignSecurity(parentdescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, explicitdescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, newdescriptor : *mut super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, isdirectoryobject : super::super::super::Win32::Foundation:: BOOLEAN, subjectcontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, pooltype : super::super::Foundation:: POOL_TYPE) -> super::super::super::Win32::Foundation:: NTSTATUS); - SeAssignSecurity(core::mem::transmute(parentdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(explicitdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(newdescriptor), isdirectoryobject.param().abi(), core::mem::transmute(subjectcontext), core::mem::transmute(genericmapping), core::mem::transmute(pooltype)) + SeAssignSecurity(core::mem::transmute(parentdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(explicitdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(newdescriptor), isdirectoryobject.into(), core::mem::transmute(subjectcontext), core::mem::transmute(genericmapping), core::mem::transmute(pooltype)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SeAssignSecurityEx(parentdescriptor: Option, explicitdescriptor: Option, newdescriptor: *mut super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, objecttype: Option<*const windows_core::GUID>, isdirectoryobject: P4, autoinheritflags: u32, subjectcontext: *const super::super::Foundation::SECURITY_SUBJECT_CONTEXT, genericmapping: *const super::super::super::Win32::Security::GENERIC_MAPPING, pooltype: super::super::Foundation::POOL_TYPE) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, -{ +pub unsafe fn SeAssignSecurityEx(parentdescriptor: Option, explicitdescriptor: Option, newdescriptor: *mut super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, objecttype: Option<*const windows_core::GUID>, isdirectoryobject: bool, autoinheritflags: u32, subjectcontext: *const super::super::Foundation::SECURITY_SUBJECT_CONTEXT, genericmapping: *const super::super::super::Win32::Security::GENERIC_MAPPING, pooltype: super::super::Foundation::POOL_TYPE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeAssignSecurityEx(parentdescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, explicitdescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, newdescriptor : *mut super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, objecttype : *const windows_core::GUID, isdirectoryobject : super::super::super::Win32::Foundation:: BOOLEAN, autoinheritflags : u32, subjectcontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, pooltype : super::super::Foundation:: POOL_TYPE) -> super::super::super::Win32::Foundation:: NTSTATUS); - SeAssignSecurityEx(core::mem::transmute(parentdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(explicitdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(newdescriptor), core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), isdirectoryobject.param().abi(), core::mem::transmute(autoinheritflags), core::mem::transmute(subjectcontext), core::mem::transmute(genericmapping), core::mem::transmute(pooltype)) + SeAssignSecurityEx(core::mem::transmute(parentdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(explicitdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(newdescriptor), core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), isdirectoryobject.into(), core::mem::transmute(autoinheritflags), core::mem::transmute(subjectcontext), core::mem::transmute(genericmapping), core::mem::transmute(pooltype)) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -6222,12 +5988,9 @@ pub unsafe fn TmCommitEnlistment(enlistment: *const super::super::Foundation::KE } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn TmCommitTransaction(transaction: *const super::super::Foundation::KTRANSACTION, wait: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn TmCommitTransaction(transaction: *const super::super::Foundation::KTRANSACTION, wait: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn TmCommitTransaction(transaction : *const super::super::Foundation:: KTRANSACTION, wait : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - TmCommitTransaction(core::mem::transmute(transaction), wait.param().abi()) + TmCommitTransaction(core::mem::transmute(transaction), wait.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -6357,12 +6120,9 @@ pub unsafe fn TmRollbackEnlistment(enlistment: *const super::super::Foundation:: } #[cfg(feature = "Wdk_Foundation")] #[inline] -pub unsafe fn TmRollbackTransaction(transaction: *const super::super::Foundation::KTRANSACTION, wait: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn TmRollbackTransaction(transaction: *const super::super::Foundation::KTRANSACTION, wait: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn TmRollbackTransaction(transaction : *const super::super::Foundation:: KTRANSACTION, wait : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - TmRollbackTransaction(core::mem::transmute(transaction), wait.param().abi()) + TmRollbackTransaction(core::mem::transmute(transaction), wait.into()) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -6542,12 +6302,9 @@ pub unsafe fn ZwCommitEnlistment(enlistmenthandle: super::super::super::Win32::F ZwCommitEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ZwCommitTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, wait: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn ZwCommitTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, wait: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwCommitTransaction(transactionhandle : super::super::super::Win32::Foundation:: HANDLE, wait : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwCommitTransaction(core::mem::transmute(transactionhandle), wait.param().abi()) + ZwCommitTransaction(core::mem::transmute(transactionhandle), wait.into()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -6805,12 +6562,9 @@ pub unsafe fn ZwRollbackEnlistment(enlistmenthandle: super::super::super::Win32: ZwRollbackEnlistment(core::mem::transmute(enlistmenthandle), core::mem::transmute(tmvirtualclock.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ZwRollbackTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, wait: P1) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn ZwRollbackTransaction(transactionhandle: super::super::super::Win32::Foundation::HANDLE, wait: bool) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwRollbackTransaction(transactionhandle : super::super::super::Win32::Foundation:: HANDLE, wait : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwRollbackTransaction(core::mem::transmute(transactionhandle), wait.param().abi()) + ZwRollbackTransaction(core::mem::transmute(transactionhandle), wait.into()) } #[inline] pub unsafe fn ZwRollforwardTransactionManager(transactionmanagerhandle: super::super::super::Win32::Foundation::HANDLE, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -20022,9 +19776,6 @@ pub const SECURE_SECTION_ALLOW_PARTIAL_MDL: u32 = 1u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct SECURITY_CONTEXT_TRACKING_MODE(pub u8); -impl windows_core::TypeKind for SECURITY_CONTEXT_TRACKING_MODE { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct SECURITY_OPERATION_CODE(pub i32); diff --git a/crates/libs/windows/src/Windows/Wdk/System/Threading/mod.rs b/crates/libs/windows/src/Windows/Wdk/System/Threading/mod.rs index ace02119f5..c6e14973f7 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/Threading/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/Threading/mod.rs @@ -44,12 +44,9 @@ pub unsafe fn NtSetInformationThread(threadhandle: super::super::super::Win32::F } #[cfg(feature = "Wdk_System_SystemServices")] #[inline] -pub unsafe fn NtSetTimer(timerhandle: super::super::super::Win32::Foundation::HANDLE, duetime: *const i64, timerapcroutine: Option, timercontext: Option<*const core::ffi::c_void>, resumetimer: P4, period: Option, previousstate: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, -{ +pub unsafe fn NtSetTimer(timerhandle: super::super::super::Win32::Foundation::HANDLE, duetime: *const i64, timerapcroutine: Option, timercontext: Option<*const core::ffi::c_void>, resumetimer: bool, period: Option, previousstate: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtSetTimer(timerhandle : super::super::super::Win32::Foundation:: HANDLE, duetime : *const i64, timerapcroutine : super::SystemServices:: PTIMER_APC_ROUTINE, timercontext : *const core::ffi::c_void, resumetimer : super::super::super::Win32::Foundation:: BOOLEAN, period : i32, previousstate : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtSetTimer(core::mem::transmute(timerhandle), core::mem::transmute(duetime), core::mem::transmute(timerapcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(timercontext.unwrap_or(core::mem::zeroed())), resumetimer.param().abi(), core::mem::transmute(period.unwrap_or(core::mem::zeroed())), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed()))) + NtSetTimer(core::mem::transmute(timerhandle), core::mem::transmute(duetime), core::mem::transmute(timerapcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(timercontext.unwrap_or(core::mem::zeroed())), resumetimer.into(), core::mem::transmute(period.unwrap_or(core::mem::zeroed())), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn NtSetTimerEx(timerhandle: super::super::super::Win32::Foundation::HANDLE, timersetinformationclass: TIMER_SET_INFORMATION_CLASS, timersetinformation: Option<*mut core::ffi::c_void>, timersetinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -62,12 +59,9 @@ pub unsafe fn NtTerminateProcess(processhandle: Option(handle: super::super::super::Win32::Foundation::HANDLE, alertable: P1, timeout: *mut i64) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn NtWaitForSingleObject(handle: super::super::super::Win32::Foundation::HANDLE, alertable: bool, timeout: *mut i64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtWaitForSingleObject(handle : super::super::super::Win32::Foundation:: HANDLE, alertable : super::super::super::Win32::Foundation:: BOOLEAN, timeout : *mut i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtWaitForSingleObject(core::mem::transmute(handle), alertable.param().abi(), core::mem::transmute(timeout)) + NtWaitForSingleObject(core::mem::transmute(handle), alertable.into(), core::mem::transmute(timeout)) } #[inline] pub unsafe fn ZwCancelTimer(timerhandle: super::super::super::Win32::Foundation::HANDLE, currentstate: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -115,12 +109,9 @@ pub unsafe fn ZwSetInformationThread(threadhandle: super::super::super::Win32::F } #[cfg(feature = "Wdk_System_SystemServices")] #[inline] -pub unsafe fn ZwSetTimer(timerhandle: super::super::super::Win32::Foundation::HANDLE, duetime: *const i64, timerapcroutine: Option, timercontext: Option<*const core::ffi::c_void>, resumetimer: P4, period: Option, previousstate: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P4: windows_core::Param, -{ +pub unsafe fn ZwSetTimer(timerhandle: super::super::super::Win32::Foundation::HANDLE, duetime: *const i64, timerapcroutine: Option, timercontext: Option<*const core::ffi::c_void>, resumetimer: bool, period: Option, previousstate: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwSetTimer(timerhandle : super::super::super::Win32::Foundation:: HANDLE, duetime : *const i64, timerapcroutine : super::SystemServices:: PTIMER_APC_ROUTINE, timercontext : *const core::ffi::c_void, resumetimer : super::super::super::Win32::Foundation:: BOOLEAN, period : i32, previousstate : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwSetTimer(core::mem::transmute(timerhandle), core::mem::transmute(duetime), core::mem::transmute(timerapcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(timercontext.unwrap_or(core::mem::zeroed())), resumetimer.param().abi(), core::mem::transmute(period.unwrap_or(core::mem::zeroed())), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed()))) + ZwSetTimer(core::mem::transmute(timerhandle), core::mem::transmute(duetime), core::mem::transmute(timerapcroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(timercontext.unwrap_or(core::mem::zeroed())), resumetimer.into(), core::mem::transmute(period.unwrap_or(core::mem::zeroed())), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ZwSetTimerEx(timerhandle: super::super::super::Win32::Foundation::HANDLE, timersetinformationclass: TIMER_SET_INFORMATION_CLASS, timersetinformation: Option<*mut core::ffi::c_void>, timersetinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -133,12 +124,9 @@ pub unsafe fn ZwTerminateProcess(processhandle: Option(handle: super::super::super::Win32::Foundation::HANDLE, alertable: P1, timeout: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn ZwWaitForSingleObject(handle: super::super::super::Win32::Foundation::HANDLE, alertable: bool, timeout: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwWaitForSingleObject(handle : super::super::super::Win32::Foundation:: HANDLE, alertable : super::super::super::Win32::Foundation:: BOOLEAN, timeout : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwWaitForSingleObject(core::mem::transmute(handle), alertable.param().abi(), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed()))) + ZwWaitForSingleObject(core::mem::transmute(handle), alertable.into(), core::mem::transmute(timeout.unwrap_or(core::mem::zeroed()))) } pub const MaxProcessInfoClass: PROCESSINFOCLASS = PROCESSINFOCLASS(83i32); pub const MaxThreadInfoClass: THREADINFOCLASS = THREADINFOCLASS(56i32); diff --git a/crates/libs/windows/src/Windows/Win32/AI/MachineLearning/DirectML/mod.rs b/crates/libs/windows/src/Windows/Win32/AI/MachineLearning/DirectML/mod.rs index 8d744c35ac..0841192c9a 100644 --- a/crates/libs/windows/src/Windows/Win32/AI/MachineLearning/DirectML/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/AI/MachineLearning/DirectML/mod.rs @@ -2893,11 +2893,8 @@ impl windows_core::RuntimeName for IDMLCompiledOperator {} windows_core::imp::define_interface!(IDMLDebugDevice, IDMLDebugDevice_Vtbl, 0x7d6f3ac9_394a_4ac3_92a7_390cc57a8217); windows_core::imp::interface_hierarchy!(IDMLDebugDevice, windows_core::IUnknown); impl IDMLDebugDevice { - pub unsafe fn SetMuteDebugOutput(&self, mute: P0) - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMuteDebugOutput)(windows_core::Interface::as_raw(self), mute.param().abi()) + pub unsafe fn SetMuteDebugOutput(&self, mute: bool) { + (windows_core::Interface::vtable(self).SetMuteDebugOutput)(windows_core::Interface::as_raw(self), mute.into()) } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Data/HtmlHelp/mod.rs b/crates/libs/windows/src/Windows/Win32/Data/HtmlHelp/mod.rs index 710c5a99c4..10f2ca4277 100644 --- a/crates/libs/windows/src/Windows/Win32/Data/HtmlHelp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Data/HtmlHelp/mod.rs @@ -509,12 +509,11 @@ impl IITDatabase { pub unsafe fn GetObject(&self, dwobjinstance: u32, riid: *const windows_core::GUID, ppvobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), core::mem::transmute(dwobjinstance), core::mem::transmute(riid), core::mem::transmute(ppvobj)).ok() } - pub unsafe fn GetObjectPersistence(&self, lpwszobject: P0, dwobjinstance: u32, ppvpersistence: *mut *mut core::ffi::c_void, fstream: P3) -> windows_core::Result<()> + pub unsafe fn GetObjectPersistence(&self, lpwszobject: P0, dwobjinstance: u32, ppvpersistence: *mut *mut core::ffi::c_void, fstream: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).GetObjectPersistence)(windows_core::Interface::as_raw(self), lpwszobject.param().abi(), core::mem::transmute(dwobjinstance), core::mem::transmute(ppvpersistence), fstream.param().abi()).ok() + (windows_core::Interface::vtable(self).GetObjectPersistence)(windows_core::Interface::as_raw(self), lpwszobject.param().abi(), core::mem::transmute(dwobjinstance), core::mem::transmute(ppvpersistence), fstream.into()).ok() } } #[repr(C)] @@ -603,17 +602,11 @@ impl IITPropList { pub unsafe fn Clear(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Clear)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetPersist(&self, fpersist: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPersist)(windows_core::Interface::as_raw(self), fpersist.param().abi()).ok() + pub unsafe fn SetPersist(&self, fpersist: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPersist)(windows_core::Interface::as_raw(self), fpersist.into()).ok() } - pub unsafe fn SetPersist2(&self, propid: u32, fpersist: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPersist2)(windows_core::Interface::as_raw(self), core::mem::transmute(propid), fpersist.param().abi()).ok() + pub unsafe fn SetPersist2(&self, propid: u32, fpersist: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPersist2)(windows_core::Interface::as_raw(self), core::mem::transmute(propid), fpersist.into()).ok() } pub unsafe fn GetFirst(&self, property: *mut CProperty) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetFirst)(windows_core::Interface::as_raw(self), core::mem::transmute(property)).ok() @@ -896,11 +889,8 @@ impl IITResultSet { pub unsafe fn Cancel(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Cancel)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn Pause(&self, fpause: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Pause)(windows_core::Interface::as_raw(self), fpause.param().abi()).ok() + pub unsafe fn Pause(&self, fpause: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Pause)(windows_core::Interface::as_raw(self), fpause.into()).ok() } pub unsafe fn GetRowStatus(&self, lrowfirst: i32, crows: i32, lprowstatus: *mut ROWSTATUS) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetRowStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(lrowfirst), core::mem::transmute(crows), core::mem::transmute(lprowstatus)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Data/RightsManagement/mod.rs b/crates/libs/windows/src/Windows/Win32/Data/RightsManagement/mod.rs index 7d3f2276b6..52b554a404 100644 --- a/crates/libs/windows/src/Windows/Win32/Data/RightsManagement/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Data/RightsManagement/mod.rs @@ -545,12 +545,9 @@ where DRMParseUnboundLicense(wszcertificate.param().abi(), core::mem::transmute(phqueryroot)).ok() } #[inline] -pub unsafe fn DRMRegisterContent(fregister: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DRMRegisterContent(fregister: bool) -> windows_core::Result<()> { windows_targets::link!("msdrm.dll" "system" fn DRMRegisterContent(fregister : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - DRMRegisterContent(fregister.param().abi()).ok() + DRMRegisterContent(fregister.into()).ok() } #[inline] pub unsafe fn DRMRegisterProtectedWindow(henv: u32, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { @@ -571,14 +568,13 @@ pub unsafe fn DRMRepair() -> windows_core::Result<()> { DRMRepair().ok() } #[inline] -pub unsafe fn DRMSetApplicationSpecificData(hissuancelicense: u32, fdelete: P1, wszname: P2, wszvalue: P3) -> windows_core::Result<()> +pub unsafe fn DRMSetApplicationSpecificData(hissuancelicense: u32, fdelete: bool, wszname: P2, wszvalue: P3) -> windows_core::Result<()> where - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMSetApplicationSpecificData(hissuancelicense : u32, fdelete : super::super::Foundation:: BOOL, wszname : windows_core::PCWSTR, wszvalue : windows_core::PCWSTR) -> windows_core::HRESULT); - DRMSetApplicationSpecificData(core::mem::transmute(hissuancelicense), fdelete.param().abi(), wszname.param().abi(), wszvalue.param().abi()).ok() + DRMSetApplicationSpecificData(core::mem::transmute(hissuancelicense), fdelete.into(), wszname.param().abi(), wszvalue.param().abi()).ok() } #[inline] pub unsafe fn DRMSetGlobalOptions(eglobaloptions: DRMGLOBALOPTIONS, pvdata: *mut core::ffi::c_void, dwlen: u32) -> windows_core::Result<()> { @@ -604,19 +600,17 @@ where DRMSetMetaData(core::mem::transmute(hissuancelicense), wszcontentid.param().abi(), wszcontentidtype.param().abi(), wszskuid.param().abi(), wszskuidtype.param().abi(), wszcontenttype.param().abi(), wszcontentname.param().abi()).ok() } #[inline] -pub unsafe fn DRMSetNameAndDescription(hissuancelicense: u32, fdelete: P1, lcid: u32, wszname: P3, wszdescription: P4) -> windows_core::Result<()> +pub unsafe fn DRMSetNameAndDescription(hissuancelicense: u32, fdelete: bool, lcid: u32, wszname: P3, wszdescription: P4) -> windows_core::Result<()> where - P1: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMSetNameAndDescription(hissuancelicense : u32, fdelete : super::super::Foundation:: BOOL, lcid : u32, wszname : windows_core::PCWSTR, wszdescription : windows_core::PCWSTR) -> windows_core::HRESULT); - DRMSetNameAndDescription(core::mem::transmute(hissuancelicense), fdelete.param().abi(), core::mem::transmute(lcid), wszname.param().abi(), wszdescription.param().abi()).ok() + DRMSetNameAndDescription(core::mem::transmute(hissuancelicense), fdelete.into(), core::mem::transmute(lcid), wszname.param().abi(), wszdescription.param().abi()).ok() } #[inline] -pub unsafe fn DRMSetRevocationPoint(hissuancelicense: u32, fdelete: P1, wszid: P2, wszidtype: P3, wszurl: P4, pstfrequency: *mut super::super::Foundation::SYSTEMTIME, wszname: P6, wszpublickey: P7) -> windows_core::Result<()> +pub unsafe fn DRMSetRevocationPoint(hissuancelicense: u32, fdelete: bool, wszid: P2, wszidtype: P3, wszurl: P4, pstfrequency: *mut super::super::Foundation::SYSTEMTIME, wszname: P6, wszpublickey: P7) -> windows_core::Result<()> where - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, @@ -624,13 +618,11 @@ where P7: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMSetRevocationPoint(hissuancelicense : u32, fdelete : super::super::Foundation:: BOOL, wszid : windows_core::PCWSTR, wszidtype : windows_core::PCWSTR, wszurl : windows_core::PCWSTR, pstfrequency : *mut super::super::Foundation:: SYSTEMTIME, wszname : windows_core::PCWSTR, wszpublickey : windows_core::PCWSTR) -> windows_core::HRESULT); - DRMSetRevocationPoint(core::mem::transmute(hissuancelicense), fdelete.param().abi(), wszid.param().abi(), wszidtype.param().abi(), wszurl.param().abi(), core::mem::transmute(pstfrequency), wszname.param().abi(), wszpublickey.param().abi()).ok() + DRMSetRevocationPoint(core::mem::transmute(hissuancelicense), fdelete.into(), wszid.param().abi(), wszidtype.param().abi(), wszurl.param().abi(), core::mem::transmute(pstfrequency), wszname.param().abi(), wszpublickey.param().abi()).ok() } #[inline] -pub unsafe fn DRMSetUsagePolicy(hissuancelicense: u32, eusagepolicytype: DRM_USAGEPOLICY_TYPE, fdelete: P2, fexclusion: P3, wszname: P4, wszminversion: P5, wszmaxversion: P6, wszpublickey: P7, wszdigestalgorithm: P8, pbdigest: *mut u8, cbdigest: u32) -> windows_core::Result<()> +pub unsafe fn DRMSetUsagePolicy(hissuancelicense: u32, eusagepolicytype: DRM_USAGEPOLICY_TYPE, fdelete: bool, fexclusion: bool, wszname: P4, wszminversion: P5, wszmaxversion: P6, wszpublickey: P7, wszdigestalgorithm: P8, pbdigest: *mut u8, cbdigest: u32) -> windows_core::Result<()> where - P2: windows_core::Param, - P3: windows_core::Param, P4: windows_core::Param, P5: windows_core::Param, P6: windows_core::Param, @@ -638,7 +630,7 @@ where P8: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMSetUsagePolicy(hissuancelicense : u32, eusagepolicytype : DRM_USAGEPOLICY_TYPE, fdelete : super::super::Foundation:: BOOL, fexclusion : super::super::Foundation:: BOOL, wszname : windows_core::PCWSTR, wszminversion : windows_core::PCWSTR, wszmaxversion : windows_core::PCWSTR, wszpublickey : windows_core::PCWSTR, wszdigestalgorithm : windows_core::PCWSTR, pbdigest : *mut u8, cbdigest : u32) -> windows_core::HRESULT); - DRMSetUsagePolicy(core::mem::transmute(hissuancelicense), core::mem::transmute(eusagepolicytype), fdelete.param().abi(), fexclusion.param().abi(), wszname.param().abi(), wszminversion.param().abi(), wszmaxversion.param().abi(), wszpublickey.param().abi(), wszdigestalgorithm.param().abi(), core::mem::transmute(pbdigest), core::mem::transmute(cbdigest)).ok() + DRMSetUsagePolicy(core::mem::transmute(hissuancelicense), core::mem::transmute(eusagepolicytype), fdelete.into(), fexclusion.into(), wszname.param().abi(), wszminversion.param().abi(), wszmaxversion.param().abi(), wszpublickey.param().abi(), wszdigestalgorithm.param().abi(), core::mem::transmute(pbdigest), core::mem::transmute(cbdigest)).ok() } #[inline] pub unsafe fn DRMVerify(wszdata: P0, pcattesteddata: *mut u32, wszattesteddata: Option, petype: *mut DRMATTESTTYPE, pcprincipal: *mut u32, wszprincipal: Option, pcmanifest: *mut u32, wszmanifest: Option) -> windows_core::Result<()> diff --git a/crates/libs/windows/src/Windows/Win32/Data/Xml/MsXml/mod.rs b/crates/libs/windows/src/Windows/Win32/Data/Xml/MsXml/mod.rs index 0cd02fef85..4c763567bd 100644 --- a/crates/libs/windows/src/Windows/Win32/Data/Xml/MsXml/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Data/Xml/MsXml/mod.rs @@ -9683,11 +9683,8 @@ impl IXMLDSOControl { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).JavaDSOCompatible)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetJavaDSOCompatible(&self, fjavadsocompatible: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetJavaDSOCompatible)(windows_core::Interface::as_raw(self), fjavadsocompatible.param().abi()).ok() + pub unsafe fn SetJavaDSOCompatible(&self, fjavadsocompatible: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetJavaDSOCompatible)(windows_core::Interface::as_raw(self), fjavadsocompatible.into()).ok() } pub unsafe fn readyState(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Win32/Data/Xml/XmlLite/mod.rs b/crates/libs/windows/src/Windows/Win32/Data/Xml/XmlLite/mod.rs index 64dece9cb9..cbe892af3a 100644 --- a/crates/libs/windows/src/Windows/Win32/Data/Xml/XmlLite/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Data/Xml/XmlLite/mod.rs @@ -9,30 +9,28 @@ where } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn CreateXmlReaderInputWithEncodingCodePage(pinputstream: P0, pmalloc: P1, nencodingcodepage: u32, fencodinghint: P3, pwszbaseuri: P4) -> windows_core::Result +pub unsafe fn CreateXmlReaderInputWithEncodingCodePage(pinputstream: P0, pmalloc: P1, nencodingcodepage: u32, fencodinghint: bool, pwszbaseuri: P4) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("xmllite.dll" "system" fn CreateXmlReaderInputWithEncodingCodePage(pinputstream : * mut core::ffi::c_void, pmalloc : * mut core::ffi::c_void, nencodingcodepage : u32, fencodinghint : super::super::super::Foundation:: BOOL, pwszbaseuri : windows_core::PCWSTR, ppinput : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - CreateXmlReaderInputWithEncodingCodePage(pinputstream.param().abi(), pmalloc.param().abi(), core::mem::transmute(nencodingcodepage), fencodinghint.param().abi(), pwszbaseuri.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + CreateXmlReaderInputWithEncodingCodePage(pinputstream.param().abi(), pmalloc.param().abi(), core::mem::transmute(nencodingcodepage), fencodinghint.into(), pwszbaseuri.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn CreateXmlReaderInputWithEncodingName(pinputstream: P0, pmalloc: P1, pwszencodingname: P2, fencodinghint: P3, pwszbaseuri: P4) -> windows_core::Result +pub unsafe fn CreateXmlReaderInputWithEncodingName(pinputstream: P0, pmalloc: P1, pwszencodingname: P2, fencodinghint: bool, pwszbaseuri: P4) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("xmllite.dll" "system" fn CreateXmlReaderInputWithEncodingName(pinputstream : * mut core::ffi::c_void, pmalloc : * mut core::ffi::c_void, pwszencodingname : windows_core::PCWSTR, fencodinghint : super::super::super::Foundation:: BOOL, pwszbaseuri : windows_core::PCWSTR, ppinput : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - CreateXmlReaderInputWithEncodingName(pinputstream.param().abi(), pmalloc.param().abi(), pwszencodingname.param().abi(), fencodinghint.param().abi(), pwszbaseuri.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + CreateXmlReaderInputWithEncodingName(pinputstream.param().abi(), pmalloc.param().abi(), pwszencodingname.param().abi(), fencodinghint.into(), pwszbaseuri.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -427,12 +425,11 @@ impl IXmlWriter { pub unsafe fn SetProperty(&self, nproperty: u32, pvalue: Option) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(nproperty), core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn WriteAttributes(&self, preader: P0, fwritedefaultattributes: P1) -> windows_core::Result<()> + pub unsafe fn WriteAttributes(&self, preader: P0, fwritedefaultattributes: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).WriteAttributes)(windows_core::Interface::as_raw(self), preader.param().abi(), fwritedefaultattributes.param().abi()).ok() + (windows_core::Interface::vtable(self).WriteAttributes)(windows_core::Interface::as_raw(self), preader.param().abi(), fwritedefaultattributes.into()).ok() } pub unsafe fn WriteAttributeString(&self, pwszprefix: P0, pwszlocalname: P1, pwsznamespaceuri: P2, pwszvalue: P3) -> windows_core::Result<()> where @@ -506,19 +503,17 @@ impl IXmlWriter { { (windows_core::Interface::vtable(self).WriteNmToken)(windows_core::Interface::as_raw(self), pwsznmtoken.param().abi()).ok() } - pub unsafe fn WriteNode(&self, preader: P0, fwritedefaultattributes: P1) -> windows_core::Result<()> + pub unsafe fn WriteNode(&self, preader: P0, fwritedefaultattributes: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).WriteNode)(windows_core::Interface::as_raw(self), preader.param().abi(), fwritedefaultattributes.param().abi()).ok() + (windows_core::Interface::vtable(self).WriteNode)(windows_core::Interface::as_raw(self), preader.param().abi(), fwritedefaultattributes.into()).ok() } - pub unsafe fn WriteNodeShallow(&self, preader: P0, fwritedefaultattributes: P1) -> windows_core::Result<()> + pub unsafe fn WriteNodeShallow(&self, preader: P0, fwritedefaultattributes: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).WriteNodeShallow)(windows_core::Interface::as_raw(self), preader.param().abi(), fwritedefaultattributes.param().abi()).ok() + (windows_core::Interface::vtable(self).WriteNodeShallow)(windows_core::Interface::as_raw(self), preader.param().abi(), fwritedefaultattributes.into()).ok() } pub unsafe fn WriteProcessingInstruction(&self, pwszname: P0, pwsztext: P1) -> windows_core::Result<()> where @@ -815,12 +810,11 @@ impl IXmlWriterLite { pub unsafe fn SetProperty(&self, nproperty: u32, pvalue: Option) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(nproperty), core::mem::transmute(pvalue.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn WriteAttributes(&self, preader: P0, fwritedefaultattributes: P1) -> windows_core::Result<()> + pub unsafe fn WriteAttributes(&self, preader: P0, fwritedefaultattributes: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).WriteAttributes)(windows_core::Interface::as_raw(self), preader.param().abi(), fwritedefaultattributes.param().abi()).ok() + (windows_core::Interface::vtable(self).WriteAttributes)(windows_core::Interface::as_raw(self), preader.param().abi(), fwritedefaultattributes.into()).ok() } pub unsafe fn WriteAttributeString(&self, pwszqname: &[u16], pwszvalue: Option<&[u16]>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).WriteAttributeString)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszqname.as_ptr()), pwszqname.len().try_into().unwrap(), core::mem::transmute(pwszvalue.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pwszvalue.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() @@ -885,19 +879,17 @@ impl IXmlWriterLite { { (windows_core::Interface::vtable(self).WriteNmToken)(windows_core::Interface::as_raw(self), pwsznmtoken.param().abi()).ok() } - pub unsafe fn WriteNode(&self, preader: P0, fwritedefaultattributes: P1) -> windows_core::Result<()> + pub unsafe fn WriteNode(&self, preader: P0, fwritedefaultattributes: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).WriteNode)(windows_core::Interface::as_raw(self), preader.param().abi(), fwritedefaultattributes.param().abi()).ok() + (windows_core::Interface::vtable(self).WriteNode)(windows_core::Interface::as_raw(self), preader.param().abi(), fwritedefaultattributes.into()).ok() } - pub unsafe fn WriteNodeShallow(&self, preader: P0, fwritedefaultattributes: P1) -> windows_core::Result<()> + pub unsafe fn WriteNodeShallow(&self, preader: P0, fwritedefaultattributes: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).WriteNodeShallow)(windows_core::Interface::as_raw(self), preader.param().abi(), fwritedefaultattributes.param().abi()).ok() + (windows_core::Interface::vtable(self).WriteNodeShallow)(windows_core::Interface::as_raw(self), preader.param().abi(), fwritedefaultattributes.into()).ok() } pub unsafe fn WriteProcessingInstruction(&self, pwszname: P0, pwsztext: P1) -> windows_core::Result<()> where diff --git a/crates/libs/windows/src/Windows/Win32/Devices/AllJoyn/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/AllJoyn/mod.rs index c22e7a0e31..2f8ab67c95 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/AllJoyn/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/AllJoyn/mod.rs @@ -3866,15 +3866,9 @@ pub struct alljoyn_about_announceflag(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct alljoyn_aboutdata(pub isize); -impl windows_core::TypeKind for alljoyn_aboutdata { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct alljoyn_aboutdatalistener(pub isize); -impl windows_core::TypeKind for alljoyn_aboutdatalistener { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct alljoyn_aboutdatalistener_callbacks { @@ -3891,27 +3885,15 @@ pub type alljoyn_aboutdatalistener_getannouncedaboutdata_ptr = Option; #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] @@ -4001,25 +3968,16 @@ impl Default for alljoyn_authlistenerasync_callbacks { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct alljoyn_autopinger(pub isize); -impl windows_core::TypeKind for alljoyn_autopinger { - type TypeKind = windows_core::CopyType; -} pub type alljoyn_autopinger_destination_found_ptr = Option; pub type alljoyn_autopinger_destination_lost_ptr = Option; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct alljoyn_busattachment(pub isize); -impl windows_core::TypeKind for alljoyn_busattachment { - type TypeKind = windows_core::CopyType; -} pub type alljoyn_busattachment_joinsessioncb_ptr = Option; pub type alljoyn_busattachment_setlinktimeoutcb_ptr = Option; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct alljoyn_buslistener(pub isize); -impl windows_core::TypeKind for alljoyn_buslistener { - type TypeKind = windows_core::CopyType; -} pub type alljoyn_buslistener_bus_disconnected_ptr = Option; pub type alljoyn_buslistener_bus_prop_changed_ptr = Option; pub type alljoyn_buslistener_bus_stopping_ptr = Option; @@ -4048,9 +4006,6 @@ pub type alljoyn_buslistener_name_owner_changed_ptr = Option QStatus>; #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] @@ -4208,9 +4151,6 @@ impl Default for alljoyn_manifestarray { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct alljoyn_message(pub isize); -impl windows_core::TypeKind for alljoyn_message { - type TypeKind = windows_core::CopyType; -} pub type alljoyn_messagereceiver_methodhandler_ptr = Option; pub type alljoyn_messagereceiver_replyhandler_ptr = Option; pub type alljoyn_messagereceiver_signalhandler_ptr = Option; @@ -4220,23 +4160,14 @@ pub struct alljoyn_messagetype(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct alljoyn_msgarg(pub isize); -impl windows_core::TypeKind for alljoyn_msgarg { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct alljoyn_observer(pub isize); -impl windows_core::TypeKind for alljoyn_observer { - type TypeKind = windows_core::CopyType; -} pub type alljoyn_observer_object_discovered_ptr = Option; pub type alljoyn_observer_object_lost_ptr = Option; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct alljoyn_observerlistener(pub isize); -impl windows_core::TypeKind for alljoyn_observerlistener { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct alljoyn_observerlistener_callback { @@ -4251,9 +4182,6 @@ impl Default for alljoyn_observerlistener_callback { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct alljoyn_permissionconfigurationlistener(pub isize); -impl windows_core::TypeKind for alljoyn_permissionconfigurationlistener { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct alljoyn_permissionconfigurationlistener_callbacks { @@ -4274,15 +4202,9 @@ pub type alljoyn_permissionconfigurationlistener_startmanagement_ptr = Option; pub type alljoyn_proxybusobject_listener_getpropertycb_ptr = Option; pub type alljoyn_proxybusobject_listener_introspectcb_ptr = Option; @@ -4308,21 +4227,12 @@ pub type alljoyn_proxybusobject_listener_setpropertycb_ptr = Option i32>; #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] diff --git a/crates/libs/windows/src/Windows/Win32/Devices/BiometricFramework/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/BiometricFramework/mod.rs index 83ea26c4ab..f4021a7230 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/BiometricFramework/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/BiometricFramework/mod.rs @@ -24,18 +24,12 @@ pub unsafe fn WinBioAsyncMonitorFrameworkChanges(frameworkhandle: u32, changetyp WinBioAsyncMonitorFrameworkChanges(core::mem::transmute(frameworkhandle), core::mem::transmute(changetypes)).ok() } #[inline] -pub unsafe fn WinBioAsyncOpenFramework(notificationmethod: WINBIO_ASYNC_NOTIFICATION_METHOD, targetwindow: Option, messagecode: Option, callbackroutine: Option, userdata: Option<*const core::ffi::c_void>, asynchronousopen: P5, frameworkhandle: Option<*mut u32>) -> windows_core::Result<()> -where - P5: windows_core::Param, -{ +pub unsafe fn WinBioAsyncOpenFramework(notificationmethod: WINBIO_ASYNC_NOTIFICATION_METHOD, targetwindow: Option, messagecode: Option, callbackroutine: Option, userdata: Option<*const core::ffi::c_void>, asynchronousopen: bool, frameworkhandle: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioAsyncOpenFramework(notificationmethod : WINBIO_ASYNC_NOTIFICATION_METHOD, targetwindow : super::super::Foundation:: HWND, messagecode : u32, callbackroutine : PWINBIO_ASYNC_COMPLETION_CALLBACK, userdata : *const core::ffi::c_void, asynchronousopen : super::super::Foundation:: BOOL, frameworkhandle : *mut u32) -> windows_core::HRESULT); - WinBioAsyncOpenFramework(core::mem::transmute(notificationmethod), core::mem::transmute(targetwindow.unwrap_or(core::mem::zeroed())), core::mem::transmute(messagecode.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(userdata.unwrap_or(core::mem::zeroed())), asynchronousopen.param().abi(), core::mem::transmute(frameworkhandle.unwrap_or(core::mem::zeroed()))).ok() + WinBioAsyncOpenFramework(core::mem::transmute(notificationmethod), core::mem::transmute(targetwindow.unwrap_or(core::mem::zeroed())), core::mem::transmute(messagecode.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(userdata.unwrap_or(core::mem::zeroed())), asynchronousopen.into(), core::mem::transmute(frameworkhandle.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WinBioAsyncOpenSession(factor: u32, pooltype: WINBIO_POOL, flags: u32, unitarray: Option<&[u32]>, databaseid: Option<*const windows_core::GUID>, notificationmethod: WINBIO_ASYNC_NOTIFICATION_METHOD, targetwindow: Option, messagecode: Option, callbackroutine: Option, userdata: Option<*const core::ffi::c_void>, asynchronousopen: P11, sessionhandle: Option<*mut u32>) -> windows_core::Result<()> -where - P11: windows_core::Param, -{ +pub unsafe fn WinBioAsyncOpenSession(factor: u32, pooltype: WINBIO_POOL, flags: u32, unitarray: Option<&[u32]>, databaseid: Option<*const windows_core::GUID>, notificationmethod: WINBIO_ASYNC_NOTIFICATION_METHOD, targetwindow: Option, messagecode: Option, callbackroutine: Option, userdata: Option<*const core::ffi::c_void>, asynchronousopen: bool, sessionhandle: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioAsyncOpenSession(factor : u32, pooltype : WINBIO_POOL, flags : u32, unitarray : *const u32, unitcount : usize, databaseid : *const windows_core::GUID, notificationmethod : WINBIO_ASYNC_NOTIFICATION_METHOD, targetwindow : super::super::Foundation:: HWND, messagecode : u32, callbackroutine : PWINBIO_ASYNC_COMPLETION_CALLBACK, userdata : *const core::ffi::c_void, asynchronousopen : super::super::Foundation:: BOOL, sessionhandle : *mut u32) -> windows_core::HRESULT); WinBioAsyncOpenSession( core::mem::transmute(factor), @@ -49,7 +43,7 @@ where core::mem::transmute(messagecode.unwrap_or(core::mem::zeroed())), core::mem::transmute(callbackroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(userdata.unwrap_or(core::mem::zeroed())), - asynchronousopen.param().abi(), + asynchronousopen.into(), core::mem::transmute(sessionhandle.unwrap_or(core::mem::zeroed())), ) .ok() @@ -2292,18 +2286,9 @@ pub const WINBIO_WBDI_MINOR_VERSION: u32 = 0u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct WINIBIO_ENGINE_CONTEXT(pub isize); -impl windows_core::TypeKind for WINIBIO_ENGINE_CONTEXT { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct WINIBIO_SENSOR_CONTEXT(pub isize); -impl windows_core::TypeKind for WINIBIO_SENSOR_CONTEXT { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct WINIBIO_STORAGE_CONTEXT(pub isize); -impl windows_core::TypeKind for WINIBIO_STORAGE_CONTEXT { - type TypeKind = windows_core::CopyType; -} diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Bluetooth/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Bluetooth/mod.rs index 6052a59c07..7b29b9ef72 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Bluetooth/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Bluetooth/mod.rs @@ -19,20 +19,14 @@ pub unsafe fn BluetoothDisplayDeviceProperties(hwndparent: Option(hradio: Option, fenabled: P1) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn BluetoothEnableDiscovery(hradio: Option, fenabled: bool) -> super::super::Foundation::BOOL { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothEnableDiscovery(hradio : super::super::Foundation:: HANDLE, fenabled : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - BluetoothEnableDiscovery(core::mem::transmute(hradio.unwrap_or(core::mem::zeroed())), fenabled.param().abi()) + BluetoothEnableDiscovery(core::mem::transmute(hradio.unwrap_or(core::mem::zeroed())), fenabled.into()) } #[inline] -pub unsafe fn BluetoothEnableIncomingConnections(hradio: Option, fenabled: P1) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn BluetoothEnableIncomingConnections(hradio: Option, fenabled: bool) -> super::super::Foundation::BOOL { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothEnableIncomingConnections(hradio : super::super::Foundation:: HANDLE, fenabled : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - BluetoothEnableIncomingConnections(core::mem::transmute(hradio.unwrap_or(core::mem::zeroed())), fenabled.param().abi()) + BluetoothEnableIncomingConnections(core::mem::transmute(hradio.unwrap_or(core::mem::zeroed())), fenabled.into()) } #[inline] pub unsafe fn BluetoothEnumerateInstalledServices(hradio: Option, pbtdi: *const BLUETOOTH_DEVICE_INFO, pcserviceinout: *mut u32, pguidservices: Option<*mut windows_core::GUID>) -> u32 { @@ -1371,9 +1365,6 @@ pub const GenericTelephonyServiceClassID_UUID16: u32 = 4612u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HANDLE_SDP_TYPE(pub u64); -impl windows_core::TypeKind for HANDLE_SDP_TYPE { - type TypeKind = windows_core::CopyType; -} impl HANDLE_SDP_TYPE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 @@ -1382,9 +1373,6 @@ impl HANDLE_SDP_TYPE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HBLUETOOTH_DEVICE_FIND(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HBLUETOOTH_DEVICE_FIND { - type TypeKind = windows_core::CopyType; -} impl HBLUETOOTH_DEVICE_FIND { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1407,9 +1395,6 @@ impl Default for HBLUETOOTH_DEVICE_FIND { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HBLUETOOTH_RADIO_FIND(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HBLUETOOTH_RADIO_FIND { - type TypeKind = windows_core::CopyType; -} impl HBLUETOOTH_RADIO_FIND { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/Devices/DeviceAndDriverInstallation/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/DeviceAndDriverInstallation/mod.rs index 137f3ba1c2..bdbfebe7da 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/DeviceAndDriverInstallation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/DeviceAndDriverInstallation/mod.rs @@ -3310,12 +3310,9 @@ where SetupOpenInfFileW(filename.param().abi(), infclass.param().abi(), core::mem::transmute(infstyle), core::mem::transmute(errorline.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetupOpenLog(erase: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetupOpenLog(erase: bool) -> windows_core::Result<()> { windows_targets::link!("setupapi.dll" "system" fn SetupOpenLog(erase : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetupOpenLog(erase.param().abi()).ok() + SetupOpenLog(erase.into()).ok() } #[inline] pub unsafe fn SetupOpenMasterInf() -> *mut core::ffi::c_void { @@ -3363,12 +3360,9 @@ where SetupPromptForDiskW(core::mem::transmute(hwndparent), dialogtitle.param().abi(), diskname.param().abi(), pathtosource.param().abi(), filesought.param().abi(), tagfile.param().abi(), core::mem::transmute(diskpromptstyle), core::mem::transmute(pathbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathrequiredsize.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetupPromptReboot(filequeue: Option<*const core::ffi::c_void>, owner: Option, scanonly: P2) -> i32 -where - P2: windows_core::Param, -{ +pub unsafe fn SetupPromptReboot(filequeue: Option<*const core::ffi::c_void>, owner: Option, scanonly: bool) -> i32 { windows_targets::link!("setupapi.dll" "system" fn SetupPromptReboot(filequeue : *const core::ffi::c_void, owner : super::super::Foundation:: HWND, scanonly : super::super::Foundation:: BOOL) -> i32); - SetupPromptReboot(core::mem::transmute(filequeue.unwrap_or(core::mem::zeroed())), core::mem::transmute(owner.unwrap_or(core::mem::zeroed())), scanonly.param().abi()) + SetupPromptReboot(core::mem::transmute(filequeue.unwrap_or(core::mem::zeroed())), core::mem::transmute(owner.unwrap_or(core::mem::zeroed())), scanonly.into()) } #[inline] pub unsafe fn SetupQueryDrivesInDiskSpaceListA(diskspace: *const core::ffi::c_void, returnbuffer: Option<&mut [u8]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> { @@ -3778,12 +3772,9 @@ pub unsafe fn SetupSetFileQueueFlags(filequeue: *const core::ffi::c_void, flagma SetupSetFileQueueFlags(core::mem::transmute(filequeue), core::mem::transmute(flagmask), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn SetupSetNonInteractiveMode(noninteractiveflag: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SetupSetNonInteractiveMode(noninteractiveflag: bool) -> super::super::Foundation::BOOL { windows_targets::link!("setupapi.dll" "system" fn SetupSetNonInteractiveMode(noninteractiveflag : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetupSetNonInteractiveMode(noninteractiveflag.param().abi()) + SetupSetNonInteractiveMode(noninteractiveflag.into()) } #[inline] pub unsafe fn SetupSetPlatformPathOverrideA(r#override: P0) -> windows_core::Result<()> @@ -5910,9 +5901,6 @@ pub const GUID_WUDF_DEVICE_HOST_PROBLEM: windows_core::GUID = windows_core::GUID #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HCMNOTIFICATION(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HCMNOTIFICATION { - type TypeKind = windows_core::CopyType; -} impl HCMNOTIFICATION { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -5935,9 +5923,6 @@ impl Default for HCMNOTIFICATION { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HDEVINFO(pub isize); -impl windows_core::TypeKind for HDEVINFO { - type TypeKind = windows_core::CopyType; -} impl HDEVINFO { pub fn is_invalid(&self) -> bool { self.0 == -1 || self.0 == 0 diff --git a/crates/libs/windows/src/Windows/Win32/Devices/DeviceQuery/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/DeviceQuery/mod.rs index 06703c2bee..8fa207fc7f 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/DeviceQuery/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/DeviceQuery/mod.rs @@ -393,9 +393,6 @@ pub const DevQueryStateInitialized: DEV_QUERY_STATE = DEV_QUERY_STATE(0i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HDEVQUERY(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HDEVQUERY { - type TypeKind = windows_core::CopyType; -} impl HDEVQUERY { pub fn is_invalid(&self) -> bool { self.0.is_null() diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Display/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Display/mod.rs index f6bf8baaaa..52b014f127 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Display/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Display/mod.rs @@ -24,12 +24,9 @@ pub unsafe fn CLIPOBJ_bEnum(pco: *mut CLIPOBJ, cj: u32, pul: *mut u32) -> super: CLIPOBJ_bEnum(core::mem::transmute(pco), core::mem::transmute(cj), core::mem::transmute(pul)) } #[inline] -pub unsafe fn CLIPOBJ_cEnumStart(pco: *mut CLIPOBJ, ball: P1, itype: u32, idirection: u32, climit: u32) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn CLIPOBJ_cEnumStart(pco: *mut CLIPOBJ, ball: bool, itype: u32, idirection: u32, climit: u32) -> u32 { windows_targets::link!("gdi32.dll" "system" fn CLIPOBJ_cEnumStart(pco : *mut CLIPOBJ, ball : super::super::Foundation:: BOOL, itype : u32, idirection : u32, climit : u32) -> u32); - CLIPOBJ_cEnumStart(core::mem::transmute(pco), ball.param().abi(), core::mem::transmute(itype), core::mem::transmute(idirection), core::mem::transmute(climit)) + CLIPOBJ_cEnumStart(core::mem::transmute(pco), ball.into(), core::mem::transmute(itype), core::mem::transmute(idirection), core::mem::transmute(climit)) } #[inline] pub unsafe fn CLIPOBJ_ppoGetPath(pco: *mut CLIPOBJ) -> *mut PATHOBJ { @@ -472,12 +469,9 @@ pub unsafe fn HT_Get8BPPFormatPalette(ppaletteentry: Option<*mut super::super::G } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn HT_Get8BPPMaskPalette(ppaletteentry: Option<*mut super::super::Graphics::Gdi::PALETTEENTRY>, use8bppmaskpal: P1, cmymask: u8, redgamma: u16, greengamma: u16, bluegamma: u16) -> i32 -where - P1: windows_core::Param, -{ +pub unsafe fn HT_Get8BPPMaskPalette(ppaletteentry: Option<*mut super::super::Graphics::Gdi::PALETTEENTRY>, use8bppmaskpal: bool, cmymask: u8, redgamma: u16, greengamma: u16, bluegamma: u16) -> i32 { windows_targets::link!("gdi32.dll" "system" fn HT_Get8BPPMaskPalette(ppaletteentry : *mut super::super::Graphics::Gdi:: PALETTEENTRY, use8bppmaskpal : super::super::Foundation:: BOOL, cmymask : u8, redgamma : u16, greengamma : u16, bluegamma : u16) -> i32); - HT_Get8BPPMaskPalette(core::mem::transmute(ppaletteentry.unwrap_or(core::mem::zeroed())), use8bppmaskpal.param().abi(), core::mem::transmute(cmymask), core::mem::transmute(redgamma), core::mem::transmute(greengamma), core::mem::transmute(bluegamma)) + HT_Get8BPPMaskPalette(core::mem::transmute(ppaletteentry.unwrap_or(core::mem::zeroed())), use8bppmaskpal.into(), core::mem::transmute(cmymask), core::mem::transmute(redgamma), core::mem::transmute(greengamma), core::mem::transmute(bluegamma)) } #[inline] pub unsafe fn PATHOBJ_bEnum(ppo: *mut PATHOBJ, ppd: *mut PATHDATA) -> super::super::Foundation::BOOL { @@ -1220,9 +1214,6 @@ pub const DEVPKEY_IndirectDisplay: super::super::Foundation::DEVPROPKEY = super: #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct DHPDEV(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for DHPDEV { - type TypeKind = windows_core::CopyType; -} impl DHPDEV { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1236,9 +1227,6 @@ impl Default for DHPDEV { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct DHSURF(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for DHSURF { - type TypeKind = windows_core::CopyType; -} impl DHSURF { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2744,9 +2732,6 @@ pub const GX_SCALE: i32 = 2i32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HBM(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HBM { - type TypeKind = windows_core::CopyType; -} impl HBM { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2760,9 +2745,6 @@ impl Default for HBM { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HDEV(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HDEV { - type TypeKind = windows_core::CopyType; -} impl HDEV { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2776,9 +2758,6 @@ impl Default for HDEV { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HDRVOBJ(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HDRVOBJ { - type TypeKind = windows_core::CopyType; -} impl HDRVOBJ { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2792,9 +2771,6 @@ impl Default for HDRVOBJ { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HFASTMUTEX(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HFASTMUTEX { - type TypeKind = windows_core::CopyType; -} impl HFASTMUTEX { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2836,9 +2812,6 @@ pub const HOST_DSI_TRANSMISSION_TIMEOUT: u32 = 64u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HSEMAPHORE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HSEMAPHORE { - type TypeKind = windows_core::CopyType; -} impl HSEMAPHORE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2861,9 +2834,6 @@ impl Default for HSEMAPHORE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HSURF(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HSURF { - type TypeKind = windows_core::CopyType; -} impl HSURF { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2947,11 +2917,8 @@ impl ICloneViewHelper { { (windows_core::Interface::vtable(self).SetActiveTopology)(windows_core::Interface::as_raw(self), wszadaptorname.param().abi(), core::mem::transmute(ulsourceid), core::mem::transmute(ulcount), core::mem::transmute(pultargetid)).ok() } - pub unsafe fn Commit(&self, ffinalcall: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Commit)(windows_core::Interface::as_raw(self), ffinalcall.param().abi()).ok() + pub unsafe fn Commit(&self, ffinalcall: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Commit)(windows_core::Interface::as_raw(self), ffinalcall.into()).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Enumeration/Pnp/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Enumeration/Pnp/mod.rs index 527c3b16f7..eb26e19d8c 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Enumeration/Pnp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Enumeration/Pnp/mod.rs @@ -31,23 +31,21 @@ where } #[cfg(feature = "Win32_Devices_Properties")] #[inline] -pub unsafe fn SwDeviceInterfaceRegister(hswdevice: HSWDEVICE, pinterfaceclassguid: *const windows_core::GUID, pszreferencestring: P2, pproperties: Option<&[super::super::Properties::DEVPROPERTY]>, fenabled: P5) -> windows_core::Result +pub unsafe fn SwDeviceInterfaceRegister(hswdevice: HSWDEVICE, pinterfaceclassguid: *const windows_core::GUID, pszreferencestring: P2, pproperties: Option<&[super::super::Properties::DEVPROPERTY]>, fenabled: bool) -> windows_core::Result where P2: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn SwDeviceInterfaceRegister(hswdevice : HSWDEVICE, pinterfaceclassguid : *const windows_core::GUID, pszreferencestring : windows_core::PCWSTR, cpropertycount : u32, pproperties : *const super::super::Properties:: DEVPROPERTY, fenabled : super::super::super::Foundation:: BOOL, ppszdeviceinterfaceid : *mut windows_core::PWSTR) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - SwDeviceInterfaceRegister(core::mem::transmute(hswdevice), core::mem::transmute(pinterfaceclassguid), pszreferencestring.param().abi(), pproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fenabled.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + SwDeviceInterfaceRegister(core::mem::transmute(hswdevice), core::mem::transmute(pinterfaceclassguid), pszreferencestring.param().abi(), pproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fenabled.into(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn SwDeviceInterfaceSetState(hswdevice: HSWDEVICE, pszdeviceinterfaceid: P1, fenabled: P2) -> windows_core::Result<()> +pub unsafe fn SwDeviceInterfaceSetState(hswdevice: HSWDEVICE, pszdeviceinterfaceid: P1, fenabled: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn SwDeviceInterfaceSetState(hswdevice : HSWDEVICE, pszdeviceinterfaceid : windows_core::PCWSTR, fenabled : super::super::super::Foundation:: BOOL) -> windows_core::HRESULT); - SwDeviceInterfaceSetState(core::mem::transmute(hswdevice), pszdeviceinterfaceid.param().abi(), fenabled.param().abi()).ok() + SwDeviceInterfaceSetState(core::mem::transmute(hswdevice), pszdeviceinterfaceid.param().abi(), fenabled.into()).ok() } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -76,9 +74,6 @@ pub const FAULT_INVALID_VARIABLE: u32 = 404u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HSWDEVICE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HSWDEVICE { - type TypeKind = windows_core::CopyType; -} impl HSWDEVICE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1327,11 +1322,8 @@ impl IUPnPRegistrar { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetUniqueDeviceName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrdeviceidentifier), core::mem::transmute_copy(bstrtemplateudn), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn UnregisterDevice(&self, bstrdeviceidentifier: &windows_core::BSTR, fpermanent: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).UnregisterDevice)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrdeviceidentifier), fpermanent.param().abi()).ok() + pub unsafe fn UnregisterDevice(&self, bstrdeviceidentifier: &windows_core::BSTR, fpermanent: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).UnregisterDevice)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrdeviceidentifier), fpermanent.into()).ok() } pub unsafe fn UnregisterDeviceProvider(&self, bstrprovidername: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UnregisterDeviceProvider)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprovidername)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Fax/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Fax/mod.rs index f37a8d28af..5333767808 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Fax/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Fax/mod.rs @@ -45,22 +45,20 @@ where FaxConnectFaxServerW(machinename.param().abi(), core::mem::transmute(faxhandle)).ok() } #[inline] -pub unsafe fn FaxEnableRoutingMethodA(faxporthandle: super::super::Foundation::HANDLE, routingguid: P1, enabled: P2) -> windows_core::Result<()> +pub unsafe fn FaxEnableRoutingMethodA(faxporthandle: super::super::Foundation::HANDLE, routingguid: P1, enabled: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("winfax.dll" "system" fn FaxEnableRoutingMethodA(faxporthandle : super::super::Foundation:: HANDLE, routingguid : windows_core::PCSTR, enabled : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - FaxEnableRoutingMethodA(core::mem::transmute(faxporthandle), routingguid.param().abi(), enabled.param().abi()).ok() + FaxEnableRoutingMethodA(core::mem::transmute(faxporthandle), routingguid.param().abi(), enabled.into()).ok() } #[inline] -pub unsafe fn FaxEnableRoutingMethodW(faxporthandle: super::super::Foundation::HANDLE, routingguid: P1, enabled: P2) -> windows_core::Result<()> +pub unsafe fn FaxEnableRoutingMethodW(faxporthandle: super::super::Foundation::HANDLE, routingguid: P1, enabled: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("winfax.dll" "system" fn FaxEnableRoutingMethodW(faxporthandle : super::super::Foundation:: HANDLE, routingguid : windows_core::PCWSTR, enabled : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - FaxEnableRoutingMethodW(core::mem::transmute(faxporthandle), routingguid.param().abi(), enabled.param().abi()).ok() + FaxEnableRoutingMethodW(core::mem::transmute(faxporthandle), routingguid.param().abi(), enabled.into()).ok() } #[inline] pub unsafe fn FaxEnumGlobalRoutingInfoA(faxhandle: super::super::Foundation::HANDLE, routinginfo: *mut *mut FAX_GLOBAL_ROUTING_INFOA, methodsreturned: *mut u32) -> windows_core::Result<()> { @@ -12716,12 +12714,11 @@ impl IStillImageW { { (windows_core::Interface::vtable(self).UnregisterLaunchApplication)(windows_core::Interface::as_raw(self), pwszappname.param().abi()).ok() } - pub unsafe fn EnableHwNotifications(&self, pwszdevicename: P0, bnewstate: P1) -> windows_core::Result<()> + pub unsafe fn EnableHwNotifications(&self, pwszdevicename: P0, bnewstate: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).EnableHwNotifications)(windows_core::Interface::as_raw(self), pwszdevicename.param().abi(), bnewstate.param().abi()).ok() + (windows_core::Interface::vtable(self).EnableHwNotifications)(windows_core::Interface::as_raw(self), pwszdevicename.param().abi(), bnewstate.into()).ok() } pub unsafe fn GetHwNotificationState(&self, pwszdevicename: P0) -> windows_core::Result where diff --git a/crates/libs/windows/src/Windows/Win32/Devices/FunctionDiscovery/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/FunctionDiscovery/mod.rs index 1b0453884f..d5fb44ff3b 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/FunctionDiscovery/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/FunctionDiscovery/mod.rs @@ -80,14 +80,13 @@ pub const FunctionInstanceCollection: windows_core::GUID = windows_core::GUID::f windows_core::imp::define_interface!(IFunctionDiscovery, IFunctionDiscovery_Vtbl, 0x4df99b70_e148_4432_b004_4c9eeb535a5e); windows_core::imp::interface_hierarchy!(IFunctionDiscovery, windows_core::IUnknown); impl IFunctionDiscovery { - pub unsafe fn GetInstanceCollection(&self, pszcategory: P0, pszsubcategory: P1, fincludeallsubcategories: P2) -> windows_core::Result + pub unsafe fn GetInstanceCollection(&self, pszcategory: P0, pszsubcategory: P1, fincludeallsubcategories: bool) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetInstanceCollection)(windows_core::Interface::as_raw(self), pszcategory.param().abi(), pszsubcategory.param().abi(), fincludeallsubcategories.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetInstanceCollection)(windows_core::Interface::as_raw(self), pszcategory.param().abi(), pszsubcategory.param().abi(), fincludeallsubcategories.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetInstance(&self, pszfunctioninstanceidentity: P0) -> windows_core::Result @@ -97,15 +96,14 @@ impl IFunctionDiscovery { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetInstance)(windows_core::Interface::as_raw(self), pszfunctioninstanceidentity.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CreateInstanceCollectionQuery(&self, pszcategory: P0, pszsubcategory: P1, fincludeallsubcategories: P2, pifunctiondiscoverynotification: P3, pfdqcquerycontext: *mut u64) -> windows_core::Result + pub unsafe fn CreateInstanceCollectionQuery(&self, pszcategory: P0, pszsubcategory: P1, fincludeallsubcategories: bool, pifunctiondiscoverynotification: P3, pfdqcquerycontext: *mut u64) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateInstanceCollectionQuery)(windows_core::Interface::as_raw(self), pszcategory.param().abi(), pszsubcategory.param().abi(), fincludeallsubcategories.param().abi(), pifunctiondiscoverynotification.param().abi(), core::mem::transmute(pfdqcquerycontext), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateInstanceCollectionQuery)(windows_core::Interface::as_raw(self), pszcategory.param().abi(), pszsubcategory.param().abi(), fincludeallsubcategories.into(), pifunctiondiscoverynotification.param().abi(), core::mem::transmute(pfdqcquerycontext), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateInstanceQuery(&self, pszfunctioninstanceidentity: P0, pifunctiondiscoverynotification: P1, pfdqcquerycontext: *mut u64) -> windows_core::Result where diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Geolocation/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Geolocation/mod.rs index 9deb5ee271..5fd756232c 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Geolocation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Geolocation/mod.rs @@ -1776,11 +1776,8 @@ impl ILocation { pub unsafe fn SetDesiredAccuracy(&self, reporttype: *const windows_core::GUID, desiredaccuracy: super::Sensors::LOCATION_DESIRED_ACCURACY) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetDesiredAccuracy)(windows_core::Interface::as_raw(self), core::mem::transmute(reporttype), core::mem::transmute(desiredaccuracy)).ok() } - pub unsafe fn RequestPermissions(&self, hparent: Option, preporttypes: &[windows_core::GUID], fmodal: P3) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).RequestPermissions)(windows_core::Interface::as_raw(self), core::mem::transmute(hparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(preporttypes.as_ptr()), preporttypes.len().try_into().unwrap(), fmodal.param().abi()).ok() + pub unsafe fn RequestPermissions(&self, hparent: Option, preporttypes: &[windows_core::GUID], fmodal: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RequestPermissions)(windows_core::Interface::as_raw(self), core::mem::transmute(hparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(preporttypes.as_ptr()), preporttypes.len().try_into().unwrap(), fmodal.into()).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Devices/HumanInterfaceDevice/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/HumanInterfaceDevice/mod.rs index 4d959d5114..f6214eed6d 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/HumanInterfaceDevice/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/HumanInterfaceDevice/mod.rs @@ -6953,9 +6953,6 @@ pub type PHIDP_INSERT_SCANCODES = Option(&self, bpreviewvisible: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPreviewVisible)(windows_core::Interface::as_raw(self), bpreviewvisible.param().abi()).ok() + pub unsafe fn SetPreviewVisible(&self, bpreviewvisible: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPreviewVisible)(windows_core::Interface::as_raw(self), bpreviewvisible.into()).ok() } pub unsafe fn ImagesDirectory(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3088,26 +3085,14 @@ impl IWiaVideo { pub unsafe fn SetImagesDirectory(&self, bstrimagedirectory: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetImagesDirectory)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrimagedirectory)).ok() } - pub unsafe fn CreateVideoByWiaDevID(&self, bstrwiadeviceid: &windows_core::BSTR, hwndparent: super::super::Foundation::HWND, bstretchtofitparent: P2, bautobeginplayback: P3) -> windows_core::Result<()> - where - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).CreateVideoByWiaDevID)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrwiadeviceid), core::mem::transmute(hwndparent), bstretchtofitparent.param().abi(), bautobeginplayback.param().abi()).ok() + pub unsafe fn CreateVideoByWiaDevID(&self, bstrwiadeviceid: &windows_core::BSTR, hwndparent: super::super::Foundation::HWND, bstretchtofitparent: bool, bautobeginplayback: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CreateVideoByWiaDevID)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrwiadeviceid), core::mem::transmute(hwndparent), bstretchtofitparent.into(), bautobeginplayback.into()).ok() } - pub unsafe fn CreateVideoByDevNum(&self, uidevicenumber: u32, hwndparent: super::super::Foundation::HWND, bstretchtofitparent: P2, bautobeginplayback: P3) -> windows_core::Result<()> - where - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).CreateVideoByDevNum)(windows_core::Interface::as_raw(self), core::mem::transmute(uidevicenumber), core::mem::transmute(hwndparent), bstretchtofitparent.param().abi(), bautobeginplayback.param().abi()).ok() + pub unsafe fn CreateVideoByDevNum(&self, uidevicenumber: u32, hwndparent: super::super::Foundation::HWND, bstretchtofitparent: bool, bautobeginplayback: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CreateVideoByDevNum)(windows_core::Interface::as_raw(self), core::mem::transmute(uidevicenumber), core::mem::transmute(hwndparent), bstretchtofitparent.into(), bautobeginplayback.into()).ok() } - pub unsafe fn CreateVideoByName(&self, bstrfriendlyname: &windows_core::BSTR, hwndparent: super::super::Foundation::HWND, bstretchtofitparent: P2, bautobeginplayback: P3) -> windows_core::Result<()> - where - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).CreateVideoByName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrfriendlyname), core::mem::transmute(hwndparent), bstretchtofitparent.param().abi(), bautobeginplayback.param().abi()).ok() + pub unsafe fn CreateVideoByName(&self, bstrfriendlyname: &windows_core::BSTR, hwndparent: super::super::Foundation::HWND, bstretchtofitparent: bool, bautobeginplayback: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CreateVideoByName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrfriendlyname), core::mem::transmute(hwndparent), bstretchtofitparent.into(), bautobeginplayback.into()).ok() } pub unsafe fn DestroyVideo(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DestroyVideo)(windows_core::Interface::as_raw(self)).ok() @@ -3122,11 +3107,8 @@ impl IWiaVideo { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).TakePicture)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn ResizeVideo(&self, bstretchtofitparent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ResizeVideo)(windows_core::Interface::as_raw(self), bstretchtofitparent.param().abi()).ok() + pub unsafe fn ResizeVideo(&self, bstretchtofitparent: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ResizeVideo)(windows_core::Interface::as_raw(self), bstretchtofitparent.into()).ok() } pub unsafe fn GetCurrentState(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Win32/Devices/PortableDevices/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/PortableDevices/mod.rs index cbdc7deb06..f7e7852853 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/PortableDevices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/PortableDevices/mod.rs @@ -2712,11 +2712,8 @@ impl IPortableDeviceValues { pub unsafe fn GetKeyValue(&self, key: *const super::super::Foundation::PROPERTYKEY, pvalue: *mut super::super::Foundation::PROPERTYKEY) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetKeyValue)(windows_core::Interface::as_raw(self), core::mem::transmute(key), core::mem::transmute(pvalue)).ok() } - pub unsafe fn SetBoolValue(&self, key: *const super::super::Foundation::PROPERTYKEY, value: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBoolValue)(windows_core::Interface::as_raw(self), core::mem::transmute(key), value.param().abi()).ok() + pub unsafe fn SetBoolValue(&self, key: *const super::super::Foundation::PROPERTYKEY, value: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBoolValue)(windows_core::Interface::as_raw(self), core::mem::transmute(key), value.into()).ok() } pub unsafe fn GetBoolValue(&self, key: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result { let mut result__ = core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Properties/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Properties/mod.rs index 3bc2522f4d..50eff66cdd 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Properties/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Properties/mod.rs @@ -231,9 +231,6 @@ pub struct DEVPROPTYPE(pub u32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct DEVPROP_BOOLEAN(pub u8); -impl windows_core::TypeKind for DEVPROP_BOOLEAN { - type TypeKind = windows_core::CopyType; -} pub const DEVPROP_FALSE: DEVPROP_BOOLEAN = DEVPROP_BOOLEAN(0u8); pub const DEVPROP_MASK_TYPE: u32 = 4095u32; pub const DEVPROP_MASK_TYPEMOD: u32 = 61440u32; diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Sensors/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Sensors/mod.rs index fa52eafdba..3dc52d0039 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Sensors/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Sensors/mod.rs @@ -178,12 +178,9 @@ pub unsafe fn PropKeyFindKeyGetNthUshort(plist: *const SENSOR_COLLECTION_LIST, p } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] -pub unsafe fn PropKeyFindKeyGetPropVariant(plist: *const SENSOR_COLLECTION_LIST, pkey: *const super::super::Foundation::PROPERTYKEY, typecheck: P2, pvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> super::super::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn PropKeyFindKeyGetPropVariant(plist: *const SENSOR_COLLECTION_LIST, pkey: *const super::super::Foundation::PROPERTYKEY, typecheck: bool, pvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> super::super::Foundation::NTSTATUS { windows_targets::link!("sensorsutilsv2.dll" "system" fn PropKeyFindKeyGetPropVariant(plist : *const SENSOR_COLLECTION_LIST, pkey : *const super::super::Foundation:: PROPERTYKEY, typecheck : super::super::Foundation:: BOOLEAN, pvalue : *mut super::super::System::Com::StructuredStorage:: PROPVARIANT) -> super::super::Foundation:: NTSTATUS); - PropKeyFindKeyGetPropVariant(core::mem::transmute(plist), core::mem::transmute(pkey), typecheck.param().abi(), core::mem::transmute(pvalue)) + PropKeyFindKeyGetPropVariant(core::mem::transmute(plist), core::mem::transmute(pkey), typecheck.into(), core::mem::transmute(pvalue)) } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] @@ -199,12 +196,9 @@ pub unsafe fn PropKeyFindKeyGetUshort(plist: *const SENSOR_COLLECTION_LIST, pkey } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] -pub unsafe fn PropKeyFindKeySetPropVariant(plist: *mut SENSOR_COLLECTION_LIST, pkey: *const super::super::Foundation::PROPERTYKEY, typecheck: P2, pvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> super::super::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn PropKeyFindKeySetPropVariant(plist: *mut SENSOR_COLLECTION_LIST, pkey: *const super::super::Foundation::PROPERTYKEY, typecheck: bool, pvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> super::super::Foundation::NTSTATUS { windows_targets::link!("sensorsutilsv2.dll" "system" fn PropKeyFindKeySetPropVariant(plist : *mut SENSOR_COLLECTION_LIST, pkey : *const super::super::Foundation:: PROPERTYKEY, typecheck : super::super::Foundation:: BOOLEAN, pvalue : *const super::super::System::Com::StructuredStorage:: PROPVARIANT) -> super::super::Foundation:: NTSTATUS); - PropKeyFindKeySetPropVariant(core::mem::transmute(plist), core::mem::transmute(pkey), typecheck.param().abi(), core::mem::transmute(pvalue)) + PropKeyFindKeySetPropVariant(core::mem::transmute(plist), core::mem::transmute(pkey), typecheck.into(), core::mem::transmute(pvalue)) } #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] @@ -935,12 +929,11 @@ impl ISensorManager { { (windows_core::Interface::vtable(self).SetEventSink)(windows_core::Interface::as_raw(self), pevents.param().abi()).ok() } - pub unsafe fn RequestPermissions(&self, hparent: super::super::Foundation::HWND, psensors: P1, fmodal: P2) -> windows_core::Result<()> + pub unsafe fn RequestPermissions(&self, hparent: super::super::Foundation::HWND, psensors: P1, fmodal: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).RequestPermissions)(windows_core::Interface::as_raw(self), core::mem::transmute(hparent), psensors.param().abi(), fmodal.param().abi()).ok() + (windows_core::Interface::vtable(self).RequestPermissions)(windows_core::Interface::as_raw(self), core::mem::transmute(hparent), psensors.param().abi(), fmodal.into()).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Devices/SerialCommunication/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/SerialCommunication/mod.rs index bf6aeca69c..85f18e2c63 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/SerialCommunication/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/SerialCommunication/mod.rs @@ -4,12 +4,9 @@ pub unsafe fn ComDBClaimNextFreePort(hcomdb: HCOMDB, comnumber: *mut u32) -> i32 ComDBClaimNextFreePort(core::mem::transmute(hcomdb), core::mem::transmute(comnumber)) } #[inline] -pub unsafe fn ComDBClaimPort(hcomdb: HCOMDB, comnumber: u32, forceclaim: P2, forced: Option<*mut super::super::Foundation::BOOL>) -> i32 -where - P2: windows_core::Param, -{ +pub unsafe fn ComDBClaimPort(hcomdb: HCOMDB, comnumber: u32, forceclaim: bool, forced: Option<*mut super::super::Foundation::BOOL>) -> i32 { windows_targets::link!("msports.dll" "system" fn ComDBClaimPort(hcomdb : HCOMDB, comnumber : u32, forceclaim : super::super::Foundation:: BOOL, forced : *mut super::super::Foundation:: BOOL) -> i32); - ComDBClaimPort(core::mem::transmute(hcomdb), core::mem::transmute(comnumber), forceclaim.param().abi(), core::mem::transmute(forced.unwrap_or(core::mem::zeroed()))) + ComDBClaimPort(core::mem::transmute(hcomdb), core::mem::transmute(comnumber), forceclaim.into(), core::mem::transmute(forced.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ComDBClose(hcomdb: HCOMDB) -> i32 { @@ -47,9 +44,6 @@ pub const EVEN_PARITY: u32 = 2u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HCOMDB(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HCOMDB { - type TypeKind = windows_core::CopyType; -} impl HCOMDB { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Tapi/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Tapi/mod.rs index b5ac2c794a..f607bfd878 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Tapi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Tapi/mod.rs @@ -1977,9 +1977,6 @@ pub const GETTNEFSTREAMCODEPAGE: windows_core::PCSTR = windows_core::s!("GetTnef #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HDRVCALL(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HDRVCALL { - type TypeKind = windows_core::CopyType; -} impl HDRVCALL { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -1993,9 +1990,6 @@ impl Default for HDRVCALL { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HDRVDIALOGINSTANCE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HDRVDIALOGINSTANCE { - type TypeKind = windows_core::CopyType; -} impl HDRVDIALOGINSTANCE { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -2009,9 +2003,6 @@ impl Default for HDRVDIALOGINSTANCE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HDRVLINE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HDRVLINE { - type TypeKind = windows_core::CopyType; -} impl HDRVLINE { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -2025,9 +2016,6 @@ impl Default for HDRVLINE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HDRVMSPLINE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HDRVMSPLINE { - type TypeKind = windows_core::CopyType; -} impl HDRVMSPLINE { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -2041,9 +2029,6 @@ impl Default for HDRVMSPLINE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HDRVPHONE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HDRVPHONE { - type TypeKind = windows_core::CopyType; -} impl HDRVPHONE { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -2057,9 +2042,6 @@ impl Default for HDRVPHONE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HPROVIDER(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HPROVIDER { - type TypeKind = windows_core::CopyType; -} impl HPROVIDER { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -2073,9 +2055,6 @@ impl Default for HPROVIDER { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HTAPICALL(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HTAPICALL { - type TypeKind = windows_core::CopyType; -} impl HTAPICALL { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -2089,9 +2068,6 @@ impl Default for HTAPICALL { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HTAPILINE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HTAPILINE { - type TypeKind = windows_core::CopyType; -} impl HTAPILINE { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -2105,9 +2081,6 @@ impl Default for HTAPILINE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HTAPIPHONE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HTAPIPHONE { - type TypeKind = windows_core::CopyType; -} impl HTAPIPHONE { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -6709,11 +6682,8 @@ impl ITAllocatorProperties { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetAllocatorProperties)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAllocateBuffers(&self, ballocbuffers: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllocateBuffers)(windows_core::Interface::as_raw(self), ballocbuffers.param().abi()).ok() + pub unsafe fn SetAllocateBuffers(&self, ballocbuffers: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllocateBuffers)(windows_core::Interface::as_raw(self), ballocbuffers.into()).ok() } pub unsafe fn GetAllocateBuffers(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Usb/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Usb/mod.rs index d86b130be3..3544d014d0 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Usb/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Usb/mod.rs @@ -51,12 +51,9 @@ pub unsafe fn WinUsb_GetDescriptor(interfacehandle: WINUSB_INTERFACE_HANDLE, des } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WinUsb_GetOverlappedResult(interfacehandle: WINUSB_INTERFACE_HANDLE, lpoverlapped: *const super::super::System::IO::OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: P3) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn WinUsb_GetOverlappedResult(interfacehandle: WINUSB_INTERFACE_HANDLE, lpoverlapped: *const super::super::System::IO::OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: bool) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_GetOverlappedResult(interfacehandle : WINUSB_INTERFACE_HANDLE, lpoverlapped : *const super::super::System::IO:: OVERLAPPED, lpnumberofbytestransferred : *mut u32, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WinUsb_GetOverlappedResult(core::mem::transmute(interfacehandle), core::mem::transmute(lpoverlapped), core::mem::transmute(lpnumberofbytestransferred), bwait.param().abi()).ok() + WinUsb_GetOverlappedResult(core::mem::transmute(interfacehandle), core::mem::transmute(lpoverlapped), core::mem::transmute(lpnumberofbytestransferred), bwait.into()).ok() } #[inline] pub unsafe fn WinUsb_GetPipePolicy(interfacehandle: WINUSB_INTERFACE_HANDLE, pipeid: u8, policytype: WINUSB_PIPE_POLICY, valuelength: *mut u32, value: *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -111,12 +108,9 @@ pub unsafe fn WinUsb_ReadIsochPipe(bufferhandle: *const core::ffi::c_void, offse } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WinUsb_ReadIsochPipeAsap(bufferhandle: *const core::ffi::c_void, offset: u32, length: u32, continuestream: P3, isopacketdescriptors: &mut [USBD_ISO_PACKET_DESCRIPTOR], overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn WinUsb_ReadIsochPipeAsap(bufferhandle: *const core::ffi::c_void, offset: u32, length: u32, continuestream: bool, isopacketdescriptors: &mut [USBD_ISO_PACKET_DESCRIPTOR], overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_ReadIsochPipeAsap(bufferhandle : *const core::ffi::c_void, offset : u32, length : u32, continuestream : super::super::Foundation:: BOOL, numberofpackets : u32, isopacketdescriptors : *mut USBD_ISO_PACKET_DESCRIPTOR, overlapped : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - WinUsb_ReadIsochPipeAsap(core::mem::transmute(bufferhandle), core::mem::transmute(offset), core::mem::transmute(length), continuestream.param().abi(), isopacketdescriptors.len().try_into().unwrap(), core::mem::transmute(isopacketdescriptors.as_ptr()), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() + WinUsb_ReadIsochPipeAsap(core::mem::transmute(bufferhandle), core::mem::transmute(offset), core::mem::transmute(length), continuestream.into(), isopacketdescriptors.len().try_into().unwrap(), core::mem::transmute(isopacketdescriptors.as_ptr()), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -172,12 +166,9 @@ pub unsafe fn WinUsb_WriteIsochPipe(bufferhandle: *const core::ffi::c_void, offs } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WinUsb_WriteIsochPipeAsap(bufferhandle: *const core::ffi::c_void, offset: u32, length: u32, continuestream: P3, overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn WinUsb_WriteIsochPipeAsap(bufferhandle: *const core::ffi::c_void, offset: u32, length: u32, continuestream: bool, overlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { windows_targets::link!("winusb.dll" "system" fn WinUsb_WriteIsochPipeAsap(bufferhandle : *const core::ffi::c_void, offset : u32, length : u32, continuestream : super::super::Foundation:: BOOL, overlapped : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - WinUsb_WriteIsochPipeAsap(core::mem::transmute(bufferhandle), core::mem::transmute(offset), core::mem::transmute(length), continuestream.param().abi(), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() + WinUsb_WriteIsochPipeAsap(core::mem::transmute(bufferhandle), core::mem::transmute(offset), core::mem::transmute(length), continuestream.into(), core::mem::transmute(overlapped.unwrap_or(core::mem::zeroed()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -1525,9 +1516,6 @@ impl Default for USB_BUS_STATISTICS_0 { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct USB_CHANGE_REGISTRATION_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for USB_CHANGE_REGISTRATION_HANDLE { - type TypeKind = windows_core::CopyType; -} impl USB_CHANGE_REGISTRATION_HANDLE { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -3650,9 +3638,6 @@ pub struct WDMUSB_POWER_STATE(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct WINUSB_INTERFACE_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for WINUSB_INTERFACE_HANDLE { - type TypeKind = windows_core::CopyType; -} impl WINUSB_INTERFACE_HANDLE { pub fn is_invalid(&self) -> bool { self.0.is_null() diff --git a/crates/libs/windows/src/Windows/Win32/Devices/WebServicesOnDevices/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/WebServicesOnDevices/mod.rs index e89578e1f3..8d27a73c1f 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/WebServicesOnDevices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/WebServicesOnDevices/mod.rs @@ -245,11 +245,8 @@ pub const DirectedDiscovery: DeviceDiscoveryMechanism = DeviceDiscoveryMechanism windows_core::imp::define_interface!(IWSDAddress, IWSDAddress_Vtbl, 0xb9574c6c_12a6_4f74_93a1_3318ff605759); windows_core::imp::interface_hierarchy!(IWSDAddress, windows_core::IUnknown); impl IWSDAddress { - pub unsafe fn Serialize(&self, pszbuffer: &mut [u16], fsafe: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap(), fsafe.param().abi()).ok() + pub unsafe fn Serialize(&self, pszbuffer: &mut [u16], fsafe: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap(), fsafe.into()).ok() } pub unsafe fn Deserialize(&self, pszbuffer: P0) -> windows_core::Result<()> where @@ -501,12 +498,11 @@ impl IWSDDeviceHost { { (windows_core::Interface::vtable(self).RemoveDynamicService)(windows_core::Interface::as_raw(self), pszserviceid.param().abi()).ok() } - pub unsafe fn SetServiceDiscoverable(&self, pszserviceid: P0, fdiscoverable: P1) -> windows_core::Result<()> + pub unsafe fn SetServiceDiscoverable(&self, pszserviceid: P0, fdiscoverable: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetServiceDiscoverable)(windows_core::Interface::as_raw(self), pszserviceid.param().abi(), fdiscoverable.param().abi()).ok() + (windows_core::Interface::vtable(self).SetServiceDiscoverable)(windows_core::Interface::as_raw(self), pszserviceid.param().abi(), fdiscoverable.into()).ok() } pub unsafe fn SignalEvent(&self, pszserviceid: P0, pbody: Option<*const core::ffi::c_void>, poperation: *const WSD_OPERATION) -> windows_core::Result<()> where @@ -1035,11 +1031,8 @@ impl IWSDHttpAddress { pub unsafe fn GetSecure(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetSecure)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetSecure(&self, fsecure: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSecure)(windows_core::Interface::as_raw(self), fsecure.param().abi()).ok() + pub unsafe fn SetSecure(&self, fsecure: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSecure)(windows_core::Interface::as_raw(self), fsecure.into()).ok() } pub unsafe fn GetPath(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2169,12 +2162,9 @@ impl IWSDTransportAddress { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetTransportAddress)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn GetTransportAddressEx(&self, fsafe: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetTransportAddressEx(&self, fsafe: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetTransportAddressEx)(windows_core::Interface::as_raw(self), fsafe.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetTransportAddressEx)(windows_core::Interface::as_raw(self), fsafe.into(), &mut result__).map(|| result__) } pub unsafe fn SetTransportAddress(&self, pszaddress: P0) -> windows_core::Result<()> where @@ -2270,11 +2260,8 @@ impl IWSDUdpAddress { pub unsafe fn GetSockaddr(&self, psockaddr: *mut super::super::Networking::WinSock::SOCKADDR_STORAGE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetSockaddr)(windows_core::Interface::as_raw(self), core::mem::transmute(psockaddr)).ok() } - pub unsafe fn SetExclusive(&self, fexclusive: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetExclusive)(windows_core::Interface::as_raw(self), fexclusive.param().abi()).ok() + pub unsafe fn SetExclusive(&self, fexclusive: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetExclusive)(windows_core::Interface::as_raw(self), fexclusive.into()).ok() } pub unsafe fn GetExclusive(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetExclusive)(windows_core::Interface::as_raw(self)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Foundation/mod.rs b/crates/libs/windows/src/Windows/Win32/Foundation/mod.rs index 5e19247afa..2715e52fed 100644 --- a/crates/libs/windows/src/Windows/Win32/Foundation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Foundation/mod.rs @@ -9,12 +9,9 @@ pub unsafe fn CompareObjectHandles(hfirstobjecthandle: HANDLE, hsecondobjecthand CompareObjectHandles(core::mem::transmute(hfirstobjecthandle), core::mem::transmute(hsecondobjecthandle)) } #[inline] -pub unsafe fn DuplicateHandle(hsourceprocesshandle: HANDLE, hsourcehandle: HANDLE, htargetprocesshandle: HANDLE, lptargethandle: *mut HANDLE, dwdesiredaccess: u32, binherithandle: P5, dwoptions: DUPLICATE_HANDLE_OPTIONS) -> windows_core::Result<()> -where - P5: windows_core::Param, -{ +pub unsafe fn DuplicateHandle(hsourceprocesshandle: HANDLE, hsourcehandle: HANDLE, htargetprocesshandle: HANDLE, lptargethandle: *mut HANDLE, dwdesiredaccess: u32, binherithandle: bool, dwoptions: DUPLICATE_HANDLE_OPTIONS) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn DuplicateHandle(hsourceprocesshandle : HANDLE, hsourcehandle : HANDLE, htargetprocesshandle : HANDLE, lptargethandle : *mut HANDLE, dwdesiredaccess : u32, binherithandle : BOOL, dwoptions : DUPLICATE_HANDLE_OPTIONS) -> BOOL); - DuplicateHandle(core::mem::transmute(hsourceprocesshandle), core::mem::transmute(hsourcehandle), core::mem::transmute(htargetprocesshandle), core::mem::transmute(lptargethandle), core::mem::transmute(dwdesiredaccess), binherithandle.param().abi(), core::mem::transmute(dwoptions)).ok() + DuplicateHandle(core::mem::transmute(hsourceprocesshandle), core::mem::transmute(hsourcehandle), core::mem::transmute(htargetprocesshandle), core::mem::transmute(lptargethandle), core::mem::transmute(dwdesiredaccess), binherithandle.into(), core::mem::transmute(dwoptions)).ok() } #[inline] pub unsafe fn FreeLibrary(hlibmodule: HMODULE) -> windows_core::Result<()> { @@ -170,15 +167,9 @@ pub const APP_LOCAL_DEVICE_ID_SIZE: u32 = 32u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct BOOL(pub i32); -impl windows_core::TypeKind for BOOL { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct BOOLEAN(pub u8); -impl windows_core::TypeKind for BOOLEAN { - type TypeKind = windows_core::CopyType; -} pub const BT_E_SPURIOUS_ACTIVATION: windows_core::HRESULT = windows_core::HRESULT(0x80080300_u32 as _); pub const CACHE_E_FIRST: i32 = -2147221136i32; pub const CACHE_E_LAST: i32 = -2147221121i32; @@ -333,9 +324,6 @@ pub const CLIPBRD_S_LAST: i32 = 262623i32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct COLORREF(pub u32); -impl windows_core::TypeKind for COLORREF { - type TypeKind = windows_core::CopyType; -} pub const COMADMIN_E_ALREADYINSTALLED: windows_core::HRESULT = windows_core::HRESULT(0x80110404_u32 as _); pub const COMADMIN_E_AMBIGUOUS_APPLICATION_NAME: windows_core::HRESULT = windows_core::HRESULT(0x8011045C_u32 as _); pub const COMADMIN_E_AMBIGUOUS_PARTITION_NAME: windows_core::HRESULT = windows_core::HRESULT(0x8011045D_u32 as _); @@ -5333,9 +5321,6 @@ pub const GENERIC_WRITE: GENERIC_ACCESS_RIGHTS = GENERIC_ACCESS_RIGHTS(107374182 #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HANDLE { - type TypeKind = windows_core::CopyType; -} impl HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -5396,9 +5381,6 @@ pub const HANDLE_FLAG_PROTECT_FROM_CLOSE: HANDLE_FLAGS = HANDLE_FLAGS(2u32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HANDLE_PTR(pub usize); -impl windows_core::TypeKind for HANDLE_PTR { - type TypeKind = windows_core::CopyType; -} pub const HCN_E_ADAPTER_NOT_FOUND: windows_core::HRESULT = windows_core::HRESULT(0x803B0006_u32 as _); pub const HCN_E_ADDR_INVALID_OR_RESERVED: windows_core::HRESULT = windows_core::HRESULT(0x803B002F_u32 as _); pub const HCN_E_DEGRADED_OPERATION: windows_core::HRESULT = windows_core::HRESULT(0x803B0017_u32 as _); @@ -5480,9 +5462,6 @@ pub const HCS_E_WINDOWS_INSIDER_REQUIRED: windows_core::HRESULT = windows_core:: #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HGLOBAL(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HGLOBAL { - type TypeKind = windows_core::CopyType; -} impl HGLOBAL { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -5505,9 +5484,6 @@ impl Default for HGLOBAL { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HINSTANCE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HINSTANCE { - type TypeKind = windows_core::CopyType; -} impl HINSTANCE { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -5536,9 +5512,6 @@ impl From for HMODULE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HLOCAL(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HLOCAL { - type TypeKind = windows_core::CopyType; -} impl HLOCAL { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -5561,9 +5534,6 @@ impl Default for HLOCAL { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HLSURF(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HLSURF { - type TypeKind = windows_core::CopyType; -} impl HLSURF { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -5577,9 +5547,6 @@ impl Default for HLSURF { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HMODULE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HMODULE { - type TypeKind = windows_core::CopyType; -} impl HMODULE { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -5608,9 +5575,6 @@ impl From for HINSTANCE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HRSRC(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HRSRC { - type TypeKind = windows_core::CopyType; -} impl HRSRC { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -5624,9 +5588,6 @@ impl Default for HRSRC { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HSPRITE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HSPRITE { - type TypeKind = windows_core::CopyType; -} impl HSPRITE { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -5668,9 +5629,6 @@ pub const HSP_KSP_PARAMETER_NOT_SET: windows_core::HRESULT = windows_core::HRESU #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HSTR(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HSTR { - type TypeKind = windows_core::CopyType; -} impl HSTR { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -5719,9 +5677,6 @@ pub const HTTP_E_STATUS_VERSION_NOT_SUP: windows_core::HRESULT = windows_core::H #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HUMPD(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HUMPD { - type TypeKind = windows_core::CopyType; -} impl HUMPD { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -5735,9 +5690,6 @@ impl Default for HUMPD { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HWND(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HWND { - type TypeKind = windows_core::CopyType; -} impl HWND { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -5876,15 +5828,9 @@ pub const LANGUAGE_S_LARGE_WORD: windows_core::HRESULT = windows_core::HRESULT(0 #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct LPARAM(pub isize); -impl windows_core::TypeKind for LPARAM { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct LRESULT(pub isize); -impl windows_core::TypeKind for LRESULT { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct LUID { @@ -6172,9 +6118,6 @@ pub const NTE_VALIDATION_FAILED: windows_core::HRESULT = windows_core::HRESULT(0 #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct NTSTATUS(pub i32); -impl windows_core::TypeKind for NTSTATUS { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct NTSTATUS_FACILITY_CODE(pub u32); @@ -7030,9 +6973,6 @@ pub const SEVERITY_SUCCESS: u32 = 0u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct SHANDLE_PTR(pub isize); -impl windows_core::TypeKind for SHANDLE_PTR { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct SIZE { @@ -10589,9 +10529,6 @@ pub const UTC_E_WINRT_INIT_FAILED: windows_core::HRESULT = windows_core::HRESULT #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct VARIANT_BOOL(pub i16); -impl windows_core::TypeKind for VARIANT_BOOL { - type TypeKind = windows_core::CopyType; -} pub const VARIANT_FALSE: VARIANT_BOOL = VARIANT_BOOL(0i16); pub const VARIANT_TRUE: VARIANT_BOOL = VARIANT_BOOL(-1i16); pub const VIEW_E_DRAW: windows_core::HRESULT = windows_core::HRESULT(0x80040140_u32 as _); @@ -10809,9 +10746,6 @@ pub const WINVER_MAXVER: u32 = 2560u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct WPARAM(pub usize); -impl windows_core::TypeKind for WPARAM { - type TypeKind = windows_core::CopyType; -} pub const WPN_E_ACCESS_DENIED: windows_core::HRESULT = windows_core::HRESULT(0x803E0117_u32 as _); pub const WPN_E_ALL_URL_NOT_COMPLETED: windows_core::HRESULT = windows_core::HRESULT(0x803E0203_u32 as _); pub const WPN_E_CALLBACK_ALREADY_REGISTERED: windows_core::HRESULT = windows_core::HRESULT(0x803E0206_u32 as _); diff --git a/crates/libs/windows/src/Windows/Win32/Gaming/mod.rs b/crates/libs/windows/src/Windows/Win32/Gaming/mod.rs index 872fb766a3..0653e12d54 100644 --- a/crates/libs/windows/src/Windows/Win32/Gaming/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Gaming/mod.rs @@ -45,12 +45,9 @@ pub unsafe fn HasExpandedResources() -> windows_core::Result(waitforcompletion: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn ProcessPendingGameUI(waitforcompletion: bool) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-0.dll" "system" fn ProcessPendingGameUI(waitforcompletion : super::Foundation:: BOOL) -> windows_core::HRESULT); - ProcessPendingGameUI(waitforcompletion.param().abi()).ok() + ProcessPendingGameUI(waitforcompletion.into()).ok() } #[inline] pub unsafe fn ReleaseExclusiveCpuSets() -> windows_core::Result<()> { @@ -442,11 +439,8 @@ impl IGameStatistics { { (windows_core::Interface::vtable(self).SetStatistic)(windows_core::Interface::as_raw(self), core::mem::transmute(categoryindex), core::mem::transmute(statindex), name.param().abi(), value.param().abi()).ok() } - pub unsafe fn Save(&self, trackchanges: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), trackchanges.param().abi()).ok() + pub unsafe fn Save(&self, trackchanges: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), trackchanges.into()).ok() } pub unsafe fn SetLastPlayedCategory(&self, categoryindex: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetLastPlayedCategory)(windows_core::Interface::as_raw(self), core::mem::transmute(categoryindex)).ok() @@ -674,7 +668,7 @@ impl IXblIdpAuthManager { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetSandbox)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn GetTokenAndSignatureWithTokenResult(&self, msaaccountid: P0, appsid: P1, msatarget: P2, msapolicy: P3, httpmethod: P4, uri: P5, headers: P6, body: &[u8], forcerefresh: P9) -> windows_core::Result + pub unsafe fn GetTokenAndSignatureWithTokenResult(&self, msaaccountid: P0, appsid: P1, msatarget: P2, msapolicy: P3, httpmethod: P4, uri: P5, headers: P6, body: &[u8], forcerefresh: bool) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, @@ -683,10 +677,9 @@ impl IXblIdpAuthManager { P4: windows_core::Param, P5: windows_core::Param, P6: windows_core::Param, - P9: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetTokenAndSignatureWithTokenResult)(windows_core::Interface::as_raw(self), msaaccountid.param().abi(), appsid.param().abi(), msatarget.param().abi(), msapolicy.param().abi(), httpmethod.param().abi(), uri.param().abi(), headers.param().abi(), core::mem::transmute(body.as_ptr()), body.len().try_into().unwrap(), forcerefresh.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetTokenAndSignatureWithTokenResult)(windows_core::Interface::as_raw(self), msaaccountid.param().abi(), appsid.param().abi(), msatarget.param().abi(), msapolicy.param().abi(), httpmethod.param().abi(), uri.param().abi(), headers.param().abi(), core::mem::transmute(body.as_ptr()), body.len().try_into().unwrap(), forcerefresh.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -769,7 +762,7 @@ impl windows_core::RuntimeName for IXblIdpAuthManager {} windows_core::imp::define_interface!(IXblIdpAuthManager2, IXblIdpAuthManager2_Vtbl, 0xbf8c0950_8389_43dd_9a76_a19728ec5dc5); windows_core::imp::interface_hierarchy!(IXblIdpAuthManager2, windows_core::IUnknown); impl IXblIdpAuthManager2 { - pub unsafe fn GetUserlessTokenAndSignatureWithTokenResult(&self, appsid: P0, msatarget: P1, msapolicy: P2, httpmethod: P3, uri: P4, headers: P5, body: &[u8], forcerefresh: P8) -> windows_core::Result + pub unsafe fn GetUserlessTokenAndSignatureWithTokenResult(&self, appsid: P0, msatarget: P1, msapolicy: P2, httpmethod: P3, uri: P4, headers: P5, body: &[u8], forcerefresh: bool) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, @@ -777,10 +770,9 @@ impl IXblIdpAuthManager2 { P3: windows_core::Param, P4: windows_core::Param, P5: windows_core::Param, - P8: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetUserlessTokenAndSignatureWithTokenResult)(windows_core::Interface::as_raw(self), appsid.param().abi(), msatarget.param().abi(), msapolicy.param().abi(), httpmethod.param().abi(), uri.param().abi(), headers.param().abi(), core::mem::transmute(body.as_ptr()), body.len().try_into().unwrap(), forcerefresh.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetUserlessTokenAndSignatureWithTokenResult)(windows_core::Interface::as_raw(self), appsid.param().abi(), msatarget.param().abi(), msapolicy.param().abi(), httpmethod.param().abi(), uri.param().abi(), headers.param().abi(), core::mem::transmute(body.as_ptr()), body.len().try_into().unwrap(), forcerefresh.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs b/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs index f4d6709a04..8faf961c58 100644 --- a/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs @@ -17,12 +17,9 @@ where CompareStringEx(lplocalename.param().abi(), core::mem::transmute(dwcmpflags), core::mem::transmute(lpstring1.as_ptr()), lpstring1.len().try_into().unwrap(), core::mem::transmute(lpstring2.as_ptr()), lpstring2.len().try_into().unwrap(), core::mem::transmute(lpversioninformation.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(lparam.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CompareStringOrdinal(lpstring1: &[u16], lpstring2: &[u16], bignorecase: P4) -> COMPARESTRING_RESULT -where - P4: windows_core::Param, -{ +pub unsafe fn CompareStringOrdinal(lpstring1: &[u16], lpstring2: &[u16], bignorecase: bool) -> COMPARESTRING_RESULT { windows_targets::link!("kernel32.dll" "system" fn CompareStringOrdinal(lpstring1 : windows_core::PCWSTR, cchcount1 : i32, lpstring2 : windows_core::PCWSTR, cchcount2 : i32, bignorecase : super::Foundation:: BOOL) -> COMPARESTRING_RESULT); - CompareStringOrdinal(core::mem::transmute(lpstring1.as_ptr()), lpstring1.len().try_into().unwrap(), core::mem::transmute(lpstring2.as_ptr()), lpstring2.len().try_into().unwrap(), bignorecase.param().abi()) + CompareStringOrdinal(core::mem::transmute(lpstring1.as_ptr()), lpstring1.len().try_into().unwrap(), core::mem::transmute(lpstring2.as_ptr()), lpstring2.len().try_into().unwrap(), bignorecase.into()) } #[inline] pub unsafe fn CompareStringW(locale: u32, dwcmpflags: u32, lpstring1: &[u16], lpstring2: &[u16]) -> COMPARESTRING_RESULT { @@ -209,12 +206,9 @@ where ) } #[inline] -pub unsafe fn FindStringOrdinal(dwfindstringordinalflags: u32, lpstringsource: &[u16], lpstringvalue: &[u16], bignorecase: P5) -> i32 -where - P5: windows_core::Param, -{ +pub unsafe fn FindStringOrdinal(dwfindstringordinalflags: u32, lpstringsource: &[u16], lpstringvalue: &[u16], bignorecase: bool) -> i32 { windows_targets::link!("kernel32.dll" "system" fn FindStringOrdinal(dwfindstringordinalflags : u32, lpstringsource : windows_core::PCWSTR, cchsource : i32, lpstringvalue : windows_core::PCWSTR, cchvalue : i32, bignorecase : super::Foundation:: BOOL) -> i32); - FindStringOrdinal(core::mem::transmute(dwfindstringordinalflags), core::mem::transmute(lpstringsource.as_ptr()), lpstringsource.len().try_into().unwrap(), core::mem::transmute(lpstringvalue.as_ptr()), lpstringvalue.len().try_into().unwrap(), bignorecase.param().abi()) + FindStringOrdinal(core::mem::transmute(dwfindstringordinalflags), core::mem::transmute(lpstringsource.as_ptr()), lpstringsource.len().try_into().unwrap(), core::mem::transmute(lpstringvalue.as_ptr()), lpstringvalue.len().try_into().unwrap(), bignorecase.into()) } #[inline] pub unsafe fn FoldStringA(dwmapflags: FOLD_STRING_MAP_FLAGS, lpsrcstr: &[u8], lpdeststr: Option<&mut [u8]>) -> i32 { @@ -807,12 +801,9 @@ where ScriptBreak(pwcchars.param().abi(), core::mem::transmute(cchars), core::mem::transmute(psa), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn ScriptCPtoX(icp: i32, ftrailing: P1, cglyphs: i32, pwlogclust: &[u16], psva: *const SCRIPT_VISATTR, piadvance: *const i32, psa: *const SCRIPT_ANALYSIS, pix: *mut i32) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn ScriptCPtoX(icp: i32, ftrailing: bool, cglyphs: i32, pwlogclust: &[u16], psva: *const SCRIPT_VISATTR, piadvance: *const i32, psa: *const SCRIPT_ANALYSIS, pix: *mut i32) -> windows_core::Result<()> { windows_targets::link!("usp10.dll" "system" fn ScriptCPtoX(icp : i32, ftrailing : super::Foundation:: BOOL, cchars : i32, cglyphs : i32, pwlogclust : *const u16, psva : *const SCRIPT_VISATTR, piadvance : *const i32, psa : *const SCRIPT_ANALYSIS, pix : *mut i32) -> windows_core::HRESULT); - ScriptCPtoX(core::mem::transmute(icp), ftrailing.param().abi(), pwlogclust.len().try_into().unwrap(), core::mem::transmute(cglyphs), core::mem::transmute(pwlogclust.as_ptr()), core::mem::transmute(psva), core::mem::transmute(piadvance), core::mem::transmute(psa), core::mem::transmute(pix)).ok() + ScriptCPtoX(core::mem::transmute(icp), ftrailing.into(), pwlogclust.len().try_into().unwrap(), core::mem::transmute(cglyphs), core::mem::transmute(pwlogclust.as_ptr()), core::mem::transmute(psva), core::mem::transmute(piadvance), core::mem::transmute(psa), core::mem::transmute(pix)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1011,13 +1002,10 @@ pub unsafe fn ScriptStringAnalyse(hdc: super::Graphics::Gdi::HDC, pstring: *cons .ok() } #[inline] -pub unsafe fn ScriptStringCPtoX(ssa: *const core::ffi::c_void, icp: i32, ftrailing: P2) -> windows_core::Result -where - P2: windows_core::Param, -{ +pub unsafe fn ScriptStringCPtoX(ssa: *const core::ffi::c_void, icp: i32, ftrailing: bool) -> windows_core::Result { windows_targets::link!("usp10.dll" "system" fn ScriptStringCPtoX(ssa : *const core::ffi::c_void, icp : i32, ftrailing : super::Foundation:: BOOL, px : *mut i32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - ScriptStringCPtoX(core::mem::transmute(ssa), core::mem::transmute(icp), ftrailing.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + ScriptStringCPtoX(core::mem::transmute(ssa), core::mem::transmute(icp), ftrailing.into(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn ScriptStringFree(pssa: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -1036,12 +1024,9 @@ pub unsafe fn ScriptStringGetOrder(ssa: *const core::ffi::c_void, puorder: *mut } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn ScriptStringOut(ssa: *const core::ffi::c_void, ix: i32, iy: i32, uoptions: super::Graphics::Gdi::ETO_OPTIONS, prc: Option<*const super::Foundation::RECT>, iminsel: i32, imaxsel: i32, fdisabled: P7) -> windows_core::Result<()> -where - P7: windows_core::Param, -{ +pub unsafe fn ScriptStringOut(ssa: *const core::ffi::c_void, ix: i32, iy: i32, uoptions: super::Graphics::Gdi::ETO_OPTIONS, prc: Option<*const super::Foundation::RECT>, iminsel: i32, imaxsel: i32, fdisabled: bool) -> windows_core::Result<()> { windows_targets::link!("usp10.dll" "system" fn ScriptStringOut(ssa : *const core::ffi::c_void, ix : i32, iy : i32, uoptions : super::Graphics::Gdi:: ETO_OPTIONS, prc : *const super::Foundation:: RECT, iminsel : i32, imaxsel : i32, fdisabled : super::Foundation:: BOOL) -> windows_core::HRESULT); - ScriptStringOut(core::mem::transmute(ssa), core::mem::transmute(ix), core::mem::transmute(iy), core::mem::transmute(uoptions), core::mem::transmute(prc.unwrap_or(core::mem::zeroed())), core::mem::transmute(iminsel), core::mem::transmute(imaxsel), fdisabled.param().abi()).ok() + ScriptStringOut(core::mem::transmute(ssa), core::mem::transmute(ix), core::mem::transmute(iy), core::mem::transmute(uoptions), core::mem::transmute(prc.unwrap_or(core::mem::zeroed())), core::mem::transmute(iminsel), core::mem::transmute(imaxsel), fdisabled.into()).ok() } #[inline] pub unsafe fn ScriptStringValidate(ssa: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -7680,9 +7665,6 @@ pub const HIGH_SURROGATE_START: u32 = 55296u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HSAVEDUILANGUAGES(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HSAVEDUILANGUAGES { - type TypeKind = windows_core::CopyType; -} impl HSAVEDUILANGUAGES { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -8409,11 +8391,8 @@ impl windows_core::RuntimeName for IMLangLineBreakConsole {} windows_core::imp::define_interface!(IMLangString, IMLangString_Vtbl, 0xc04d65ce_b70d_11d0_b188_00aa0038c969); windows_core::imp::interface_hierarchy!(IMLangString, windows_core::IUnknown); impl IMLangString { - pub unsafe fn Sync(&self, fnoaccess: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Sync)(windows_core::Interface::as_raw(self), fnoaccess.param().abi()).ok() + pub unsafe fn Sync(&self, fnoaccess: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Sync)(windows_core::Interface::as_raw(self), fnoaccess.into()).ok() } pub unsafe fn GetLength(&self, pllen: Option<*mut i32>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLength)(windows_core::Interface::as_raw(self), core::mem::transmute(pllen.unwrap_or(core::mem::zeroed()))).ok() @@ -11853,9 +11832,6 @@ pub const UBRK_WORD_NUMBER_LIMIT: UWordBreak = UWordBreak(200i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct UBiDi(pub isize); -impl windows_core::TypeKind for UBiDi { - type TypeKind = windows_core::CopyType; -} pub type UBiDiClassCallback = Option UCharDirection>; #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] @@ -11875,9 +11851,6 @@ pub struct UBiDiReorderingOption(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct UBiDiTransform(pub isize); -impl windows_core::TypeKind for UBiDiTransform { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct UBidiPairedBracketType(pub i32); @@ -11887,9 +11860,6 @@ pub struct UBlockCode(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct UBreakIterator(pub isize); -impl windows_core::TypeKind for UBreakIterator { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct UBreakIteratorType(pub i32); @@ -12215,9 +12185,6 @@ pub const UCPMAP_RANGE_NORMAL: UCPMapRangeOption = UCPMapRangeOption(0i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct UCPMap(pub isize); -impl windows_core::TypeKind for UCPMap { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct UCPMapRangeOption(pub i32); @@ -12319,9 +12286,6 @@ pub struct UCalendarWeekdayType(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct UCaseMap(pub isize); -impl windows_core::TypeKind for UCaseMap { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct UCharCategory(pub i32); @@ -12373,15 +12337,9 @@ pub struct UCharNameChoice(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct UCharsetDetector(pub isize); -impl windows_core::TypeKind for UCharsetDetector { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct UCharsetMatch(pub isize); -impl windows_core::TypeKind for UCharsetMatch { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct UColAttribute(pub i32); @@ -12400,30 +12358,18 @@ pub struct UColRuleOption(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct UCollationElements(pub isize); -impl windows_core::TypeKind for UCollationElements { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct UCollationResult(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct UCollator(pub isize); -impl windows_core::TypeKind for UCollator { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct UConstrainedFieldPosition(pub isize); -impl windows_core::TypeKind for UConstrainedFieldPosition { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct UConverter(pub isize); -impl windows_core::TypeKind for UConverter { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct UConverterCallbackReason(pub i32); @@ -12451,9 +12397,6 @@ pub struct UConverterPlatform(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct UConverterSelector(pub isize); -impl windows_core::TypeKind for UConverterSelector { - type TypeKind = windows_core::CopyType; -} pub type UConverterToUCallback = Option; #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] @@ -12732,15 +12675,9 @@ pub struct UDateFormatSymbolType(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct UDateFormatSymbols(pub isize); -impl windows_core::TypeKind for UDateFormatSymbols { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct UDateIntervalFormat(pub isize); -impl windows_core::TypeKind for UDateIntervalFormat { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct UDateRelativeDateTimeFormatterStyle(pub i32); @@ -12781,9 +12718,6 @@ pub type UEnumCharNamesFn = Option u16>; #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] @@ -13304,9 +13196,6 @@ pub struct UNormalizationMode(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct UNormalizer2(pub isize); -impl windows_core::TypeKind for UNormalizer2 { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct UNumberCompactStyle(pub i32); @@ -13340,9 +13229,6 @@ pub struct UNumberFormatTextAttribute(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct UNumberFormatter(pub isize); -impl windows_core::TypeKind for UNumberFormatter { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct UNumberGroupingStrategy(pub i32); @@ -13364,9 +13250,6 @@ pub struct UNumberUnitWidth(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct UNumberingSystem(pub isize); -impl windows_core::TypeKind for UNumberingSystem { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct UNumericType(pub i32); @@ -13388,9 +13271,6 @@ impl Default for UParseError { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct UPluralRules(pub isize); -impl windows_core::TypeKind for UPluralRules { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct UPluralType(pub i32); @@ -13431,24 +13311,15 @@ pub struct URegexpFlag(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct URegion(pub isize); -impl windows_core::TypeKind for URegion { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct URegionType(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct URegularExpression(pub isize); -impl windows_core::TypeKind for URegularExpression { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct URelativeDateTimeFormatter(pub isize); -impl windows_core::TypeKind for URelativeDateTimeFormatter { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct URelativeDateTimeFormatterField(pub i32); @@ -13476,9 +13347,6 @@ pub struct UResType(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct UResourceBundle(pub isize); -impl windows_core::TypeKind for UResourceBundle { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct URestrictionLevel(pub i32); @@ -13753,9 +13621,6 @@ pub struct UScriptUsage(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct USearch(pub isize); -impl windows_core::TypeKind for USearch { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct USearchAttribute(pub i32); @@ -13784,24 +13649,15 @@ impl Default for USerializedSet { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct USet(pub isize); -impl windows_core::TypeKind for USet { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct USetSpanCondition(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct USpoofCheckResult(pub isize); -impl windows_core::TypeKind for USpoofCheckResult { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct USpoofChecker(pub isize); -impl windows_core::TypeKind for USpoofChecker { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct USpoofChecks(pub i32); @@ -13809,18 +13665,12 @@ pub type UStringCaseMapper = Option windows_core::Result<()> { (windows_core::Interface::vtable(self).SetOutputBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(bufferprecision), core::mem::transmute(channeldepth)).ok() } - pub unsafe fn SetCached(&self, iscached: P0) - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCached)(windows_core::Interface::as_raw(self), iscached.param().abi()) + pub unsafe fn SetCached(&self, iscached: bool) { + (windows_core::Interface::vtable(self).SetCached)(windows_core::Interface::as_raw(self), iscached.into()) } } #[repr(C)] @@ -5955,22 +5952,20 @@ impl ID2D1DeviceContext4 { (windows_core::Interface::vtable(self).DrawSvgGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineorigin), core::mem::transmute(glyphrun), defaultfillbrush.param().abi(), svgglyphstyle.param().abi(), core::mem::transmute(colorpaletteindex), core::mem::transmute(measuringmode)) } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] - pub unsafe fn GetColorBitmapGlyphImage(&self, glyphimageformat: super::DirectWrite::DWRITE_GLYPH_IMAGE_FORMATS, glyphorigin: Common::D2D_POINT_2F, fontface: P2, fontemsize: f32, glyphindex: u16, issideways: P5, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, dpix: f32, dpiy: f32, glyphtransform: *mut super::super::super::Foundation::Numerics::Matrix3x2, glyphimage: *mut Option) -> windows_core::Result<()> + pub unsafe fn GetColorBitmapGlyphImage(&self, glyphimageformat: super::DirectWrite::DWRITE_GLYPH_IMAGE_FORMATS, glyphorigin: Common::D2D_POINT_2F, fontface: P2, fontemsize: f32, glyphindex: u16, issideways: bool, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, dpix: f32, dpiy: f32, glyphtransform: *mut super::super::super::Foundation::Numerics::Matrix3x2, glyphimage: *mut Option) -> windows_core::Result<()> where P2: windows_core::Param, - P5: windows_core::Param, { - (windows_core::Interface::vtable(self).GetColorBitmapGlyphImage)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphimageformat), core::mem::transmute(glyphorigin), fontface.param().abi(), core::mem::transmute(fontemsize), core::mem::transmute(glyphindex), issideways.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), core::mem::transmute(dpix), core::mem::transmute(dpiy), core::mem::transmute(glyphtransform), core::mem::transmute(glyphimage)).ok() + (windows_core::Interface::vtable(self).GetColorBitmapGlyphImage)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphimageformat), core::mem::transmute(glyphorigin), fontface.param().abi(), core::mem::transmute(fontemsize), core::mem::transmute(glyphindex), issideways.into(), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), core::mem::transmute(dpix), core::mem::transmute(dpiy), core::mem::transmute(glyphtransform), core::mem::transmute(glyphimage)).ok() } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] - pub unsafe fn GetSvgGlyphImage(&self, glyphorigin: Common::D2D_POINT_2F, fontface: P1, fontemsize: f32, glyphindex: u16, issideways: P4, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, defaultfillbrush: P6, svgglyphstyle: P7, colorpaletteindex: u32, glyphtransform: *mut super::super::super::Foundation::Numerics::Matrix3x2, glyphimage: *mut Option) -> windows_core::Result<()> + pub unsafe fn GetSvgGlyphImage(&self, glyphorigin: Common::D2D_POINT_2F, fontface: P1, fontemsize: f32, glyphindex: u16, issideways: bool, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, defaultfillbrush: P6, svgglyphstyle: P7, colorpaletteindex: u32, glyphtransform: *mut super::super::super::Foundation::Numerics::Matrix3x2, glyphimage: *mut Option) -> windows_core::Result<()> where P1: windows_core::Param, - P4: windows_core::Param, P6: windows_core::Param, P7: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSvgGlyphImage)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphorigin), fontface.param().abi(), core::mem::transmute(fontemsize), core::mem::transmute(glyphindex), issideways.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), defaultfillbrush.param().abi(), svgglyphstyle.param().abi(), core::mem::transmute(colorpaletteindex), core::mem::transmute(glyphtransform), core::mem::transmute(glyphimage)).ok() + (windows_core::Interface::vtable(self).GetSvgGlyphImage)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphorigin), fontface.param().abi(), core::mem::transmute(fontemsize), core::mem::transmute(glyphindex), issideways.into(), core::mem::transmute(worldtransform.unwrap_or(core::mem::zeroed())), defaultfillbrush.param().abi(), svgglyphstyle.param().abi(), core::mem::transmute(colorpaletteindex), core::mem::transmute(glyphtransform), core::mem::transmute(glyphimage)).ok() } } #[repr(C)] @@ -6604,12 +6599,11 @@ impl core::ops::Deref for ID2D1Effect { } windows_core::imp::interface_hierarchy!(ID2D1Effect, windows_core::IUnknown, ID2D1Properties); impl ID2D1Effect { - pub unsafe fn SetInput(&self, index: u32, input: P1, invalidate: P2) + pub unsafe fn SetInput(&self, index: u32, input: P1, invalidate: bool) where P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).SetInput)(windows_core::Interface::as_raw(self), core::mem::transmute(index), input.param().abi(), invalidate.param().abi()) + (windows_core::Interface::vtable(self).SetInput)(windows_core::Interface::as_raw(self), core::mem::transmute(index), input.param().abi(), invalidate.into()) } pub unsafe fn SetInputCount(&self, inputcount: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetInputCount)(windows_core::Interface::as_raw(self), core::mem::transmute(inputcount)).ok() @@ -10621,11 +10615,8 @@ impl ID2D1RenderInfo { pub unsafe fn SetOutputBuffer(&self, bufferprecision: D2D1_BUFFER_PRECISION, channeldepth: D2D1_CHANNEL_DEPTH) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetOutputBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(bufferprecision), core::mem::transmute(channeldepth)).ok() } - pub unsafe fn SetCached(&self, iscached: P0) - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCached)(windows_core::Interface::as_raw(self), iscached.param().abi()) + pub unsafe fn SetCached(&self, iscached: bool) { + (windows_core::Interface::vtable(self).SetCached)(windows_core::Interface::as_raw(self), iscached.into()) } pub unsafe fn SetInstructionCountHint(&self, instructioncount: u32) { (windows_core::Interface::vtable(self).SetInstructionCountHint)(windows_core::Interface::as_raw(self), core::mem::transmute(instructioncount)) diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/Fxc/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/Fxc/mod.rs index dd73afea08..21edb6f035 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/Fxc/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/Fxc/mod.rs @@ -188,14 +188,13 @@ pub unsafe fn D3DStripShader(pshaderbytecode: *const core::ffi::c_void, bytecode D3DStripShader(core::mem::transmute(pshaderbytecode), core::mem::transmute(bytecodelength), core::mem::transmute(ustripflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn D3DWriteBlobToFile(pblob: P0, pfilename: P1, boverwrite: P2) -> windows_core::Result<()> +pub unsafe fn D3DWriteBlobToFile(pblob: P0, pfilename: P1, boverwrite: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("d3dcompiler_47.dll" "system" fn D3DWriteBlobToFile(pblob : * mut core::ffi::c_void, pfilename : windows_core::PCWSTR, boverwrite : super::super::super::Foundation:: BOOL) -> windows_core::HRESULT); - D3DWriteBlobToFile(pblob.param().abi(), pfilename.param().abi(), boverwrite.param().abi()).ok() + D3DWriteBlobToFile(pblob.param().abi(), pfilename.param().abi(), boverwrite.into()).ok() } pub const D3DCOMPILER_DLL_A: windows_core::PCSTR = windows_core::s!("d3dcompiler_47.dll"); pub const D3DCOMPILER_DLL_W: windows_core::PCWSTR = windows_core::w!("d3dcompiler_47.dll"); 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 f838d552e4..601694b22b 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D10/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D10/mod.rs @@ -93,25 +93,23 @@ where } #[cfg(feature = "Win32_Graphics_Direct3D")] #[inline] -pub unsafe fn D3D10DisassembleEffect(peffect: P0, enablecolorcode: P1) -> windows_core::Result +pub unsafe fn D3D10DisassembleEffect(peffect: P0, enablecolorcode: bool) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("d3d10.dll" "system" fn D3D10DisassembleEffect(peffect : * mut core::ffi::c_void, enablecolorcode : super::super::Foundation:: BOOL, ppdisassembly : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - D3D10DisassembleEffect(peffect.param().abi(), enablecolorcode.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + D3D10DisassembleEffect(peffect.param().abi(), enablecolorcode.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_Graphics_Direct3D")] #[inline] -pub unsafe fn D3D10DisassembleShader(pshader: *const core::ffi::c_void, bytecodelength: usize, enablecolorcode: P2, pcomments: P3) -> windows_core::Result +pub unsafe fn D3D10DisassembleShader(pshader: *const core::ffi::c_void, bytecodelength: usize, enablecolorcode: bool, pcomments: P3) -> windows_core::Result where - P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("d3d10.dll" "system" fn D3D10DisassembleShader(pshader : *const core::ffi::c_void, bytecodelength : usize, enablecolorcode : super::super::Foundation:: BOOL, pcomments : windows_core::PCSTR, ppdisassembly : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - D3D10DisassembleShader(core::mem::transmute(pshader), core::mem::transmute(bytecodelength), enablecolorcode.param().abi(), pcomments.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + D3D10DisassembleShader(core::mem::transmute(pshader), core::mem::transmute(bytecodelength), enablecolorcode.into(), pcomments.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn D3D10GetGeometryShaderProfile(pdevice: P0) -> windows_core::PCSTR @@ -3219,12 +3217,11 @@ impl ID3D10Device { pub unsafe fn VSSetSamplers(&self, startslot: u32, ppsamplers: Option<&[Option]>) { (windows_core::Interface::vtable(self).VSSetSamplers)(windows_core::Interface::as_raw(self), core::mem::transmute(startslot), ppsamplers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppsamplers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } - pub unsafe fn SetPredication(&self, ppredicate: P0, predicatevalue: P1) + pub unsafe fn SetPredication(&self, ppredicate: P0, predicatevalue: bool) where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetPredication)(windows_core::Interface::as_raw(self), ppredicate.param().abi(), predicatevalue.param().abi()) + (windows_core::Interface::vtable(self).SetPredication)(windows_core::Interface::as_raw(self), ppredicate.param().abi(), predicatevalue.into()) } pub unsafe fn GSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: Option<&[Option]>) { (windows_core::Interface::vtable(self).GSSetShaderResources)(windows_core::Interface::as_raw(self), core::mem::transmute(startslot), ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppshaderresourceviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) @@ -5468,11 +5465,8 @@ impl ID3D10EffectScalarVariable { pub unsafe fn GetIntArray(&self, pdata: &mut [i32], offset: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetIntArray)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata.as_ptr()), core::mem::transmute(offset), pdata.len().try_into().unwrap()).ok() } - pub unsafe fn SetBool(&self, value: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBool)(windows_core::Interface::as_raw(self), value.param().abi()).ok() + pub unsafe fn SetBool(&self, value: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBool)(windows_core::Interface::as_raw(self), value.into()).ok() } pub unsafe fn GetBool(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6738,23 +6732,14 @@ impl ID3D10InfoQueue { { (windows_core::Interface::vtable(self).AddApplicationMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(severity), pdescription.param().abi()).ok() } - pub unsafe fn SetBreakOnCategory(&self, category: D3D10_MESSAGE_CATEGORY, benable: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBreakOnCategory)(windows_core::Interface::as_raw(self), core::mem::transmute(category), benable.param().abi()).ok() + pub unsafe fn SetBreakOnCategory(&self, category: D3D10_MESSAGE_CATEGORY, benable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBreakOnCategory)(windows_core::Interface::as_raw(self), core::mem::transmute(category), benable.into()).ok() } - pub unsafe fn SetBreakOnSeverity(&self, severity: D3D10_MESSAGE_SEVERITY, benable: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBreakOnSeverity)(windows_core::Interface::as_raw(self), core::mem::transmute(severity), benable.param().abi()).ok() + pub unsafe fn SetBreakOnSeverity(&self, severity: D3D10_MESSAGE_SEVERITY, benable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBreakOnSeverity)(windows_core::Interface::as_raw(self), core::mem::transmute(severity), benable.into()).ok() } - pub unsafe fn SetBreakOnID(&self, id: D3D10_MESSAGE_ID, benable: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBreakOnID)(windows_core::Interface::as_raw(self), core::mem::transmute(id), benable.param().abi()).ok() + pub unsafe fn SetBreakOnID(&self, id: D3D10_MESSAGE_ID, benable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBreakOnID)(windows_core::Interface::as_raw(self), core::mem::transmute(id), benable.into()).ok() } pub unsafe fn GetBreakOnCategory(&self, category: D3D10_MESSAGE_CATEGORY) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).GetBreakOnCategory)(windows_core::Interface::as_raw(self), core::mem::transmute(category)) @@ -6765,11 +6750,8 @@ impl ID3D10InfoQueue { pub unsafe fn GetBreakOnID(&self, id: D3D10_MESSAGE_ID) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).GetBreakOnID)(windows_core::Interface::as_raw(self), core::mem::transmute(id)) } - pub unsafe fn SetMuteDebugOutput(&self, bmute: P0) - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMuteDebugOutput)(windows_core::Interface::as_raw(self), bmute.param().abi()) + pub unsafe fn SetMuteDebugOutput(&self, bmute: bool) { + (windows_core::Interface::vtable(self).SetMuteDebugOutput)(windows_core::Interface::as_raw(self), bmute.into()) } pub unsafe fn GetMuteDebugOutput(&self) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).GetMuteDebugOutput)(windows_core::Interface::as_raw(self)) @@ -7072,11 +7054,8 @@ impl ID3D10Multithread { pub unsafe fn Leave(&self) { (windows_core::Interface::vtable(self).Leave)(windows_core::Interface::as_raw(self)) } - pub unsafe fn SetMultithreadProtected(&self, bmtprotect: P0) -> super::super::Foundation::BOOL - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMultithreadProtected)(windows_core::Interface::as_raw(self), bmtprotect.param().abi()) + pub unsafe fn SetMultithreadProtected(&self, bmtprotect: bool) -> super::super::Foundation::BOOL { + (windows_core::Interface::vtable(self).SetMultithreadProtected)(windows_core::Interface::as_raw(self), bmtprotect.into()) } pub unsafe fn GetMultithreadProtected(&self) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).GetMultithreadProtected)(windows_core::Interface::as_raw(self)) @@ -8124,11 +8103,8 @@ unsafe impl Sync for ID3D10StateBlock {} windows_core::imp::define_interface!(ID3D10SwitchToRef, ID3D10SwitchToRef_Vtbl, 0x9b7e4e02_342c_4106_a19f_4f2704f689f0); windows_core::imp::interface_hierarchy!(ID3D10SwitchToRef, windows_core::IUnknown); impl ID3D10SwitchToRef { - pub unsafe fn SetUseRef(&self, useref: P0) -> super::super::Foundation::BOOL - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseRef)(windows_core::Interface::as_raw(self), useref.param().abi()) + pub unsafe fn SetUseRef(&self, useref: bool) -> super::super::Foundation::BOOL { + (windows_core::Interface::vtable(self).SetUseRef)(windows_core::Interface::as_raw(self), useref.into()) } pub unsafe fn GetUseRef(&self) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).GetUseRef)(windows_core::Interface::as_raw(self)) diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/mod.rs index faf563732c..a32756f362 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/mod.rs @@ -8094,12 +8094,11 @@ impl ID3D11DeviceContext { { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), pasync.param().abi(), core::mem::transmute(pdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(datasize), core::mem::transmute(getdataflags)).ok() } - pub unsafe fn SetPredication(&self, ppredicate: P0, predicatevalue: P1) + pub unsafe fn SetPredication(&self, ppredicate: P0, predicatevalue: bool) where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetPredication)(windows_core::Interface::as_raw(self), ppredicate.param().abi(), predicatevalue.param().abi()) + (windows_core::Interface::vtable(self).SetPredication)(windows_core::Interface::as_raw(self), ppredicate.param().abi(), predicatevalue.into()) } pub unsafe fn GSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: Option<&[Option]>) { (windows_core::Interface::vtable(self).GSSetShaderResources)(windows_core::Interface::as_raw(self), core::mem::transmute(startslot), ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppshaderresourceviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) @@ -8247,12 +8246,11 @@ impl ID3D11DeviceContext { { (windows_core::Interface::vtable(self).ResolveSubresource)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), core::mem::transmute(dstsubresource), psrcresource.param().abi(), core::mem::transmute(srcsubresource), core::mem::transmute(format)) } - pub unsafe fn ExecuteCommandList(&self, pcommandlist: P0, restorecontextstate: P1) + pub unsafe fn ExecuteCommandList(&self, pcommandlist: P0, restorecontextstate: bool) where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).ExecuteCommandList)(windows_core::Interface::as_raw(self), pcommandlist.param().abi(), restorecontextstate.param().abi()) + (windows_core::Interface::vtable(self).ExecuteCommandList)(windows_core::Interface::as_raw(self), pcommandlist.param().abi(), restorecontextstate.into()) } pub unsafe fn HSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: Option<&[Option]>) { (windows_core::Interface::vtable(self).HSSetShaderResources)(windows_core::Interface::as_raw(self), core::mem::transmute(startslot), ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppshaderresourceviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) @@ -8444,11 +8442,8 @@ impl ID3D11DeviceContext { pub unsafe fn GetContextFlags(&self) -> u32 { (windows_core::Interface::vtable(self).GetContextFlags)(windows_core::Interface::as_raw(self)) } - pub unsafe fn FinishCommandList(&self, restoredeferredcontextstate: P0, ppcommandlist: Option<*mut Option>) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).FinishCommandList)(windows_core::Interface::as_raw(self), restoredeferredcontextstate.param().abi(), core::mem::transmute(ppcommandlist.unwrap_or(core::mem::zeroed()))).ok() + pub unsafe fn FinishCommandList(&self, restoredeferredcontextstate: bool, ppcommandlist: Option<*mut Option>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).FinishCommandList)(windows_core::Interface::as_raw(self), restoredeferredcontextstate.into(), core::mem::transmute(ppcommandlist.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -9692,11 +9687,8 @@ impl ID3D11DeviceContext3 { pub unsafe fn Flush1(&self, contexttype: D3D11_CONTEXT_TYPE, hevent: Option) { (windows_core::Interface::vtable(self).Flush1)(windows_core::Interface::as_raw(self), core::mem::transmute(contexttype), core::mem::transmute(hevent.unwrap_or(core::mem::zeroed()))) } - pub unsafe fn SetHardwareProtectionState(&self, hwprotectionenable: P0) - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHardwareProtectionState)(windows_core::Interface::as_raw(self), hwprotectionenable.param().abi()) + pub unsafe fn SetHardwareProtectionState(&self, hwprotectionenable: bool) { + (windows_core::Interface::vtable(self).SetHardwareProtectionState)(windows_core::Interface::as_raw(self), hwprotectionenable.into()) } pub unsafe fn GetHardwareProtectionState(&self) -> super::super::Foundation::BOOL { let mut result__ = core::mem::zeroed(); @@ -10395,23 +10387,14 @@ impl ID3D11InfoQueue { { (windows_core::Interface::vtable(self).AddApplicationMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(severity), pdescription.param().abi()).ok() } - pub unsafe fn SetBreakOnCategory(&self, category: D3D11_MESSAGE_CATEGORY, benable: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBreakOnCategory)(windows_core::Interface::as_raw(self), core::mem::transmute(category), benable.param().abi()).ok() + pub unsafe fn SetBreakOnCategory(&self, category: D3D11_MESSAGE_CATEGORY, benable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBreakOnCategory)(windows_core::Interface::as_raw(self), core::mem::transmute(category), benable.into()).ok() } - pub unsafe fn SetBreakOnSeverity(&self, severity: D3D11_MESSAGE_SEVERITY, benable: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBreakOnSeverity)(windows_core::Interface::as_raw(self), core::mem::transmute(severity), benable.param().abi()).ok() + pub unsafe fn SetBreakOnSeverity(&self, severity: D3D11_MESSAGE_SEVERITY, benable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBreakOnSeverity)(windows_core::Interface::as_raw(self), core::mem::transmute(severity), benable.into()).ok() } - pub unsafe fn SetBreakOnID(&self, id: D3D11_MESSAGE_ID, benable: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBreakOnID)(windows_core::Interface::as_raw(self), core::mem::transmute(id), benable.param().abi()).ok() + pub unsafe fn SetBreakOnID(&self, id: D3D11_MESSAGE_ID, benable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBreakOnID)(windows_core::Interface::as_raw(self), core::mem::transmute(id), benable.into()).ok() } pub unsafe fn GetBreakOnCategory(&self, category: D3D11_MESSAGE_CATEGORY) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).GetBreakOnCategory)(windows_core::Interface::as_raw(self), core::mem::transmute(category)) @@ -10422,11 +10405,8 @@ impl ID3D11InfoQueue { pub unsafe fn GetBreakOnID(&self, id: D3D11_MESSAGE_ID) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).GetBreakOnID)(windows_core::Interface::as_raw(self), core::mem::transmute(id)) } - pub unsafe fn SetMuteDebugOutput(&self, bmute: P0) - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMuteDebugOutput)(windows_core::Interface::as_raw(self), bmute.param().abi()) + pub unsafe fn SetMuteDebugOutput(&self, bmute: bool) { + (windows_core::Interface::vtable(self).SetMuteDebugOutput)(windows_core::Interface::as_raw(self), bmute.into()) } pub unsafe fn GetMuteDebugOutput(&self) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).GetMuteDebugOutput)(windows_core::Interface::as_raw(self)) @@ -11045,11 +11025,8 @@ impl ID3D11Multithread { pub unsafe fn Leave(&self) { (windows_core::Interface::vtable(self).Leave)(windows_core::Interface::as_raw(self)) } - pub unsafe fn SetMultithreadProtected(&self, bmtprotect: P0) -> super::super::Foundation::BOOL - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMultithreadProtected)(windows_core::Interface::as_raw(self), bmtprotect.param().abi()) + pub unsafe fn SetMultithreadProtected(&self, bmtprotect: bool) -> super::super::Foundation::BOOL { + (windows_core::Interface::vtable(self).SetMultithreadProtected)(windows_core::Interface::as_raw(self), bmtprotect.into()) } pub unsafe fn GetMultithreadProtected(&self) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).GetMultithreadProtected)(windows_core::Interface::as_raw(self)) @@ -12390,11 +12367,8 @@ unsafe impl Sync for ID3D11ShaderTraceFactory {} windows_core::imp::define_interface!(ID3D11SwitchToRef, ID3D11SwitchToRef_Vtbl, 0x1ef337e3_58e7_4f83_a692_db221f5ed47e); windows_core::imp::interface_hierarchy!(ID3D11SwitchToRef, windows_core::IUnknown); impl ID3D11SwitchToRef { - pub unsafe fn SetUseRef(&self, useref: P0) -> super::super::Foundation::BOOL - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseRef)(windows_core::Interface::as_raw(self), useref.param().abi()) + pub unsafe fn SetUseRef(&self, useref: bool) -> super::super::Foundation::BOOL { + (windows_core::Interface::vtable(self).SetUseRef)(windows_core::Interface::as_raw(self), useref.into()) } pub unsafe fn GetUseRef(&self) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).GetUseRef)(windows_core::Interface::as_raw(self)) @@ -12864,19 +12838,17 @@ impl ID3D11VideoContext { { (windows_core::Interface::vtable(self).DecoderExtension)(windows_core::Interface::as_raw(self), pdecoder.param().abi(), core::mem::transmute(pextensiondata)) } - pub unsafe fn VideoProcessorSetOutputTargetRect(&self, pvideoprocessor: P0, enable: P1, prect: Option<*const super::super::Foundation::RECT>) + pub unsafe fn VideoProcessorSetOutputTargetRect(&self, pvideoprocessor: P0, enable: bool, prect: Option<*const super::super::Foundation::RECT>) where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetOutputTargetRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), enable.param().abi(), core::mem::transmute(prect.unwrap_or(core::mem::zeroed()))) + (windows_core::Interface::vtable(self).VideoProcessorSetOutputTargetRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), enable.into(), core::mem::transmute(prect.unwrap_or(core::mem::zeroed()))) } - pub unsafe fn VideoProcessorSetOutputBackgroundColor(&self, pvideoprocessor: P0, ycbcr: P1, pcolor: *const D3D11_VIDEO_COLOR) + pub unsafe fn VideoProcessorSetOutputBackgroundColor(&self, pvideoprocessor: P0, ycbcr: bool, pcolor: *const D3D11_VIDEO_COLOR) where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetOutputBackgroundColor)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), ycbcr.param().abi(), core::mem::transmute(pcolor)) + (windows_core::Interface::vtable(self).VideoProcessorSetOutputBackgroundColor)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), ycbcr.into(), core::mem::transmute(pcolor)) } pub unsafe fn VideoProcessorSetOutputColorSpace(&self, pvideoprocessor: P0, pcolorspace: *const D3D11_VIDEO_PROCESSOR_COLOR_SPACE) where @@ -12890,19 +12862,17 @@ impl ID3D11VideoContext { { (windows_core::Interface::vtable(self).VideoProcessorSetOutputAlphaFillMode)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(alphafillmode), core::mem::transmute(streamindex)) } - pub unsafe fn VideoProcessorSetOutputConstriction(&self, pvideoprocessor: P0, enable: P1, size: super::super::Foundation::SIZE) + pub unsafe fn VideoProcessorSetOutputConstriction(&self, pvideoprocessor: P0, enable: bool, size: super::super::Foundation::SIZE) where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetOutputConstriction)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), enable.param().abi(), core::mem::transmute(size)) + (windows_core::Interface::vtable(self).VideoProcessorSetOutputConstriction)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), enable.into(), core::mem::transmute(size)) } - pub unsafe fn VideoProcessorSetOutputStereoMode(&self, pvideoprocessor: P0, enable: P1) + pub unsafe fn VideoProcessorSetOutputStereoMode(&self, pvideoprocessor: P0, enable: bool) where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetOutputStereoMode)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), enable.param().abi()) + (windows_core::Interface::vtable(self).VideoProcessorSetOutputStereoMode)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), enable.into()) } pub unsafe fn VideoProcessorSetOutputExtension(&self, pvideoprocessor: P0, pextensionguid: *const windows_core::GUID, datasize: u32, pdata: *const core::ffi::c_void) -> i32 where @@ -12969,33 +12939,29 @@ impl ID3D11VideoContext { (windows_core::Interface::vtable(self).VideoProcessorSetStreamColorSpace)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), core::mem::transmute(pcolorspace)) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] - pub unsafe fn VideoProcessorSetStreamOutputRate(&self, pvideoprocessor: P0, streamindex: u32, outputrate: D3D11_VIDEO_PROCESSOR_OUTPUT_RATE, repeatframe: P3, pcustomrate: Option<*const super::Dxgi::Common::DXGI_RATIONAL>) + pub unsafe fn VideoProcessorSetStreamOutputRate(&self, pvideoprocessor: P0, streamindex: u32, outputrate: D3D11_VIDEO_PROCESSOR_OUTPUT_RATE, repeatframe: bool, pcustomrate: Option<*const super::Dxgi::Common::DXGI_RATIONAL>) where P0: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetStreamOutputRate)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), core::mem::transmute(outputrate), repeatframe.param().abi(), core::mem::transmute(pcustomrate.unwrap_or(core::mem::zeroed()))) + (windows_core::Interface::vtable(self).VideoProcessorSetStreamOutputRate)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), core::mem::transmute(outputrate), repeatframe.into(), core::mem::transmute(pcustomrate.unwrap_or(core::mem::zeroed()))) } - pub unsafe fn VideoProcessorSetStreamSourceRect(&self, pvideoprocessor: P0, streamindex: u32, enable: P2, prect: Option<*const super::super::Foundation::RECT>) + pub unsafe fn VideoProcessorSetStreamSourceRect(&self, pvideoprocessor: P0, streamindex: u32, enable: bool, prect: Option<*const super::super::Foundation::RECT>) where P0: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetStreamSourceRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.param().abi(), core::mem::transmute(prect.unwrap_or(core::mem::zeroed()))) + (windows_core::Interface::vtable(self).VideoProcessorSetStreamSourceRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.into(), core::mem::transmute(prect.unwrap_or(core::mem::zeroed()))) } - pub unsafe fn VideoProcessorSetStreamDestRect(&self, pvideoprocessor: P0, streamindex: u32, enable: P2, prect: Option<*const super::super::Foundation::RECT>) + pub unsafe fn VideoProcessorSetStreamDestRect(&self, pvideoprocessor: P0, streamindex: u32, enable: bool, prect: Option<*const super::super::Foundation::RECT>) where P0: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetStreamDestRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.param().abi(), core::mem::transmute(prect.unwrap_or(core::mem::zeroed()))) + (windows_core::Interface::vtable(self).VideoProcessorSetStreamDestRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.into(), core::mem::transmute(prect.unwrap_or(core::mem::zeroed()))) } - pub unsafe fn VideoProcessorSetStreamAlpha(&self, pvideoprocessor: P0, streamindex: u32, enable: P2, alpha: f32) + pub unsafe fn VideoProcessorSetStreamAlpha(&self, pvideoprocessor: P0, streamindex: u32, enable: bool, alpha: f32) where P0: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetStreamAlpha)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.param().abi(), core::mem::transmute(alpha)) + (windows_core::Interface::vtable(self).VideoProcessorSetStreamAlpha)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.into(), core::mem::transmute(alpha)) } pub unsafe fn VideoProcessorSetStreamPalette(&self, pvideoprocessor: P0, streamindex: u32, pentries: Option<&[u32]>) where @@ -13004,42 +12970,35 @@ impl ID3D11VideoContext { (windows_core::Interface::vtable(self).VideoProcessorSetStreamPalette)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), pentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pentries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] - pub unsafe fn VideoProcessorSetStreamPixelAspectRatio(&self, pvideoprocessor: P0, streamindex: u32, enable: P2, psourceaspectratio: Option<*const super::Dxgi::Common::DXGI_RATIONAL>, pdestinationaspectratio: Option<*const super::Dxgi::Common::DXGI_RATIONAL>) + pub unsafe fn VideoProcessorSetStreamPixelAspectRatio(&self, pvideoprocessor: P0, streamindex: u32, enable: bool, psourceaspectratio: Option<*const super::Dxgi::Common::DXGI_RATIONAL>, pdestinationaspectratio: Option<*const super::Dxgi::Common::DXGI_RATIONAL>) where P0: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetStreamPixelAspectRatio)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.param().abi(), core::mem::transmute(psourceaspectratio.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdestinationaspectratio.unwrap_or(core::mem::zeroed()))) + (windows_core::Interface::vtable(self).VideoProcessorSetStreamPixelAspectRatio)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.into(), core::mem::transmute(psourceaspectratio.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdestinationaspectratio.unwrap_or(core::mem::zeroed()))) } - pub unsafe fn VideoProcessorSetStreamLumaKey(&self, pvideoprocessor: P0, streamindex: u32, enable: P2, lower: f32, upper: f32) + pub unsafe fn VideoProcessorSetStreamLumaKey(&self, pvideoprocessor: P0, streamindex: u32, enable: bool, lower: f32, upper: f32) where P0: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetStreamLumaKey)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.param().abi(), core::mem::transmute(lower), core::mem::transmute(upper)) + (windows_core::Interface::vtable(self).VideoProcessorSetStreamLumaKey)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.into(), core::mem::transmute(lower), core::mem::transmute(upper)) } - pub unsafe fn VideoProcessorSetStreamStereoFormat(&self, pvideoprocessor: P0, streamindex: u32, enable: P2, format: D3D11_VIDEO_PROCESSOR_STEREO_FORMAT, leftviewframe0: P4, baseviewframe0: P5, flipmode: D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE, monooffset: i32) + pub unsafe fn VideoProcessorSetStreamStereoFormat(&self, pvideoprocessor: P0, streamindex: u32, enable: bool, format: D3D11_VIDEO_PROCESSOR_STEREO_FORMAT, leftviewframe0: bool, baseviewframe0: bool, flipmode: D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE, monooffset: i32) where P0: windows_core::Param, - P2: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetStreamStereoFormat)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.param().abi(), core::mem::transmute(format), leftviewframe0.param().abi(), baseviewframe0.param().abi(), core::mem::transmute(flipmode), core::mem::transmute(monooffset)) + (windows_core::Interface::vtable(self).VideoProcessorSetStreamStereoFormat)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.into(), core::mem::transmute(format), leftviewframe0.into(), baseviewframe0.into(), core::mem::transmute(flipmode), core::mem::transmute(monooffset)) } - pub unsafe fn VideoProcessorSetStreamAutoProcessingMode(&self, pvideoprocessor: P0, streamindex: u32, enable: P2) + pub unsafe fn VideoProcessorSetStreamAutoProcessingMode(&self, pvideoprocessor: P0, streamindex: u32, enable: bool) where P0: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetStreamAutoProcessingMode)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.param().abi()) + (windows_core::Interface::vtable(self).VideoProcessorSetStreamAutoProcessingMode)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.into()) } - pub unsafe fn VideoProcessorSetStreamFilter(&self, pvideoprocessor: P0, streamindex: u32, filter: D3D11_VIDEO_PROCESSOR_FILTER, enable: P3, level: i32) + pub unsafe fn VideoProcessorSetStreamFilter(&self, pvideoprocessor: P0, streamindex: u32, filter: D3D11_VIDEO_PROCESSOR_FILTER, enable: bool, level: i32) where P0: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetStreamFilter)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), core::mem::transmute(filter), enable.param().abi(), core::mem::transmute(level)) + (windows_core::Interface::vtable(self).VideoProcessorSetStreamFilter)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), core::mem::transmute(filter), enable.into(), core::mem::transmute(level)) } pub unsafe fn VideoProcessorSetStreamExtension(&self, pvideoprocessor: P0, streamindex: u32, pextensionguid: *const windows_core::GUID, datasize: u32, pdata: *const core::ffi::c_void) -> i32 where @@ -13198,12 +13157,11 @@ impl ID3D11VideoContext { { (windows_core::Interface::vtable(self).ConfigureAuthenticatedChannel)(windows_core::Interface::as_raw(self), pchannel.param().abi(), core::mem::transmute(inputsize), core::mem::transmute(pinput), core::mem::transmute(poutput)).ok() } - pub unsafe fn VideoProcessorSetStreamRotation(&self, pvideoprocessor: P0, streamindex: u32, enable: P2, rotation: D3D11_VIDEO_PROCESSOR_ROTATION) + pub unsafe fn VideoProcessorSetStreamRotation(&self, pvideoprocessor: P0, streamindex: u32, enable: bool, rotation: D3D11_VIDEO_PROCESSOR_ROTATION) where P0: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetStreamRotation)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.param().abi(), core::mem::transmute(rotation)) + (windows_core::Interface::vtable(self).VideoProcessorSetStreamRotation)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.into(), core::mem::transmute(rotation)) } pub unsafe fn VideoProcessorGetStreamRotation(&self, pvideoprocessor: P0, streamindex: u32, penable: *mut super::super::Foundation::BOOL, protation: *mut D3D11_VIDEO_PROCESSOR_ROTATION) where @@ -13704,12 +13662,11 @@ impl ID3D11VideoContext1 { { (windows_core::Interface::vtable(self).VideoProcessorSetOutputColorSpace1)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(colorspace)) } - pub unsafe fn VideoProcessorSetOutputShaderUsage(&self, pvideoprocessor: P0, shaderusage: P1) + pub unsafe fn VideoProcessorSetOutputShaderUsage(&self, pvideoprocessor: P0, shaderusage: bool) where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetOutputShaderUsage)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), shaderusage.param().abi()) + (windows_core::Interface::vtable(self).VideoProcessorSetOutputShaderUsage)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), shaderusage.into()) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn VideoProcessorGetOutputColorSpace1(&self, pvideoprocessor: P0) -> super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE @@ -13735,14 +13692,11 @@ impl ID3D11VideoContext1 { { (windows_core::Interface::vtable(self).VideoProcessorSetStreamColorSpace1)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), core::mem::transmute(colorspace)) } - pub unsafe fn VideoProcessorSetStreamMirror(&self, pvideoprocessor: P0, streamindex: u32, enable: P2, fliphorizontal: P3, flipvertical: P4) + pub unsafe fn VideoProcessorSetStreamMirror(&self, pvideoprocessor: P0, streamindex: u32, enable: bool, fliphorizontal: bool, flipvertical: bool) where P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetStreamMirror)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.param().abi(), fliphorizontal.param().abi(), flipvertical.param().abi()) + (windows_core::Interface::vtable(self).VideoProcessorSetStreamMirror)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(streamindex), enable.into(), fliphorizontal.into(), flipvertical.into()) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn VideoProcessorGetStreamColorSpace1(&self, pvideoprocessor: P0, streamindex: u32) -> super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE 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 91529c2b9b..fc9d709a33 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D12/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D12/mod.rs @@ -9477,17 +9477,11 @@ impl ID3D12Debug1 { pub unsafe fn EnableDebugLayer(&self) { (windows_core::Interface::vtable(self).EnableDebugLayer)(windows_core::Interface::as_raw(self)) } - pub unsafe fn SetEnableGPUBasedValidation(&self, enable: P0) - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableGPUBasedValidation)(windows_core::Interface::as_raw(self), enable.param().abi()) + pub unsafe fn SetEnableGPUBasedValidation(&self, enable: bool) { + (windows_core::Interface::vtable(self).SetEnableGPUBasedValidation)(windows_core::Interface::as_raw(self), enable.into()) } - pub unsafe fn SetEnableSynchronizedCommandQueueValidation(&self, enable: P0) - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableSynchronizedCommandQueueValidation)(windows_core::Interface::as_raw(self), enable.param().abi()) + pub unsafe fn SetEnableSynchronizedCommandQueueValidation(&self, enable: bool) { + (windows_core::Interface::vtable(self).SetEnableSynchronizedCommandQueueValidation)(windows_core::Interface::as_raw(self), enable.into()) } } #[repr(C)] @@ -9569,17 +9563,11 @@ impl core::ops::Deref for ID3D12Debug3 { } windows_core::imp::interface_hierarchy!(ID3D12Debug3, windows_core::IUnknown, ID3D12Debug); impl ID3D12Debug3 { - pub unsafe fn SetEnableGPUBasedValidation(&self, enable: P0) - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableGPUBasedValidation)(windows_core::Interface::as_raw(self), enable.param().abi()) + pub unsafe fn SetEnableGPUBasedValidation(&self, enable: bool) { + (windows_core::Interface::vtable(self).SetEnableGPUBasedValidation)(windows_core::Interface::as_raw(self), enable.into()) } - pub unsafe fn SetEnableSynchronizedCommandQueueValidation(&self, enable: P0) - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableSynchronizedCommandQueueValidation)(windows_core::Interface::as_raw(self), enable.param().abi()) + pub unsafe fn SetEnableSynchronizedCommandQueueValidation(&self, enable: bool) { + (windows_core::Interface::vtable(self).SetEnableSynchronizedCommandQueueValidation)(windows_core::Interface::as_raw(self), enable.into()) } pub unsafe fn SetGPUBasedValidationFlags(&self, flags: D3D12_GPU_BASED_VALIDATION_FLAGS) { (windows_core::Interface::vtable(self).SetGPUBasedValidationFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(flags)) @@ -9670,11 +9658,8 @@ impl core::ops::Deref for ID3D12Debug5 { } windows_core::imp::interface_hierarchy!(ID3D12Debug5, windows_core::IUnknown, ID3D12Debug, ID3D12Debug3, ID3D12Debug4); impl ID3D12Debug5 { - pub unsafe fn SetEnableAutoName(&self, enable: P0) - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableAutoName)(windows_core::Interface::as_raw(self), enable.param().abi()) + pub unsafe fn SetEnableAutoName(&self, enable: bool) { + (windows_core::Interface::vtable(self).SetEnableAutoName)(windows_core::Interface::as_raw(self), enable.into()) } } #[repr(C)] @@ -9709,11 +9694,8 @@ impl core::ops::Deref for ID3D12Debug6 { } windows_core::imp::interface_hierarchy!(ID3D12Debug6, windows_core::IUnknown, ID3D12Debug, ID3D12Debug3, ID3D12Debug4, ID3D12Debug5); impl ID3D12Debug6 { - pub unsafe fn SetForceLegacyBarrierValidation(&self, enable: P0) - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetForceLegacyBarrierValidation)(windows_core::Interface::as_raw(self), enable.param().abi()) + pub unsafe fn SetForceLegacyBarrierValidation(&self, enable: bool) { + (windows_core::Interface::vtable(self).SetForceLegacyBarrierValidation)(windows_core::Interface::as_raw(self), enable.into()) } } #[repr(C)] @@ -10461,11 +10443,8 @@ impl ID3D12Device { { (windows_core::Interface::vtable(self).CreateQueryHeap)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc), &T::IID, result__ as *mut _ as *mut _).ok() } - pub unsafe fn SetStablePowerState(&self, enable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStablePowerState)(windows_core::Interface::as_raw(self), enable.param().abi()).ok() + pub unsafe fn SetStablePowerState(&self, enable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStablePowerState)(windows_core::Interface::as_raw(self), enable.into()).ok() } pub unsafe fn CreateCommandSignature(&self, pdesc: *const D3D12_COMMAND_SIGNATURE_DESC, prootsignature: P1, result__: *mut Option) -> windows_core::Result<()> where @@ -12430,11 +12409,8 @@ impl core::ops::Deref for ID3D12DeviceRemovedExtendedDataSettings2 { } windows_core::imp::interface_hierarchy!(ID3D12DeviceRemovedExtendedDataSettings2, windows_core::IUnknown, ID3D12DeviceRemovedExtendedDataSettings, ID3D12DeviceRemovedExtendedDataSettings1); impl ID3D12DeviceRemovedExtendedDataSettings2 { - pub unsafe fn UseMarkersOnlyAutoBreadcrumbs(&self, markersonly: P0) - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).UseMarkersOnlyAutoBreadcrumbs)(windows_core::Interface::as_raw(self), markersonly.param().abi()) + pub unsafe fn UseMarkersOnlyAutoBreadcrumbs(&self, markersonly: bool) { + (windows_core::Interface::vtable(self).UseMarkersOnlyAutoBreadcrumbs)(windows_core::Interface::as_raw(self), markersonly.into()) } } #[repr(C)] @@ -13014,11 +12990,8 @@ impl ID3D12GraphicsCommandList { pub unsafe fn SOSetTargets(&self, startslot: u32, pviews: Option<&[D3D12_STREAM_OUTPUT_BUFFER_VIEW]>) { (windows_core::Interface::vtable(self).SOSetTargets)(windows_core::Interface::as_raw(self), core::mem::transmute(startslot), pviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } - pub unsafe fn OMSetRenderTargets(&self, numrendertargetdescriptors: u32, prendertargetdescriptors: Option<*const D3D12_CPU_DESCRIPTOR_HANDLE>, rtssinglehandletodescriptorrange: P2, pdepthstencildescriptor: Option<*const D3D12_CPU_DESCRIPTOR_HANDLE>) - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).OMSetRenderTargets)(windows_core::Interface::as_raw(self), core::mem::transmute(numrendertargetdescriptors), core::mem::transmute(prendertargetdescriptors.unwrap_or(core::mem::zeroed())), rtssinglehandletodescriptorrange.param().abi(), core::mem::transmute(pdepthstencildescriptor.unwrap_or(core::mem::zeroed()))) + pub unsafe fn OMSetRenderTargets(&self, numrendertargetdescriptors: u32, prendertargetdescriptors: Option<*const D3D12_CPU_DESCRIPTOR_HANDLE>, rtssinglehandletodescriptorrange: bool, pdepthstencildescriptor: Option<*const D3D12_CPU_DESCRIPTOR_HANDLE>) { + (windows_core::Interface::vtable(self).OMSetRenderTargets)(windows_core::Interface::as_raw(self), core::mem::transmute(numrendertargetdescriptors), core::mem::transmute(prendertargetdescriptors.unwrap_or(core::mem::zeroed())), rtssinglehandletodescriptorrange.into(), core::mem::transmute(pdepthstencildescriptor.unwrap_or(core::mem::zeroed()))) } pub unsafe fn ClearDepthStencilView(&self, depthstencilview: D3D12_CPU_DESCRIPTOR_HANDLE, clearflags: D3D12_CLEAR_FLAGS, depth: f32, stencil: u8, prects: Option<&[super::super::Foundation::RECT]>) { (windows_core::Interface::vtable(self).ClearDepthStencilView)(windows_core::Interface::as_raw(self), core::mem::transmute(depthstencilview), core::mem::transmute(clearflags), core::mem::transmute(depth), core::mem::transmute(stencil), prects.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prects.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) @@ -14307,23 +14280,14 @@ impl ID3D12InfoQueue { { (windows_core::Interface::vtable(self).AddApplicationMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(severity), pdescription.param().abi()).ok() } - pub unsafe fn SetBreakOnCategory(&self, category: D3D12_MESSAGE_CATEGORY, benable: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBreakOnCategory)(windows_core::Interface::as_raw(self), core::mem::transmute(category), benable.param().abi()).ok() + pub unsafe fn SetBreakOnCategory(&self, category: D3D12_MESSAGE_CATEGORY, benable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBreakOnCategory)(windows_core::Interface::as_raw(self), core::mem::transmute(category), benable.into()).ok() } - pub unsafe fn SetBreakOnSeverity(&self, severity: D3D12_MESSAGE_SEVERITY, benable: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBreakOnSeverity)(windows_core::Interface::as_raw(self), core::mem::transmute(severity), benable.param().abi()).ok() + pub unsafe fn SetBreakOnSeverity(&self, severity: D3D12_MESSAGE_SEVERITY, benable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBreakOnSeverity)(windows_core::Interface::as_raw(self), core::mem::transmute(severity), benable.into()).ok() } - pub unsafe fn SetBreakOnID(&self, id: D3D12_MESSAGE_ID, benable: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBreakOnID)(windows_core::Interface::as_raw(self), core::mem::transmute(id), benable.param().abi()).ok() + pub unsafe fn SetBreakOnID(&self, id: D3D12_MESSAGE_ID, benable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBreakOnID)(windows_core::Interface::as_raw(self), core::mem::transmute(id), benable.into()).ok() } pub unsafe fn GetBreakOnCategory(&self, category: D3D12_MESSAGE_CATEGORY) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).GetBreakOnCategory)(windows_core::Interface::as_raw(self), core::mem::transmute(category)) @@ -14334,11 +14298,8 @@ impl ID3D12InfoQueue { pub unsafe fn GetBreakOnID(&self, id: D3D12_MESSAGE_ID) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).GetBreakOnID)(windows_core::Interface::as_raw(self), core::mem::transmute(id)) } - pub unsafe fn SetMuteDebugOutput(&self, bmute: P0) - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMuteDebugOutput)(windows_core::Interface::as_raw(self), bmute.param().abi()) + pub unsafe fn SetMuteDebugOutput(&self, bmute: bool) { + (windows_core::Interface::vtable(self).SetMuteDebugOutput)(windows_core::Interface::as_raw(self), bmute.into()) } pub unsafe fn GetMuteDebugOutput(&self) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).GetMuteDebugOutput)(windows_core::Interface::as_raw(self)) @@ -16552,11 +16513,8 @@ unsafe impl Sync for ID3D12SwapChainAssistant {} windows_core::imp::define_interface!(ID3D12Tools, ID3D12Tools_Vtbl, 0x7071e1f0_e84b_4b33_974f_12fa49de65c5); windows_core::imp::interface_hierarchy!(ID3D12Tools, windows_core::IUnknown); impl ID3D12Tools { - pub unsafe fn EnableShaderInstrumentation(&self, benable: P0) - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableShaderInstrumentation)(windows_core::Interface::as_raw(self), benable.param().abi()) + pub unsafe fn EnableShaderInstrumentation(&self, benable: bool) { + (windows_core::Interface::vtable(self).EnableShaderInstrumentation)(windows_core::Interface::as_raw(self), benable.into()) } pub unsafe fn ShaderInstrumentationEnabled(&self) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).ShaderInstrumentationEnabled)(windows_core::Interface::as_raw(self)) diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D9/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D9/mod.rs index 6b60dfe211..03d38fea31 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D9/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D9/mod.rs @@ -3889,20 +3889,14 @@ impl IDirect3D9 { pub unsafe fn GetAdapterDisplayMode(&self, adapter: u32, pmode: *mut D3DDISPLAYMODE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetAdapterDisplayMode)(windows_core::Interface::as_raw(self), core::mem::transmute(adapter), core::mem::transmute(pmode)).ok() } - pub unsafe fn CheckDeviceType(&self, adapter: u32, devtype: D3DDEVTYPE, adapterformat: D3DFORMAT, backbufferformat: D3DFORMAT, bwindowed: P4) -> windows_core::Result<()> - where - P4: windows_core::Param, - { - (windows_core::Interface::vtable(self).CheckDeviceType)(windows_core::Interface::as_raw(self), core::mem::transmute(adapter), core::mem::transmute(devtype), core::mem::transmute(adapterformat), core::mem::transmute(backbufferformat), bwindowed.param().abi()).ok() + pub unsafe fn CheckDeviceType(&self, adapter: u32, devtype: D3DDEVTYPE, adapterformat: D3DFORMAT, backbufferformat: D3DFORMAT, bwindowed: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CheckDeviceType)(windows_core::Interface::as_raw(self), core::mem::transmute(adapter), core::mem::transmute(devtype), core::mem::transmute(adapterformat), core::mem::transmute(backbufferformat), bwindowed.into()).ok() } pub unsafe fn CheckDeviceFormat(&self, adapter: u32, devicetype: D3DDEVTYPE, adapterformat: D3DFORMAT, usage: u32, rtype: D3DRESOURCETYPE, checkformat: D3DFORMAT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CheckDeviceFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(adapter), core::mem::transmute(devicetype), core::mem::transmute(adapterformat), core::mem::transmute(usage), core::mem::transmute(rtype), core::mem::transmute(checkformat)).ok() } - pub unsafe fn CheckDeviceMultiSampleType(&self, adapter: u32, devicetype: D3DDEVTYPE, surfaceformat: D3DFORMAT, windowed: P3, multisampletype: D3DMULTISAMPLE_TYPE, pqualitylevels: *mut u32) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).CheckDeviceMultiSampleType)(windows_core::Interface::as_raw(self), core::mem::transmute(adapter), core::mem::transmute(devicetype), core::mem::transmute(surfaceformat), windowed.param().abi(), core::mem::transmute(multisampletype), core::mem::transmute(pqualitylevels)).ok() + pub unsafe fn CheckDeviceMultiSampleType(&self, adapter: u32, devicetype: D3DDEVTYPE, surfaceformat: D3DFORMAT, windowed: bool, multisampletype: D3DMULTISAMPLE_TYPE, pqualitylevels: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CheckDeviceMultiSampleType)(windows_core::Interface::as_raw(self), core::mem::transmute(adapter), core::mem::transmute(devicetype), core::mem::transmute(surfaceformat), windowed.into(), core::mem::transmute(multisampletype), core::mem::transmute(pqualitylevels)).ok() } pub unsafe fn CheckDepthStencilMatch(&self, adapter: u32, devicetype: D3DDEVTYPE, adapterformat: D3DFORMAT, rendertargetformat: D3DFORMAT, depthstencilformat: D3DFORMAT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CheckDepthStencilMatch)(windows_core::Interface::as_raw(self), core::mem::transmute(adapter), core::mem::transmute(devicetype), core::mem::transmute(adapterformat), core::mem::transmute(rendertargetformat), core::mem::transmute(depthstencilformat)).ok() @@ -4327,11 +4321,8 @@ impl IDirect3DDevice9 { pub unsafe fn SetCursorPosition(&self, x: i32, y: i32, flags: u32) { (windows_core::Interface::vtable(self).SetCursorPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(flags)) } - pub unsafe fn ShowCursor(&self, bshow: P0) -> super::super::Foundation::BOOL - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ShowCursor)(windows_core::Interface::as_raw(self), bshow.param().abi()) + pub unsafe fn ShowCursor(&self, bshow: bool) -> super::super::Foundation::BOOL { + (windows_core::Interface::vtable(self).ShowCursor)(windows_core::Interface::as_raw(self), bshow.into()) } pub unsafe fn CreateAdditionalSwapChain(&self, ppresentationparameters: *mut D3DPRESENT_PARAMETERS, pswapchain: *mut Option) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CreateAdditionalSwapChain)(windows_core::Interface::as_raw(self), core::mem::transmute(ppresentationparameters), core::mem::transmute(pswapchain)).ok() @@ -4357,11 +4348,8 @@ impl IDirect3DDevice9 { pub unsafe fn GetRasterStatus(&self, iswapchain: u32, prasterstatus: *mut D3DRASTER_STATUS) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetRasterStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(iswapchain), core::mem::transmute(prasterstatus)).ok() } - pub unsafe fn SetDialogBoxMode(&self, benabledialogs: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDialogBoxMode)(windows_core::Interface::as_raw(self), benabledialogs.param().abi()).ok() + pub unsafe fn SetDialogBoxMode(&self, benabledialogs: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDialogBoxMode)(windows_core::Interface::as_raw(self), benabledialogs.into()).ok() } pub unsafe fn SetGammaRamp(&self, iswapchain: u32, flags: u32, pramp: *const D3DGAMMARAMP) { (windows_core::Interface::vtable(self).SetGammaRamp)(windows_core::Interface::as_raw(self), core::mem::transmute(iswapchain), core::mem::transmute(flags), core::mem::transmute(pramp)) @@ -4384,17 +4372,11 @@ impl IDirect3DDevice9 { pub unsafe fn CreateIndexBuffer(&self, length: u32, usage: u32, format: D3DFORMAT, pool: D3DPOOL, ppindexbuffer: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CreateIndexBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(length), core::mem::transmute(usage), core::mem::transmute(format), core::mem::transmute(pool), core::mem::transmute(ppindexbuffer), core::mem::transmute(psharedhandle)).ok() } - pub unsafe fn CreateRenderTarget(&self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, lockable: P5, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> - where - P5: windows_core::Param, - { - (windows_core::Interface::vtable(self).CreateRenderTarget)(windows_core::Interface::as_raw(self), core::mem::transmute(width), core::mem::transmute(height), core::mem::transmute(format), core::mem::transmute(multisample), core::mem::transmute(multisamplequality), lockable.param().abi(), core::mem::transmute(ppsurface), core::mem::transmute(psharedhandle)).ok() + pub unsafe fn CreateRenderTarget(&self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, lockable: bool, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CreateRenderTarget)(windows_core::Interface::as_raw(self), core::mem::transmute(width), core::mem::transmute(height), core::mem::transmute(format), core::mem::transmute(multisample), core::mem::transmute(multisamplequality), lockable.into(), core::mem::transmute(ppsurface), core::mem::transmute(psharedhandle)).ok() } - pub unsafe fn CreateDepthStencilSurface(&self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, discard: P5, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> - where - P5: windows_core::Param, - { - (windows_core::Interface::vtable(self).CreateDepthStencilSurface)(windows_core::Interface::as_raw(self), core::mem::transmute(width), core::mem::transmute(height), core::mem::transmute(format), core::mem::transmute(multisample), core::mem::transmute(multisamplequality), discard.param().abi(), core::mem::transmute(ppsurface), core::mem::transmute(psharedhandle)).ok() + pub unsafe fn CreateDepthStencilSurface(&self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, discard: bool, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CreateDepthStencilSurface)(windows_core::Interface::as_raw(self), core::mem::transmute(width), core::mem::transmute(height), core::mem::transmute(format), core::mem::transmute(multisample), core::mem::transmute(multisamplequality), discard.into(), core::mem::transmute(ppsurface), core::mem::transmute(psharedhandle)).ok() } pub unsafe fn UpdateSurface(&self, psourcesurface: P0, psourcerect: *const super::super::Foundation::RECT, pdestinationsurface: P2, pdestpoint: *const super::super::Foundation::POINT) -> windows_core::Result<()> where @@ -4500,11 +4482,8 @@ impl IDirect3DDevice9 { pub unsafe fn GetLight(&self, index: u32, param1: *mut D3DLIGHT9) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLight)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(param1)).ok() } - pub unsafe fn LightEnable(&self, index: u32, enable: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).LightEnable)(windows_core::Interface::as_raw(self), core::mem::transmute(index), enable.param().abi()).ok() + pub unsafe fn LightEnable(&self, index: u32, enable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).LightEnable)(windows_core::Interface::as_raw(self), core::mem::transmute(index), enable.into()).ok() } pub unsafe fn GetLightEnable(&self, index: u32, penable: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLightEnable)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(penable)).ok() @@ -4583,11 +4562,8 @@ impl IDirect3DDevice9 { pub unsafe fn GetScissorRect(&self, prect: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetScissorRect)(windows_core::Interface::as_raw(self), core::mem::transmute(prect)).ok() } - pub unsafe fn SetSoftwareVertexProcessing(&self, bsoftware: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSoftwareVertexProcessing)(windows_core::Interface::as_raw(self), bsoftware.param().abi()).ok() + pub unsafe fn SetSoftwareVertexProcessing(&self, bsoftware: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSoftwareVertexProcessing)(windows_core::Interface::as_raw(self), bsoftware.into()).ok() } pub unsafe fn GetSoftwareVertexProcessing(&self) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).GetSoftwareVertexProcessing)(windows_core::Interface::as_raw(self)) @@ -5738,20 +5714,14 @@ impl IDirect3DDevice9Ex { pub unsafe fn CheckDeviceState(&self, hdestinationwindow: super::super::Foundation::HWND) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CheckDeviceState)(windows_core::Interface::as_raw(self), core::mem::transmute(hdestinationwindow)).ok() } - pub unsafe fn CreateRenderTargetEx(&self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, lockable: P5, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE, usage: u32) -> windows_core::Result<()> - where - P5: windows_core::Param, - { - (windows_core::Interface::vtable(self).CreateRenderTargetEx)(windows_core::Interface::as_raw(self), core::mem::transmute(width), core::mem::transmute(height), core::mem::transmute(format), core::mem::transmute(multisample), core::mem::transmute(multisamplequality), lockable.param().abi(), core::mem::transmute(ppsurface), core::mem::transmute(psharedhandle), core::mem::transmute(usage)).ok() + pub unsafe fn CreateRenderTargetEx(&self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, lockable: bool, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE, usage: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CreateRenderTargetEx)(windows_core::Interface::as_raw(self), core::mem::transmute(width), core::mem::transmute(height), core::mem::transmute(format), core::mem::transmute(multisample), core::mem::transmute(multisamplequality), lockable.into(), core::mem::transmute(ppsurface), core::mem::transmute(psharedhandle), core::mem::transmute(usage)).ok() } pub unsafe fn CreateOffscreenPlainSurfaceEx(&self, width: u32, height: u32, format: D3DFORMAT, pool: D3DPOOL, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE, usage: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CreateOffscreenPlainSurfaceEx)(windows_core::Interface::as_raw(self), core::mem::transmute(width), core::mem::transmute(height), core::mem::transmute(format), core::mem::transmute(pool), core::mem::transmute(ppsurface), core::mem::transmute(psharedhandle), core::mem::transmute(usage)).ok() } - pub unsafe fn CreateDepthStencilSurfaceEx(&self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, discard: P5, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE, usage: u32) -> windows_core::Result<()> - where - P5: windows_core::Param, - { - (windows_core::Interface::vtable(self).CreateDepthStencilSurfaceEx)(windows_core::Interface::as_raw(self), core::mem::transmute(width), core::mem::transmute(height), core::mem::transmute(format), core::mem::transmute(multisample), core::mem::transmute(multisamplequality), discard.param().abi(), core::mem::transmute(ppsurface), core::mem::transmute(psharedhandle), core::mem::transmute(usage)).ok() + pub unsafe fn CreateDepthStencilSurfaceEx(&self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, discard: bool, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE, usage: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CreateDepthStencilSurfaceEx)(windows_core::Interface::as_raw(self), core::mem::transmute(width), core::mem::transmute(height), core::mem::transmute(format), core::mem::transmute(multisample), core::mem::transmute(multisamplequality), discard.into(), core::mem::transmute(ppsurface), core::mem::transmute(psharedhandle), core::mem::transmute(usage)).ok() } pub unsafe fn ResetEx(&self, ppresentationparameters: *mut D3DPRESENT_PARAMETERS, pfullscreendisplaymode: *mut D3DDISPLAYMODEEX) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetEx)(windows_core::Interface::as_raw(self), core::mem::transmute(ppresentationparameters), core::mem::transmute(pfullscreendisplaymode)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/DirectComposition/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/DirectComposition/mod.rs index 0a9fcbb395..4a1456d988 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectComposition/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectComposition/mod.rs @@ -1,28 +1,23 @@ #[inline] -pub unsafe fn DCompositionAttachMouseDragToHwnd(visual: P0, hwnd: super::super::Foundation::HWND, enable: P2) -> windows_core::Result<()> +pub unsafe fn DCompositionAttachMouseDragToHwnd(visual: P0, hwnd: super::super::Foundation::HWND, enable: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("dcomp.dll" "system" fn DCompositionAttachMouseDragToHwnd(visual : * mut core::ffi::c_void, hwnd : super::super::Foundation:: HWND, enable : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - DCompositionAttachMouseDragToHwnd(visual.param().abi(), core::mem::transmute(hwnd), enable.param().abi()).ok() + DCompositionAttachMouseDragToHwnd(visual.param().abi(), core::mem::transmute(hwnd), enable.into()).ok() } #[inline] -pub unsafe fn DCompositionAttachMouseWheelToHwnd(visual: P0, hwnd: super::super::Foundation::HWND, enable: P2) -> windows_core::Result<()> +pub unsafe fn DCompositionAttachMouseWheelToHwnd(visual: P0, hwnd: super::super::Foundation::HWND, enable: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("dcomp.dll" "system" fn DCompositionAttachMouseWheelToHwnd(visual : * mut core::ffi::c_void, hwnd : super::super::Foundation:: HWND, enable : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - DCompositionAttachMouseWheelToHwnd(visual.param().abi(), core::mem::transmute(hwnd), enable.param().abi()).ok() + DCompositionAttachMouseWheelToHwnd(visual.param().abi(), core::mem::transmute(hwnd), enable.into()).ok() } #[inline] -pub unsafe fn DCompositionBoostCompositorClock(enable: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DCompositionBoostCompositorClock(enable: bool) -> windows_core::Result<()> { windows_targets::link!("dcomp.dll" "system" fn DCompositionBoostCompositorClock(enable : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - DCompositionBoostCompositorClock(enable.param().abi()).ok() + DCompositionBoostCompositorClock(enable.into()).ok() } #[cfg(feature = "Win32_Graphics_Dxgi")] #[inline] @@ -425,11 +420,8 @@ impl IDCompositionArithmeticCompositeEffect { pub unsafe fn SetCoefficients(&self, coefficients: *const super::Direct2D::Common::D2D_VECTOR_4F) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetCoefficients)(windows_core::Interface::as_raw(self), core::mem::transmute(coefficients)).ok() } - pub unsafe fn SetClampOutput(&self, clampoutput: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetClampOutput)(windows_core::Interface::as_raw(self), clampoutput.param().abi()).ok() + pub unsafe fn SetClampOutput(&self, clampoutput: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetClampOutput)(windows_core::Interface::as_raw(self), clampoutput.into()).ok() } pub unsafe fn SetCoefficient1(&self, animation: P0) -> windows_core::Result<()> where @@ -794,11 +786,8 @@ impl IDCompositionColorMatrixEffect { pub unsafe fn SetAlphaMode(&self, mode: super::Direct2D::Common::D2D1_COLORMATRIX_ALPHA_MODE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetAlphaMode)(windows_core::Interface::as_raw(self), core::mem::transmute(mode)).ok() } - pub unsafe fn SetClampOutput(&self, clamp: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetClampOutput)(windows_core::Interface::as_raw(self), clamp.param().abi()).ok() + pub unsafe fn SetClampOutput(&self, clamp: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetClampOutput)(windows_core::Interface::as_raw(self), clamp.into()).ok() } } #[repr(C)] @@ -994,12 +983,9 @@ impl core::ops::Deref for IDCompositionDesktopDevice { } windows_core::imp::interface_hierarchy!(IDCompositionDesktopDevice, windows_core::IUnknown, IDCompositionDevice2); impl IDCompositionDesktopDevice { - pub unsafe fn CreateTargetForHwnd(&self, hwnd: super::super::Foundation::HWND, topmost: P1) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn CreateTargetForHwnd(&self, hwnd: super::super::Foundation::HWND, topmost: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateTargetForHwnd)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), topmost.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateTargetForHwnd)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), topmost.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateSurfaceFromHandle(&self, handle: super::super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1083,12 +1069,9 @@ impl IDCompositionDevice { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetFrameStatistics)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn CreateTargetForHwnd(&self, hwnd: super::super::Foundation::HWND, topmost: P1) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn CreateTargetForHwnd(&self, hwnd: super::super::Foundation::HWND, topmost: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateTargetForHwnd)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), topmost.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateTargetForHwnd)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), topmost.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateVisual(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2564,11 +2547,8 @@ impl IDCompositionLinearTransferEffect { pub unsafe fn SetRedSlope2(&self, redslope: f32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetRedSlope2)(windows_core::Interface::as_raw(self), core::mem::transmute(redslope)).ok() } - pub unsafe fn SetRedDisable(&self, reddisable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRedDisable)(windows_core::Interface::as_raw(self), reddisable.param().abi()).ok() + pub unsafe fn SetRedDisable(&self, reddisable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRedDisable)(windows_core::Interface::as_raw(self), reddisable.into()).ok() } pub unsafe fn SetGreenYIntercept(&self, animation: P0) -> windows_core::Result<()> where @@ -2588,11 +2568,8 @@ impl IDCompositionLinearTransferEffect { pub unsafe fn SetGreenSlope2(&self, greenslope: f32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetGreenSlope2)(windows_core::Interface::as_raw(self), core::mem::transmute(greenslope)).ok() } - pub unsafe fn SetGreenDisable(&self, greendisable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetGreenDisable)(windows_core::Interface::as_raw(self), greendisable.param().abi()).ok() + pub unsafe fn SetGreenDisable(&self, greendisable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetGreenDisable)(windows_core::Interface::as_raw(self), greendisable.into()).ok() } pub unsafe fn SetBlueYIntercept(&self, animation: P0) -> windows_core::Result<()> where @@ -2612,11 +2589,8 @@ impl IDCompositionLinearTransferEffect { pub unsafe fn SetBlueSlope2(&self, blueslope: f32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetBlueSlope2)(windows_core::Interface::as_raw(self), core::mem::transmute(blueslope)).ok() } - pub unsafe fn SetBlueDisable(&self, bluedisable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBlueDisable)(windows_core::Interface::as_raw(self), bluedisable.param().abi()).ok() + pub unsafe fn SetBlueDisable(&self, bluedisable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBlueDisable)(windows_core::Interface::as_raw(self), bluedisable.into()).ok() } pub unsafe fn SetAlphaYIntercept(&self, animation: P0) -> windows_core::Result<()> where @@ -2636,17 +2610,11 @@ impl IDCompositionLinearTransferEffect { pub unsafe fn SetAlphaSlope2(&self, alphaslope: f32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetAlphaSlope2)(windows_core::Interface::as_raw(self), core::mem::transmute(alphaslope)).ok() } - pub unsafe fn SetAlphaDisable(&self, alphadisable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAlphaDisable)(windows_core::Interface::as_raw(self), alphadisable.param().abi()).ok() + pub unsafe fn SetAlphaDisable(&self, alphadisable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAlphaDisable)(windows_core::Interface::as_raw(self), alphadisable.into()).ok() } - pub unsafe fn SetClampOutput(&self, clampoutput: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetClampOutput)(windows_core::Interface::as_raw(self), clampoutput.param().abi()).ok() + pub unsafe fn SetClampOutput(&self, clampoutput: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetClampOutput)(windows_core::Interface::as_raw(self), clampoutput.into()).ok() } } #[repr(C)] @@ -4308,35 +4276,20 @@ impl IDCompositionTableTransferEffect { pub unsafe fn SetAlphaTable(&self, tablevalues: &[f32]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetAlphaTable)(windows_core::Interface::as_raw(self), core::mem::transmute(tablevalues.as_ptr()), tablevalues.len().try_into().unwrap()).ok() } - pub unsafe fn SetRedDisable(&self, reddisable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRedDisable)(windows_core::Interface::as_raw(self), reddisable.param().abi()).ok() + pub unsafe fn SetRedDisable(&self, reddisable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRedDisable)(windows_core::Interface::as_raw(self), reddisable.into()).ok() } - pub unsafe fn SetGreenDisable(&self, greendisable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetGreenDisable)(windows_core::Interface::as_raw(self), greendisable.param().abi()).ok() + pub unsafe fn SetGreenDisable(&self, greendisable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetGreenDisable)(windows_core::Interface::as_raw(self), greendisable.into()).ok() } - pub unsafe fn SetBlueDisable(&self, bluedisable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBlueDisable)(windows_core::Interface::as_raw(self), bluedisable.param().abi()).ok() + pub unsafe fn SetBlueDisable(&self, bluedisable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBlueDisable)(windows_core::Interface::as_raw(self), bluedisable.into()).ok() } - pub unsafe fn SetAlphaDisable(&self, alphadisable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAlphaDisable)(windows_core::Interface::as_raw(self), alphadisable.param().abi()).ok() + pub unsafe fn SetAlphaDisable(&self, alphadisable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAlphaDisable)(windows_core::Interface::as_raw(self), alphadisable.into()).ok() } - pub unsafe fn SetClampOutput(&self, clampoutput: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetClampOutput)(windows_core::Interface::as_raw(self), clampoutput.param().abi()).ok() + pub unsafe fn SetClampOutput(&self, clampoutput: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetClampOutput)(windows_core::Interface::as_raw(self), clampoutput.into()).ok() } pub unsafe fn SetRedTableValue(&self, index: u32, animation: P1) -> windows_core::Result<()> where @@ -4866,11 +4819,8 @@ impl IDCompositionTurbulenceEffect { pub unsafe fn SetNoise(&self, noise: super::Direct2D::Common::D2D1_TURBULENCE_NOISE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetNoise)(windows_core::Interface::as_raw(self), core::mem::transmute(noise)).ok() } - pub unsafe fn SetStitchable(&self, stitchable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStitchable)(windows_core::Interface::as_raw(self), stitchable.param().abi()).ok() + pub unsafe fn SetStitchable(&self, stitchable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStitchable)(windows_core::Interface::as_raw(self), stitchable.into()).ok() } } #[repr(C)] @@ -5062,13 +5012,12 @@ impl IDCompositionVisual { { (windows_core::Interface::vtable(self).SetContent)(windows_core::Interface::as_raw(self), content.param().abi()).ok() } - pub unsafe fn AddVisual(&self, visual: P0, insertabove: P1, referencevisual: P2) -> windows_core::Result<()> + pub unsafe fn AddVisual(&self, visual: P0, insertabove: bool, referencevisual: P2) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddVisual)(windows_core::Interface::as_raw(self), visual.param().abi(), insertabove.param().abi(), referencevisual.param().abi()).ok() + (windows_core::Interface::vtable(self).AddVisual)(windows_core::Interface::as_raw(self), visual.param().abi(), insertabove.into(), referencevisual.param().abi()).ok() } pub unsafe fn RemoveVisual(&self, visual: P0) -> windows_core::Result<()> where @@ -5318,11 +5267,8 @@ impl IDCompositionVisual3 { pub unsafe fn SetTransform2(&self, matrix: *const super::Direct2D::Common::D2D_MATRIX_4X4_F) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetTransform2)(windows_core::Interface::as_raw(self), core::mem::transmute(matrix)).ok() } - pub unsafe fn SetVisible(&self, visible: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetVisible)(windows_core::Interface::as_raw(self), visible.param().abi()).ok() + pub unsafe fn SetVisible(&self, visible: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetVisible)(windows_core::Interface::as_raw(self), visible.into()).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/DirectDraw/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/DirectDraw/mod.rs index 952a79e1b3..1aee06d797 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectDraw/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectDraw/mod.rs @@ -10209,9 +10209,6 @@ pub type LPDDENUMVIDEOCALLBACK = Option windows_core::HRESULT>; #[cfg(feature = "Win32_Graphics_Gdi")] pub type LPDDHALCOLORCB_COLORCONTROL = Option u32>; @@ -10385,9 +10382,6 @@ pub type PDD_DESTROYDRIVER = Option u32>; pub type PDD_FREEDRIVERMEMORY = Option u32>; pub type PDD_GETAVAILDRIVERMEMORY = Option u32>; @@ -10397,9 +10391,6 @@ pub type PDD_GETSCANLINE = Option u32>; pub type PDD_KERNELCB_SYNCVIDEOPORT = Option u32>; pub type PDD_MAPMEMORY = Option u32>; @@ -10422,9 +10413,6 @@ pub type PDD_SETMODE = Option u32>; pub type PDD_SURFCB_BLT = Option u32>; pub type PDD_SURFCB_DESTROYSURFACE = Option u32>; diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/DirectManipulation/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/DirectManipulation/mod.rs index 1f0fe8241c..2e26567574 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectManipulation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectManipulation/mod.rs @@ -1327,11 +1327,8 @@ impl IDirectManipulationViewport { pub unsafe fn SetViewportRect(&self, viewport: *const super::super::Foundation::RECT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetViewportRect)(windows_core::Interface::as_raw(self), core::mem::transmute(viewport)).ok() } - pub unsafe fn ZoomToRect(&self, left: f32, top: f32, right: f32, bottom: f32, animate: P4) -> windows_core::Result<()> - where - P4: windows_core::Param, - { - (windows_core::Interface::vtable(self).ZoomToRect)(windows_core::Interface::as_raw(self), core::mem::transmute(left), core::mem::transmute(top), core::mem::transmute(right), core::mem::transmute(bottom), animate.param().abi()).ok() + pub unsafe fn ZoomToRect(&self, left: f32, top: f32, right: f32, bottom: f32, animate: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ZoomToRect)(windows_core::Interface::as_raw(self), core::mem::transmute(left), core::mem::transmute(top), core::mem::transmute(right), core::mem::transmute(bottom), animate.into()).ok() } pub unsafe fn SetViewportTransform(&self, matrix: &[f32]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetViewportTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(matrix.as_ptr()), matrix.len().try_into().unwrap()).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/DirectWrite/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/DirectWrite/mod.rs index cc23a762aa..933187a7dc 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectWrite/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectWrite/mod.rs @@ -2277,11 +2277,8 @@ unsafe impl Sync for IDWriteColorGlyphRunEnumerator1 {} windows_core::imp::define_interface!(IDWriteFactory, IDWriteFactory_Vtbl, 0xb859ee5a_d838_4b5b_a2e8_1adc7d93db48); windows_core::imp::interface_hierarchy!(IDWriteFactory, windows_core::IUnknown); impl IDWriteFactory { - pub unsafe fn GetSystemFontCollection(&self, fontcollection: *mut Option, checkforupdates: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetSystemFontCollection)(windows_core::Interface::as_raw(self), core::mem::transmute(fontcollection), checkforupdates.param().abi()).ok() + pub unsafe fn GetSystemFontCollection(&self, fontcollection: *mut Option, checkforupdates: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetSystemFontCollection)(windows_core::Interface::as_raw(self), core::mem::transmute(fontcollection), checkforupdates.into()).ok() } pub unsafe fn CreateCustomFontCollection(&self, collectionloader: P0, collectionkey: *const core::ffi::c_void, collectionkeysize: u32) -> windows_core::Result where @@ -2369,13 +2366,12 @@ impl IDWriteFactory { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateTextLayout)(windows_core::Interface::as_raw(self), core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.param().abi(), core::mem::transmute(maxwidth), core::mem::transmute(maxheight), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CreateGdiCompatibleTextLayout(&self, string: &[u16], textformat: P2, layoutwidth: f32, layoutheight: f32, pixelsperdip: f32, transform: Option<*const DWRITE_MATRIX>, usegdinatural: P7) -> windows_core::Result + pub unsafe fn CreateGdiCompatibleTextLayout(&self, string: &[u16], textformat: P2, layoutwidth: f32, layoutheight: f32, pixelsperdip: f32, transform: Option<*const DWRITE_MATRIX>, usegdinatural: bool) -> windows_core::Result where P2: windows_core::Param, - P7: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateGdiCompatibleTextLayout)(windows_core::Interface::as_raw(self), core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.param().abi(), core::mem::transmute(layoutwidth), core::mem::transmute(layoutheight), core::mem::transmute(pixelsperdip), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), usegdinatural.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateGdiCompatibleTextLayout)(windows_core::Interface::as_raw(self), core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.param().abi(), core::mem::transmute(layoutwidth), core::mem::transmute(layoutheight), core::mem::transmute(pixelsperdip), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), usegdinatural.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateEllipsisTrimmingSign(&self, textformat: P0) -> windows_core::Result where @@ -2388,13 +2384,12 @@ impl IDWriteFactory { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateTextAnalyzer)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CreateNumberSubstitution(&self, substitutionmethod: DWRITE_NUMBER_SUBSTITUTION_METHOD, localename: P1, ignoreuseroverride: P2) -> windows_core::Result + pub unsafe fn CreateNumberSubstitution(&self, substitutionmethod: DWRITE_NUMBER_SUBSTITUTION_METHOD, localename: P1, ignoreuseroverride: bool) -> windows_core::Result where P1: windows_core::Param, - P2: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateNumberSubstitution)(windows_core::Interface::as_raw(self), core::mem::transmute(substitutionmethod), localename.param().abi(), ignoreuseroverride.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateNumberSubstitution)(windows_core::Interface::as_raw(self), core::mem::transmute(substitutionmethod), localename.param().abi(), ignoreuseroverride.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateGlyphRunAnalysis(&self, glyphrun: *const DWRITE_GLYPH_RUN, pixelsperdip: f32, transform: Option<*const DWRITE_MATRIX>, renderingmode: DWRITE_RENDERING_MODE, measuringmode: DWRITE_MEASURING_MODE, baselineoriginx: f32, baselineoriginy: f32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2680,11 +2675,8 @@ impl core::ops::Deref for IDWriteFactory1 { } windows_core::imp::interface_hierarchy!(IDWriteFactory1, windows_core::IUnknown, IDWriteFactory); impl IDWriteFactory1 { - pub unsafe fn GetEudcFontCollection(&self, fontcollection: *mut Option, checkforupdates: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetEudcFontCollection)(windows_core::Interface::as_raw(self), core::mem::transmute(fontcollection), checkforupdates.param().abi()).ok() + pub unsafe fn GetEudcFontCollection(&self, fontcollection: *mut Option, checkforupdates: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetEudcFontCollection)(windows_core::Interface::as_raw(self), core::mem::transmute(fontcollection), checkforupdates.into()).ok() } pub unsafe fn CreateCustomRenderingParams(&self, gamma: f32, enhancedcontrast: f32, enhancedcontrastgrayscale: f32, cleartypelevel: f32, pixelgeometry: DWRITE_PIXEL_GEOMETRY, renderingmode: DWRITE_RENDERING_MODE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2900,12 +2892,8 @@ impl IDWriteFactory3 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateFontCollectionFromFontSet)(windows_core::Interface::as_raw(self), fontset.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn GetSystemFontCollection(&self, includedownloadablefonts: P0, fontcollection: *mut Option, checkforupdates: P2) -> windows_core::Result<()> - where - P0: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetSystemFontCollection)(windows_core::Interface::as_raw(self), includedownloadablefonts.param().abi(), core::mem::transmute(fontcollection), checkforupdates.param().abi()).ok() + pub unsafe fn GetSystemFontCollection(&self, includedownloadablefonts: bool, fontcollection: *mut Option, checkforupdates: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetSystemFontCollection)(windows_core::Interface::as_raw(self), includedownloadablefonts.into(), core::mem::transmute(fontcollection), checkforupdates.into()).ok() } pub unsafe fn GetFontDownloadQueue(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3283,19 +3271,13 @@ impl IDWriteFactory6 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateFontResource)(windows_core::Interface::as_raw(self), fontfile.param().abi(), core::mem::transmute(faceindex), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn GetSystemFontSet(&self, includedownloadablefonts: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetSystemFontSet(&self, includedownloadablefonts: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetSystemFontSet)(windows_core::Interface::as_raw(self), includedownloadablefonts.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetSystemFontSet)(windows_core::Interface::as_raw(self), includedownloadablefonts.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn GetSystemFontCollection(&self, includedownloadablefonts: P0, fontfamilymodel: DWRITE_FONT_FAMILY_MODEL) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetSystemFontCollection(&self, includedownloadablefonts: bool, fontfamilymodel: DWRITE_FONT_FAMILY_MODEL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetSystemFontCollection)(windows_core::Interface::as_raw(self), includedownloadablefonts.param().abi(), core::mem::transmute(fontfamilymodel), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetSystemFontCollection)(windows_core::Interface::as_raw(self), includedownloadablefonts.into(), core::mem::transmute(fontfamilymodel), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateFontCollectionFromFontSet(&self, fontset: P0, fontfamilymodel: DWRITE_FONT_FAMILY_MODEL) -> windows_core::Result where @@ -3442,19 +3424,13 @@ impl core::ops::Deref for IDWriteFactory7 { } windows_core::imp::interface_hierarchy!(IDWriteFactory7, windows_core::IUnknown, IDWriteFactory, IDWriteFactory1, IDWriteFactory2, IDWriteFactory3, IDWriteFactory4, IDWriteFactory5, IDWriteFactory6); impl IDWriteFactory7 { - pub unsafe fn GetSystemFontSet(&self, includedownloadablefonts: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetSystemFontSet(&self, includedownloadablefonts: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetSystemFontSet)(windows_core::Interface::as_raw(self), includedownloadablefonts.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetSystemFontSet)(windows_core::Interface::as_raw(self), includedownloadablefonts.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn GetSystemFontCollection(&self, includedownloadablefonts: P0, fontfamilymodel: DWRITE_FONT_FAMILY_MODEL) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetSystemFontCollection(&self, includedownloadablefonts: bool, fontfamilymodel: DWRITE_FONT_FAMILY_MODEL) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetSystemFontCollection)(windows_core::Interface::as_raw(self), includedownloadablefonts.param().abi(), core::mem::transmute(fontfamilymodel), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetSystemFontCollection)(windows_core::Interface::as_raw(self), includedownloadablefonts.into(), core::mem::transmute(fontfamilymodel), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -4392,11 +4368,8 @@ impl IDWriteFontFace { pub unsafe fn GetGlyphCount(&self) -> u16 { (windows_core::Interface::vtable(self).GetGlyphCount)(windows_core::Interface::as_raw(self)) } - pub unsafe fn GetDesignGlyphMetrics(&self, glyphindices: *const u16, glyphcount: u32, glyphmetrics: *mut DWRITE_GLYPH_METRICS, issideways: P3) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetDesignGlyphMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphindices), core::mem::transmute(glyphcount), core::mem::transmute(glyphmetrics), issideways.param().abi()).ok() + pub unsafe fn GetDesignGlyphMetrics(&self, glyphindices: *const u16, glyphcount: u32, glyphmetrics: *mut DWRITE_GLYPH_METRICS, issideways: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetDesignGlyphMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphindices), core::mem::transmute(glyphcount), core::mem::transmute(glyphmetrics), issideways.into()).ok() } pub unsafe fn GetGlyphIndices(&self, codepoints: *const u32, codepointcount: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4409,13 +4382,11 @@ impl IDWriteFontFace { (windows_core::Interface::vtable(self).ReleaseFontTable)(windows_core::Interface::as_raw(self), core::mem::transmute(tablecontext)) } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] - pub unsafe fn GetGlyphRunOutline(&self, emsize: f32, glyphindices: *const u16, glyphadvances: Option<*const f32>, glyphoffsets: Option<*const DWRITE_GLYPH_OFFSET>, glyphcount: u32, issideways: P5, isrighttoleft: P6, geometrysink: P7) -> windows_core::Result<()> + pub unsafe fn GetGlyphRunOutline(&self, emsize: f32, glyphindices: *const u16, glyphadvances: Option<*const f32>, glyphoffsets: Option<*const DWRITE_GLYPH_OFFSET>, glyphcount: u32, issideways: bool, isrighttoleft: bool, geometrysink: P7) -> windows_core::Result<()> where - P5: windows_core::Param, - P6: windows_core::Param, P7: windows_core::Param, { - (windows_core::Interface::vtable(self).GetGlyphRunOutline)(windows_core::Interface::as_raw(self), core::mem::transmute(emsize), core::mem::transmute(glyphindices), core::mem::transmute(glyphadvances.unwrap_or(core::mem::zeroed())), core::mem::transmute(glyphoffsets.unwrap_or(core::mem::zeroed())), core::mem::transmute(glyphcount), issideways.param().abi(), isrighttoleft.param().abi(), geometrysink.param().abi()).ok() + (windows_core::Interface::vtable(self).GetGlyphRunOutline)(windows_core::Interface::as_raw(self), core::mem::transmute(emsize), core::mem::transmute(glyphindices), core::mem::transmute(glyphadvances.unwrap_or(core::mem::zeroed())), core::mem::transmute(glyphoffsets.unwrap_or(core::mem::zeroed())), core::mem::transmute(glyphcount), issideways.into(), isrighttoleft.into(), geometrysink.param().abi()).ok() } pub unsafe fn GetRecommendedRenderingMode(&self, emsize: f32, pixelsperdip: f32, measuringmode: DWRITE_MEASURING_MODE, renderingparams: P3) -> windows_core::Result where @@ -4427,12 +4398,8 @@ impl IDWriteFontFace { pub unsafe fn GetGdiCompatibleMetrics(&self, emsize: f32, pixelsperdip: f32, transform: Option<*const DWRITE_MATRIX>, fontfacemetrics: *mut DWRITE_FONT_METRICS) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetGdiCompatibleMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(emsize), core::mem::transmute(pixelsperdip), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), core::mem::transmute(fontfacemetrics)).ok() } - pub unsafe fn GetGdiCompatibleGlyphMetrics(&self, emsize: f32, pixelsperdip: f32, transform: Option<*const DWRITE_MATRIX>, usegdinatural: P3, glyphindices: *const u16, glyphcount: u32, glyphmetrics: *mut DWRITE_GLYPH_METRICS, issideways: P7) -> windows_core::Result<()> - where - P3: windows_core::Param, - P7: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetGdiCompatibleGlyphMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(emsize), core::mem::transmute(pixelsperdip), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), usegdinatural.param().abi(), core::mem::transmute(glyphindices), core::mem::transmute(glyphcount), core::mem::transmute(glyphmetrics), issideways.param().abi()).ok() + pub unsafe fn GetGdiCompatibleGlyphMetrics(&self, emsize: f32, pixelsperdip: f32, transform: Option<*const DWRITE_MATRIX>, usegdinatural: bool, glyphindices: *const u16, glyphcount: u32, glyphmetrics: *mut DWRITE_GLYPH_METRICS, issideways: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetGdiCompatibleGlyphMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(emsize), core::mem::transmute(pixelsperdip), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), usegdinatural.into(), core::mem::transmute(glyphindices), core::mem::transmute(glyphcount), core::mem::transmute(glyphmetrics), issideways.into()).ok() } } #[repr(C)] @@ -4605,19 +4572,12 @@ impl IDWriteFontFace1 { pub unsafe fn IsMonospacedFont(&self) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).IsMonospacedFont)(windows_core::Interface::as_raw(self)) } - pub unsafe fn GetDesignGlyphAdvances(&self, glyphcount: u32, glyphindices: *const u16, glyphadvances: *mut i32, issideways: P3) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetDesignGlyphAdvances)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphcount), core::mem::transmute(glyphindices), core::mem::transmute(glyphadvances), issideways.param().abi()).ok() + pub unsafe fn GetDesignGlyphAdvances(&self, glyphcount: u32, glyphindices: *const u16, glyphadvances: *mut i32, issideways: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetDesignGlyphAdvances)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphcount), core::mem::transmute(glyphindices), core::mem::transmute(glyphadvances), issideways.into()).ok() } - pub unsafe fn GetGdiCompatibleGlyphAdvances(&self, emsize: f32, pixelsperdip: f32, transform: Option<*const DWRITE_MATRIX>, usegdinatural: P3, issideways: P4, glyphcount: u32, glyphindices: *const u16) -> windows_core::Result - where - P3: windows_core::Param, - P4: windows_core::Param, - { + pub unsafe fn GetGdiCompatibleGlyphAdvances(&self, emsize: f32, pixelsperdip: f32, transform: Option<*const DWRITE_MATRIX>, usegdinatural: bool, issideways: bool, glyphcount: u32, glyphindices: *const u16) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetGdiCompatibleGlyphAdvances)(windows_core::Interface::as_raw(self), core::mem::transmute(emsize), core::mem::transmute(pixelsperdip), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), usegdinatural.param().abi(), issideways.param().abi(), core::mem::transmute(glyphcount), core::mem::transmute(glyphindices), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetGdiCompatibleGlyphAdvances)(windows_core::Interface::as_raw(self), core::mem::transmute(emsize), core::mem::transmute(pixelsperdip), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), usegdinatural.into(), issideways.into(), core::mem::transmute(glyphcount), core::mem::transmute(glyphindices), &mut result__).map(|| result__) } pub unsafe fn GetKerningPairAdjustments(&self, glyphcount: u32, glyphindices: *const u16) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4626,12 +4586,9 @@ impl IDWriteFontFace1 { pub unsafe fn HasKerningPairs(&self) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).HasKerningPairs)(windows_core::Interface::as_raw(self)) } - pub unsafe fn GetRecommendedRenderingMode(&self, fontemsize: f32, dpix: f32, dpiy: f32, transform: Option<*const DWRITE_MATRIX>, issideways: P4, outlinethreshold: DWRITE_OUTLINE_THRESHOLD, measuringmode: DWRITE_MEASURING_MODE) -> windows_core::Result - where - P4: windows_core::Param, - { + pub unsafe fn GetRecommendedRenderingMode(&self, fontemsize: f32, dpix: f32, dpiy: f32, transform: Option<*const DWRITE_MATRIX>, issideways: bool, outlinethreshold: DWRITE_OUTLINE_THRESHOLD, measuringmode: DWRITE_MEASURING_MODE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), core::mem::transmute(fontemsize), core::mem::transmute(dpix), core::mem::transmute(dpiy), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), issideways.param().abi(), core::mem::transmute(outlinethreshold), core::mem::transmute(measuringmode), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), core::mem::transmute(fontemsize), core::mem::transmute(dpix), core::mem::transmute(dpiy), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), issideways.into(), core::mem::transmute(outlinethreshold), core::mem::transmute(measuringmode), &mut result__).map(|| result__) } pub unsafe fn GetVerticalGlyphVariants(&self, glyphcount: u32, nominalglyphindices: *const u16) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4794,12 +4751,11 @@ impl IDWriteFontFace2 { pub unsafe fn GetPaletteEntries(&self, colorpaletteindex: u32, firstentryindex: u32, paletteentries: &mut [DWRITE_COLOR_F]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetPaletteEntries)(windows_core::Interface::as_raw(self), core::mem::transmute(colorpaletteindex), core::mem::transmute(firstentryindex), paletteentries.len().try_into().unwrap(), core::mem::transmute(paletteentries.as_ptr())).ok() } - pub unsafe fn GetRecommendedRenderingMode(&self, fontemsize: f32, dpix: f32, dpiy: f32, transform: Option<*const DWRITE_MATRIX>, issideways: P4, outlinethreshold: DWRITE_OUTLINE_THRESHOLD, measuringmode: DWRITE_MEASURING_MODE, renderingparams: P7, renderingmode: *mut DWRITE_RENDERING_MODE, gridfitmode: *mut DWRITE_GRID_FIT_MODE) -> windows_core::Result<()> + pub unsafe fn GetRecommendedRenderingMode(&self, fontemsize: f32, dpix: f32, dpiy: f32, transform: Option<*const DWRITE_MATRIX>, issideways: bool, outlinethreshold: DWRITE_OUTLINE_THRESHOLD, measuringmode: DWRITE_MEASURING_MODE, renderingparams: P7, renderingmode: *mut DWRITE_RENDERING_MODE, gridfitmode: *mut DWRITE_GRID_FIT_MODE) -> windows_core::Result<()> where - P4: windows_core::Param, P7: windows_core::Param, { - (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), core::mem::transmute(fontemsize), core::mem::transmute(dpix), core::mem::transmute(dpiy), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), issideways.param().abi(), core::mem::transmute(outlinethreshold), core::mem::transmute(measuringmode), renderingparams.param().abi(), core::mem::transmute(renderingmode), core::mem::transmute(gridfitmode)).ok() + (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), core::mem::transmute(fontemsize), core::mem::transmute(dpix), core::mem::transmute(dpiy), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), issideways.into(), core::mem::transmute(outlinethreshold), core::mem::transmute(measuringmode), renderingparams.param().abi(), core::mem::transmute(renderingmode), core::mem::transmute(gridfitmode)).ok() } } #[repr(C)] @@ -4902,12 +4858,11 @@ impl IDWriteFontFace3 { pub unsafe fn HasCharacter(&self, unicodevalue: u32) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).HasCharacter)(windows_core::Interface::as_raw(self), core::mem::transmute(unicodevalue)) } - pub unsafe fn GetRecommendedRenderingMode(&self, fontemsize: f32, dpix: f32, dpiy: f32, transform: Option<*const DWRITE_MATRIX>, issideways: P4, outlinethreshold: DWRITE_OUTLINE_THRESHOLD, measuringmode: DWRITE_MEASURING_MODE, renderingparams: P7, renderingmode: *mut DWRITE_RENDERING_MODE1, gridfitmode: *mut DWRITE_GRID_FIT_MODE) -> windows_core::Result<()> + pub unsafe fn GetRecommendedRenderingMode(&self, fontemsize: f32, dpix: f32, dpiy: f32, transform: Option<*const DWRITE_MATRIX>, issideways: bool, outlinethreshold: DWRITE_OUTLINE_THRESHOLD, measuringmode: DWRITE_MEASURING_MODE, renderingparams: P7, renderingmode: *mut DWRITE_RENDERING_MODE1, gridfitmode: *mut DWRITE_GRID_FIT_MODE) -> windows_core::Result<()> where - P4: windows_core::Param, P7: windows_core::Param, { - (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), core::mem::transmute(fontemsize), core::mem::transmute(dpix), core::mem::transmute(dpiy), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), issideways.param().abi(), core::mem::transmute(outlinethreshold), core::mem::transmute(measuringmode), renderingparams.param().abi(), core::mem::transmute(renderingmode), core::mem::transmute(gridfitmode)).ok() + (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), core::mem::transmute(fontemsize), core::mem::transmute(dpix), core::mem::transmute(dpiy), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), issideways.into(), core::mem::transmute(outlinethreshold), core::mem::transmute(measuringmode), renderingparams.param().abi(), core::mem::transmute(renderingmode), core::mem::transmute(gridfitmode)).ok() } pub unsafe fn IsCharacterLocal(&self, unicodevalue: u32) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).IsCharacterLocal)(windows_core::Interface::as_raw(self), core::mem::transmute(unicodevalue)) @@ -4915,19 +4870,13 @@ impl IDWriteFontFace3 { pub unsafe fn IsGlyphLocal(&self, glyphid: u16) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).IsGlyphLocal)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphid)) } - pub unsafe fn AreCharactersLocal(&self, characters: &[u16], enqueueifnotlocal: P2) -> windows_core::Result - where - P2: windows_core::Param, - { + pub unsafe fn AreCharactersLocal(&self, characters: &[u16], enqueueifnotlocal: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AreCharactersLocal)(windows_core::Interface::as_raw(self), core::mem::transmute(characters.as_ptr()), characters.len().try_into().unwrap(), enqueueifnotlocal.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).AreCharactersLocal)(windows_core::Interface::as_raw(self), core::mem::transmute(characters.as_ptr()), characters.len().try_into().unwrap(), enqueueifnotlocal.into(), &mut result__).map(|| result__) } - pub unsafe fn AreGlyphsLocal(&self, glyphindices: &[u16], enqueueifnotlocal: P2) -> windows_core::Result - where - P2: windows_core::Param, - { + pub unsafe fn AreGlyphsLocal(&self, glyphindices: &[u16], enqueueifnotlocal: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AreGlyphsLocal)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphindices.as_ptr()), glyphindices.len().try_into().unwrap(), enqueueifnotlocal.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).AreGlyphsLocal)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphindices.as_ptr()), glyphindices.len().try_into().unwrap(), enqueueifnotlocal.into(), &mut result__).map(|| result__) } } #[repr(C)] @@ -6793,31 +6742,19 @@ impl IDWriteFontSet1 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetFilteredFonts)(windows_core::Interface::as_raw(self), core::mem::transmute(indices.as_ptr()), indices.len().try_into().unwrap(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn GetFilteredFonts2(&self, fontaxisranges: &[DWRITE_FONT_AXIS_RANGE], selectanyrange: P2) -> windows_core::Result - where - P2: windows_core::Param, - { + pub unsafe fn GetFilteredFonts2(&self, fontaxisranges: &[DWRITE_FONT_AXIS_RANGE], selectanyrange: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetFilteredFonts2)(windows_core::Interface::as_raw(self), core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), selectanyrange.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetFilteredFonts2)(windows_core::Interface::as_raw(self), core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), selectanyrange.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn GetFilteredFonts3(&self, properties: Option<&[DWRITE_FONT_PROPERTY]>, selectanyproperty: P2) -> windows_core::Result - where - P2: windows_core::Param, - { + pub unsafe fn GetFilteredFonts3(&self, properties: Option<&[DWRITE_FONT_PROPERTY]>, selectanyproperty: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetFilteredFonts3)(windows_core::Interface::as_raw(self), core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), selectanyproperty.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetFilteredFonts3)(windows_core::Interface::as_raw(self), core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), selectanyproperty.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn GetFilteredFontIndices(&self, fontaxisranges: &[DWRITE_FONT_AXIS_RANGE], selectanyrange: P2, indices: &mut [u32], actualindexcount: *mut u32) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetFilteredFontIndices)(windows_core::Interface::as_raw(self), core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), selectanyrange.param().abi(), core::mem::transmute(indices.as_ptr()), indices.len().try_into().unwrap(), core::mem::transmute(actualindexcount)).ok() + pub unsafe fn GetFilteredFontIndices(&self, fontaxisranges: &[DWRITE_FONT_AXIS_RANGE], selectanyrange: bool, indices: &mut [u32], actualindexcount: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetFilteredFontIndices)(windows_core::Interface::as_raw(self), core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), selectanyrange.into(), core::mem::transmute(indices.as_ptr()), indices.len().try_into().unwrap(), core::mem::transmute(actualindexcount)).ok() } - pub unsafe fn GetFilteredFontIndices2(&self, properties: &[DWRITE_FONT_PROPERTY], selectanyproperty: P2, indices: &mut [u32], actualindexcount: *mut u32) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetFilteredFontIndices2)(windows_core::Interface::as_raw(self), core::mem::transmute(properties.as_ptr()), properties.len().try_into().unwrap(), selectanyproperty.param().abi(), core::mem::transmute(indices.as_ptr()), indices.len().try_into().unwrap(), core::mem::transmute(actualindexcount)).ok() + pub unsafe fn GetFilteredFontIndices2(&self, properties: &[DWRITE_FONT_PROPERTY], selectanyproperty: bool, indices: &mut [u32], actualindexcount: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetFilteredFontIndices2)(windows_core::Interface::as_raw(self), core::mem::transmute(properties.as_ptr()), properties.len().try_into().unwrap(), selectanyproperty.into(), core::mem::transmute(indices.as_ptr()), indices.len().try_into().unwrap(), core::mem::transmute(actualindexcount)).ok() } pub unsafe fn GetFontAxisRanges(&self, listindex: u32, fontaxisranges: &mut [DWRITE_FONT_AXIS_RANGE], actualfontaxisrangecount: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetFontAxisRanges)(windows_core::Interface::as_raw(self), core::mem::transmute(listindex), core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), core::mem::transmute(actualfontaxisrangecount)).ok() @@ -7693,14 +7630,12 @@ unsafe impl Sync for IDWriteInMemoryFontFileLoader {} windows_core::imp::define_interface!(IDWriteInlineObject, IDWriteInlineObject_Vtbl, 0x8339fde3_106f_47ab_8373_1c6295eb10b3); windows_core::imp::interface_hierarchy!(IDWriteInlineObject, windows_core::IUnknown); impl IDWriteInlineObject { - pub unsafe fn Draw(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, renderer: P1, originx: f32, originy: f32, issideways: P4, isrighttoleft: P5, clientdrawingeffect: P6) -> windows_core::Result<()> + pub unsafe fn Draw(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, renderer: P1, originx: f32, originy: f32, issideways: bool, isrighttoleft: bool, clientdrawingeffect: P6) -> windows_core::Result<()> where P1: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, P6: windows_core::Param, { - (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), renderer.param().abi(), core::mem::transmute(originx), core::mem::transmute(originy), issideways.param().abi(), isrighttoleft.param().abi(), clientdrawingeffect.param().abi()).ok() + (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), renderer.param().abi(), core::mem::transmute(originx), core::mem::transmute(originy), issideways.into(), isrighttoleft.into(), clientdrawingeffect.param().abi()).ok() } pub unsafe fn GetMetrics(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8676,12 +8611,8 @@ impl core::ops::Deref for IDWriteTextAnalysisSink1 { } windows_core::imp::interface_hierarchy!(IDWriteTextAnalysisSink1, windows_core::IUnknown, IDWriteTextAnalysisSink); impl IDWriteTextAnalysisSink1 { - pub unsafe fn SetGlyphOrientation(&self, textposition: u32, textlength: u32, glyphorientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, adjustedbidilevel: u8, issideways: P4, isrighttoleft: P5) -> windows_core::Result<()> - where - P4: windows_core::Param, - P5: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetGlyphOrientation)(windows_core::Interface::as_raw(self), core::mem::transmute(textposition), core::mem::transmute(textlength), core::mem::transmute(glyphorientationangle), core::mem::transmute(adjustedbidilevel), issideways.param().abi(), isrighttoleft.param().abi()).ok() + pub unsafe fn SetGlyphOrientation(&self, textposition: u32, textlength: u32, glyphorientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, adjustedbidilevel: u8, issideways: bool, isrighttoleft: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetGlyphOrientation)(windows_core::Interface::as_raw(self), core::mem::transmute(textposition), core::mem::transmute(textlength), core::mem::transmute(glyphorientationangle), core::mem::transmute(adjustedbidilevel), issideways.into(), isrighttoleft.into()).ok() } } #[repr(C)] @@ -8847,12 +8778,10 @@ impl IDWriteTextAnalyzer { { (windows_core::Interface::vtable(self).AnalyzeLineBreakpoints)(windows_core::Interface::as_raw(self), analysissource.param().abi(), core::mem::transmute(textposition), core::mem::transmute(textlength), analysissink.param().abi()).ok() } - pub unsafe fn GetGlyphs(&self, textstring: P0, textlength: u32, fontface: P2, issideways: P3, isrighttoleft: P4, scriptanalysis: *const DWRITE_SCRIPT_ANALYSIS, localename: P6, numbersubstitution: P7, features: Option<*const *const DWRITE_TYPOGRAPHIC_FEATURES>, featurerangelengths: Option<*const u32>, featureranges: u32, maxglyphcount: u32, clustermap: *mut u16, textprops: *mut DWRITE_SHAPING_TEXT_PROPERTIES, glyphindices: *mut u16, glyphprops: *mut DWRITE_SHAPING_GLYPH_PROPERTIES, actualglyphcount: *mut u32) -> windows_core::Result<()> + pub unsafe fn GetGlyphs(&self, textstring: P0, textlength: u32, fontface: P2, issideways: bool, isrighttoleft: bool, scriptanalysis: *const DWRITE_SCRIPT_ANALYSIS, localename: P6, numbersubstitution: P7, features: Option<*const *const DWRITE_TYPOGRAPHIC_FEATURES>, featurerangelengths: Option<*const u32>, featureranges: u32, maxglyphcount: u32, clustermap: *mut u16, textprops: *mut DWRITE_SHAPING_TEXT_PROPERTIES, glyphindices: *mut u16, glyphprops: *mut DWRITE_SHAPING_GLYPH_PROPERTIES, actualglyphcount: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, P6: windows_core::Param, P7: windows_core::Param, { @@ -8861,8 +8790,8 @@ impl IDWriteTextAnalyzer { textstring.param().abi(), core::mem::transmute(textlength), fontface.param().abi(), - issideways.param().abi(), - isrighttoleft.param().abi(), + issideways.into(), + isrighttoleft.into(), core::mem::transmute(scriptanalysis), localename.param().abi(), numbersubstitution.param().abi(), @@ -8878,12 +8807,10 @@ impl IDWriteTextAnalyzer { ) .ok() } - pub unsafe fn GetGlyphPlacements(&self, textstring: P0, clustermap: *const u16, textprops: *mut DWRITE_SHAPING_TEXT_PROPERTIES, textlength: u32, glyphindices: *const u16, glyphprops: *const DWRITE_SHAPING_GLYPH_PROPERTIES, glyphcount: u32, fontface: P7, fontemsize: f32, issideways: P9, isrighttoleft: P10, scriptanalysis: *const DWRITE_SCRIPT_ANALYSIS, localename: P12, features: Option<*const *const DWRITE_TYPOGRAPHIC_FEATURES>, featurerangelengths: Option<*const u32>, featureranges: u32, glyphadvances: *mut f32, glyphoffsets: *mut DWRITE_GLYPH_OFFSET) -> windows_core::Result<()> + pub unsafe fn GetGlyphPlacements(&self, textstring: P0, clustermap: *const u16, textprops: *mut DWRITE_SHAPING_TEXT_PROPERTIES, textlength: u32, glyphindices: *const u16, glyphprops: *const DWRITE_SHAPING_GLYPH_PROPERTIES, glyphcount: u32, fontface: P7, fontemsize: f32, issideways: bool, isrighttoleft: bool, scriptanalysis: *const DWRITE_SCRIPT_ANALYSIS, localename: P12, features: Option<*const *const DWRITE_TYPOGRAPHIC_FEATURES>, featurerangelengths: Option<*const u32>, featureranges: u32, glyphadvances: *mut f32, glyphoffsets: *mut DWRITE_GLYPH_OFFSET) -> windows_core::Result<()> where P0: windows_core::Param, P7: windows_core::Param, - P9: windows_core::Param, - P10: windows_core::Param, P12: windows_core::Param, { (windows_core::Interface::vtable(self).GetGlyphPlacements)( @@ -8897,8 +8824,8 @@ impl IDWriteTextAnalyzer { core::mem::transmute(glyphcount), fontface.param().abi(), core::mem::transmute(fontemsize), - issideways.param().abi(), - isrighttoleft.param().abi(), + issideways.into(), + isrighttoleft.into(), core::mem::transmute(scriptanalysis), localename.param().abi(), core::mem::transmute(features.unwrap_or(core::mem::zeroed())), @@ -8909,13 +8836,10 @@ impl IDWriteTextAnalyzer { ) .ok() } - pub unsafe fn GetGdiCompatibleGlyphPlacements(&self, textstring: P0, clustermap: *const u16, textprops: *const DWRITE_SHAPING_TEXT_PROPERTIES, textlength: u32, glyphindices: *const u16, glyphprops: *const DWRITE_SHAPING_GLYPH_PROPERTIES, glyphcount: u32, fontface: P7, fontemsize: f32, pixelsperdip: f32, transform: Option<*const DWRITE_MATRIX>, usegdinatural: P11, issideways: P12, isrighttoleft: P13, scriptanalysis: *const DWRITE_SCRIPT_ANALYSIS, localename: P15, features: Option<*const *const DWRITE_TYPOGRAPHIC_FEATURES>, featurerangelengths: Option<*const u32>, featureranges: u32, glyphadvances: *mut f32, glyphoffsets: *mut DWRITE_GLYPH_OFFSET) -> windows_core::Result<()> + pub unsafe fn GetGdiCompatibleGlyphPlacements(&self, textstring: P0, clustermap: *const u16, textprops: *const DWRITE_SHAPING_TEXT_PROPERTIES, textlength: u32, glyphindices: *const u16, glyphprops: *const DWRITE_SHAPING_GLYPH_PROPERTIES, glyphcount: u32, fontface: P7, fontemsize: f32, pixelsperdip: f32, transform: Option<*const DWRITE_MATRIX>, usegdinatural: bool, issideways: bool, isrighttoleft: bool, scriptanalysis: *const DWRITE_SCRIPT_ANALYSIS, localename: P15, features: Option<*const *const DWRITE_TYPOGRAPHIC_FEATURES>, featurerangelengths: Option<*const u32>, featureranges: u32, glyphadvances: *mut f32, glyphoffsets: *mut DWRITE_GLYPH_OFFSET) -> windows_core::Result<()> where P0: windows_core::Param, P7: windows_core::Param, - P11: windows_core::Param, - P12: windows_core::Param, - P13: windows_core::Param, P15: windows_core::Param, { (windows_core::Interface::vtable(self).GetGdiCompatibleGlyphPlacements)( @@ -8931,9 +8855,9 @@ impl IDWriteTextAnalyzer { core::mem::transmute(fontemsize), core::mem::transmute(pixelsperdip), core::mem::transmute(transform.unwrap_or(core::mem::zeroed())), - usegdinatural.param().abi(), - issideways.param().abi(), - isrighttoleft.param().abi(), + usegdinatural.into(), + issideways.into(), + isrighttoleft.into(), core::mem::transmute(scriptanalysis), localename.param().abi(), core::mem::transmute(features.unwrap_or(core::mem::zeroed())), @@ -9113,14 +9037,12 @@ impl IDWriteTextAnalyzer1 { pub unsafe fn ApplyCharacterSpacing(&self, leadingspacing: f32, trailingspacing: f32, minimumadvancewidth: f32, glyphcount: u32, clustermap: &[u16], glyphadvances: *const f32, glyphoffsets: *const DWRITE_GLYPH_OFFSET, glyphproperties: *const DWRITE_SHAPING_GLYPH_PROPERTIES, modifiedglyphadvances: *mut f32, modifiedglyphoffsets: *mut DWRITE_GLYPH_OFFSET) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ApplyCharacterSpacing)(windows_core::Interface::as_raw(self), core::mem::transmute(leadingspacing), core::mem::transmute(trailingspacing), core::mem::transmute(minimumadvancewidth), clustermap.len().try_into().unwrap(), core::mem::transmute(glyphcount), core::mem::transmute(clustermap.as_ptr()), core::mem::transmute(glyphadvances), core::mem::transmute(glyphoffsets), core::mem::transmute(glyphproperties), core::mem::transmute(modifiedglyphadvances), core::mem::transmute(modifiedglyphoffsets)).ok() } - pub unsafe fn GetBaseline(&self, fontface: P0, baseline: DWRITE_BASELINE, isvertical: P2, issimulationallowed: P3, scriptanalysis: DWRITE_SCRIPT_ANALYSIS, localename: P5, baselinecoordinate: *mut i32, exists: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> + pub unsafe fn GetBaseline(&self, fontface: P0, baseline: DWRITE_BASELINE, isvertical: bool, issimulationallowed: bool, scriptanalysis: DWRITE_SCRIPT_ANALYSIS, localename: P5, baselinecoordinate: *mut i32, exists: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).GetBaseline)(windows_core::Interface::as_raw(self), fontface.param().abi(), core::mem::transmute(baseline), isvertical.param().abi(), issimulationallowed.param().abi(), core::mem::transmute(scriptanalysis), localename.param().abi(), core::mem::transmute(baselinecoordinate), core::mem::transmute(exists)).ok() + (windows_core::Interface::vtable(self).GetBaseline)(windows_core::Interface::as_raw(self), fontface.param().abi(), core::mem::transmute(baseline), isvertical.into(), issimulationallowed.into(), core::mem::transmute(scriptanalysis), localename.param().abi(), core::mem::transmute(baselinecoordinate), core::mem::transmute(exists)).ok() } pub unsafe fn AnalyzeVerticalGlyphOrientation(&self, analysissource: P0, textposition: u32, textlength: u32, analysissink: P3) -> windows_core::Result<()> where @@ -9129,11 +9051,8 @@ impl IDWriteTextAnalyzer1 { { (windows_core::Interface::vtable(self).AnalyzeVerticalGlyphOrientation)(windows_core::Interface::as_raw(self), analysissource.param().abi(), core::mem::transmute(textposition), core::mem::transmute(textlength), analysissink.param().abi()).ok() } - pub unsafe fn GetGlyphOrientationTransform(&self, glyphorientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, issideways: P1, transform: *mut DWRITE_MATRIX) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetGlyphOrientationTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphorientationangle), issideways.param().abi(), core::mem::transmute(transform)).ok() + pub unsafe fn GetGlyphOrientationTransform(&self, glyphorientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, issideways: bool, transform: *mut DWRITE_MATRIX) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetGlyphOrientationTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphorientationangle), issideways.into(), core::mem::transmute(transform)).ok() } pub unsafe fn GetScriptProperties(&self, scriptanalysis: DWRITE_SCRIPT_ANALYSIS, scriptproperties: *mut DWRITE_SCRIPT_PROPERTIES) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetScriptProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(scriptanalysis), core::mem::transmute(scriptproperties)).ok() @@ -9314,11 +9233,8 @@ impl core::ops::Deref for IDWriteTextAnalyzer2 { } windows_core::imp::interface_hierarchy!(IDWriteTextAnalyzer2, windows_core::IUnknown, IDWriteTextAnalyzer, IDWriteTextAnalyzer1); impl IDWriteTextAnalyzer2 { - pub unsafe fn GetGlyphOrientationTransform(&self, glyphorientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, issideways: P1, originx: f32, originy: f32, transform: *mut DWRITE_MATRIX) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetGlyphOrientationTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphorientationangle), issideways.param().abi(), core::mem::transmute(originx), core::mem::transmute(originy), core::mem::transmute(transform)).ok() + pub unsafe fn GetGlyphOrientationTransform(&self, glyphorientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, issideways: bool, originx: f32, originy: f32, transform: *mut DWRITE_MATRIX) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetGlyphOrientationTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphorientationangle), issideways.into(), core::mem::transmute(originx), core::mem::transmute(originy), core::mem::transmute(transform)).ok() } pub unsafe fn GetTypographicFeatures(&self, fontface: P0, scriptanalysis: DWRITE_SCRIPT_ANALYSIS, localename: P2, actualtagcount: *mut u32, tags: &mut [DWRITE_FONT_FEATURE_TAG]) -> windows_core::Result<()> where @@ -9680,11 +9596,8 @@ impl IDWriteTextFormat1 { pub unsafe fn GetVerticalGlyphOrientation(&self) -> DWRITE_VERTICAL_GLYPH_ORIENTATION { (windows_core::Interface::vtable(self).GetVerticalGlyphOrientation)(windows_core::Interface::as_raw(self)) } - pub unsafe fn SetLastLineWrapping(&self, islastlinewrappingenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetLastLineWrapping)(windows_core::Interface::as_raw(self), islastlinewrappingenabled.param().abi()).ok() + pub unsafe fn SetLastLineWrapping(&self, islastlinewrappingenabled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetLastLineWrapping)(windows_core::Interface::as_raw(self), islastlinewrappingenabled.into()).ok() } pub unsafe fn GetLastLineWrapping(&self) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).GetLastLineWrapping)(windows_core::Interface::as_raw(self)) @@ -9954,17 +9867,11 @@ impl IDWriteTextLayout { pub unsafe fn SetFontSize(&self, fontsize: f32, textrange: DWRITE_TEXT_RANGE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetFontSize)(windows_core::Interface::as_raw(self), core::mem::transmute(fontsize), core::mem::transmute(textrange)).ok() } - pub unsafe fn SetUnderline(&self, hasunderline: P0, textrange: DWRITE_TEXT_RANGE) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUnderline)(windows_core::Interface::as_raw(self), hasunderline.param().abi(), core::mem::transmute(textrange)).ok() + pub unsafe fn SetUnderline(&self, hasunderline: bool, textrange: DWRITE_TEXT_RANGE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUnderline)(windows_core::Interface::as_raw(self), hasunderline.into(), core::mem::transmute(textrange)).ok() } - pub unsafe fn SetStrikethrough(&self, hasstrikethrough: P0, textrange: DWRITE_TEXT_RANGE) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStrikethrough)(windows_core::Interface::as_raw(self), hasstrikethrough.param().abi(), core::mem::transmute(textrange)).ok() + pub unsafe fn SetStrikethrough(&self, hasstrikethrough: bool, textrange: DWRITE_TEXT_RANGE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStrikethrough)(windows_core::Interface::as_raw(self), hasstrikethrough.into(), core::mem::transmute(textrange)).ok() } pub unsafe fn SetDrawingEffect(&self, drawingeffect: P0, textrange: DWRITE_TEXT_RANGE) -> windows_core::Result<()> where @@ -10064,11 +9971,8 @@ impl IDWriteTextLayout { pub unsafe fn HitTestPoint(&self, pointx: f32, pointy: f32, istrailinghit: *mut super::super::Foundation::BOOL, isinside: *mut super::super::Foundation::BOOL, hittestmetrics: *mut DWRITE_HIT_TEST_METRICS) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).HitTestPoint)(windows_core::Interface::as_raw(self), core::mem::transmute(pointx), core::mem::transmute(pointy), core::mem::transmute(istrailinghit), core::mem::transmute(isinside), core::mem::transmute(hittestmetrics)).ok() } - pub unsafe fn HitTestTextPosition(&self, textposition: u32, istrailinghit: P1, pointx: *mut f32, pointy: *mut f32, hittestmetrics: *mut DWRITE_HIT_TEST_METRICS) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).HitTestTextPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(textposition), istrailinghit.param().abi(), core::mem::transmute(pointx), core::mem::transmute(pointy), core::mem::transmute(hittestmetrics)).ok() + pub unsafe fn HitTestTextPosition(&self, textposition: u32, istrailinghit: bool, pointx: *mut f32, pointy: *mut f32, hittestmetrics: *mut DWRITE_HIT_TEST_METRICS) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).HitTestTextPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(textposition), istrailinghit.into(), core::mem::transmute(pointx), core::mem::transmute(pointy), core::mem::transmute(hittestmetrics)).ok() } pub unsafe fn HitTestTextRange(&self, textposition: u32, textlength: u32, originx: f32, originy: f32, hittestmetrics: Option<&mut [DWRITE_HIT_TEST_METRICS]>, actualhittestmetricscount: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).HitTestTextRange)(windows_core::Interface::as_raw(self), core::mem::transmute(textposition), core::mem::transmute(textlength), core::mem::transmute(originx), core::mem::transmute(originy), core::mem::transmute(hittestmetrics.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), hittestmetrics.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualhittestmetricscount)).ok() @@ -10387,11 +10291,8 @@ impl core::ops::Deref for IDWriteTextLayout1 { } windows_core::imp::interface_hierarchy!(IDWriteTextLayout1, windows_core::IUnknown, IDWriteTextFormat, IDWriteTextLayout); impl IDWriteTextLayout1 { - pub unsafe fn SetPairKerning(&self, ispairkerningenabled: P0, textrange: DWRITE_TEXT_RANGE) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPairKerning)(windows_core::Interface::as_raw(self), ispairkerningenabled.param().abi(), core::mem::transmute(textrange)).ok() + pub unsafe fn SetPairKerning(&self, ispairkerningenabled: bool, textrange: DWRITE_TEXT_RANGE) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPairKerning)(windows_core::Interface::as_raw(self), ispairkerningenabled.into(), core::mem::transmute(textrange)).ok() } pub unsafe fn GetPairKerning(&self, currentposition: u32, ispairkerningenabled: *mut super::super::Foundation::BOOL, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetPairKerning)(windows_core::Interface::as_raw(self), core::mem::transmute(currentposition), core::mem::transmute(ispairkerningenabled), core::mem::transmute(textrange.unwrap_or(core::mem::zeroed()))).ok() @@ -10468,11 +10369,8 @@ impl IDWriteTextLayout2 { pub unsafe fn GetVerticalGlyphOrientation(&self) -> DWRITE_VERTICAL_GLYPH_ORIENTATION { (windows_core::Interface::vtable(self).GetVerticalGlyphOrientation)(windows_core::Interface::as_raw(self)) } - pub unsafe fn SetLastLineWrapping(&self, islastlinewrappingenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetLastLineWrapping)(windows_core::Interface::as_raw(self), islastlinewrappingenabled.param().abi()).ok() + pub unsafe fn SetLastLineWrapping(&self, islastlinewrappingenabled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetLastLineWrapping)(windows_core::Interface::as_raw(self), islastlinewrappingenabled.into()).ok() } pub unsafe fn GetLastLineWrapping(&self) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).GetLastLineWrapping)(windows_core::Interface::as_raw(self)) @@ -10757,14 +10655,12 @@ impl IDWriteTextRenderer { { (windows_core::Interface::vtable(self).DrawStrikethrough)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), core::mem::transmute(strikethrough), clientdrawingeffect.param().abi()).ok() } - pub unsafe fn DrawInlineObject(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, originx: f32, originy: f32, inlineobject: P3, issideways: P4, isrighttoleft: P5, clientdrawingeffect: P6) -> windows_core::Result<()> + pub unsafe fn DrawInlineObject(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, originx: f32, originy: f32, inlineobject: P3, issideways: bool, isrighttoleft: bool, clientdrawingeffect: P6) -> windows_core::Result<()> where P3: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, P6: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawInlineObject)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(originx), core::mem::transmute(originy), inlineobject.param().abi(), issideways.param().abi(), isrighttoleft.param().abi(), clientdrawingeffect.param().abi()).ok() + (windows_core::Interface::vtable(self).DrawInlineObject)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(originx), core::mem::transmute(originy), inlineobject.param().abi(), issideways.into(), isrighttoleft.into(), clientdrawingeffect.param().abi()).ok() } } #[repr(C)] @@ -10841,14 +10737,12 @@ impl IDWriteTextRenderer1 { { (windows_core::Interface::vtable(self).DrawStrikethrough)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(baselineoriginx), core::mem::transmute(baselineoriginy), core::mem::transmute(orientationangle), core::mem::transmute(strikethrough), clientdrawingeffect.param().abi()).ok() } - pub unsafe fn DrawInlineObject(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, originx: f32, originy: f32, orientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, inlineobject: P4, issideways: P5, isrighttoleft: P6, clientdrawingeffect: P7) -> windows_core::Result<()> + pub unsafe fn DrawInlineObject(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, originx: f32, originy: f32, orientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, inlineobject: P4, issideways: bool, isrighttoleft: bool, clientdrawingeffect: P7) -> windows_core::Result<()> where P4: windows_core::Param, - P5: windows_core::Param, - P6: windows_core::Param, P7: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawInlineObject)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(originx), core::mem::transmute(originy), core::mem::transmute(orientationangle), inlineobject.param().abi(), issideways.param().abi(), isrighttoleft.param().abi(), clientdrawingeffect.param().abi()).ok() + (windows_core::Interface::vtable(self).DrawInlineObject)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(originx), core::mem::transmute(originy), core::mem::transmute(orientationangle), inlineobject.param().abi(), issideways.into(), isrighttoleft.into(), clientdrawingeffect.param().abi()).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Dwm/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Dwm/mod.rs index 3f58b58168..d8654042da 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Dwm/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Dwm/mod.rs @@ -25,12 +25,9 @@ pub unsafe fn DwmEnableComposition(ucompositionaction: u32) -> windows_core::Res DwmEnableComposition(core::mem::transmute(ucompositionaction)).ok() } #[inline] -pub unsafe fn DwmEnableMMCSS(fenablemmcss: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DwmEnableMMCSS(fenablemmcss: bool) -> windows_core::Result<()> { windows_targets::link!("dwmapi.dll" "system" fn DwmEnableMMCSS(fenablemmcss : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - DwmEnableMMCSS(fenablemmcss.param().abi()).ok() + DwmEnableMMCSS(fenablemmcss.into()).ok() } #[cfg(feature = "Win32_UI_Controls")] #[inline] @@ -92,12 +89,9 @@ pub unsafe fn DwmIsCompositionEnabled() -> windows_core::Result(hwnd: super::super::Foundation::HWND, crefreshes: i32, frelative: P2) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn DwmModifyPreviousDxFrameDuration(hwnd: super::super::Foundation::HWND, crefreshes: i32, frelative: bool) -> windows_core::Result<()> { windows_targets::link!("dwmapi.dll" "system" fn DwmModifyPreviousDxFrameDuration(hwnd : super::super::Foundation:: HWND, crefreshes : i32, frelative : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - DwmModifyPreviousDxFrameDuration(core::mem::transmute(hwnd), core::mem::transmute(crefreshes), frelative.param().abi()).ok() + DwmModifyPreviousDxFrameDuration(core::mem::transmute(hwnd), core::mem::transmute(crefreshes), frelative.into()).ok() } #[inline] pub unsafe fn DwmQueryThumbnailSourceSize(hthumbnail: isize) -> windows_core::Result { @@ -149,12 +143,9 @@ pub unsafe fn DwmShowContact(dwpointerid: u32, eshowcontact: DWM_SHOWCONTACT) -> DwmShowContact(core::mem::transmute(dwpointerid), core::mem::transmute(eshowcontact)).ok() } #[inline] -pub unsafe fn DwmTetherContact(dwpointerid: u32, fenable: P1, pttether: super::super::Foundation::POINT) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn DwmTetherContact(dwpointerid: u32, fenable: bool, pttether: super::super::Foundation::POINT) -> windows_core::Result<()> { windows_targets::link!("dwmapi.dll" "system" fn DwmTetherContact(dwpointerid : u32, fenable : super::super::Foundation:: BOOL, pttether : super::super::Foundation:: POINT) -> windows_core::HRESULT); - DwmTetherContact(core::mem::transmute(dwpointerid), fenable.param().abi(), core::mem::transmute(pttether)).ok() + DwmTetherContact(core::mem::transmute(dwpointerid), fenable.into(), core::mem::transmute(pttether)).ok() } #[inline] pub unsafe fn DwmTransitionOwnedWindow(hwnd: super::super::Foundation::HWND, target: DWMTRANSITION_OWNEDWINDOW_TARGET) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Dxgi/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Dxgi/mod.rs index 0f158ef45e..c0a755cfba 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Dxgi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Dxgi/mod.rs @@ -2623,11 +2623,8 @@ impl IDXGIDisplayControl { pub unsafe fn IsStereoEnabled(&self) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).IsStereoEnabled)(windows_core::Interface::as_raw(self)) } - pub unsafe fn SetStereoEnabled(&self, enabled: P0) - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStereoEnabled)(windows_core::Interface::as_raw(self), enabled.param().abi()) + pub unsafe fn SetStereoEnabled(&self, enabled: bool) { + (windows_core::Interface::vtable(self).SetStereoEnabled)(windows_core::Interface::as_raw(self), enabled.into()) } } #[repr(C)] @@ -3478,23 +3475,14 @@ impl IDXGIInfoQueue { { (windows_core::Interface::vtable(self).AddApplicationMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(severity), pdescription.param().abi()).ok() } - pub unsafe fn SetBreakOnCategory(&self, producer: windows_core::GUID, category: DXGI_INFO_QUEUE_MESSAGE_CATEGORY, benable: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBreakOnCategory)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), core::mem::transmute(category), benable.param().abi()).ok() + pub unsafe fn SetBreakOnCategory(&self, producer: windows_core::GUID, category: DXGI_INFO_QUEUE_MESSAGE_CATEGORY, benable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBreakOnCategory)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), core::mem::transmute(category), benable.into()).ok() } - pub unsafe fn SetBreakOnSeverity(&self, producer: windows_core::GUID, severity: DXGI_INFO_QUEUE_MESSAGE_SEVERITY, benable: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBreakOnSeverity)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), core::mem::transmute(severity), benable.param().abi()).ok() + pub unsafe fn SetBreakOnSeverity(&self, producer: windows_core::GUID, severity: DXGI_INFO_QUEUE_MESSAGE_SEVERITY, benable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBreakOnSeverity)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), core::mem::transmute(severity), benable.into()).ok() } - pub unsafe fn SetBreakOnID(&self, producer: windows_core::GUID, id: i32, benable: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBreakOnID)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), core::mem::transmute(id), benable.param().abi()).ok() + pub unsafe fn SetBreakOnID(&self, producer: windows_core::GUID, id: i32, benable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBreakOnID)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), core::mem::transmute(id), benable.into()).ok() } pub unsafe fn GetBreakOnCategory(&self, producer: windows_core::GUID, category: DXGI_INFO_QUEUE_MESSAGE_CATEGORY) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).GetBreakOnCategory)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), core::mem::transmute(category)) @@ -3505,11 +3493,8 @@ impl IDXGIInfoQueue { pub unsafe fn GetBreakOnID(&self, producer: windows_core::GUID, id: i32) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).GetBreakOnID)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), core::mem::transmute(id)) } - pub unsafe fn SetMuteDebugOutput(&self, producer: windows_core::GUID, bmute: P1) - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMuteDebugOutput)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), bmute.param().abi()) + pub unsafe fn SetMuteDebugOutput(&self, producer: windows_core::GUID, bmute: bool) { + (windows_core::Interface::vtable(self).SetMuteDebugOutput)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), bmute.into()) } pub unsafe fn GetMuteDebugOutput(&self, producer: windows_core::GUID) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).GetMuteDebugOutput)(windows_core::Interface::as_raw(self), core::mem::transmute(producer)) @@ -3940,12 +3925,11 @@ impl IDXGIOutput { pub unsafe fn WaitForVBlank(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).WaitForVBlank)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn TakeOwnership(&self, pdevice: P0, exclusive: P1) -> windows_core::Result<()> + pub unsafe fn TakeOwnership(&self, pdevice: P0, exclusive: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).TakeOwnership)(windows_core::Interface::as_raw(self), pdevice.param().abi(), exclusive.param().abi()).ok() + (windows_core::Interface::vtable(self).TakeOwnership)(windows_core::Interface::as_raw(self), pdevice.param().abi(), exclusive.into()).ok() } pub unsafe fn ReleaseOwnership(&self) { (windows_core::Interface::vtable(self).ReleaseOwnership)(windows_core::Interface::as_raw(self)) @@ -4863,12 +4847,9 @@ impl core::ops::Deref for IDXGISurface1 { windows_core::imp::interface_hierarchy!(IDXGISurface1, windows_core::IUnknown, IDXGIObject, IDXGIDeviceSubObject, IDXGISurface); impl IDXGISurface1 { #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn GetDC(&self, discard: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetDC(&self, discard: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetDC)(windows_core::Interface::as_raw(self), discard.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetDC)(windows_core::Interface::as_raw(self), discard.into(), &mut result__).map(|| result__) } pub unsafe fn ReleaseDC(&self, pdirtyrect: Option<*const super::super::Foundation::RECT>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), core::mem::transmute(pdirtyrect.unwrap_or(core::mem::zeroed()))).ok() @@ -4981,12 +4962,11 @@ impl IDXGISwapChain { let mut result__ = core::ptr::null_mut(); (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetFullscreenState(&self, fullscreen: P0, ptarget: P1) -> windows_core::Result<()> + pub unsafe fn SetFullscreenState(&self, fullscreen: bool, ptarget: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetFullscreenState)(windows_core::Interface::as_raw(self), fullscreen.param().abi(), ptarget.param().abi()).ok() + (windows_core::Interface::vtable(self).SetFullscreenState)(windows_core::Interface::as_raw(self), fullscreen.into(), ptarget.param().abi()).ok() } pub unsafe fn GetFullscreenState(&self, pfullscreen: Option<*mut super::super::Foundation::BOOL>, pptarget: Option<*mut Option>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetFullscreenState)(windows_core::Interface::as_raw(self), core::mem::transmute(pfullscreen.unwrap_or(core::mem::zeroed())), core::mem::transmute(pptarget.unwrap_or(core::mem::zeroed()))).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Gdi/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Gdi/mod.rs index bec6f450b0..585ad2ee1e 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Gdi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Gdi/mod.rs @@ -1323,20 +1323,14 @@ pub unsafe fn GetTextMetricsW(hdc: HDC, lptm: *mut TEXTMETRICW) -> super::super: GetTextMetricsW(core::mem::transmute(hdc), core::mem::transmute(lptm)) } #[inline] -pub unsafe fn GetUpdateRect(hwnd: super::super::Foundation::HWND, lprect: Option<*mut super::super::Foundation::RECT>, berase: P2) -> super::super::Foundation::BOOL -where - P2: windows_core::Param, -{ +pub unsafe fn GetUpdateRect(hwnd: super::super::Foundation::HWND, lprect: Option<*mut super::super::Foundation::RECT>, berase: bool) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn GetUpdateRect(hwnd : super::super::Foundation:: HWND, lprect : *mut super::super::Foundation:: RECT, berase : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetUpdateRect(core::mem::transmute(hwnd), core::mem::transmute(lprect.unwrap_or(core::mem::zeroed())), berase.param().abi()) + GetUpdateRect(core::mem::transmute(hwnd), core::mem::transmute(lprect.unwrap_or(core::mem::zeroed())), berase.into()) } #[inline] -pub unsafe fn GetUpdateRgn(hwnd: super::super::Foundation::HWND, hrgn: HRGN, berase: P2) -> GDI_REGION_TYPE -where - P2: windows_core::Param, -{ +pub unsafe fn GetUpdateRgn(hwnd: super::super::Foundation::HWND, hrgn: HRGN, berase: bool) -> GDI_REGION_TYPE { windows_targets::link!("user32.dll" "system" fn GetUpdateRgn(hwnd : super::super::Foundation:: HWND, hrgn : HRGN, berase : super::super::Foundation:: BOOL) -> GDI_REGION_TYPE); - GetUpdateRgn(core::mem::transmute(hwnd), core::mem::transmute(hrgn), berase.param().abi()) + GetUpdateRgn(core::mem::transmute(hwnd), core::mem::transmute(hrgn), berase.into()) } #[inline] pub unsafe fn GetViewportExtEx(hdc: HDC, lpsize: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL { @@ -1414,20 +1408,14 @@ pub unsafe fn IntersectRect(lprcdst: *mut super::super::Foundation::RECT, lprcsr IntersectRect(core::mem::transmute(lprcdst), core::mem::transmute(lprcsrc1), core::mem::transmute(lprcsrc2)) } #[inline] -pub unsafe fn InvalidateRect(hwnd: Option, lprect: Option<*const super::super::Foundation::RECT>, berase: P2) -> super::super::Foundation::BOOL -where - P2: windows_core::Param, -{ +pub unsafe fn InvalidateRect(hwnd: Option, lprect: Option<*const super::super::Foundation::RECT>, berase: bool) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn InvalidateRect(hwnd : super::super::Foundation:: HWND, lprect : *const super::super::Foundation:: RECT, berase : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - InvalidateRect(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(lprect.unwrap_or(core::mem::zeroed())), berase.param().abi()) + InvalidateRect(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(lprect.unwrap_or(core::mem::zeroed())), berase.into()) } #[inline] -pub unsafe fn InvalidateRgn(hwnd: super::super::Foundation::HWND, hrgn: Option, berase: P2) -> super::super::Foundation::BOOL -where - P2: windows_core::Param, -{ +pub unsafe fn InvalidateRgn(hwnd: super::super::Foundation::HWND, hrgn: Option, berase: bool) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn InvalidateRgn(hwnd : super::super::Foundation:: HWND, hrgn : HRGN, berase : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - InvalidateRgn(core::mem::transmute(hwnd), core::mem::transmute(hrgn.unwrap_or(core::mem::zeroed())), berase.param().abi()) + InvalidateRgn(core::mem::transmute(hwnd), core::mem::transmute(hrgn.unwrap_or(core::mem::zeroed())), berase.into()) } #[inline] pub unsafe fn InvertRect(hdc: HDC, lprc: *const super::super::Foundation::RECT) -> super::super::Foundation::BOOL { @@ -1788,12 +1776,9 @@ pub unsafe fn SelectObject(hdc: HDC, h: HGDIOBJ) -> HGDIOBJ { SelectObject(core::mem::transmute(hdc), core::mem::transmute(h)) } #[inline] -pub unsafe fn SelectPalette(hdc: HDC, hpal: HPALETTE, bforcebkgd: P2) -> HPALETTE -where - P2: windows_core::Param, -{ +pub unsafe fn SelectPalette(hdc: HDC, hpal: HPALETTE, bforcebkgd: bool) -> HPALETTE { windows_targets::link!("gdi32.dll" "system" fn SelectPalette(hdc : HDC, hpal : HPALETTE, bforcebkgd : super::super::Foundation:: BOOL) -> HPALETTE); - SelectPalette(core::mem::transmute(hdc), core::mem::transmute(hpal), bforcebkgd.param().abi()) + SelectPalette(core::mem::transmute(hdc), core::mem::transmute(hpal), bforcebkgd.into()) } #[inline] pub unsafe fn SetArcDirection(hdc: HDC, dir: ARC_DIRECTION) -> i32 { @@ -1996,12 +1981,9 @@ pub unsafe fn SetWindowOrgEx(hdc: HDC, x: i32, y: i32, lppt: Option<*mut super:: SetWindowOrgEx(core::mem::transmute(hdc), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(lppt.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetWindowRgn(hwnd: super::super::Foundation::HWND, hrgn: Option, bredraw: P2) -> i32 -where - P2: windows_core::Param, -{ +pub unsafe fn SetWindowRgn(hwnd: super::super::Foundation::HWND, hrgn: Option, bredraw: bool) -> i32 { windows_targets::link!("user32.dll" "system" fn SetWindowRgn(hwnd : super::super::Foundation:: HWND, hrgn : HRGN, bredraw : super::super::Foundation:: BOOL) -> i32); - SetWindowRgn(core::mem::transmute(hwnd), core::mem::transmute(hrgn.unwrap_or(core::mem::zeroed())), bredraw.param().abi()) + SetWindowRgn(core::mem::transmute(hwnd), core::mem::transmute(hrgn.unwrap_or(core::mem::zeroed())), bredraw.into()) } #[inline] pub unsafe fn SetWorldTransform(hdc: HDC, lpxf: *const XFORM) -> super::super::Foundation::BOOL { @@ -2076,13 +2058,12 @@ where ) } #[inline] -pub unsafe fn TTEnableEmbeddingForFacename(lpszfacename: P0, benable: P1) -> i32 +pub unsafe fn TTEnableEmbeddingForFacename(lpszfacename: P0, benable: bool) -> i32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("t2embed.dll" "system" fn TTEnableEmbeddingForFacename(lpszfacename : windows_core::PCSTR, benable : super::super::Foundation:: BOOL) -> i32); - TTEnableEmbeddingForFacename(lpszfacename.param().abi(), benable.param().abi()) + TTEnableEmbeddingForFacename(lpszfacename.param().abi(), benable.into()) } #[inline] pub unsafe fn TTGetEmbeddedFontInfo(ulflags: TTEMBED_FLAGS, pulprivstatus: *mut u32, ulprivs: FONT_LICENSE_PRIVS, pulstatus: *mut u32, lpfnreadfromstream: READEMBEDPROC, lpvreadstream: *const core::ffi::c_void, pttloadinfo: Option<*const TTLOADINFO>) -> i32 { @@ -5676,9 +5657,6 @@ pub struct HATCH_BRUSH_STYLE(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HBITMAP(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HBITMAP { - type TypeKind = windows_core::CopyType; -} impl HBITMAP { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -5707,9 +5685,6 @@ impl From for HGDIOBJ { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HBRUSH(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HBRUSH { - type TypeKind = windows_core::CopyType; -} impl HBRUSH { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -5738,9 +5713,6 @@ impl From for HGDIOBJ { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HDC(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HDC { - type TypeKind = windows_core::CopyType; -} impl HDC { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -5758,9 +5730,6 @@ pub const HEBREW_CHARSET: FONT_CHARSET = FONT_CHARSET(177u8); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HENHMETAFILE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HENHMETAFILE { - type TypeKind = windows_core::CopyType; -} impl HENHMETAFILE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -5783,9 +5752,6 @@ impl Default for HENHMETAFILE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HFONT(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HFONT { - type TypeKind = windows_core::CopyType; -} impl HFONT { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -5814,9 +5780,6 @@ impl From for HGDIOBJ { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HGDIOBJ(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HGDIOBJ { - type TypeKind = windows_core::CopyType; -} impl HGDIOBJ { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -5839,9 +5802,6 @@ impl Default for HGDIOBJ { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HMETAFILE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HMETAFILE { - type TypeKind = windows_core::CopyType; -} impl HMETAFILE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -5864,9 +5824,6 @@ impl Default for HMETAFILE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HMONITOR(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HMONITOR { - type TypeKind = windows_core::CopyType; -} impl HMONITOR { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -5883,9 +5840,6 @@ pub const HORZSIZE: GET_DEVICE_CAPS_INDEX = GET_DEVICE_CAPS_INDEX(4u32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HPALETTE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HPALETTE { - type TypeKind = windows_core::CopyType; -} impl HPALETTE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -5914,9 +5868,6 @@ impl From for HGDIOBJ { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HPEN(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HPEN { - type TypeKind = windows_core::CopyType; -} impl HPEN { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -5945,9 +5896,6 @@ impl From for HGDIOBJ { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HRGN(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HRGN { - type TypeKind = windows_core::CopyType; -} impl HRGN { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ 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 e3b8aba02e..1c296f42d8 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/GdiPlus/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/GdiPlus/mod.rs @@ -109,12 +109,9 @@ pub unsafe fn GdipAddPathLineI(path: *mut GpPath, x1: i32, y1: i32, x2: i32, y2: GdipAddPathLineI(core::mem::transmute(path), core::mem::transmute(x1), core::mem::transmute(y1), core::mem::transmute(x2), core::mem::transmute(y2)) } #[inline] -pub unsafe fn GdipAddPathPath(path: *mut GpPath, addingpath: *const GpPath, connect: P2) -> Status -where - P2: windows_core::Param, -{ +pub unsafe fn GdipAddPathPath(path: *mut GpPath, addingpath: *const GpPath, connect: bool) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipAddPathPath(path : *mut GpPath, addingpath : *const GpPath, connect : super::super::Foundation:: BOOL) -> Status); - GdipAddPathPath(core::mem::transmute(path), core::mem::transmute(addingpath), connect.param().abi()) + GdipAddPathPath(core::mem::transmute(path), core::mem::transmute(addingpath), connect.into()) } #[inline] pub unsafe fn GdipAddPathPie(path: *mut GpPath, x: f32, y: f32, width: f32, height: f32, startangle: f32, sweepangle: f32) -> Status { @@ -193,12 +190,9 @@ pub unsafe fn GdipBeginContainerI(graphics: *mut GpGraphics, dstrect: *const Rec GdipBeginContainerI(core::mem::transmute(graphics), core::mem::transmute(dstrect), core::mem::transmute(srcrect), core::mem::transmute(unit), core::mem::transmute(state)) } #[inline] -pub unsafe fn GdipBitmapApplyEffect(bitmap: *mut GpBitmap, effect: *mut CGpEffect, roi: *mut super::super::Foundation::RECT, useauxdata: P3, auxdata: *mut *mut core::ffi::c_void, auxdatasize: *mut i32) -> Status -where - P3: windows_core::Param, -{ +pub unsafe fn GdipBitmapApplyEffect(bitmap: *mut GpBitmap, effect: *mut CGpEffect, roi: *mut super::super::Foundation::RECT, useauxdata: bool, auxdata: *mut *mut core::ffi::c_void, auxdatasize: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipBitmapApplyEffect(bitmap : *mut GpBitmap, effect : *mut CGpEffect, roi : *mut super::super::Foundation:: RECT, useauxdata : super::super::Foundation:: BOOL, auxdata : *mut *mut core::ffi::c_void, auxdatasize : *mut i32) -> Status); - GdipBitmapApplyEffect(core::mem::transmute(bitmap), core::mem::transmute(effect), core::mem::transmute(roi), useauxdata.param().abi(), core::mem::transmute(auxdata), core::mem::transmute(auxdatasize)) + GdipBitmapApplyEffect(core::mem::transmute(bitmap), core::mem::transmute(effect), core::mem::transmute(roi), useauxdata.into(), core::mem::transmute(auxdata), core::mem::transmute(auxdatasize)) } #[inline] pub unsafe fn GdipBitmapConvertFormat(pinputbitmap: *mut GpBitmap, format: i32, dithertype: DitherType, palettetype: PaletteType, palette: *mut ColorPalette, alphathresholdpercent: f32) -> Status { @@ -206,12 +200,9 @@ pub unsafe fn GdipBitmapConvertFormat(pinputbitmap: *mut GpBitmap, format: i32, GdipBitmapConvertFormat(core::mem::transmute(pinputbitmap), core::mem::transmute(format), core::mem::transmute(dithertype), core::mem::transmute(palettetype), core::mem::transmute(palette), core::mem::transmute(alphathresholdpercent)) } #[inline] -pub unsafe fn GdipBitmapCreateApplyEffect(inputbitmaps: *mut *mut GpBitmap, numinputs: i32, effect: *mut CGpEffect, roi: *mut super::super::Foundation::RECT, outputrect: *mut super::super::Foundation::RECT, outputbitmap: *mut *mut GpBitmap, useauxdata: P6, auxdata: *mut *mut core::ffi::c_void, auxdatasize: *mut i32) -> Status -where - P6: windows_core::Param, -{ +pub unsafe fn GdipBitmapCreateApplyEffect(inputbitmaps: *mut *mut GpBitmap, numinputs: i32, effect: *mut CGpEffect, roi: *mut super::super::Foundation::RECT, outputrect: *mut super::super::Foundation::RECT, outputbitmap: *mut *mut GpBitmap, useauxdata: bool, auxdata: *mut *mut core::ffi::c_void, auxdatasize: *mut i32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipBitmapCreateApplyEffect(inputbitmaps : *mut *mut GpBitmap, numinputs : i32, effect : *mut CGpEffect, roi : *mut super::super::Foundation:: RECT, outputrect : *mut super::super::Foundation:: RECT, outputbitmap : *mut *mut GpBitmap, useauxdata : super::super::Foundation:: BOOL, auxdata : *mut *mut core::ffi::c_void, auxdatasize : *mut i32) -> Status); - GdipBitmapCreateApplyEffect(core::mem::transmute(inputbitmaps), core::mem::transmute(numinputs), core::mem::transmute(effect), core::mem::transmute(roi), core::mem::transmute(outputrect), core::mem::transmute(outputbitmap), useauxdata.param().abi(), core::mem::transmute(auxdata), core::mem::transmute(auxdatasize)) + GdipBitmapCreateApplyEffect(core::mem::transmute(inputbitmaps), core::mem::transmute(numinputs), core::mem::transmute(effect), core::mem::transmute(roi), core::mem::transmute(outputrect), core::mem::transmute(outputbitmap), useauxdata.into(), core::mem::transmute(auxdata), core::mem::transmute(auxdatasize)) } #[inline] pub unsafe fn GdipBitmapGetHistogram(bitmap: *mut GpBitmap, format: HistogramFormat, numberofentries: u32, channel0: *mut u32, channel1: *mut u32, channel2: *mut u32, channel3: *mut u32) -> Status { @@ -381,12 +372,9 @@ where GdipConvertToEmfPlusToStream(core::mem::transmute(refgraphics), core::mem::transmute(metafile), core::mem::transmute(conversionfailureflag), stream.param().abi(), core::mem::transmute(emftype), description.param().abi(), core::mem::transmute(out_metafile)) } #[inline] -pub unsafe fn GdipCreateAdjustableArrowCap(height: f32, width: f32, isfilled: P2, cap: *mut *mut GpAdjustableArrowCap) -> Status -where - P2: windows_core::Param, -{ +pub unsafe fn GdipCreateAdjustableArrowCap(height: f32, width: f32, isfilled: bool, cap: *mut *mut GpAdjustableArrowCap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateAdjustableArrowCap(height : f32, width : f32, isfilled : super::super::Foundation:: BOOL, cap : *mut *mut GpAdjustableArrowCap) -> Status); - GdipCreateAdjustableArrowCap(core::mem::transmute(height), core::mem::transmute(width), isfilled.param().abi(), core::mem::transmute(cap)) + GdipCreateAdjustableArrowCap(core::mem::transmute(height), core::mem::transmute(width), isfilled.into(), core::mem::transmute(cap)) } #[cfg(feature = "Win32_Graphics_DirectDraw")] #[inline] @@ -579,20 +567,14 @@ pub unsafe fn GdipCreateLineBrushFromRectI(rect: *const Rect, color1: u32, color GdipCreateLineBrushFromRectI(core::mem::transmute(rect), core::mem::transmute(color1), core::mem::transmute(color2), core::mem::transmute(mode), core::mem::transmute(wrapmode), core::mem::transmute(linegradient)) } #[inline] -pub unsafe fn GdipCreateLineBrushFromRectWithAngle(rect: *const RectF, color1: u32, color2: u32, angle: f32, isanglescalable: P4, wrapmode: WrapMode, linegradient: *mut *mut GpLineGradient) -> Status -where - P4: windows_core::Param, -{ +pub unsafe fn GdipCreateLineBrushFromRectWithAngle(rect: *const RectF, color1: u32, color2: u32, angle: f32, isanglescalable: bool, wrapmode: WrapMode, linegradient: *mut *mut GpLineGradient) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateLineBrushFromRectWithAngle(rect : *const RectF, color1 : u32, color2 : u32, angle : f32, isanglescalable : super::super::Foundation:: BOOL, wrapmode : WrapMode, linegradient : *mut *mut GpLineGradient) -> Status); - GdipCreateLineBrushFromRectWithAngle(core::mem::transmute(rect), core::mem::transmute(color1), core::mem::transmute(color2), core::mem::transmute(angle), isanglescalable.param().abi(), core::mem::transmute(wrapmode), core::mem::transmute(linegradient)) + GdipCreateLineBrushFromRectWithAngle(core::mem::transmute(rect), core::mem::transmute(color1), core::mem::transmute(color2), core::mem::transmute(angle), isanglescalable.into(), core::mem::transmute(wrapmode), core::mem::transmute(linegradient)) } #[inline] -pub unsafe fn GdipCreateLineBrushFromRectWithAngleI(rect: *const Rect, color1: u32, color2: u32, angle: f32, isanglescalable: P4, wrapmode: WrapMode, linegradient: *mut *mut GpLineGradient) -> Status -where - P4: windows_core::Param, -{ +pub unsafe fn GdipCreateLineBrushFromRectWithAngleI(rect: *const Rect, color1: u32, color2: u32, angle: f32, isanglescalable: bool, wrapmode: WrapMode, linegradient: *mut *mut GpLineGradient) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateLineBrushFromRectWithAngleI(rect : *const Rect, color1 : u32, color2 : u32, angle : f32, isanglescalable : super::super::Foundation:: BOOL, wrapmode : WrapMode, linegradient : *mut *mut GpLineGradient) -> Status); - GdipCreateLineBrushFromRectWithAngleI(core::mem::transmute(rect), core::mem::transmute(color1), core::mem::transmute(color2), core::mem::transmute(angle), isanglescalable.param().abi(), core::mem::transmute(wrapmode), core::mem::transmute(linegradient)) + GdipCreateLineBrushFromRectWithAngleI(core::mem::transmute(rect), core::mem::transmute(color1), core::mem::transmute(color2), core::mem::transmute(angle), isanglescalable.into(), core::mem::transmute(wrapmode), core::mem::transmute(linegradient)) } #[inline] pub unsafe fn GdipCreateLineBrushI(point1: *const Point, point2: *const Point, color1: u32, color2: u32, wrapmode: WrapMode, linegradient: *mut *mut GpLineGradient) -> Status { @@ -621,12 +603,9 @@ pub unsafe fn GdipCreateMatrix3I(rect: *const Rect, dstplg: *const Point, matrix } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdipCreateMetafileFromEmf(hemf: super::Gdi::HENHMETAFILE, deleteemf: P1, metafile: *mut *mut GpMetafile) -> Status -where - P1: windows_core::Param, -{ +pub unsafe fn GdipCreateMetafileFromEmf(hemf: super::Gdi::HENHMETAFILE, deleteemf: bool, metafile: *mut *mut GpMetafile) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateMetafileFromEmf(hemf : super::Gdi:: HENHMETAFILE, deleteemf : super::super::Foundation:: BOOL, metafile : *mut *mut GpMetafile) -> Status); - GdipCreateMetafileFromEmf(core::mem::transmute(hemf), deleteemf.param().abi(), core::mem::transmute(metafile)) + GdipCreateMetafileFromEmf(core::mem::transmute(hemf), deleteemf.into(), core::mem::transmute(metafile)) } #[inline] pub unsafe fn GdipCreateMetafileFromFile(file: P0, metafile: *mut *mut GpMetafile) -> Status @@ -647,12 +626,9 @@ where } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GdipCreateMetafileFromWmf(hwmf: super::Gdi::HMETAFILE, deletewmf: P1, wmfplaceablefileheader: *const WmfPlaceableFileHeader, metafile: *mut *mut GpMetafile) -> Status -where - P1: windows_core::Param, -{ +pub unsafe fn GdipCreateMetafileFromWmf(hwmf: super::Gdi::HMETAFILE, deletewmf: bool, wmfplaceablefileheader: *const WmfPlaceableFileHeader, metafile: *mut *mut GpMetafile) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateMetafileFromWmf(hwmf : super::Gdi:: HMETAFILE, deletewmf : super::super::Foundation:: BOOL, wmfplaceablefileheader : *const WmfPlaceableFileHeader, metafile : *mut *mut GpMetafile) -> Status); - GdipCreateMetafileFromWmf(core::mem::transmute(hwmf), deletewmf.param().abi(), core::mem::transmute(wmfplaceablefileheader), core::mem::transmute(metafile)) + GdipCreateMetafileFromWmf(core::mem::transmute(hwmf), deletewmf.into(), core::mem::transmute(wmfplaceablefileheader), core::mem::transmute(metafile)) } #[inline] pub unsafe fn GdipCreateMetafileFromWmfFile(file: P0, wmfplaceablefileheader: *const WmfPlaceableFileHeader, metafile: *mut *mut GpMetafile) -> Status @@ -2189,12 +2165,9 @@ where GdipImageSetAbort(core::mem::transmute(pimage), piabort.param().abi()) } #[inline] -pub unsafe fn GdipInitializePalette(palette: *mut ColorPalette, palettetype: PaletteType, optimalcolors: i32, usetransparentcolor: P3, bitmap: *mut GpBitmap) -> Status -where - P3: windows_core::Param, -{ +pub unsafe fn GdipInitializePalette(palette: *mut ColorPalette, palettetype: PaletteType, optimalcolors: i32, usetransparentcolor: bool, bitmap: *mut GpBitmap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipInitializePalette(palette : *mut ColorPalette, palettetype : PaletteType, optimalcolors : i32, usetransparentcolor : super::super::Foundation:: BOOL, bitmap : *mut GpBitmap) -> Status); - GdipInitializePalette(core::mem::transmute(palette), core::mem::transmute(palettetype), core::mem::transmute(optimalcolors), usetransparentcolor.param().abi(), core::mem::transmute(bitmap)) + GdipInitializePalette(core::mem::transmute(palette), core::mem::transmute(palettetype), core::mem::transmute(optimalcolors), usetransparentcolor.into(), core::mem::transmute(bitmap)) } #[inline] pub unsafe fn GdipInvertMatrix(matrix: *mut Matrix) -> Status { @@ -2696,12 +2669,9 @@ pub unsafe fn GdipScaleWorldTransform(graphics: *mut GpGraphics, sx: f32, sy: f3 GdipScaleWorldTransform(core::mem::transmute(graphics), core::mem::transmute(sx), core::mem::transmute(sy), core::mem::transmute(order)) } #[inline] -pub unsafe fn GdipSetAdjustableArrowCapFillState(cap: *mut GpAdjustableArrowCap, fillstate: P1) -> Status -where - P1: windows_core::Param, -{ +pub unsafe fn GdipSetAdjustableArrowCapFillState(cap: *mut GpAdjustableArrowCap, fillstate: bool) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetAdjustableArrowCapFillState(cap : *mut GpAdjustableArrowCap, fillstate : super::super::Foundation:: BOOL) -> Status); - GdipSetAdjustableArrowCapFillState(core::mem::transmute(cap), fillstate.param().abi()) + GdipSetAdjustableArrowCapFillState(core::mem::transmute(cap), fillstate.into()) } #[inline] pub unsafe fn GdipSetAdjustableArrowCapHeight(cap: *mut GpAdjustableArrowCap, height: f32) -> Status { @@ -2795,77 +2765,52 @@ pub unsafe fn GdipSetEmpty(region: *mut GpRegion) -> Status { GdipSetEmpty(core::mem::transmute(region)) } #[inline] -pub unsafe fn GdipSetImageAttributesCachedBackground(imageattr: *mut GpImageAttributes, enableflag: P1) -> Status -where - P1: windows_core::Param, -{ +pub unsafe fn GdipSetImageAttributesCachedBackground(imageattr: *mut GpImageAttributes, enableflag: bool) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetImageAttributesCachedBackground(imageattr : *mut GpImageAttributes, enableflag : super::super::Foundation:: BOOL) -> Status); - GdipSetImageAttributesCachedBackground(core::mem::transmute(imageattr), enableflag.param().abi()) + GdipSetImageAttributesCachedBackground(core::mem::transmute(imageattr), enableflag.into()) } #[inline] -pub unsafe fn GdipSetImageAttributesColorKeys(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: P2, colorlow: u32, colorhigh: u32) -> Status -where - P2: windows_core::Param, -{ +pub unsafe fn GdipSetImageAttributesColorKeys(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: bool, colorlow: u32, colorhigh: u32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetImageAttributesColorKeys(imageattr : *mut GpImageAttributes, r#type : ColorAdjustType, enableflag : super::super::Foundation:: BOOL, colorlow : u32, colorhigh : u32) -> Status); - GdipSetImageAttributesColorKeys(core::mem::transmute(imageattr), core::mem::transmute(r#type), enableflag.param().abi(), core::mem::transmute(colorlow), core::mem::transmute(colorhigh)) + GdipSetImageAttributesColorKeys(core::mem::transmute(imageattr), core::mem::transmute(r#type), enableflag.into(), core::mem::transmute(colorlow), core::mem::transmute(colorhigh)) } #[inline] -pub unsafe fn GdipSetImageAttributesColorMatrix(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: P2, colormatrix: *const ColorMatrix, graymatrix: *const ColorMatrix, flags: ColorMatrixFlags) -> Status -where - P2: windows_core::Param, -{ +pub unsafe fn GdipSetImageAttributesColorMatrix(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: bool, colormatrix: *const ColorMatrix, graymatrix: *const ColorMatrix, flags: ColorMatrixFlags) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetImageAttributesColorMatrix(imageattr : *mut GpImageAttributes, r#type : ColorAdjustType, enableflag : super::super::Foundation:: BOOL, colormatrix : *const ColorMatrix, graymatrix : *const ColorMatrix, flags : ColorMatrixFlags) -> Status); - GdipSetImageAttributesColorMatrix(core::mem::transmute(imageattr), core::mem::transmute(r#type), enableflag.param().abi(), core::mem::transmute(colormatrix), core::mem::transmute(graymatrix), core::mem::transmute(flags)) + GdipSetImageAttributesColorMatrix(core::mem::transmute(imageattr), core::mem::transmute(r#type), enableflag.into(), core::mem::transmute(colormatrix), core::mem::transmute(graymatrix), core::mem::transmute(flags)) } #[inline] -pub unsafe fn GdipSetImageAttributesGamma(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: P2, gamma: f32) -> Status -where - P2: windows_core::Param, -{ +pub unsafe fn GdipSetImageAttributesGamma(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: bool, gamma: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetImageAttributesGamma(imageattr : *mut GpImageAttributes, r#type : ColorAdjustType, enableflag : super::super::Foundation:: BOOL, gamma : f32) -> Status); - GdipSetImageAttributesGamma(core::mem::transmute(imageattr), core::mem::transmute(r#type), enableflag.param().abi(), core::mem::transmute(gamma)) + GdipSetImageAttributesGamma(core::mem::transmute(imageattr), core::mem::transmute(r#type), enableflag.into(), core::mem::transmute(gamma)) } #[inline] -pub unsafe fn GdipSetImageAttributesNoOp(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: P2) -> Status -where - P2: windows_core::Param, -{ +pub unsafe fn GdipSetImageAttributesNoOp(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: bool) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetImageAttributesNoOp(imageattr : *mut GpImageAttributes, r#type : ColorAdjustType, enableflag : super::super::Foundation:: BOOL) -> Status); - GdipSetImageAttributesNoOp(core::mem::transmute(imageattr), core::mem::transmute(r#type), enableflag.param().abi()) + GdipSetImageAttributesNoOp(core::mem::transmute(imageattr), core::mem::transmute(r#type), enableflag.into()) } #[inline] -pub unsafe fn GdipSetImageAttributesOutputChannel(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: P2, channelflags: ColorChannelFlags) -> Status -where - P2: windows_core::Param, -{ +pub unsafe fn GdipSetImageAttributesOutputChannel(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: bool, channelflags: ColorChannelFlags) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetImageAttributesOutputChannel(imageattr : *mut GpImageAttributes, r#type : ColorAdjustType, enableflag : super::super::Foundation:: BOOL, channelflags : ColorChannelFlags) -> Status); - GdipSetImageAttributesOutputChannel(core::mem::transmute(imageattr), core::mem::transmute(r#type), enableflag.param().abi(), core::mem::transmute(channelflags)) + GdipSetImageAttributesOutputChannel(core::mem::transmute(imageattr), core::mem::transmute(r#type), enableflag.into(), core::mem::transmute(channelflags)) } #[inline] -pub unsafe fn GdipSetImageAttributesOutputChannelColorProfile(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: P2, colorprofilefilename: P3) -> Status +pub unsafe fn GdipSetImageAttributesOutputChannelColorProfile(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: bool, colorprofilefilename: P3) -> Status where - P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("gdiplus.dll" "system" fn GdipSetImageAttributesOutputChannelColorProfile(imageattr : *mut GpImageAttributes, r#type : ColorAdjustType, enableflag : super::super::Foundation:: BOOL, colorprofilefilename : windows_core::PCWSTR) -> Status); - GdipSetImageAttributesOutputChannelColorProfile(core::mem::transmute(imageattr), core::mem::transmute(r#type), enableflag.param().abi(), colorprofilefilename.param().abi()) + GdipSetImageAttributesOutputChannelColorProfile(core::mem::transmute(imageattr), core::mem::transmute(r#type), enableflag.into(), colorprofilefilename.param().abi()) } #[inline] -pub unsafe fn GdipSetImageAttributesRemapTable(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: P2, mapsize: u32, map: *const ColorMap) -> Status -where - P2: windows_core::Param, -{ +pub unsafe fn GdipSetImageAttributesRemapTable(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: bool, mapsize: u32, map: *const ColorMap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetImageAttributesRemapTable(imageattr : *mut GpImageAttributes, r#type : ColorAdjustType, enableflag : super::super::Foundation:: BOOL, mapsize : u32, map : *const ColorMap) -> Status); - GdipSetImageAttributesRemapTable(core::mem::transmute(imageattr), core::mem::transmute(r#type), enableflag.param().abi(), core::mem::transmute(mapsize), core::mem::transmute(map)) + GdipSetImageAttributesRemapTable(core::mem::transmute(imageattr), core::mem::transmute(r#type), enableflag.into(), core::mem::transmute(mapsize), core::mem::transmute(map)) } #[inline] -pub unsafe fn GdipSetImageAttributesThreshold(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: P2, threshold: f32) -> Status -where - P2: windows_core::Param, -{ +pub unsafe fn GdipSetImageAttributesThreshold(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType, enableflag: bool, threshold: f32) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetImageAttributesThreshold(imageattr : *mut GpImageAttributes, r#type : ColorAdjustType, enableflag : super::super::Foundation:: BOOL, threshold : f32) -> Status); - GdipSetImageAttributesThreshold(core::mem::transmute(imageattr), core::mem::transmute(r#type), enableflag.param().abi(), core::mem::transmute(threshold)) + GdipSetImageAttributesThreshold(core::mem::transmute(imageattr), core::mem::transmute(r#type), enableflag.into(), core::mem::transmute(threshold)) } #[inline] pub unsafe fn GdipSetImageAttributesToIdentity(imageattr: *mut GpImageAttributes, r#type: ColorAdjustType) -> Status { @@ -2873,12 +2818,9 @@ pub unsafe fn GdipSetImageAttributesToIdentity(imageattr: *mut GpImageAttributes GdipSetImageAttributesToIdentity(core::mem::transmute(imageattr), core::mem::transmute(r#type)) } #[inline] -pub unsafe fn GdipSetImageAttributesWrapMode(imageattr: *mut GpImageAttributes, wrap: WrapMode, argb: u32, clamp: P3) -> Status -where - P3: windows_core::Param, -{ +pub unsafe fn GdipSetImageAttributesWrapMode(imageattr: *mut GpImageAttributes, wrap: WrapMode, argb: u32, clamp: bool) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetImageAttributesWrapMode(imageattr : *mut GpImageAttributes, wrap : WrapMode, argb : u32, clamp : super::super::Foundation:: BOOL) -> Status); - GdipSetImageAttributesWrapMode(core::mem::transmute(imageattr), core::mem::transmute(wrap), core::mem::transmute(argb), clamp.param().abi()) + GdipSetImageAttributesWrapMode(core::mem::transmute(imageattr), core::mem::transmute(wrap), core::mem::transmute(argb), clamp.into()) } #[inline] pub unsafe fn GdipSetImagePalette(image: *mut GpImage, palette: *const ColorPalette) -> Status { @@ -2906,12 +2848,9 @@ pub unsafe fn GdipSetLineColors(brush: *mut GpLineGradient, color1: u32, color2: GdipSetLineColors(core::mem::transmute(brush), core::mem::transmute(color1), core::mem::transmute(color2)) } #[inline] -pub unsafe fn GdipSetLineGammaCorrection(brush: *mut GpLineGradient, usegammacorrection: P1) -> Status -where - P1: windows_core::Param, -{ +pub unsafe fn GdipSetLineGammaCorrection(brush: *mut GpLineGradient, usegammacorrection: bool) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetLineGammaCorrection(brush : *mut GpLineGradient, usegammacorrection : super::super::Foundation:: BOOL) -> Status); - GdipSetLineGammaCorrection(core::mem::transmute(brush), usegammacorrection.param().abi()) + GdipSetLineGammaCorrection(core::mem::transmute(brush), usegammacorrection.into()) } #[inline] pub unsafe fn GdipSetLineLinearBlend(brush: *mut GpLineGradient, focus: f32, scale: f32) -> Status { @@ -2989,12 +2928,9 @@ pub unsafe fn GdipSetPathGradientFocusScales(brush: *mut GpPathGradient, xscale: GdipSetPathGradientFocusScales(core::mem::transmute(brush), core::mem::transmute(xscale), core::mem::transmute(yscale)) } #[inline] -pub unsafe fn GdipSetPathGradientGammaCorrection(brush: *mut GpPathGradient, usegammacorrection: P1) -> Status -where - P1: windows_core::Param, -{ +pub unsafe fn GdipSetPathGradientGammaCorrection(brush: *mut GpPathGradient, usegammacorrection: bool) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipSetPathGradientGammaCorrection(brush : *mut GpPathGradient, usegammacorrection : super::super::Foundation:: BOOL) -> Status); - GdipSetPathGradientGammaCorrection(core::mem::transmute(brush), usegammacorrection.param().abi()) + GdipSetPathGradientGammaCorrection(core::mem::transmute(brush), usegammacorrection.into()) } #[inline] pub unsafe fn GdipSetPathGradientLinearBlend(brush: *mut GpPathGradient, focus: f32, scale: f32) -> Status { @@ -3381,9 +3317,6 @@ pub const BLUE_SHIFT: u32 = 0u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct Bitmap(pub isize); -impl windows_core::TypeKind for Bitmap { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct BitmapData { @@ -3454,15 +3387,9 @@ pub const BrushTypeTextureFill: BrushType = BrushType(2i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct CGpEffect(pub isize); -impl windows_core::TypeKind for CGpEffect { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct CachedBitmap(pub isize); -impl windows_core::TypeKind for CachedBitmap { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct CharacterRange { @@ -3828,9 +3755,6 @@ pub const CurveChannelRed: CurveChannel = CurveChannel(1i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct CustomLineCap(pub isize); -impl windows_core::TypeKind for CustomLineCap { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct CustomLineCapType(pub i32); @@ -4213,21 +4137,12 @@ pub const FlushIntentionSync: FlushIntention = FlushIntention(1i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct Font(pub isize); -impl windows_core::TypeKind for Font { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct FontCollection(pub isize); -impl windows_core::TypeKind for FontCollection { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct FontFamily(pub isize); -impl windows_core::TypeKind for FontFamily { - type TypeKind = windows_core::CopyType; -} pub const FontFamilyNotFound: Status = Status(14i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] @@ -4682,9 +4597,6 @@ impl windows_core::RuntimeName for IImageBytes {} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct Image(pub isize); -impl windows_core::TypeKind for Image { - type TypeKind = windows_core::CopyType; -} pub type ImageAbort = Option super::super::Foundation::BOOL>; #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] @@ -4781,9 +4693,6 @@ pub const ImageTypeUnknown: ImageType = ImageType(0i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct InstalledFontCollection(pub isize); -impl windows_core::TypeKind for InstalledFontCollection { - type TypeKind = windows_core::CopyType; -} pub const InsufficientBuffer: Status = Status(5i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] @@ -4858,9 +4767,6 @@ pub const LinearGradientModeVertical: LinearGradientMode = LinearGradientMode(1i #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct Matrix(pub isize); -impl windows_core::TypeKind for Matrix { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct MatrixOrder(pub i32); @@ -4869,9 +4775,6 @@ pub const MatrixOrderPrepend: MatrixOrder = MatrixOrder(0i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct Metafile(pub isize); -impl windows_core::TypeKind for Metafile { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct MetafileFrameUnit(pub i32); @@ -4986,9 +4889,6 @@ pub const PaletteTypeOptimal: PaletteType = PaletteType(1i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PathData(pub isize); -impl windows_core::TypeKind for PathData { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct PathPointType(pub i32); @@ -5057,9 +4957,6 @@ impl Default for PointF { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PrivateFontCollection(pub isize); -impl windows_core::TypeKind for PrivateFontCollection { - type TypeKind = windows_core::CopyType; -} pub const ProfileNotFound: Status = Status(21i32); #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] @@ -5378,9 +5275,6 @@ impl Default for RedEyeCorrectionParams { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct Region(pub isize); -impl windows_core::TypeKind for Region { - type TypeKind = windows_core::CopyType; -} pub const Rotate180FlipNone: RotateFlipType = RotateFlipType(2i32); pub const Rotate180FlipX: RotateFlipType = RotateFlipType(6i32); pub const Rotate180FlipXY: RotateFlipType = RotateFlipType(0i32); diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/mod.rs index 8351fe170e..59b01e9984 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/mod.rs @@ -4524,21 +4524,17 @@ impl windows_core::RuntimeName for IWICMetadataWriterInfo {} windows_core::imp::define_interface!(IWICPalette, IWICPalette_Vtbl, 0x00000040_a8f2_4877_ba0a_fd2b6645fb94); windows_core::imp::interface_hierarchy!(IWICPalette, windows_core::IUnknown); impl IWICPalette { - pub unsafe fn InitializePredefined(&self, epalettetype: WICBitmapPaletteType, faddtransparentcolor: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).InitializePredefined)(windows_core::Interface::as_raw(self), core::mem::transmute(epalettetype), faddtransparentcolor.param().abi()).ok() + pub unsafe fn InitializePredefined(&self, epalettetype: WICBitmapPaletteType, faddtransparentcolor: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InitializePredefined)(windows_core::Interface::as_raw(self), core::mem::transmute(epalettetype), faddtransparentcolor.into()).ok() } pub unsafe fn InitializeCustom(&self, pcolors: &[u32]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).InitializeCustom)(windows_core::Interface::as_raw(self), core::mem::transmute(pcolors.as_ptr()), pcolors.len().try_into().unwrap()).ok() } - pub unsafe fn InitializeFromBitmap(&self, pisurface: P0, ccount: u32, faddtransparentcolor: P2) -> windows_core::Result<()> + pub unsafe fn InitializeFromBitmap(&self, pisurface: P0, ccount: u32, faddtransparentcolor: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).InitializeFromBitmap)(windows_core::Interface::as_raw(self), pisurface.param().abi(), core::mem::transmute(ccount), faddtransparentcolor.param().abi()).ok() + (windows_core::Interface::vtable(self).InitializeFromBitmap)(windows_core::Interface::as_raw(self), pisurface.param().abi(), core::mem::transmute(ccount), faddtransparentcolor.into()).ok() } pub unsafe fn InitializeFromPalette(&self, pipalette: P0) -> windows_core::Result<()> where @@ -4708,12 +4704,11 @@ impl IWICPersistStream { (windows_core::Interface::vtable(self).LoadEx)(windows_core::Interface::as_raw(self), pistream.param().abi(), core::mem::transmute(pguidpreferredvendor), core::mem::transmute(dwpersistoptions)).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn SaveEx(&self, pistream: P0, dwpersistoptions: u32, fcleardirty: P2) -> windows_core::Result<()> + pub unsafe fn SaveEx(&self, pistream: P0, dwpersistoptions: u32, fcleardirty: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).SaveEx)(windows_core::Interface::as_raw(self), pistream.param().abi(), core::mem::transmute(dwpersistoptions), fcleardirty.param().abi()).ok() + (windows_core::Interface::vtable(self).SaveEx)(windows_core::Interface::as_raw(self), pistream.param().abi(), core::mem::transmute(dwpersistoptions), fcleardirty.into()).ok() } } #[cfg(feature = "Win32_System_Com")] diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/OpenGL/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/OpenGL/mod.rs index d583fc0f7c..2fa84389cd 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/OpenGL/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/OpenGL/mod.rs @@ -2037,12 +2037,9 @@ pub unsafe fn wglMakeCurrent(param0: super::Gdi::HDC, param1: HGLRC) -> windows_ } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn wglRealizeLayerPalette(param0: super::Gdi::HDC, param1: i32, param2: P2) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn wglRealizeLayerPalette(param0: super::Gdi::HDC, param1: i32, param2: bool) -> windows_core::Result<()> { windows_targets::link!("opengl32.dll" "system" fn wglRealizeLayerPalette(param0 : super::Gdi:: HDC, param1 : i32, param2 : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - wglRealizeLayerPalette(core::mem::transmute(param0), core::mem::transmute(param1), param2.param().abi()).ok() + wglRealizeLayerPalette(core::mem::transmute(param0), core::mem::transmute(param1), param2.into()).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -2216,16 +2213,10 @@ pub const GLU_V_STEP: u32 = 100207u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct GLUnurbs(pub isize); -impl windows_core::TypeKind for GLUnurbs { - type TypeKind = windows_core::CopyType; -} pub type GLUnurbsErrorProc = Option; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct GLUquadric(pub isize); -impl windows_core::TypeKind for GLUquadric { - type TypeKind = windows_core::CopyType; -} pub type GLUquadricErrorProc = Option; pub type GLUtessBeginDataProc = Option; pub type GLUtessBeginProc = Option; @@ -2242,9 +2233,6 @@ pub type GLUtessVertexProc = Option bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Printing/PrintTicket/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Printing/PrintTicket/mod.rs index e69d6643ce..3fe641d3e9 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Printing/PrintTicket/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Printing/PrintTicket/mod.rs @@ -107,9 +107,6 @@ pub const E_PRINTTICKET_FORMAT: u32 = 2147745795u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HPTPROVIDER(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HPTPROVIDER { - type TypeKind = windows_core::CopyType; -} impl HPTPROVIDER { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Printing/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Printing/mod.rs index 12ee450dd1..6802391213 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Printing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Printing/mod.rs @@ -3259,12 +3259,11 @@ impl core::ops::Deref for IAsyncGetSendNotificationCookie { } windows_core::imp::interface_hierarchy!(IAsyncGetSendNotificationCookie, windows_core::IUnknown, IPrintAsyncCookie); impl IAsyncGetSendNotificationCookie { - pub unsafe fn FinishAsyncCallWithData(&self, param0: P0, param1: P1) -> windows_core::Result<()> + pub unsafe fn FinishAsyncCallWithData(&self, param0: P0, param1: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).FinishAsyncCallWithData)(windows_core::Interface::as_raw(self), param0.param().abi(), param1.param().abi()).ok() + (windows_core::Interface::vtable(self).FinishAsyncCallWithData)(windows_core::Interface::as_raw(self), param0.param().abi(), param1.into()).ok() } } #[repr(C)] @@ -5456,11 +5455,8 @@ impl IPrintCoreHelper { (windows_core::Interface::vtable(self).GetOption)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevmode.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbsize), pszfeaturerequested.param().abi(), &mut result__).map(|| result__) } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn SetOptions(&self, pdevmode: *mut super::Gdi::DEVMODEA, cbsize: u32, bresolveconflicts: P2, pfopairs: *const PRINT_FEATURE_OPTION, cpairs: u32, pcpairswritten: *mut u32, pdwresult: *mut u32) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevmode), core::mem::transmute(cbsize), bresolveconflicts.param().abi(), core::mem::transmute(pfopairs), core::mem::transmute(cpairs), core::mem::transmute(pcpairswritten), core::mem::transmute(pdwresult)).ok() + pub unsafe fn SetOptions(&self, pdevmode: *mut super::Gdi::DEVMODEA, cbsize: u32, bresolveconflicts: bool, pfopairs: *const PRINT_FEATURE_OPTION, cpairs: u32, pcpairswritten: *mut u32, pdwresult: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevmode), core::mem::transmute(cbsize), bresolveconflicts.into(), core::mem::transmute(pfopairs), core::mem::transmute(cpairs), core::mem::transmute(pcpairswritten), core::mem::transmute(pdwresult)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn EnumConstrainedOptions(&self, pdevmode: *const super::Gdi::DEVMODEA, cbsize: u32, pszfeaturekeyword: P2, pconstrainedoptionlist: *const *const *const windows_core::PCSTR, pdwnumoptions: *mut u32) -> windows_core::Result<()> @@ -9205,11 +9201,8 @@ impl IPrinterPropertyBag { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetBool)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrname), &mut result__).map(|| result__) } - pub unsafe fn SetBool(&self, bstrname: &windows_core::BSTR, bvalue: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBool)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrname), bvalue.param().abi()).ok() + pub unsafe fn SetBool(&self, bstrname: &windows_core::BSTR, bvalue: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBool)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrname), bvalue.into()).ok() } pub unsafe fn GetInt32(&self, bstrname: &windows_core::BSTR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -9769,11 +9762,8 @@ impl IPrinterScriptablePropertyBag { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetBool)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrname), &mut result__).map(|| result__) } - pub unsafe fn SetBool(&self, bstrname: &windows_core::BSTR, bvalue: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBool)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrname), bvalue.param().abi()).ok() + pub unsafe fn SetBool(&self, bstrname: &windows_core::BSTR, bvalue: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBool)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrname), bvalue.into()).ok() } pub unsafe fn GetInt32(&self, bstrname: &windows_core::BSTR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Win32/Management/MobileDeviceManagementRegistration/mod.rs b/crates/libs/windows/src/Windows/Win32/Management/MobileDeviceManagementRegistration/mod.rs index 1330b8cc39..2337270c90 100644 --- a/crates/libs/windows/src/Windows/Win32/Management/MobileDeviceManagementRegistration/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Management/MobileDeviceManagementRegistration/mod.rs @@ -103,12 +103,9 @@ where SetDeviceManagementConfigInfo(providerid.param().abi(), configstring.param().abi()).ok() } #[inline] -pub unsafe fn SetManagedExternally(ismanagedexternally: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetManagedExternally(ismanagedexternally: bool) -> windows_core::Result<()> { windows_targets::link!("mdmregistration.dll" "system" fn SetManagedExternally(ismanagedexternally : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - SetManagedExternally(ismanagedexternally.param().abi()).ok() + SetManagedExternally(ismanagedexternally.into()).ok() } #[inline] pub unsafe fn UnregisterDeviceWithLocalManagement() -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/Media/Audio/DirectMusic/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/Audio/DirectMusic/mod.rs index b7c59b5682..996ca7e118 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Audio/DirectMusic/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Audio/DirectMusic/mod.rs @@ -862,11 +862,8 @@ impl IDirectMusic { pub unsafe fn SetMasterClock(&self, rguidclock: *const windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetMasterClock)(windows_core::Interface::as_raw(self), core::mem::transmute(rguidclock)).ok() } - pub unsafe fn Activate(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn Activate(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), fenable.into()).ok() } pub unsafe fn GetDefaultPort(&self, pguidport: *mut windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDefaultPort)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidport)).ok() @@ -1341,11 +1338,8 @@ impl IDirectMusicPort { pub unsafe fn GetNumChannelGroups(&self, pdwchannelgroups: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetNumChannelGroups)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwchannelgroups)).ok() } - pub unsafe fn Activate(&self, factive: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), factive.param().abi()).ok() + pub unsafe fn Activate(&self, factive: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), factive.into()).ok() } pub unsafe fn SetChannelPriority(&self, dwchannelgroup: u32, dwchannel: u32, dwpriority: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetChannelPriority)(windows_core::Interface::as_raw(self), core::mem::transmute(dwchannelgroup), core::mem::transmute(dwchannel), core::mem::transmute(dwpriority)).ok() @@ -1654,11 +1648,8 @@ impl IDirectMusicSynth { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetLatencyClock)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn Activate(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn Activate(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), fenable.into()).ok() } pub unsafe fn SetSynthSink(&self, psynthsink: P0) -> windows_core::Result<()> where @@ -1920,11 +1911,8 @@ impl IDirectMusicSynthSink { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetLatencyClock)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn Activate(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn Activate(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), fenable.into()).ok() } pub unsafe fn SampleToRefTime(&self, llsampletime: i64, prftime: *mut i64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SampleToRefTime)(windows_core::Interface::as_raw(self), core::mem::transmute(llsampletime), core::mem::transmute(prftime)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Media/Audio/Endpoints/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/Audio/Endpoints/mod.rs index 03162723ba..8efba0ec54 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Audio/Endpoints/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Audio/Endpoints/mod.rs @@ -313,11 +313,8 @@ impl IAudioEndpointVolume { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetChannelVolumeLevelScalar)(windows_core::Interface::as_raw(self), core::mem::transmute(nchannel), &mut result__).map(|| result__) } - pub unsafe fn SetMute(&self, bmute: P0, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMute)(windows_core::Interface::as_raw(self), bmute.param().abi(), core::mem::transmute(pguideventcontext)).ok() + pub unsafe fn SetMute(&self, bmute: bool, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMute)(windows_core::Interface::as_raw(self), bmute.into(), core::mem::transmute(pguideventcontext)).ok() } pub unsafe fn GetMute(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -590,11 +587,8 @@ impl windows_core::RuntimeName for IAudioEndpointVolumeEx {} windows_core::imp::define_interface!(IAudioLfxControl, IAudioLfxControl_Vtbl, 0x076a6922_d802_4f83_baf6_409d9ca11bfe); windows_core::imp::interface_hierarchy!(IAudioLfxControl, windows_core::IUnknown); impl IAudioLfxControl { - pub unsafe fn SetLocalEffectsState(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetLocalEffectsState)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn SetLocalEffectsState(&self, benabled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetLocalEffectsState)(windows_core::Interface::as_raw(self), benabled.into()).ok() } pub unsafe fn GetLocalEffectsState(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -730,12 +724,11 @@ impl IHardwareAudioEngineBase { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetAvailableOffloadConnectorCount)(windows_core::Interface::as_raw(self), _pwstrdeviceid.param().abi(), core::mem::transmute(_uconnectorid), &mut result__).map(|| result__) } - pub unsafe fn GetEngineFormat(&self, pdevice: P0, _brequestdeviceformat: P1, _ppwfxformat: *mut *mut super::WAVEFORMATEX) -> windows_core::Result<()> + pub unsafe fn GetEngineFormat(&self, pdevice: P0, _brequestdeviceformat: bool, _ppwfxformat: *mut *mut super::WAVEFORMATEX) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetEngineFormat)(windows_core::Interface::as_raw(self), pdevice.param().abi(), _brequestdeviceformat.param().abi(), core::mem::transmute(_ppwfxformat)).ok() + (windows_core::Interface::vtable(self).GetEngineFormat)(windows_core::Interface::as_raw(self), pdevice.param().abi(), _brequestdeviceformat.into(), core::mem::transmute(_ppwfxformat)).ok() } pub unsafe fn SetEngineDeviceFormat(&self, pdevice: P0, _pwfxformat: *mut super::WAVEFORMATEX) -> windows_core::Result<()> where @@ -743,12 +736,11 @@ impl IHardwareAudioEngineBase { { (windows_core::Interface::vtable(self).SetEngineDeviceFormat)(windows_core::Interface::as_raw(self), pdevice.param().abi(), core::mem::transmute(_pwfxformat)).ok() } - pub unsafe fn SetGfxState(&self, pdevice: P0, _benable: P1) -> windows_core::Result<()> + pub unsafe fn SetGfxState(&self, pdevice: P0, _benable: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetGfxState)(windows_core::Interface::as_raw(self), pdevice.param().abi(), _benable.param().abi()).ok() + (windows_core::Interface::vtable(self).SetGfxState)(windows_core::Interface::as_raw(self), pdevice.param().abi(), _benable.into()).ok() } pub unsafe fn GetGfxState(&self, pdevice: P0) -> windows_core::Result where 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 7184ba5578..f791df31b3 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 @@ -261,11 +261,8 @@ impl IXAPO { pub unsafe fn UnlockForProcess(&self) { (windows_core::Interface::vtable(self).UnlockForProcess)(windows_core::Interface::as_raw(self)) } - pub unsafe fn Process(&self, pinputprocessparameters: Option<&[XAPO_PROCESS_BUFFER_PARAMETERS]>, poutputprocessparameters: Option<&mut [XAPO_PROCESS_BUFFER_PARAMETERS]>, isenabled: P4) - where - P4: windows_core::Param, - { - (windows_core::Interface::vtable(self).Process)(windows_core::Interface::as_raw(self), pinputprocessparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pinputprocessparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), poutputprocessparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(poutputprocessparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), isenabled.param().abi()) + pub unsafe fn Process(&self, pinputprocessparameters: Option<&[XAPO_PROCESS_BUFFER_PARAMETERS]>, poutputprocessparameters: Option<&mut [XAPO_PROCESS_BUFFER_PARAMETERS]>, isenabled: bool) { + (windows_core::Interface::vtable(self).Process)(windows_core::Interface::as_raw(self), pinputprocessparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pinputprocessparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), poutputprocessparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(poutputprocessparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), isenabled.into()) } pub unsafe fn CalcInputFrames(&self, outputframecount: u32) -> u32 { (windows_core::Interface::vtable(self).CalcInputFrames)(windows_core::Interface::as_raw(self), core::mem::transmute(outputframecount)) diff --git a/crates/libs/windows/src/Windows/Win32/Media/Audio/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/Audio/mod.rs index bfb745536f..78c94baa7f 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Audio/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Audio/mod.rs @@ -1947,9 +1947,6 @@ pub const Full: AudioStateMonitorSoundLevel = AudioStateMonitorSoundLevel(2i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HACMDRIVER(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HACMDRIVER { - type TypeKind = windows_core::CopyType; -} impl HACMDRIVER { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1972,9 +1969,6 @@ impl Default for HACMDRIVER { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HACMDRIVERID(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HACMDRIVERID { - type TypeKind = windows_core::CopyType; -} impl HACMDRIVERID { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1988,9 +1982,6 @@ impl Default for HACMDRIVERID { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HACMOBJ(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HACMOBJ { - type TypeKind = windows_core::CopyType; -} impl HACMOBJ { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2004,9 +1995,6 @@ impl Default for HACMOBJ { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HACMSTREAM(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HACMSTREAM { - type TypeKind = windows_core::CopyType; -} impl HACMSTREAM { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2029,9 +2017,6 @@ impl Default for HACMSTREAM { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HMIDI(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HMIDI { - type TypeKind = windows_core::CopyType; -} impl HMIDI { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2045,9 +2030,6 @@ impl Default for HMIDI { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HMIDIIN(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HMIDIIN { - type TypeKind = windows_core::CopyType; -} impl HMIDIIN { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2070,9 +2052,6 @@ impl Default for HMIDIIN { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HMIDIOUT(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HMIDIOUT { - type TypeKind = windows_core::CopyType; -} impl HMIDIOUT { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2095,9 +2074,6 @@ impl Default for HMIDIOUT { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HMIDISTRM(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HMIDISTRM { - type TypeKind = windows_core::CopyType; -} impl HMIDISTRM { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2120,9 +2096,6 @@ impl Default for HMIDISTRM { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HMIXER(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HMIXER { - type TypeKind = windows_core::CopyType; -} impl HMIXER { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2145,9 +2118,6 @@ impl Default for HMIXER { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HMIXEROBJ(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HMIXEROBJ { - type TypeKind = windows_core::CopyType; -} impl HMIXEROBJ { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2161,9 +2131,6 @@ impl Default for HMIXEROBJ { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HWAVE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HWAVE { - type TypeKind = windows_core::CopyType; -} impl HWAVE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2177,9 +2144,6 @@ impl Default for HWAVE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HWAVEIN(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HWAVEIN { - type TypeKind = windows_core::CopyType; -} impl HWAVEIN { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2202,9 +2166,6 @@ impl Default for HWAVEIN { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HWAVEOUT(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HWAVEOUT { - type TypeKind = windows_core::CopyType; -} impl HWAVEOUT { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2326,11 +2287,8 @@ impl IAudioAmbisonicsControl { pub unsafe fn SetData(&self, pambisonicsparams: &[AMBISONICS_PARAMS]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetData)(windows_core::Interface::as_raw(self), core::mem::transmute(pambisonicsparams.as_ptr()), pambisonicsparams.len().try_into().unwrap()).ok() } - pub unsafe fn SetHeadTracking(&self, benableheadtracking: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHeadTracking)(windows_core::Interface::as_raw(self), benableheadtracking.param().abi()).ok() + pub unsafe fn SetHeadTracking(&self, benableheadtracking: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHeadTracking)(windows_core::Interface::as_raw(self), benableheadtracking.into()).ok() } pub unsafe fn GetHeadTracking(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2398,11 +2356,8 @@ impl IAudioAutoGainControl { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetEnabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, benable: P0, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), benable.param().abi(), core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).ok() + pub unsafe fn SetEnabled(&self, benable: bool, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), benable.into(), core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -2759,11 +2714,8 @@ impl IAudioClient2 { pub unsafe fn SetClientProperties(&self, pproperties: *const AudioClientProperties) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetClientProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pproperties)).ok() } - pub unsafe fn GetBufferSizeLimits(&self, pformat: *const WAVEFORMATEX, beventdriven: P1, phnsminbufferduration: *mut i64, phnsmaxbufferduration: *mut i64) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetBufferSizeLimits)(windows_core::Interface::as_raw(self), core::mem::transmute(pformat), beventdriven.param().abi(), core::mem::transmute(phnsminbufferduration), core::mem::transmute(phnsmaxbufferduration)).ok() + pub unsafe fn GetBufferSizeLimits(&self, pformat: *const WAVEFORMATEX, beventdriven: bool, phnsminbufferduration: *mut i64, phnsmaxbufferduration: *mut i64) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetBufferSizeLimits)(windows_core::Interface::as_raw(self), core::mem::transmute(pformat), beventdriven.into(), core::mem::transmute(phnsminbufferduration), core::mem::transmute(phnsmaxbufferduration)).ok() } } #[repr(C)] @@ -3220,11 +3172,8 @@ impl IAudioLoudness { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetEnabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, benable: P0, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), benable.param().abi(), core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).ok() + pub unsafe fn SetEnabled(&self, benable: bool, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), benable.into(), core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -3289,11 +3238,8 @@ impl windows_core::RuntimeName for IAudioMidrange {} windows_core::imp::define_interface!(IAudioMute, IAudioMute_Vtbl, 0xdf45aeea_b74a_4b6b_afad_2366b6aa012e); windows_core::imp::interface_hierarchy!(IAudioMute, windows_core::IUnknown); impl IAudioMute { - pub unsafe fn SetMute(&self, bmuted: P0, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMute)(windows_core::Interface::as_raw(self), bmuted.param().abi(), core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).ok() + pub unsafe fn SetMute(&self, bmuted: bool, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMute)(windows_core::Interface::as_raw(self), bmuted.into(), core::mem::transmute(pguideventcontext.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetMute(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3659,11 +3605,8 @@ impl IAudioSessionControl2 { pub unsafe fn IsSystemSoundsSession(&self) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).IsSystemSoundsSession)(windows_core::Interface::as_raw(self)) } - pub unsafe fn SetDuckingPreference(&self, optout: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDuckingPreference)(windows_core::Interface::as_raw(self), optout.param().abi()).ok() + pub unsafe fn SetDuckingPreference(&self, optout: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDuckingPreference)(windows_core::Interface::as_raw(self), optout.into()).ok() } } #[repr(C)] @@ -3806,11 +3749,8 @@ impl IAudioSessionEvents { { (windows_core::Interface::vtable(self).OnIconPathChanged)(windows_core::Interface::as_raw(self), newiconpath.param().abi(), core::mem::transmute(eventcontext)).ok() } - pub unsafe fn OnSimpleVolumeChanged(&self, newvolume: f32, newmute: P1, eventcontext: *const windows_core::GUID) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnSimpleVolumeChanged)(windows_core::Interface::as_raw(self), core::mem::transmute(newvolume), newmute.param().abi(), core::mem::transmute(eventcontext)).ok() + pub unsafe fn OnSimpleVolumeChanged(&self, newvolume: f32, newmute: bool, eventcontext: *const windows_core::GUID) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnSimpleVolumeChanged)(windows_core::Interface::as_raw(self), core::mem::transmute(newvolume), newmute.into(), core::mem::transmute(eventcontext)).ok() } pub unsafe fn OnChannelVolumeChanged(&self, newchannelvolumearray: &[f32], changedchannel: u32, eventcontext: *const windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnChannelVolumeChanged)(windows_core::Interface::as_raw(self), newchannelvolumearray.len().try_into().unwrap(), core::mem::transmute(newchannelvolumearray.as_ptr()), core::mem::transmute(changedchannel), core::mem::transmute(eventcontext)).ok() @@ -4902,14 +4842,13 @@ impl IDeviceTopology { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetDeviceId)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn GetSignalPath(&self, pipartfrom: P0, pipartto: P1, brejectmixedpaths: P2) -> windows_core::Result + pub unsafe fn GetSignalPath(&self, pipartfrom: P0, pipartto: P1, brejectmixedpaths: bool) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetSignalPath)(windows_core::Interface::as_raw(self), pipartfrom.param().abi(), pipartto.param().abi(), brejectmixedpaths.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetSignalPath)(windows_core::Interface::as_raw(self), pipartfrom.param().abi(), pipartto.param().abi(), brejectmixedpaths.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -5869,11 +5808,8 @@ impl ISimpleAudioVolume { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetMasterVolume)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetMute(&self, bmute: P0, eventcontext: *const windows_core::GUID) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMute)(windows_core::Interface::as_raw(self), bmute.param().abi(), core::mem::transmute(eventcontext)).ok() + pub unsafe fn SetMute(&self, bmute: bool, eventcontext: *const windows_core::GUID) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMute)(windows_core::Interface::as_raw(self), bmute.into(), core::mem::transmute(eventcontext)).ok() } pub unsafe fn GetMute(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6094,12 +6030,9 @@ impl ISpatialAudioClient2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsOffloadCapable)(windows_core::Interface::as_raw(self), core::mem::transmute(category), &mut result__).map(|| result__) } - pub unsafe fn GetMaxFrameCountForCategory(&self, category: AUDIO_STREAM_CATEGORY, offloadenabled: P1, objectformat: *const WAVEFORMATEX) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn GetMaxFrameCountForCategory(&self, category: AUDIO_STREAM_CATEGORY, offloadenabled: bool, objectformat: *const WAVEFORMATEX) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetMaxFrameCountForCategory)(windows_core::Interface::as_raw(self), core::mem::transmute(category), offloadenabled.param().abi(), core::mem::transmute(objectformat), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetMaxFrameCountForCategory)(windows_core::Interface::as_raw(self), core::mem::transmute(category), offloadenabled.into(), core::mem::transmute(objectformat), &mut result__).map(|| result__) } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Media/DeviceManager/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/DeviceManager/mod.rs index 39233c8b55..cd9c4b143f 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/DeviceManager/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/DeviceManager/mod.rs @@ -3020,11 +3020,8 @@ impl IWMDMLogger { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsEnabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn Enable(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn Enable(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), fenable.into()).ok() } pub unsafe fn GetLogFileName(&self, pszfilename: windows_core::PSTR, nmaxchars: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLogFileName)(windows_core::Interface::as_raw(self), core::mem::transmute(pszfilename), core::mem::transmute(nmaxchars)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Media/DirectShow/Tv/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/DirectShow/Tv/mod.rs index 60770667a6..32778a6880 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/DirectShow/Tv/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/DirectShow/Tv/mod.rs @@ -3031,12 +3031,9 @@ impl IAtscPsipParser { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetMGT)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn GetVCT(&self, tableid: u8, fgetnexttable: P1) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn GetVCT(&self, tableid: u8, fgetnexttable: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetVCT)(windows_core::Interface::as_raw(self), core::mem::transmute(tableid), fgetnexttable.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetVCT)(windows_core::Interface::as_raw(self), core::mem::transmute(tableid), fgetnexttable.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetEIT(&self, pid: u16, pwsourceid: *const u16, dwtimeout: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5017,11 +5014,8 @@ impl IDTFilter { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).BlockUnRated)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetBlockUnRated(&self, fblockunratedshows: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBlockUnRated)(windows_core::Interface::as_raw(self), fblockunratedshows.param().abi()).ok() + pub unsafe fn SetBlockUnRated(&self, fblockunratedshows: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBlockUnRated)(windows_core::Interface::as_raw(self), fblockunratedshows.into()).ok() } pub unsafe fn BlockUnRatedDelay(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -13207,11 +13201,8 @@ impl IETFilter { pub unsafe fn GetLastErrorCode(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLastErrorCode)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetRecordingOn(&self, frecstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRecordingOn)(windows_core::Interface::as_raw(self), frecstate.param().abi()).ok() + pub unsafe fn SetRecordingOn(&self, frecstate: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRecordingOn)(windows_core::Interface::as_raw(self), frecstate.into()).ok() } } #[repr(C)] @@ -13890,11 +13881,8 @@ impl IEvalRat { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).BlockUnRated)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetBlockUnRated(&self, fblockunratedshows: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBlockUnRated)(windows_core::Interface::as_raw(self), fblockunratedshows.param().abi()).ok() + pub unsafe fn SetBlockUnRated(&self, fblockunratedshows: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBlockUnRated)(windows_core::Interface::as_raw(self), fblockunratedshows.into()).ok() } pub unsafe fn MostRestrictiveRating(&self, ensystem1: EnTvRat_System, enenlevel1: EnTvRat_GenericLevel, lbfenattr1: i32, ensystem2: EnTvRat_System, enenlevel2: EnTvRat_GenericLevel, lbfenattr2: i32, pensystem: *mut EnTvRat_System, penenlevel: *mut EnTvRat_GenericLevel, plbfenattr: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).MostRestrictiveRating)(windows_core::Interface::as_raw(self), core::mem::transmute(ensystem1), core::mem::transmute(enenlevel1), core::mem::transmute(lbfenattr1), core::mem::transmute(ensystem2), core::mem::transmute(enenlevel2), core::mem::transmute(lbfenattr2), core::mem::transmute(pensystem), core::mem::transmute(penenlevel), core::mem::transmute(plbfenattr)).ok() @@ -29392,13 +29380,12 @@ impl windows_core::RuntimeName for IPSITables {} windows_core::imp::define_interface!(IPTFilterLicenseRenewal, IPTFilterLicenseRenewal_Vtbl, 0x26d836a5_0c15_44c7_ac59_b0da8728f240); windows_core::imp::interface_hierarchy!(IPTFilterLicenseRenewal, windows_core::IUnknown); impl IPTFilterLicenseRenewal { - pub unsafe fn RenewLicenses(&self, wszfilename: P0, wszexpiredkid: P1, dwcallersid: u32, bhighpriority: P3) -> windows_core::Result<()> + pub unsafe fn RenewLicenses(&self, wszfilename: P0, wszexpiredkid: P1, dwcallersid: u32, bhighpriority: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).RenewLicenses)(windows_core::Interface::as_raw(self), wszfilename.param().abi(), wszexpiredkid.param().abi(), core::mem::transmute(dwcallersid), bhighpriority.param().abi()).ok() + (windows_core::Interface::vtable(self).RenewLicenses)(windows_core::Interface::as_raw(self), wszfilename.param().abi(), wszexpiredkid.param().abi(), core::mem::transmute(dwcallersid), bhighpriority.into()).ok() } pub unsafe fn CancelLicenseRenewal(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CancelLicenseRenewal)(windows_core::Interface::as_raw(self)).ok() @@ -31245,11 +31232,8 @@ impl core::ops::Deref for IStreamBufferConfigure3 { } windows_core::imp::interface_hierarchy!(IStreamBufferConfigure3, windows_core::IUnknown, IStreamBufferConfigure, IStreamBufferConfigure2); impl IStreamBufferConfigure3 { - pub unsafe fn SetStartRecConfig(&self, fstartstopscur: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStartRecConfig)(windows_core::Interface::as_raw(self), fstartstopscur.param().abi()).ok() + pub unsafe fn SetStartRecConfig(&self, fstartstopscur: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStartRecConfig)(windows_core::Interface::as_raw(self), fstartstopscur.into()).ok() } pub unsafe fn GetStartRecConfig(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Win32/Media/DirectShow/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/DirectShow/mod.rs index eab241dd5d..68df71be02 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/DirectShow/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/DirectShow/mod.rs @@ -4367,11 +4367,8 @@ impl IAMAsyncReaderTimestampScaling { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetTimestampMode)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetTimestampMode(&self, fraw: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetTimestampMode)(windows_core::Interface::as_raw(self), fraw.param().abi()).ok() + pub unsafe fn SetTimestampMode(&self, fraw: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetTimestampMode)(windows_core::Interface::as_raw(self), fraw.into()).ok() } } #[repr(C)] @@ -4414,21 +4411,15 @@ impl windows_core::RuntimeName for IAMAsyncReaderTimestampScaling {} windows_core::imp::define_interface!(IAMAudioInputMixer, IAMAudioInputMixer_Vtbl, 0x54c39221_8380_11d0_b3f0_00aa003761c5); windows_core::imp::interface_hierarchy!(IAMAudioInputMixer, windows_core::IUnknown); impl IAMAudioInputMixer { - pub unsafe fn SetEnable(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnable)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn SetEnable(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnable)(windows_core::Interface::as_raw(self), fenable.into()).ok() } pub unsafe fn Enable(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetMono(&self, fmono: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMono)(windows_core::Interface::as_raw(self), fmono.param().abi()).ok() + pub unsafe fn SetMono(&self, fmono: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMono)(windows_core::Interface::as_raw(self), fmono.into()).ok() } pub unsafe fn Mono(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4448,11 +4439,8 @@ impl IAMAudioInputMixer { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Pan)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetLoudness(&self, floudness: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetLoudness)(windows_core::Interface::as_raw(self), floudness.param().abi()).ok() + pub unsafe fn SetLoudness(&self, floudness: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetLoudness)(windows_core::Interface::as_raw(self), floudness.into()).ok() } pub unsafe fn Loudness(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5153,11 +5141,8 @@ impl IAMCrossbar { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).get_IsRoutedTo)(windows_core::Interface::as_raw(self), core::mem::transmute(outputpinindex), &mut result__).map(|| result__) } - pub unsafe fn get_CrossbarPinInfo(&self, isinputpin: P0, pinindex: i32, pinindexrelated: *mut i32, physicaltype: *mut i32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).get_CrossbarPinInfo)(windows_core::Interface::as_raw(self), isinputpin.param().abi(), core::mem::transmute(pinindex), core::mem::transmute(pinindexrelated), core::mem::transmute(physicaltype)).ok() + pub unsafe fn get_CrossbarPinInfo(&self, isinputpin: bool, pinindex: i32, pinindexrelated: *mut i32, physicaltype: *mut i32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).get_CrossbarPinInfo)(windows_core::Interface::as_raw(self), isinputpin.into(), core::mem::transmute(pinindex), core::mem::transmute(pinindexrelated), core::mem::transmute(physicaltype)).ok() } } #[repr(C)] @@ -5475,11 +5460,8 @@ impl IAMDirectSound { { (windows_core::Interface::vtable(self).ReleaseSecondaryBufferInterface)(windows_core::Interface::as_raw(self), lpdsb.param().abi()).ok() } - pub unsafe fn SetFocusWindow(&self, param0: super::super::Foundation::HWND, param1: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetFocusWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1.param().abi()).ok() + pub unsafe fn SetFocusWindow(&self, param0: super::super::Foundation::HWND, param1: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetFocusWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), param1.into()).ok() } pub unsafe fn GetFocusWindow(&self, param0: *mut super::super::Foundation::HWND, param1: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetFocusWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(param0), core::mem::transmute(param1)).ok() @@ -6492,11 +6474,8 @@ impl IAMGraphStreams { { (windows_core::Interface::vtable(self).FindUpstreamInterface)(windows_core::Interface::as_raw(self), ppin.param().abi(), core::mem::transmute(riid), core::mem::transmute(ppvinterface), core::mem::transmute(dwflags)).ok() } - pub unsafe fn SyncUsingStreamOffset(&self, busestreamoffset: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SyncUsingStreamOffset)(windows_core::Interface::as_raw(self), busestreamoffset.param().abi()).ok() + pub unsafe fn SyncUsingStreamOffset(&self, busestreamoffset: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SyncUsingStreamOffset)(windows_core::Interface::as_raw(self), busestreamoffset.into()).ok() } pub unsafe fn SetMaxGraphLatency(&self, rtmaxgraphlatency: i64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetMaxGraphLatency)(windows_core::Interface::as_raw(self), core::mem::transmute(rtmaxgraphlatency)).ok() @@ -6610,11 +6589,8 @@ impl IAMLine21Decoder { pub unsafe fn GetRedrawAlways(&self, lpboption: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetRedrawAlways)(windows_core::Interface::as_raw(self), core::mem::transmute(lpboption)).ok() } - pub unsafe fn SetRedrawAlways(&self, boption: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRedrawAlways)(windows_core::Interface::as_raw(self), boption.param().abi()).ok() + pub unsafe fn SetRedrawAlways(&self, boption: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRedrawAlways)(windows_core::Interface::as_raw(self), boption.into()).ok() } pub unsafe fn GetDrawBackgroundMode(&self, lpmode: *mut AM_LINE21_DRAWBGMODE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDrawBackgroundMode)(windows_core::Interface::as_raw(self), core::mem::transmute(lpmode)).ok() @@ -7094,20 +7070,14 @@ impl IAMMediaTypeSample { pub unsafe fn IsSyncPoint(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).IsSyncPoint)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetSyncPoint(&self, bissyncpoint: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSyncPoint)(windows_core::Interface::as_raw(self), bissyncpoint.param().abi()).ok() + pub unsafe fn SetSyncPoint(&self, bissyncpoint: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSyncPoint)(windows_core::Interface::as_raw(self), bissyncpoint.into()).ok() } pub unsafe fn IsPreroll(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).IsPreroll)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetPreroll(&self, bispreroll: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPreroll)(windows_core::Interface::as_raw(self), bispreroll.param().abi()).ok() + pub unsafe fn SetPreroll(&self, bispreroll: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPreroll)(windows_core::Interface::as_raw(self), bispreroll.into()).ok() } pub unsafe fn GetActualDataLength(&self) -> i32 { (windows_core::Interface::vtable(self).GetActualDataLength)(windows_core::Interface::as_raw(self)) @@ -7127,11 +7097,8 @@ impl IAMMediaTypeSample { pub unsafe fn IsDiscontinuity(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).IsDiscontinuity)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetDiscontinuity(&self, bdiscontinuity: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDiscontinuity)(windows_core::Interface::as_raw(self), bdiscontinuity.param().abi()).ok() + pub unsafe fn SetDiscontinuity(&self, bdiscontinuity: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDiscontinuity)(windows_core::Interface::as_raw(self), bdiscontinuity.into()).ok() } pub unsafe fn GetMediaTime(&self, ptimestart: *mut i64, ptimeend: *mut i64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetMediaTime)(windows_core::Interface::as_raw(self), core::mem::transmute(ptimestart), core::mem::transmute(ptimeend)).ok() @@ -8599,11 +8566,8 @@ impl IAMPluginControl { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetDisabledByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(index), &mut result__).map(|| result__) } - pub unsafe fn SetDisabled(&self, clsid: *const windows_core::GUID, disabled: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDisabled)(windows_core::Interface::as_raw(self), core::mem::transmute(clsid), disabled.param().abi()).ok() + pub unsafe fn SetDisabled(&self, clsid: *const windows_core::GUID, disabled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDisabled)(windows_core::Interface::as_raw(self), core::mem::transmute(clsid), disabled.into()).ok() } pub unsafe fn IsLegacyDisabled(&self, dllname: P0) -> windows_core::Result<()> where @@ -9052,11 +9016,8 @@ impl IAMStreamControl { pub unsafe fn StartAt(&self, ptstart: Option<*const i64>, dwcookie: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).StartAt)(windows_core::Interface::as_raw(self), core::mem::transmute(ptstart.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcookie)).ok() } - pub unsafe fn StopAt(&self, ptstop: Option<*const i64>, bsendextra: P1, dwcookie: u32) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).StopAt)(windows_core::Interface::as_raw(self), core::mem::transmute(ptstop.unwrap_or(core::mem::zeroed())), bsendextra.param().abi(), core::mem::transmute(dwcookie)).ok() + pub unsafe fn StopAt(&self, ptstop: Option<*const i64>, bsendextra: bool, dwcookie: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).StopAt)(windows_core::Interface::as_raw(self), core::mem::transmute(ptstop.unwrap_or(core::mem::zeroed())), bsendextra.into(), core::mem::transmute(dwcookie)).ok() } pub unsafe fn GetInfo(&self, pinfo: *mut AM_STREAM_INFO) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo)).ok() @@ -10140,11 +10101,8 @@ impl IAMVideoAccelerator { pub unsafe fn EndFrame(&self, pendframeinfo: *const AMVAEndFrameInfo) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EndFrame)(windows_core::Interface::as_raw(self), core::mem::transmute(pendframeinfo)).ok() } - pub unsafe fn GetBuffer(&self, dwtypeindex: u32, dwbufferindex: u32, breadonly: P2, ppbuffer: *mut *mut core::ffi::c_void, lpstride: *mut i32) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(dwtypeindex), core::mem::transmute(dwbufferindex), breadonly.param().abi(), core::mem::transmute(ppbuffer), core::mem::transmute(lpstride)).ok() + pub unsafe fn GetBuffer(&self, dwtypeindex: u32, dwbufferindex: u32, breadonly: bool, ppbuffer: *mut *mut core::ffi::c_void, lpstride: *mut i32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(dwtypeindex), core::mem::transmute(dwbufferindex), breadonly.into(), core::mem::transmute(ppbuffer), core::mem::transmute(lpstride)).ok() } pub unsafe fn ReleaseBuffer(&self, dwtypeindex: u32, dwbufferindex: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReleaseBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(dwtypeindex), core::mem::transmute(dwbufferindex)).ok() @@ -10834,11 +10792,8 @@ impl IAMWstDecoder { pub unsafe fn GetRedrawAlways(&self, lpboption: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetRedrawAlways)(windows_core::Interface::as_raw(self), core::mem::transmute(lpboption)).ok() } - pub unsafe fn SetRedrawAlways(&self, boption: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRedrawAlways)(windows_core::Interface::as_raw(self), boption.param().abi()).ok() + pub unsafe fn SetRedrawAlways(&self, boption: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRedrawAlways)(windows_core::Interface::as_raw(self), boption.into()).ok() } pub unsafe fn GetDrawBackgroundMode(&self, lpmode: *mut AM_WST_DRAWBGMODE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDrawBackgroundMode)(windows_core::Interface::as_raw(self), core::mem::transmute(lpmode)).ok() @@ -10846,20 +10801,14 @@ impl IAMWstDecoder { pub unsafe fn SetDrawBackgroundMode(&self, mode: AM_WST_DRAWBGMODE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetDrawBackgroundMode)(windows_core::Interface::as_raw(self), core::mem::transmute(mode)).ok() } - pub unsafe fn SetAnswerMode(&self, banswer: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAnswerMode)(windows_core::Interface::as_raw(self), banswer.param().abi()).ok() + pub unsafe fn SetAnswerMode(&self, banswer: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAnswerMode)(windows_core::Interface::as_raw(self), banswer.into()).ok() } pub unsafe fn GetAnswerMode(&self, pbanswer: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetAnswerMode)(windows_core::Interface::as_raw(self), core::mem::transmute(pbanswer)).ok() } - pub unsafe fn SetHoldPage(&self, bholdpage: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHoldPage)(windows_core::Interface::as_raw(self), bholdpage.param().abi()).ok() + pub unsafe fn SetHoldPage(&self, bholdpage: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHoldPage)(windows_core::Interface::as_raw(self), bholdpage.into()).ok() } pub unsafe fn GetHoldPage(&self, pbholdpage: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetHoldPage)(windows_core::Interface::as_raw(self), core::mem::transmute(pbholdpage)).ok() @@ -11862,11 +11811,8 @@ impl IBDA_DRM { pub unsafe fn GetDRMPairingStatus(&self, pdwstatus: *mut u32, pherror: *mut windows_core::HRESULT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDRMPairingStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwstatus), core::mem::transmute(pherror)).ok() } - pub unsafe fn PerformDRMPairing(&self, fsync: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).PerformDRMPairing)(windows_core::Interface::as_raw(self), fsync.param().abi()).ok() + pub unsafe fn PerformDRMPairing(&self, fsync: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PerformDRMPairing)(windows_core::Interface::as_raw(self), fsync.into()).ok() } } #[repr(C)] @@ -12369,20 +12315,14 @@ impl windows_core::RuntimeName for IBDA_DigitalDemodulator3 {} windows_core::imp::define_interface!(IBDA_DiseqCommand, IBDA_DiseqCommand_Vtbl, 0xf84e2ab0_3c6b_45e3_a0fc_8669d4b81f11); windows_core::imp::interface_hierarchy!(IBDA_DiseqCommand, windows_core::IUnknown); impl IBDA_DiseqCommand { - pub unsafe fn SetEnableDiseqCommands(&self, benable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableDiseqCommands)(windows_core::Interface::as_raw(self), benable.param().abi()).ok() + pub unsafe fn SetEnableDiseqCommands(&self, benable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableDiseqCommands)(windows_core::Interface::as_raw(self), benable.into()).ok() } pub unsafe fn SetDiseqLNBSource(&self, ullnbsource: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetDiseqLNBSource)(windows_core::Interface::as_raw(self), core::mem::transmute(ullnbsource)).ok() } - pub unsafe fn SetDiseqUseToneBurst(&self, busetoneburst: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDiseqUseToneBurst)(windows_core::Interface::as_raw(self), busetoneburst.param().abi()).ok() + pub unsafe fn SetDiseqUseToneBurst(&self, busetoneburst: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDiseqUseToneBurst)(windows_core::Interface::as_raw(self), busetoneburst.into()).ok() } pub unsafe fn SetDiseqRepeats(&self, ulrepeats: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetDiseqRepeats)(windows_core::Interface::as_raw(self), core::mem::transmute(ulrepeats)).ok() @@ -13805,20 +13745,14 @@ impl IBDA_SignalStatistics { pub unsafe fn SignalQuality(&self, plpercentquality: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SignalQuality)(windows_core::Interface::as_raw(self), core::mem::transmute(plpercentquality)).ok() } - pub unsafe fn SetSignalPresent(&self, fpresent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSignalPresent)(windows_core::Interface::as_raw(self), fpresent.param().abi()).ok() + pub unsafe fn SetSignalPresent(&self, fpresent: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSignalPresent)(windows_core::Interface::as_raw(self), fpresent.into()).ok() } pub unsafe fn SignalPresent(&self, pfpresent: *mut u8) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SignalPresent)(windows_core::Interface::as_raw(self), core::mem::transmute(pfpresent)).ok() } - pub unsafe fn SetSignalLocked(&self, flocked: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSignalLocked)(windows_core::Interface::as_raw(self), flocked.param().abi()).ok() + pub unsafe fn SetSignalLocked(&self, flocked: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSignalLocked)(windows_core::Interface::as_raw(self), flocked.into()).ok() } pub unsafe fn SignalLocked(&self, pflocked: *mut u8) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SignalLocked)(windows_core::Interface::as_raw(self), core::mem::transmute(pflocked)).ok() @@ -16172,13 +16106,12 @@ impl ICaptureGraphBuilder2 { { (windows_core::Interface::vtable(self).CopyCaptureFile)(windows_core::Interface::as_raw(self), lpwstrold.param().abi(), lpwstrnew.param().abi(), core::mem::transmute(fallowescabort), pcallback.param().abi()).ok() } - pub unsafe fn FindPin(&self, psource: P0, pindir: PIN_DIRECTION, pcategory: Option<*const windows_core::GUID>, ptype: Option<*const windows_core::GUID>, funconnected: P4, num: i32) -> windows_core::Result + pub unsafe fn FindPin(&self, psource: P0, pindir: PIN_DIRECTION, pcategory: Option<*const windows_core::GUID>, ptype: Option<*const windows_core::GUID>, funconnected: bool, num: i32) -> windows_core::Result where P0: windows_core::Param, - P4: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).FindPin)(windows_core::Interface::as_raw(self), psource.param().abi(), core::mem::transmute(pindir), core::mem::transmute(pcategory.unwrap_or(core::mem::zeroed())), core::mem::transmute(ptype.unwrap_or(core::mem::zeroed())), funconnected.param().abi(), core::mem::transmute(num), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).FindPin)(windows_core::Interface::as_raw(self), psource.param().abi(), core::mem::transmute(pindir), core::mem::transmute(pcategory.unwrap_or(core::mem::zeroed())), core::mem::transmute(ptype.unwrap_or(core::mem::zeroed())), funconnected.into(), core::mem::transmute(num), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -16317,11 +16250,8 @@ impl IConfigAsfWriter { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetCurrentProfile)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetIndexMode(&self, bindexfile: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIndexMode)(windows_core::Interface::as_raw(self), bindexfile.param().abi()).ok() + pub unsafe fn SetIndexMode(&self, bindexfile: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIndexMode)(windows_core::Interface::as_raw(self), bindexfile.into()).ok() } pub unsafe fn GetIndexMode(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -16524,11 +16454,8 @@ impl IConfigAviMux { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetMasterStream)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetOutputCompatibilityIndex(&self, foldindex: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetOutputCompatibilityIndex)(windows_core::Interface::as_raw(self), foldindex.param().abi()).ok() + pub unsafe fn SetOutputCompatibilityIndex(&self, foldindex: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetOutputCompatibilityIndex)(windows_core::Interface::as_raw(self), foldindex.into()).ok() } pub unsafe fn GetOutputCompatibilityIndex(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -16817,13 +16744,8 @@ impl windows_core::RuntimeName for IDDrawExclModeVideo {} windows_core::imp::define_interface!(IDDrawExclModeVideoCallback, IDDrawExclModeVideoCallback_Vtbl, 0x913c24a0_20ab_11d2_9038_00a0c9697298); windows_core::imp::interface_hierarchy!(IDDrawExclModeVideoCallback, windows_core::IUnknown); impl IDDrawExclModeVideoCallback { - pub unsafe fn OnUpdateOverlay(&self, bbefore: P0, dwflags: u32, boldvisible: P2, prcoldsrc: *const super::super::Foundation::RECT, prcolddest: *const super::super::Foundation::RECT, bnewvisible: P5, prcnewsrc: *const super::super::Foundation::RECT, prcnewdest: *const super::super::Foundation::RECT) -> windows_core::Result<()> - where - P0: windows_core::Param, - P2: windows_core::Param, - P5: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnUpdateOverlay)(windows_core::Interface::as_raw(self), bbefore.param().abi(), core::mem::transmute(dwflags), boldvisible.param().abi(), core::mem::transmute(prcoldsrc), core::mem::transmute(prcolddest), bnewvisible.param().abi(), core::mem::transmute(prcnewsrc), core::mem::transmute(prcnewdest)).ok() + pub unsafe fn OnUpdateOverlay(&self, bbefore: bool, dwflags: u32, boldvisible: bool, prcoldsrc: *const super::super::Foundation::RECT, prcolddest: *const super::super::Foundation::RECT, bnewvisible: bool, prcnewsrc: *const super::super::Foundation::RECT, prcnewdest: *const super::super::Foundation::RECT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnUpdateOverlay)(windows_core::Interface::as_raw(self), bbefore.into(), core::mem::transmute(dwflags), boldvisible.into(), core::mem::transmute(prcoldsrc), core::mem::transmute(prcolddest), bnewvisible.into(), core::mem::transmute(prcnewsrc), core::mem::transmute(prcnewdest)).ok() } pub unsafe fn OnUpdateColorKey(&self, pkey: *const COLORKEY, dwcolor: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnUpdateColorKey)(windows_core::Interface::as_raw(self), core::mem::transmute(pkey), core::mem::transmute(dwcolor)).ok() @@ -16979,11 +16901,8 @@ impl windows_core::RuntimeName for IDVEnc {} windows_core::imp::define_interface!(IDVRGB219, IDVRGB219_Vtbl, 0x58473a19_2bc8_4663_8012_25f81babddd1); windows_core::imp::interface_hierarchy!(IDVRGB219, windows_core::IUnknown); impl IDVRGB219 { - pub unsafe fn SetRGB219(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRGB219)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn SetRGB219(&self, bstate: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRGB219)(windows_core::Interface::as_raw(self), bstate.into()).ok() } } #[repr(C)] @@ -17931,11 +17850,8 @@ impl IDvdControl { pub unsafe fn AudioStreamChange(&self, ulaudio: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AudioStreamChange)(windows_core::Interface::as_raw(self), core::mem::transmute(ulaudio)).ok() } - pub unsafe fn SubpictureStreamChange(&self, ulsubpicture: u32, bdisplay: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SubpictureStreamChange)(windows_core::Interface::as_raw(self), core::mem::transmute(ulsubpicture), bdisplay.param().abi()).ok() + pub unsafe fn SubpictureStreamChange(&self, ulsubpicture: u32, bdisplay: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SubpictureStreamChange)(windows_core::Interface::as_raw(self), core::mem::transmute(ulsubpicture), bdisplay.into()).ok() } pub unsafe fn AngleChange(&self, ulangle: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AngleChange)(windows_core::Interface::as_raw(self), core::mem::transmute(ulangle)).ok() @@ -18303,11 +18219,8 @@ impl IDvdControl2 { pub unsafe fn StillOff(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).StillOff)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn Pause(&self, bstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Pause)(windows_core::Interface::as_raw(self), bstate.param().abi()).ok() + pub unsafe fn Pause(&self, bstate: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Pause)(windows_core::Interface::as_raw(self), bstate.into()).ok() } pub unsafe fn SelectAudioStream(&self, ulaudio: u32, dwflags: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -18317,12 +18230,9 @@ impl IDvdControl2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SelectSubpictureStream)(windows_core::Interface::as_raw(self), core::mem::transmute(ulsubpicture), core::mem::transmute(dwflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetSubpictureState(&self, bstate: P0, dwflags: u32) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn SetSubpictureState(&self, bstate: bool, dwflags: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).SetSubpictureState)(windows_core::Interface::as_raw(self), bstate.param().abi(), core::mem::transmute(dwflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).SetSubpictureState)(windows_core::Interface::as_raw(self), bstate.into(), core::mem::transmute(dwflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn SelectAngle(&self, ulangle: u32, dwflags: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -18356,17 +18266,11 @@ impl IDvdControl2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).PlayChaptersAutoStop)(windows_core::Interface::as_raw(self), core::mem::transmute(ultitle), core::mem::transmute(ulchapter), core::mem::transmute(ulchapterstoplay), core::mem::transmute(dwflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn AcceptParentalLevelChange(&self, baccept: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).AcceptParentalLevelChange)(windows_core::Interface::as_raw(self), baccept.param().abi()).ok() + pub unsafe fn AcceptParentalLevelChange(&self, baccept: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AcceptParentalLevelChange)(windows_core::Interface::as_raw(self), baccept.into()).ok() } - pub unsafe fn SetOption(&self, flag: DVD_OPTION_FLAG, fstate: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetOption)(windows_core::Interface::as_raw(self), core::mem::transmute(flag), fstate.param().abi()).ok() + pub unsafe fn SetOption(&self, flag: DVD_OPTION_FLAG, fstate: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetOption)(windows_core::Interface::as_raw(self), core::mem::transmute(flag), fstate.into()).ok() } pub unsafe fn SetState(&self, pstate: P0, dwflags: u32) -> windows_core::Result where @@ -21232,16 +21136,12 @@ impl IFilterMapper { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).RegisterFilterInstance)(windows_core::Interface::as_raw(self), core::mem::transmute(clsid), name.param().abi(), &mut result__).map(|| result__) } - pub unsafe fn RegisterPin(&self, filter: windows_core::GUID, name: P1, brendered: P2, boutput: P3, bzero: P4, bmany: P5, connectstofilter: windows_core::GUID, connectstopin: P7) -> windows_core::Result<()> + pub unsafe fn RegisterPin(&self, filter: windows_core::GUID, name: P1, brendered: bool, boutput: bool, bzero: bool, bmany: bool, connectstofilter: windows_core::GUID, connectstopin: P7) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, P7: windows_core::Param, { - (windows_core::Interface::vtable(self).RegisterPin)(windows_core::Interface::as_raw(self), core::mem::transmute(filter), name.param().abi(), brendered.param().abi(), boutput.param().abi(), bzero.param().abi(), bmany.param().abi(), core::mem::transmute(connectstofilter), connectstopin.param().abi()).ok() + (windows_core::Interface::vtable(self).RegisterPin)(windows_core::Interface::as_raw(self), core::mem::transmute(filter), name.param().abi(), brendered.into(), boutput.into(), bzero.into(), bmany.into(), core::mem::transmute(connectstofilter), connectstopin.param().abi()).ok() } pub unsafe fn RegisterPinType(&self, clsfilter: windows_core::GUID, strname: P1, clsmajortype: windows_core::GUID, clssubtype: windows_core::GUID) -> windows_core::Result<()> where @@ -21261,13 +21161,8 @@ impl IFilterMapper { { (windows_core::Interface::vtable(self).UnregisterPin)(windows_core::Interface::as_raw(self), core::mem::transmute(filter), name.param().abi()).ok() } - pub unsafe fn EnumMatchingFilters(&self, ppenum: *mut Option, dwmerit: u32, binputneeded: P2, clsinmaj: windows_core::GUID, clsinsub: windows_core::GUID, brender: P5, boututneeded: P6, clsoutmaj: windows_core::GUID, clsoutsub: windows_core::GUID) -> windows_core::Result<()> - where - P2: windows_core::Param, - P5: windows_core::Param, - P6: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnumMatchingFilters)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum), core::mem::transmute(dwmerit), binputneeded.param().abi(), core::mem::transmute(clsinmaj), core::mem::transmute(clsinsub), brender.param().abi(), boututneeded.param().abi(), core::mem::transmute(clsoutmaj), core::mem::transmute(clsoutsub)).ok() + pub unsafe fn EnumMatchingFilters(&self, ppenum: *mut Option, dwmerit: u32, binputneeded: bool, clsinmaj: windows_core::GUID, clsinsub: windows_core::GUID, brender: bool, boututneeded: bool, clsoutmaj: windows_core::GUID, clsoutsub: windows_core::GUID) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnumMatchingFilters)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum), core::mem::transmute(dwmerit), binputneeded.into(), core::mem::transmute(clsinmaj), core::mem::transmute(clsinsub), brender.into(), boututneeded.into(), core::mem::transmute(clsoutmaj), core::mem::transmute(clsoutsub)).ok() } } #[repr(C)] @@ -21373,26 +21268,20 @@ impl IFilterMapper2 { (windows_core::Interface::vtable(self).RegisterFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(clsidfilter), name.param().abi(), core::mem::transmute(ppmoniker.unwrap_or(core::mem::zeroed())), core::mem::transmute(pclsidcategory), szinstance.param().abi(), core::mem::transmute(prf2)).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn EnumMatchingFilters(&self, ppenum: *mut Option, dwflags: u32, bexactmatch: P2, dwmerit: u32, binputneeded: P4, cinputtypes: u32, pinputtypes: Option<*const windows_core::GUID>, pmedin: Option<*const REGPINMEDIUM>, ppincategoryin: Option<*const windows_core::GUID>, brender: P9, boutputneeded: P10, coutputtypes: u32, poutputtypes: Option<*const windows_core::GUID>, pmedout: Option<*const REGPINMEDIUM>, ppincategoryout: Option<*const windows_core::GUID>) -> windows_core::Result<()> - where - P2: windows_core::Param, - P4: windows_core::Param, - P9: windows_core::Param, - P10: windows_core::Param, - { + pub unsafe fn EnumMatchingFilters(&self, ppenum: *mut Option, dwflags: u32, bexactmatch: bool, dwmerit: u32, binputneeded: bool, cinputtypes: u32, pinputtypes: Option<*const windows_core::GUID>, pmedin: Option<*const REGPINMEDIUM>, ppincategoryin: Option<*const windows_core::GUID>, brender: bool, boutputneeded: bool, coutputtypes: u32, poutputtypes: Option<*const windows_core::GUID>, pmedout: Option<*const REGPINMEDIUM>, ppincategoryout: Option<*const windows_core::GUID>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EnumMatchingFilters)( windows_core::Interface::as_raw(self), core::mem::transmute(ppenum), core::mem::transmute(dwflags), - bexactmatch.param().abi(), + bexactmatch.into(), core::mem::transmute(dwmerit), - binputneeded.param().abi(), + binputneeded.into(), core::mem::transmute(cinputtypes), core::mem::transmute(pinputtypes.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmedin.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppincategoryin.unwrap_or(core::mem::zeroed())), - brender.param().abi(), - boutputneeded.param().abi(), + brender.into(), + boutputneeded.into(), core::mem::transmute(coutputtypes), core::mem::transmute(poutputtypes.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmedout.unwrap_or(core::mem::zeroed())), @@ -23437,20 +23326,14 @@ impl IMediaSample { pub unsafe fn IsSyncPoint(&self) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).IsSyncPoint)(windows_core::Interface::as_raw(self)) } - pub unsafe fn SetSyncPoint(&self, bissyncpoint: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSyncPoint)(windows_core::Interface::as_raw(self), bissyncpoint.param().abi()).ok() + pub unsafe fn SetSyncPoint(&self, bissyncpoint: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSyncPoint)(windows_core::Interface::as_raw(self), bissyncpoint.into()).ok() } pub unsafe fn IsPreroll(&self) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).IsPreroll)(windows_core::Interface::as_raw(self)) } - pub unsafe fn SetPreroll(&self, bispreroll: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPreroll)(windows_core::Interface::as_raw(self), bispreroll.param().abi()).ok() + pub unsafe fn SetPreroll(&self, bispreroll: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPreroll)(windows_core::Interface::as_raw(self), bispreroll.into()).ok() } pub unsafe fn GetActualDataLength(&self) -> i32 { (windows_core::Interface::vtable(self).GetActualDataLength)(windows_core::Interface::as_raw(self)) @@ -23470,11 +23353,8 @@ impl IMediaSample { pub unsafe fn IsDiscontinuity(&self) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).IsDiscontinuity)(windows_core::Interface::as_raw(self)) } - pub unsafe fn SetDiscontinuity(&self, bdiscontinuity: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDiscontinuity)(windows_core::Interface::as_raw(self), bdiscontinuity.param().abi()).ok() + pub unsafe fn SetDiscontinuity(&self, bdiscontinuity: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDiscontinuity)(windows_core::Interface::as_raw(self), bdiscontinuity.into()).ok() } pub unsafe fn GetMediaTime(&self, ptimestart: *mut i64, ptimeend: *mut i64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetMediaTime)(windows_core::Interface::as_raw(self), core::mem::transmute(ptimestart), core::mem::transmute(ptimeend)).ok() @@ -24100,11 +23980,8 @@ impl IMediaStreamFilter { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EnumMediaStreams)(windows_core::Interface::as_raw(self), core::mem::transmute(index), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SupportSeeking(&self, brenderer: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SupportSeeking)(windows_core::Interface::as_raw(self), brenderer.param().abi()).ok() + pub unsafe fn SupportSeeking(&self, brenderer: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SupportSeeking)(windows_core::Interface::as_raw(self), brenderer.into()).ok() } pub unsafe fn ReferenceTimeToStreamTime(&self, ptime: *mut i64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReferenceTimeToStreamTime)(windows_core::Interface::as_raw(self), core::mem::transmute(ptime)).ok() @@ -24116,11 +23993,8 @@ impl IMediaStreamFilter { pub unsafe fn WaitUntil(&self, waitstreamtime: i64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).WaitUntil)(windows_core::Interface::as_raw(self), core::mem::transmute(waitstreamtime)).ok() } - pub unsafe fn Flush(&self, bcanceleos: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Flush)(windows_core::Interface::as_raw(self), bcanceleos.param().abi()).ok() + pub unsafe fn Flush(&self, bcanceleos: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Flush)(windows_core::Interface::as_raw(self), bcanceleos.into()).ok() } pub unsafe fn EndOfStream(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EndOfStream)(windows_core::Interface::as_raw(self)).ok() @@ -24483,12 +24357,11 @@ impl IMemInputPin { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetAllocator)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn NotifyAllocator(&self, pallocator: P0, breadonly: P1) -> windows_core::Result<()> + pub unsafe fn NotifyAllocator(&self, pallocator: P0, breadonly: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).NotifyAllocator)(windows_core::Interface::as_raw(self), pallocator.param().abi(), breadonly.param().abi()).ok() + (windows_core::Interface::vtable(self).NotifyAllocator)(windows_core::Interface::as_raw(self), pallocator.param().abi(), breadonly.into()).ok() } pub unsafe fn GetAllocatorRequirements(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -24838,11 +24711,8 @@ impl IMixerPinConfig { pub unsafe fn GetAspectRatioMode(&self, pamaspectratiomode: *mut AM_ASPECT_RATIO_MODE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetAspectRatioMode)(windows_core::Interface::as_raw(self), core::mem::transmute(pamaspectratiomode)).ok() } - pub unsafe fn SetStreamTransparent(&self, bstreamtransparent: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStreamTransparent)(windows_core::Interface::as_raw(self), bstreamtransparent.param().abi()).ok() + pub unsafe fn SetStreamTransparent(&self, bstreamtransparent: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStreamTransparent)(windows_core::Interface::as_raw(self), bstreamtransparent.into()).ok() } pub unsafe fn GetStreamTransparent(&self, pbstreamtransparent: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetStreamTransparent)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstreamtransparent)).ok() @@ -25733,13 +25603,11 @@ impl IPersistMediaPropertyBag { (windows_core::Interface::vtable(self).Load)(windows_core::Interface::as_raw(self), ppropbag.param().abi(), perrorlog.param().abi()).ok() } #[cfg(feature = "Win32_System_Com_StructuredStorage")] - pub unsafe fn Save(&self, ppropbag: P0, fcleardirty: P1, fsaveallproperties: P2) -> windows_core::Result<()> + pub unsafe fn Save(&self, ppropbag: P0, fcleardirty: bool, fsaveallproperties: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), ppropbag.param().abi(), fcleardirty.param().abi(), fsaveallproperties.param().abi()).ok() + (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), ppropbag.param().abi(), fcleardirty.into(), fsaveallproperties.into()).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -26738,12 +26606,11 @@ impl IResourceManager { { (windows_core::Interface::vtable(self).NotifyAcquire)(windows_core::Interface::as_raw(self), core::mem::transmute(idresource), pconsumer.param().abi(), core::mem::transmute(hr)).ok() } - pub unsafe fn NotifyRelease(&self, idresource: i32, pconsumer: P1, bstillwant: P2) -> windows_core::Result<()> + pub unsafe fn NotifyRelease(&self, idresource: i32, pconsumer: P1, bstillwant: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).NotifyRelease)(windows_core::Interface::as_raw(self), core::mem::transmute(idresource), pconsumer.param().abi(), bstillwant.param().abi()).ok() + (windows_core::Interface::vtable(self).NotifyRelease)(windows_core::Interface::as_raw(self), core::mem::transmute(idresource), pconsumer.param().abi(), bstillwant.into()).ok() } pub unsafe fn CancelRequest(&self, idresource: i32, pconsumer: P1) -> windows_core::Result<()> where @@ -26879,12 +26746,11 @@ pub const ISO_IEC_USER_PRIVATE: MPEG2StreamType = MPEG2StreamType(128i32); windows_core::imp::define_interface!(ISeekingPassThru, ISeekingPassThru_Vtbl, 0x36b73883_c2c8_11cf_8b46_00805f6cef60); windows_core::imp::interface_hierarchy!(ISeekingPassThru, windows_core::IUnknown); impl ISeekingPassThru { - pub unsafe fn Init(&self, bsupportrendering: P0, ppin: P1) -> windows_core::Result<()> + pub unsafe fn Init(&self, bsupportrendering: bool, ppin: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Init)(windows_core::Interface::as_raw(self), bsupportrendering.param().abi(), ppin.param().abi()).ok() + (windows_core::Interface::vtable(self).Init)(windows_core::Interface::as_raw(self), bsupportrendering.into(), ppin.param().abi()).ok() } } #[repr(C)] @@ -27703,11 +27569,8 @@ impl IVMRImageCompositor { (windows_core::Interface::vtable(self).TermCompositionTarget)(windows_core::Interface::as_raw(self), pd3ddevice.param().abi(), pddsrendertarget.param().abi()).ok() } #[cfg(feature = "Win32_Media_MediaFoundation")] - pub unsafe fn SetStreamMediaType(&self, dwstrmid: u32, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE, ftexture: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStreamMediaType)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstrmid), core::mem::transmute(pmt), ftexture.param().abi()).ok() + pub unsafe fn SetStreamMediaType(&self, dwstrmid: u32, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE, ftexture: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStreamMediaType)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstrmid), core::mem::transmute(pmt), ftexture.into()).ok() } #[cfg(all(feature = "Win32_Graphics_DirectDraw", feature = "Win32_Media_MediaFoundation"))] pub unsafe fn CompositeImage(&self, pd3ddevice: P0, pddsrendertarget: P1, pmtrendertarget: *const super::MediaFoundation::AM_MEDIA_TYPE, rtstart: i64, rtend: i64, dwclrbkgnd: u32, pvideostreaminfo: *const VMRVIDEOSTREAMINFO, cstreams: u32) -> windows_core::Result<()> @@ -27794,11 +27657,8 @@ impl IVMRImageCompositor9 { (windows_core::Interface::vtable(self).TermCompositionDevice)(windows_core::Interface::as_raw(self), pd3ddevice.param().abi()).ok() } #[cfg(feature = "Win32_Media_MediaFoundation")] - pub unsafe fn SetStreamMediaType(&self, dwstrmid: u32, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE, ftexture: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStreamMediaType)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstrmid), core::mem::transmute(pmt), ftexture.param().abi()).ok() + pub unsafe fn SetStreamMediaType(&self, dwstrmid: u32, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE, ftexture: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStreamMediaType)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstrmid), core::mem::transmute(pmt), ftexture.into()).ok() } #[cfg(all(feature = "Win32_Graphics_Direct3D9", feature = "Win32_Media_MediaFoundation"))] pub unsafe fn CompositeImage(&self, pd3ddevice: P0, pddsrendertarget: P1, pmtrendertarget: *const super::MediaFoundation::AM_MEDIA_TYPE, rtstart: i64, rtend: i64, dwclrbkgnd: u32, pvideostreaminfo: *const VMR9VideoStreamInfo, cstreams: u32) -> windows_core::Result<()> @@ -29340,11 +29200,8 @@ impl IVMRVideoStreamControl { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetColorKey)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetStreamActiveState(&self, factive: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStreamActiveState)(windows_core::Interface::as_raw(self), factive.param().abi()).ok() + pub unsafe fn SetStreamActiveState(&self, factive: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStreamActiveState)(windows_core::Interface::as_raw(self), factive.into()).ok() } pub unsafe fn GetStreamActiveState(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -29420,11 +29277,8 @@ impl windows_core::RuntimeName for IVMRVideoStreamControl {} windows_core::imp::define_interface!(IVMRVideoStreamControl9, IVMRVideoStreamControl9_Vtbl, 0xd0cfe38b_93e7_4772_8957_0400c49a4485); windows_core::imp::interface_hierarchy!(IVMRVideoStreamControl9, windows_core::IUnknown); impl IVMRVideoStreamControl9 { - pub unsafe fn SetStreamActiveState(&self, factive: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStreamActiveState)(windows_core::Interface::as_raw(self), factive.param().abi()).ok() + pub unsafe fn SetStreamActiveState(&self, factive: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStreamActiveState)(windows_core::Interface::as_raw(self), factive.into()).ok() } pub unsafe fn GetStreamActiveState(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -30212,11 +30066,8 @@ impl core::ops::Deref for IVPNotify2 { } windows_core::imp::interface_hierarchy!(IVPNotify2, windows_core::IUnknown, IVPBaseNotify, IVPNotify); impl IVPNotify2 { - pub unsafe fn SetVPSyncMaster(&self, bvpsyncmaster: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetVPSyncMaster)(windows_core::Interface::as_raw(self), bvpsyncmaster.param().abi()).ok() + pub unsafe fn SetVPSyncMaster(&self, bvpsyncmaster: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetVPSyncMaster)(windows_core::Interface::as_raw(self), bvpsyncmaster.into()).ok() } pub unsafe fn GetVPSyncMaster(&self, pbvpsyncmaster: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetVPSyncMaster)(windows_core::Interface::as_raw(self), core::mem::transmute(pbvpsyncmaster)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Media/KernelStreaming/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/KernelStreaming/mod.rs index 0dda5bd4c0..2063a40ff0 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/KernelStreaming/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/KernelStreaming/mod.rs @@ -755,12 +755,11 @@ windows_core::imp::define_interface!(IKsDataTypeHandler, IKsDataTypeHandler_Vtbl windows_core::imp::interface_hierarchy!(IKsDataTypeHandler, windows_core::IUnknown); impl IKsDataTypeHandler { #[cfg(feature = "Win32_Media_DirectShow")] - pub unsafe fn KsCompleteIoOperation(&self, sample: P0, streamheader: *mut core::ffi::c_void, iooperation: KSIOOPERATION, cancelled: P3) -> windows_core::Result<()> + pub unsafe fn KsCompleteIoOperation(&self, sample: P0, streamheader: *mut core::ffi::c_void, iooperation: KSIOOPERATION, cancelled: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).KsCompleteIoOperation)(windows_core::Interface::as_raw(self), sample.param().abi(), core::mem::transmute(streamheader), core::mem::transmute(iooperation), cancelled.param().abi()).ok() + (windows_core::Interface::vtable(self).KsCompleteIoOperation)(windows_core::Interface::as_raw(self), sample.param().abi(), core::mem::transmute(streamheader), core::mem::transmute(iooperation), cancelled.into()).ok() } pub unsafe fn KsIsMediaTypeInRanges(&self, dataranges: *const core::ffi::c_void) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).KsIsMediaTypeInRanges)(windows_core::Interface::as_raw(self), core::mem::transmute(dataranges)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Media/MediaFoundation/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/MediaFoundation/mod.rs index 1957c7f797..d7e6a42d40 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/MediaFoundation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/MediaFoundation/mod.rs @@ -177,13 +177,10 @@ pub unsafe fn MFCopyImage(pdest: *mut u8, ldeststride: i32, psrc: *const u8, lsr MFCopyImage(core::mem::transmute(pdest), core::mem::transmute(ldeststride), core::mem::transmute(psrc), core::mem::transmute(lsrcstride), core::mem::transmute(dwwidthinbytes), core::mem::transmute(dwlines)).ok() } #[inline] -pub unsafe fn MFCreate2DMediaBuffer(dwwidth: u32, dwheight: u32, dwfourcc: u32, fbottomup: P3) -> windows_core::Result -where - P3: windows_core::Param, -{ +pub unsafe fn MFCreate2DMediaBuffer(dwwidth: u32, dwheight: u32, dwfourcc: u32, fbottomup: bool) -> windows_core::Result { windows_targets::link!("mfplat.dll" "system" fn MFCreate2DMediaBuffer(dwwidth : u32, dwheight : u32, dwfourcc : u32, fbottomup : super::super::Foundation:: BOOL, ppbuffer : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - MFCreate2DMediaBuffer(core::mem::transmute(dwwidth), core::mem::transmute(dwheight), core::mem::transmute(dwfourcc), fbottomup.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + MFCreate2DMediaBuffer(core::mem::transmute(dwwidth), core::mem::transmute(dwheight), core::mem::transmute(dwfourcc), fbottomup.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn MFCreate3GPMediaSink(pibytestream: P0, pvideomediatype: P1, paudiomediatype: P2) -> windows_core::Result @@ -446,24 +443,22 @@ pub unsafe fn MFCreateDXGIDeviceManager(resettoken: *mut u32, ppdevicemanager: * MFCreateDXGIDeviceManager(core::mem::transmute(resettoken), core::mem::transmute(ppdevicemanager)).ok() } #[inline] -pub unsafe fn MFCreateDXGISurfaceBuffer(riid: *const windows_core::GUID, punksurface: P1, usubresourceindex: u32, fbottomupwhenlinear: P3) -> windows_core::Result +pub unsafe fn MFCreateDXGISurfaceBuffer(riid: *const windows_core::GUID, punksurface: P1, usubresourceindex: u32, fbottomupwhenlinear: bool) -> windows_core::Result where P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFCreateDXGISurfaceBuffer(riid : *const windows_core::GUID, punksurface : * mut core::ffi::c_void, usubresourceindex : u32, fbottomupwhenlinear : super::super::Foundation:: BOOL, ppbuffer : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - MFCreateDXGISurfaceBuffer(core::mem::transmute(riid), punksurface.param().abi(), core::mem::transmute(usubresourceindex), fbottomupwhenlinear.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + MFCreateDXGISurfaceBuffer(core::mem::transmute(riid), punksurface.param().abi(), core::mem::transmute(usubresourceindex), fbottomupwhenlinear.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn MFCreateDXSurfaceBuffer(riid: *const windows_core::GUID, punksurface: P1, fbottomupwhenlinear: P2) -> windows_core::Result +pub unsafe fn MFCreateDXSurfaceBuffer(riid: *const windows_core::GUID, punksurface: P1, fbottomupwhenlinear: bool) -> windows_core::Result where P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFCreateDXSurfaceBuffer(riid : *const windows_core::GUID, punksurface : * mut core::ffi::c_void, fbottomupwhenlinear : super::super::Foundation:: BOOL, ppbuffer : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - MFCreateDXSurfaceBuffer(core::mem::transmute(riid), punksurface.param().abi(), fbottomupwhenlinear.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + MFCreateDXSurfaceBuffer(core::mem::transmute(riid), punksurface.param().abi(), fbottomupwhenlinear.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn MFCreateDeviceSource(pattributes: P0) -> windows_core::Result @@ -1331,14 +1326,13 @@ pub unsafe fn MFGetTimerPeriodicity() -> windows_core::Result { MFGetTimerPeriodicity(&mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn MFGetTopoNodeCurrentType(pnode: P0, dwstreamindex: u32, foutput: P2) -> windows_core::Result +pub unsafe fn MFGetTopoNodeCurrentType(pnode: P0, dwstreamindex: u32, foutput: bool) -> windows_core::Result where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("mf.dll" "system" fn MFGetTopoNodeCurrentType(pnode : * mut core::ffi::c_void, dwstreamindex : u32, foutput : super::super::Foundation:: BOOL, pptype : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - MFGetTopoNodeCurrentType(pnode.param().abi(), core::mem::transmute(dwstreamindex), foutput.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + MFGetTopoNodeCurrentType(pnode.param().abi(), core::mem::transmute(dwstreamindex), foutput.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn MFGetUncompressedVideoFormat(pvideoformat: *const MFVIDEOFORMAT) -> u32 { @@ -1532,14 +1526,13 @@ pub unsafe fn MFMapDXGIFormatToDX9Format(dx11: super::super::Graphics::Dxgi::Com MFMapDXGIFormatToDX9Format(core::mem::transmute(dx11)) } #[inline] -pub unsafe fn MFPCreateMediaPlayer(pwszurl: P0, fstartplayback: P1, creationoptions: MFP_CREATION_OPTIONS, pcallback: P3, hwnd: Option, ppmediaplayer: Option<*mut Option>) -> windows_core::Result<()> +pub unsafe fn MFPCreateMediaPlayer(pwszurl: P0, fstartplayback: bool, creationoptions: MFP_CREATION_OPTIONS, pcallback: P3, hwnd: Option, ppmediaplayer: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("mfplay.dll" "system" fn MFPCreateMediaPlayer(pwszurl : windows_core::PCWSTR, fstartplayback : super::super::Foundation:: BOOL, creationoptions : MFP_CREATION_OPTIONS, pcallback : * mut core::ffi::c_void, hwnd : super::super::Foundation:: HWND, ppmediaplayer : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - MFPCreateMediaPlayer(pwszurl.param().abi(), fstartplayback.param().abi(), core::mem::transmute(creationoptions), pcallback.param().abi(), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppmediaplayer.unwrap_or(core::mem::zeroed()))).ok() + MFPCreateMediaPlayer(pwszurl.param().abi(), fstartplayback.into(), core::mem::transmute(creationoptions), pcallback.param().abi(), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppmediaplayer.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn MFPutWaitingWorkItem(hevent: super::super::Foundation::HANDLE, priority: i32, presult: P2, pkey: Option<*mut u64>) -> windows_core::Result<()> @@ -12722,17 +12715,11 @@ impl IDirect3DDeviceManager9 { (windows_core::Interface::vtable(self).TestDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(hdevice)).ok() } #[cfg(feature = "Win32_Graphics_Direct3D9")] - pub unsafe fn LockDevice(&self, hdevice: super::super::Foundation::HANDLE, ppdevice: *mut Option, fblock: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).LockDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(hdevice), core::mem::transmute(ppdevice), fblock.param().abi()).ok() + pub unsafe fn LockDevice(&self, hdevice: super::super::Foundation::HANDLE, ppdevice: *mut Option, fblock: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).LockDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(hdevice), core::mem::transmute(ppdevice), fblock.into()).ok() } - pub unsafe fn UnlockDevice(&self, hdevice: super::super::Foundation::HANDLE, fsavestate: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).UnlockDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(hdevice), fsavestate.param().abi()).ok() + pub unsafe fn UnlockDevice(&self, hdevice: super::super::Foundation::HANDLE, fsavestate: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).UnlockDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(hdevice), fsavestate.into()).ok() } pub unsafe fn GetVideoService(&self, hdevice: super::super::Foundation::HANDLE, riid: *const windows_core::GUID, ppservice: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetVideoService)(windows_core::Interface::as_raw(self), core::mem::transmute(hdevice), core::mem::transmute(riid), core::mem::transmute(ppservice)).ok() @@ -13498,11 +13485,8 @@ impl IEVRTrustedVideoPlugin { pub unsafe fn SetConstriction(&self, dwkpix: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetConstriction)(windows_core::Interface::as_raw(self), core::mem::transmute(dwkpix)).ok() } - pub unsafe fn DisableImageExport(&self, bdisable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).DisableImageExport)(windows_core::Interface::as_raw(self), bdisable.param().abi()).ok() + pub unsafe fn DisableImageExport(&self, bdisable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DisableImageExport)(windows_core::Interface::as_raw(self), bdisable.into()).ok() } } #[repr(C)] @@ -13565,11 +13549,8 @@ impl windows_core::RuntimeName for IEVRTrustedVideoPlugin {} windows_core::imp::define_interface!(IEVRVideoStreamControl, IEVRVideoStreamControl_Vtbl, 0xd0cfe38b_93e7_4772_8957_0400c49a4485); windows_core::imp::interface_hierarchy!(IEVRVideoStreamControl, windows_core::IUnknown); impl IEVRVideoStreamControl { - pub unsafe fn SetStreamActiveState(&self, factive: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStreamActiveState)(windows_core::Interface::as_raw(self), factive.param().abi()).ok() + pub unsafe fn SetStreamActiveState(&self, factive: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStreamActiveState)(windows_core::Interface::as_raw(self), factive.into()).ok() } pub unsafe fn GetStreamActiveState(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -14123,11 +14104,8 @@ impl IMFASFIndexer { pub unsafe fn GetIndexStatus(&self, pindexidentifier: *const ASF_INDEX_IDENTIFIER, pfisindexed: *mut super::super::Foundation::BOOL, pbindexdescriptor: *mut u8, pcbindexdescriptor: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetIndexStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pindexidentifier), core::mem::transmute(pfisindexed), core::mem::transmute(pbindexdescriptor), core::mem::transmute(pcbindexdescriptor)).ok() } - pub unsafe fn SetIndexStatus(&self, pbindexdescriptor: *const u8, cbindexdescriptor: u32, fgenerateindex: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIndexStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pbindexdescriptor), core::mem::transmute(cbindexdescriptor), fgenerateindex.param().abi()).ok() + pub unsafe fn SetIndexStatus(&self, pbindexdescriptor: *const u8, cbindexdescriptor: u32, fgenerateindex: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIndexStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pbindexdescriptor), core::mem::transmute(cbindexdescriptor), fgenerateindex.into()).ok() } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn GetSeekPositionForValue(&self, pvarvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pindexidentifier: *const ASF_INDEX_IDENTIFIER, pcboffsetwithindata: *mut u64, phnsapproxtime: *mut i64, pdwpayloadnumberofstreamwithinpacket: *mut u32) -> windows_core::Result<()> { @@ -16628,11 +16606,8 @@ impl IMFByteStreamBuffering { pub unsafe fn SetBufferingParams(&self, pparams: *const MFBYTESTREAM_BUFFERING_PARAMS) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetBufferingParams)(windows_core::Interface::as_raw(self), core::mem::transmute(pparams)).ok() } - pub unsafe fn EnableBuffering(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableBuffering)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn EnableBuffering(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableBuffering)(windows_core::Interface::as_raw(self), fenable.into()).ok() } pub unsafe fn StopBuffering(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).StopBuffering)(windows_core::Interface::as_raw(self)).ok() @@ -17478,12 +17453,8 @@ impl IMFCaptureEngine { pub unsafe fn StartRecord(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).StartRecord)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn StopRecord(&self, bfinalize: P0, bflushunprocessedsamples: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).StopRecord)(windows_core::Interface::as_raw(self), bfinalize.param().abi(), bflushunprocessedsamples.param().abi()).ok() + pub unsafe fn StopRecord(&self, bfinalize: bool, bflushunprocessedsamples: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).StopRecord)(windows_core::Interface::as_raw(self), bfinalize.into(), bflushunprocessedsamples.into()).ok() } pub unsafe fn TakePhoto(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).TakePhoto)(windows_core::Interface::as_raw(self)).ok() @@ -17871,11 +17842,8 @@ impl IMFCapturePreviewSink { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetMirrorState)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetMirrorState(&self, fmirrorstate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMirrorState)(windows_core::Interface::as_raw(self), fmirrorstate.param().abi()).ok() + pub unsafe fn SetMirrorState(&self, fmirrorstate: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMirrorState)(windows_core::Interface::as_raw(self), fmirrorstate.into()).ok() } pub unsafe fn GetRotation(&self, dwstreamindex: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -18254,11 +18222,8 @@ impl IMFCaptureSource { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetMirrorState)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstreamindex), &mut result__).map(|| result__) } - pub unsafe fn SetMirrorState(&self, dwstreamindex: u32, fmirrorstate: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMirrorState)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstreamindex), fmirrorstate.param().abi()).ok() + pub unsafe fn SetMirrorState(&self, dwstreamindex: u32, fmirrorstate: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMirrorState)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstreamindex), fmirrorstate.into()).ok() } pub unsafe fn GetStreamIndexFromFriendlyName(&self, uifriendlyname: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -19571,12 +19536,11 @@ impl windows_core::RuntimeName for IMFD3D12SynchronizationObjectCommands {} windows_core::imp::define_interface!(IMFDLNASinkInit, IMFDLNASinkInit_Vtbl, 0x0c012799_1b61_4c10_bda9_04445be5f561); windows_core::imp::interface_hierarchy!(IMFDLNASinkInit, windows_core::IUnknown); impl IMFDLNASinkInit { - pub unsafe fn Initialize(&self, pbytestream: P0, fpal: P1) -> windows_core::Result<()> + pub unsafe fn Initialize(&self, pbytestream: P0, fpal: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pbytestream.param().abi(), fpal.param().abi()).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pbytestream.param().abi(), fpal.into()).ok() } } #[repr(C)] @@ -19721,11 +19685,8 @@ impl IMFDXGIDeviceManager { pub unsafe fn GetVideoService(&self, hdevice: super::super::Foundation::HANDLE, riid: *const windows_core::GUID, ppservice: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetVideoService)(windows_core::Interface::as_raw(self), core::mem::transmute(hdevice), core::mem::transmute(riid), core::mem::transmute(ppservice)).ok() } - pub unsafe fn LockDevice(&self, hdevice: super::super::Foundation::HANDLE, riid: *const windows_core::GUID, ppunkdevice: *mut *mut core::ffi::c_void, fblock: P3) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).LockDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(hdevice), core::mem::transmute(riid), core::mem::transmute(ppunkdevice), fblock.param().abi()).ok() + pub unsafe fn LockDevice(&self, hdevice: super::super::Foundation::HANDLE, riid: *const windows_core::GUID, ppunkdevice: *mut *mut core::ffi::c_void, fblock: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).LockDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(hdevice), core::mem::transmute(riid), core::mem::transmute(ppunkdevice), fblock.into()).ok() } pub unsafe fn OpenDeviceHandle(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -19740,11 +19701,8 @@ impl IMFDXGIDeviceManager { pub unsafe fn TestDevice(&self, hdevice: super::super::Foundation::HANDLE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).TestDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(hdevice)).ok() } - pub unsafe fn UnlockDevice(&self, hdevice: super::super::Foundation::HANDLE, fsavestate: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).UnlockDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(hdevice), fsavestate.param().abi()).ok() + pub unsafe fn UnlockDevice(&self, hdevice: super::super::Foundation::HANDLE, fsavestate: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).UnlockDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(hdevice), fsavestate.into()).ok() } } #[repr(C)] @@ -21044,16 +21002,14 @@ impl IMFHttpDownloadSession { { (windows_core::Interface::vtable(self).SetServer)(windows_core::Interface::as_raw(self), szservername.param().abi(), core::mem::transmute(nport)).ok() } - pub unsafe fn CreateRequest(&self, szobjectname: P0, fbypassproxycache: P1, fsecure: P2, szverb: P3, szreferrer: P4) -> windows_core::Result + pub unsafe fn CreateRequest(&self, szobjectname: P0, fbypassproxycache: bool, fsecure: bool, szverb: P3, szreferrer: P4) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateRequest)(windows_core::Interface::as_raw(self), szobjectname.param().abi(), fbypassproxycache.param().abi(), fsecure.param().abi(), szverb.param().abi(), szreferrer.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateRequest)(windows_core::Interface::as_raw(self), szobjectname.param().abi(), fbypassproxycache.into(), fsecure.into(), szverb.param().abi(), szreferrer.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn Close(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() @@ -21528,20 +21484,14 @@ impl IMFMediaEngine { pub unsafe fn GetAutoPlay(&self) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).GetAutoPlay)(windows_core::Interface::as_raw(self)) } - pub unsafe fn SetAutoPlay(&self, autoplay: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAutoPlay)(windows_core::Interface::as_raw(self), autoplay.param().abi()).ok() + pub unsafe fn SetAutoPlay(&self, autoplay: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAutoPlay)(windows_core::Interface::as_raw(self), autoplay.into()).ok() } pub unsafe fn GetLoop(&self) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).GetLoop)(windows_core::Interface::as_raw(self)) } - pub unsafe fn SetLoop(&self, r#loop: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetLoop)(windows_core::Interface::as_raw(self), r#loop.param().abi()).ok() + pub unsafe fn SetLoop(&self, r#loop: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetLoop)(windows_core::Interface::as_raw(self), r#loop.into()).ok() } pub unsafe fn Play(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Play)(windows_core::Interface::as_raw(self)).ok() @@ -21552,11 +21502,8 @@ impl IMFMediaEngine { pub unsafe fn GetMuted(&self) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).GetMuted)(windows_core::Interface::as_raw(self)) } - pub unsafe fn SetMuted(&self, muted: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMuted)(windows_core::Interface::as_raw(self), muted.param().abi()).ok() + pub unsafe fn SetMuted(&self, muted: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMuted)(windows_core::Interface::as_raw(self), muted.into()).ok() } pub unsafe fn GetVolume(&self) -> f64 { (windows_core::Interface::vtable(self).GetVolume)(windows_core::Interface::as_raw(self)) @@ -22381,11 +22328,8 @@ impl IMFMediaEngineEx { pub unsafe fn IsPlaybackRateSupported(&self, rate: f64) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).IsPlaybackRateSupported)(windows_core::Interface::as_raw(self), core::mem::transmute(rate)) } - pub unsafe fn FrameStep(&self, forward: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).FrameStep)(windows_core::Interface::as_raw(self), forward.param().abi()).ok() + pub unsafe fn FrameStep(&self, forward: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).FrameStep)(windows_core::Interface::as_raw(self), forward.into()).ok() } pub unsafe fn GetResourceCharacteristics(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -22409,11 +22353,8 @@ impl IMFMediaEngineEx { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetStreamSelection)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstreamindex), &mut result__).map(|| result__) } - pub unsafe fn SetStreamSelection(&self, dwstreamindex: u32, enabled: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStreamSelection)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstreamindex), enabled.param().abi()).ok() + pub unsafe fn SetStreamSelection(&self, dwstreamindex: u32, enabled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStreamSelection)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstreamindex), enabled.into()).ok() } pub unsafe fn ApplyStreamSelections(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ApplyStreamSelections)(windows_core::Interface::as_raw(self)).ok() @@ -22422,19 +22363,17 @@ impl IMFMediaEngineEx { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsProtected)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn InsertVideoEffect(&self, peffect: P0, foptional: P1) -> windows_core::Result<()> + pub unsafe fn InsertVideoEffect(&self, peffect: P0, foptional: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).InsertVideoEffect)(windows_core::Interface::as_raw(self), peffect.param().abi(), foptional.param().abi()).ok() + (windows_core::Interface::vtable(self).InsertVideoEffect)(windows_core::Interface::as_raw(self), peffect.param().abi(), foptional.into()).ok() } - pub unsafe fn InsertAudioEffect(&self, peffect: P0, foptional: P1) -> windows_core::Result<()> + pub unsafe fn InsertAudioEffect(&self, peffect: P0, foptional: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).InsertAudioEffect)(windows_core::Interface::as_raw(self), peffect.param().abi(), foptional.param().abi()).ok() + (windows_core::Interface::vtable(self).InsertAudioEffect)(windows_core::Interface::as_raw(self), peffect.param().abi(), foptional.into()).ok() } pub unsafe fn RemoveAllEffects(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RemoveAllEffects)(windows_core::Interface::as_raw(self)).ok() @@ -22466,21 +22405,15 @@ impl IMFMediaEngineEx { pub unsafe fn SetStereo3DRenderMode(&self, outputtype: MF3DVideoOutputType) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetStereo3DRenderMode)(windows_core::Interface::as_raw(self), core::mem::transmute(outputtype)).ok() } - pub unsafe fn EnableWindowlessSwapchainMode(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableWindowlessSwapchainMode)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn EnableWindowlessSwapchainMode(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableWindowlessSwapchainMode)(windows_core::Interface::as_raw(self), fenable.into()).ok() } pub unsafe fn GetVideoSwapchainHandle(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetVideoSwapchainHandle)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn EnableHorizontalMirrorMode(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableHorizontalMirrorMode)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn EnableHorizontalMirrorMode(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableHorizontalMirrorMode)(windows_core::Interface::as_raw(self), fenable.into()).ok() } pub unsafe fn GetAudioStreamCategory(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -22500,20 +22433,14 @@ impl IMFMediaEngineEx { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetRealTimeMode)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetRealTimeMode(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRealTimeMode)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn SetRealTimeMode(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRealTimeMode)(windows_core::Interface::as_raw(self), fenable.into()).ok() } pub unsafe fn SetCurrentTimeEx(&self, seektime: f64, seekmode: MF_MEDIA_ENGINE_SEEK_MODE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetCurrentTimeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(seektime), core::mem::transmute(seekmode)).ok() } - pub unsafe fn EnableTimeUpdateTimer(&self, fenabletimer: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableTimeUpdateTimer)(windows_core::Interface::as_raw(self), fenabletimer.param().abi()).ok() + pub unsafe fn EnableTimeUpdateTimer(&self, fenabletimer: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableTimeUpdateTimer)(windows_core::Interface::as_raw(self), fenabletimer.into()).ok() } } #[repr(C)] @@ -22891,12 +22818,9 @@ impl windows_core::RuntimeName for IMFMediaEngineEx {} windows_core::imp::define_interface!(IMFMediaEngineExtension, IMFMediaEngineExtension_Vtbl, 0x2f69d622_20b5_41e9_afdf_89ced1dda04e); windows_core::imp::interface_hierarchy!(IMFMediaEngineExtension, windows_core::IUnknown); impl IMFMediaEngineExtension { - pub unsafe fn CanPlayType(&self, audioonly: P0, mimetype: &windows_core::BSTR) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn CanPlayType(&self, audioonly: bool, mimetype: &windows_core::BSTR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CanPlayType)(windows_core::Interface::as_raw(self), audioonly.param().abi(), core::mem::transmute_copy(mimetype), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CanPlayType)(windows_core::Interface::as_raw(self), audioonly.into(), core::mem::transmute_copy(mimetype), &mut result__).map(|| result__) } pub unsafe fn BeginCreateObject(&self, bstrurl: &windows_core::BSTR, pbytestream: P1, r#type: MF_OBJECT_TYPE, ppiunknowncancelcookie: *mut Option, pcallback: P4, punkstate: P5) -> windows_core::Result<()> where @@ -26218,29 +26142,17 @@ impl windows_core::RuntimeName for IMFMuxStreamSampleManager {} windows_core::imp::define_interface!(IMFNetCredential, IMFNetCredential_Vtbl, 0x5b87ef6a_7ed8_434f_ba0e_184fac1628d1); windows_core::imp::interface_hierarchy!(IMFNetCredential, windows_core::IUnknown); impl IMFNetCredential { - pub unsafe fn SetUser(&self, pbdata: &[u8], fdataisencrypted: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUser)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), fdataisencrypted.param().abi()).ok() + pub unsafe fn SetUser(&self, pbdata: &[u8], fdataisencrypted: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUser)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), fdataisencrypted.into()).ok() } - pub unsafe fn SetPassword(&self, pbdata: &[u8], fdataisencrypted: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPassword)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), fdataisencrypted.param().abi()).ok() + pub unsafe fn SetPassword(&self, pbdata: &[u8], fdataisencrypted: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPassword)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), fdataisencrypted.into()).ok() } - pub unsafe fn GetUser(&self, pbdata: Option<*mut u8>, pcbdata: *mut u32, fencryptdata: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetUser)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata), fencryptdata.param().abi()).ok() + pub unsafe fn GetUser(&self, pbdata: Option<*mut u8>, pcbdata: *mut u32, fencryptdata: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetUser)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata), fencryptdata.into()).ok() } - pub unsafe fn GetPassword(&self, pbdata: Option<*mut u8>, pcbdata: *mut u32, fencryptdata: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetPassword)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata), fencryptdata.param().abi()).ok() + pub unsafe fn GetPassword(&self, pbdata: Option<*mut u8>, pcbdata: *mut u32, fencryptdata: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetPassword)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata), fencryptdata.into()).ok() } pub unsafe fn LoggedOnUser(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -26315,12 +26227,11 @@ impl IMFNetCredentialCache { { (windows_core::Interface::vtable(self).GetCredential)(windows_core::Interface::as_raw(self), pszurl.param().abi(), pszrealm.param().abi(), core::mem::transmute(dwauthenticationflags), core::mem::transmute(ppcred), core::mem::transmute(pdwrequirementsflags)).ok() } - pub unsafe fn SetGood(&self, pcred: P0, fgood: P1) -> windows_core::Result<()> + pub unsafe fn SetGood(&self, pcred: P0, fgood: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetGood)(windows_core::Interface::as_raw(self), pcred.param().abi(), fgood.param().abi()).ok() + (windows_core::Interface::vtable(self).SetGood)(windows_core::Interface::as_raw(self), pcred.param().abi(), fgood.into()).ok() } pub unsafe fn SetUserOptions(&self, pcred: P0, dwoptionsflags: u32) -> windows_core::Result<()> where @@ -26384,12 +26295,11 @@ impl IMFNetCredentialManager { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EndGetCredentials)(windows_core::Interface::as_raw(self), presult.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetGood(&self, pcred: P0, fgood: P1) -> windows_core::Result<()> + pub unsafe fn SetGood(&self, pcred: P0, fgood: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetGood)(windows_core::Interface::as_raw(self), pcred.param().abi(), fgood.param().abi()).ok() + (windows_core::Interface::vtable(self).SetGood)(windows_core::Interface::as_raw(self), pcred.param().abi(), fgood.into()).ok() } } #[repr(C)] @@ -26514,13 +26424,12 @@ impl windows_core::RuntimeName for IMFNetCrossOriginSupport {} windows_core::imp::define_interface!(IMFNetProxyLocator, IMFNetProxyLocator_Vtbl, 0xe9cd0383_a268_4bb4_82de_658d53574d41); windows_core::imp::interface_hierarchy!(IMFNetProxyLocator, windows_core::IUnknown); impl IMFNetProxyLocator { - pub unsafe fn FindFirstProxy(&self, pszhost: P0, pszurl: P1, freserved: P2) -> windows_core::Result<()> + pub unsafe fn FindFirstProxy(&self, pszhost: P0, pszurl: P1, freserved: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).FindFirstProxy)(windows_core::Interface::as_raw(self), pszhost.param().abi(), pszurl.param().abi(), freserved.param().abi()).ok() + (windows_core::Interface::vtable(self).FindFirstProxy)(windows_core::Interface::as_raw(self), pszhost.param().abi(), pszurl.param().abi(), freserved.into()).ok() } pub unsafe fn FindNextProxy(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).FindNextProxy)(windows_core::Interface::as_raw(self)).ok() @@ -27302,11 +27211,8 @@ impl IMFPMediaItem { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetStreamSelection)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstreamindex), &mut result__).map(|| result__) } - pub unsafe fn SetStreamSelection(&self, dwstreamindex: u32, fenabled: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStreamSelection)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstreamindex), fenabled.param().abi()).ok() + pub unsafe fn SetStreamSelection(&self, dwstreamindex: u32, fenabled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStreamSelection)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstreamindex), fenabled.into()).ok() } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn GetStreamAttribute(&self, dwstreamindex: u32, guidmfattribute: *const windows_core::GUID) -> windows_core::Result { @@ -27613,29 +27519,24 @@ impl IMFPMediaPlayer { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetRate)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn GetSupportedRates(&self, fforwarddirection: P0, pflslowestrate: *mut f32, pflfastestrate: *mut f32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetSupportedRates)(windows_core::Interface::as_raw(self), fforwarddirection.param().abi(), core::mem::transmute(pflslowestrate), core::mem::transmute(pflfastestrate)).ok() + pub unsafe fn GetSupportedRates(&self, fforwarddirection: bool, pflslowestrate: *mut f32, pflfastestrate: *mut f32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetSupportedRates)(windows_core::Interface::as_raw(self), fforwarddirection.into(), core::mem::transmute(pflslowestrate), core::mem::transmute(pflfastestrate)).ok() } pub unsafe fn GetState(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetState)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn CreateMediaItemFromURL(&self, pwszurl: P0, fsync: P1, dwuserdata: usize, ppmediaitem: Option<*mut Option>) -> windows_core::Result<()> + pub unsafe fn CreateMediaItemFromURL(&self, pwszurl: P0, fsync: bool, dwuserdata: usize, ppmediaitem: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateMediaItemFromURL)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), fsync.param().abi(), core::mem::transmute(dwuserdata), core::mem::transmute(ppmediaitem.unwrap_or(core::mem::zeroed()))).ok() + (windows_core::Interface::vtable(self).CreateMediaItemFromURL)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), fsync.into(), core::mem::transmute(dwuserdata), core::mem::transmute(ppmediaitem.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn CreateMediaItemFromObject(&self, piunknownobj: P0, fsync: P1, dwuserdata: usize, ppmediaitem: Option<*mut Option>) -> windows_core::Result<()> + pub unsafe fn CreateMediaItemFromObject(&self, piunknownobj: P0, fsync: bool, dwuserdata: usize, ppmediaitem: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateMediaItemFromObject)(windows_core::Interface::as_raw(self), piunknownobj.param().abi(), fsync.param().abi(), core::mem::transmute(dwuserdata), core::mem::transmute(ppmediaitem.unwrap_or(core::mem::zeroed()))).ok() + (windows_core::Interface::vtable(self).CreateMediaItemFromObject)(windows_core::Interface::as_raw(self), piunknownobj.param().abi(), fsync.into(), core::mem::transmute(dwuserdata), core::mem::transmute(ppmediaitem.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetMediaItem(&self, pimfpmediaitem: P0) -> windows_core::Result<()> where @@ -27668,11 +27569,8 @@ impl IMFPMediaPlayer { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetMute)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetMute(&self, fmute: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMute)(windows_core::Interface::as_raw(self), fmute.param().abi()).ok() + pub unsafe fn SetMute(&self, fmute: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMute)(windows_core::Interface::as_raw(self), fmute.into()).ok() } pub unsafe fn GetNativeVideoSize(&self, pszvideo: Option<*mut super::super::Foundation::SIZE>, pszarvideo: Option<*mut super::super::Foundation::SIZE>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetNativeVideoSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pszvideo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszarvideo.unwrap_or(core::mem::zeroed()))).ok() @@ -27708,12 +27606,11 @@ impl IMFPMediaPlayer { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetBorderColor)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn InsertEffect(&self, peffect: P0, foptional: P1) -> windows_core::Result<()> + pub unsafe fn InsertEffect(&self, peffect: P0, foptional: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).InsertEffect)(windows_core::Interface::as_raw(self), peffect.param().abi(), foptional.param().abi()).ok() + (windows_core::Interface::vtable(self).InsertEffect)(windows_core::Interface::as_raw(self), peffect.param().abi(), foptional.into()).ok() } pub unsafe fn RemoveEffect(&self, peffect: P0) -> windows_core::Result<()> where @@ -28142,11 +28039,8 @@ impl IMFPluginControl { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetDisabledByIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(plugintype), core::mem::transmute(index), &mut result__).map(|| result__) } - pub unsafe fn SetDisabled(&self, plugintype: u32, clsid: *const windows_core::GUID, disabled: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDisabled)(windows_core::Interface::as_raw(self), core::mem::transmute(plugintype), core::mem::transmute(clsid), disabled.param().abi()).ok() + pub unsafe fn SetDisabled(&self, plugintype: u32, clsid: *const windows_core::GUID, disabled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDisabled)(windows_core::Interface::as_raw(self), core::mem::transmute(plugintype), core::mem::transmute(clsid), disabled.into()).ok() } } #[repr(C)] @@ -28842,11 +28736,8 @@ impl windows_core::RuntimeName for IMFQualityManager {} windows_core::imp::define_interface!(IMFRateControl, IMFRateControl_Vtbl, 0x88ddcd21_03c3_4275_91ed_55ee3929328f); windows_core::imp::interface_hierarchy!(IMFRateControl, windows_core::IUnknown); impl IMFRateControl { - pub unsafe fn SetRate(&self, fthin: P0, flrate: f32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRate)(windows_core::Interface::as_raw(self), fthin.param().abi(), core::mem::transmute(flrate)).ok() + pub unsafe fn SetRate(&self, fthin: bool, flrate: f32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRate)(windows_core::Interface::as_raw(self), fthin.into(), core::mem::transmute(flrate)).ok() } pub unsafe fn GetRate(&self, pfthin: *mut super::super::Foundation::BOOL, pflrate: *mut f32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetRate)(windows_core::Interface::as_raw(self), core::mem::transmute(pfthin), core::mem::transmute(pflrate)).ok() @@ -28882,25 +28773,16 @@ impl windows_core::RuntimeName for IMFRateControl {} windows_core::imp::define_interface!(IMFRateSupport, IMFRateSupport_Vtbl, 0x0a9ccdbc_d797_4563_9667_94ec5d79292d); windows_core::imp::interface_hierarchy!(IMFRateSupport, windows_core::IUnknown); impl IMFRateSupport { - pub unsafe fn GetSlowestRate(&self, edirection: MFRATE_DIRECTION, fthin: P1) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn GetSlowestRate(&self, edirection: MFRATE_DIRECTION, fthin: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetSlowestRate)(windows_core::Interface::as_raw(self), core::mem::transmute(edirection), fthin.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetSlowestRate)(windows_core::Interface::as_raw(self), core::mem::transmute(edirection), fthin.into(), &mut result__).map(|| result__) } - pub unsafe fn GetFastestRate(&self, edirection: MFRATE_DIRECTION, fthin: P1) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn GetFastestRate(&self, edirection: MFRATE_DIRECTION, fthin: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetFastestRate)(windows_core::Interface::as_raw(self), core::mem::transmute(edirection), fthin.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetFastestRate)(windows_core::Interface::as_raw(self), core::mem::transmute(edirection), fthin.into(), &mut result__).map(|| result__) } - pub unsafe fn IsRateSupported(&self, fthin: P0, flrate: f32, pflnearestsupportedrate: *mut f32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).IsRateSupported)(windows_core::Interface::as_raw(self), fthin.param().abi(), core::mem::transmute(flrate), core::mem::transmute(pflnearestsupportedrate)).ok() + pub unsafe fn IsRateSupported(&self, fthin: bool, flrate: f32, pflnearestsupportedrate: *mut f32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).IsRateSupported)(windows_core::Interface::as_raw(self), fthin.into(), core::mem::transmute(flrate), core::mem::transmute(pflnearestsupportedrate)).ok() } } #[repr(C)] @@ -31463,11 +31345,8 @@ impl IMFSimpleAudioVolume { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetMasterVolume)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetMute(&self, bmute: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMute)(windows_core::Interface::as_raw(self), bmute.param().abi()).ok() + pub unsafe fn SetMute(&self, bmute: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMute)(windows_core::Interface::as_raw(self), bmute.into()).ok() } pub unsafe fn GetMute(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -32191,11 +32070,8 @@ impl IMFSourceReader { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetStreamSelection)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstreamindex), &mut result__).map(|| result__) } - pub unsafe fn SetStreamSelection(&self, dwstreamindex: u32, fselected: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStreamSelection)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstreamindex), fselected.param().abi()).ok() + pub unsafe fn SetStreamSelection(&self, dwstreamindex: u32, fselected: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStreamSelection)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstreamindex), fselected.into()).ok() } pub unsafe fn GetNativeMediaType(&self, dwstreamindex: u32, dwmediatypeindex: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -33053,11 +32929,8 @@ impl windows_core::RuntimeName for IMFStreamSink {} windows_core::imp::define_interface!(IMFStreamingSinkConfig, IMFStreamingSinkConfig_Vtbl, 0x9db7aa41_3cc5_40d4_8509_555804ad34cc); windows_core::imp::interface_hierarchy!(IMFStreamingSinkConfig, windows_core::IUnknown); impl IMFStreamingSinkConfig { - pub unsafe fn StartStreaming(&self, fseekoffsetisbyteoffset: P0, qwseekoffset: u64) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).StartStreaming)(windows_core::Interface::as_raw(self), fseekoffsetisbyteoffset.param().abi(), core::mem::transmute(qwseekoffset)).ok() + pub unsafe fn StartStreaming(&self, fseekoffsetisbyteoffset: bool, qwseekoffset: u64) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).StartStreaming)(windows_core::Interface::as_raw(self), fseekoffsetisbyteoffset.into(), core::mem::transmute(qwseekoffset)).ok() } } #[repr(C)] @@ -33227,31 +33100,26 @@ impl IMFTimedText { { (windows_core::Interface::vtable(self).RegisterNotifications)(windows_core::Interface::as_raw(self), notify.param().abi()).ok() } - pub unsafe fn SelectTrack(&self, trackid: u32, selected: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SelectTrack)(windows_core::Interface::as_raw(self), core::mem::transmute(trackid), selected.param().abi()).ok() + pub unsafe fn SelectTrack(&self, trackid: u32, selected: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SelectTrack)(windows_core::Interface::as_raw(self), core::mem::transmute(trackid), selected.into()).ok() } - pub unsafe fn AddDataSource(&self, bytestream: P0, label: P1, language: P2, kind: MF_TIMED_TEXT_TRACK_KIND, isdefault: P4) -> windows_core::Result + pub unsafe fn AddDataSource(&self, bytestream: P0, label: P1, language: P2, kind: MF_TIMED_TEXT_TRACK_KIND, isdefault: bool) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P4: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AddDataSource)(windows_core::Interface::as_raw(self), bytestream.param().abi(), label.param().abi(), language.param().abi(), core::mem::transmute(kind), isdefault.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).AddDataSource)(windows_core::Interface::as_raw(self), bytestream.param().abi(), label.param().abi(), language.param().abi(), core::mem::transmute(kind), isdefault.into(), &mut result__).map(|| result__) } - pub unsafe fn AddDataSourceFromUrl(&self, url: P0, label: P1, language: P2, kind: MF_TIMED_TEXT_TRACK_KIND, isdefault: P4) -> windows_core::Result + pub unsafe fn AddDataSourceFromUrl(&self, url: P0, label: P1, language: P2, kind: MF_TIMED_TEXT_TRACK_KIND, isdefault: bool) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P4: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AddDataSourceFromUrl)(windows_core::Interface::as_raw(self), url.param().abi(), label.param().abi(), language.param().abi(), core::mem::transmute(kind), isdefault.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).AddDataSourceFromUrl)(windows_core::Interface::as_raw(self), url.param().abi(), label.param().abi(), language.param().abi(), core::mem::transmute(kind), isdefault.into(), &mut result__).map(|| result__) } pub unsafe fn AddTrack(&self, label: P0, language: P1, kind: MF_TIMED_TEXT_TRACK_KIND) -> windows_core::Result where @@ -33290,11 +33158,8 @@ impl IMFTimedText { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetMetadataTracks)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetInBandEnabled(&self, enabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetInBandEnabled)(windows_core::Interface::as_raw(self), enabled.param().abi()).ok() + pub unsafe fn SetInBandEnabled(&self, enabled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetInBandEnabled)(windows_core::Interface::as_raw(self), enabled.into()).ok() } pub unsafe fn IsInBandEnabled(&self) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).IsInBandEnabled)(windows_core::Interface::as_raw(self)) @@ -33917,11 +33782,8 @@ impl IMFTimedTextNotify { pub unsafe fn TrackRemoved(&self, trackid: u32) { (windows_core::Interface::vtable(self).TrackRemoved)(windows_core::Interface::as_raw(self), core::mem::transmute(trackid)) } - pub unsafe fn TrackSelected(&self, trackid: u32, selected: P1) - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).TrackSelected)(windows_core::Interface::as_raw(self), core::mem::transmute(trackid), selected.param().abi()) + pub unsafe fn TrackSelected(&self, trackid: u32, selected: bool) { + (windows_core::Interface::vtable(self).TrackSelected)(windows_core::Interface::as_raw(self), core::mem::transmute(trackid), selected.into()) } pub unsafe fn TrackReadyStateChanged(&self, trackid: u32) { (windows_core::Interface::vtable(self).TrackReadyStateChanged)(windows_core::Interface::as_raw(self), core::mem::transmute(trackid)) @@ -36263,11 +36125,8 @@ impl IMFVideoDisplayControl { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetRenderingPrefs)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetFullscreen(&self, ffullscreen: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetFullscreen)(windows_core::Interface::as_raw(self), ffullscreen.param().abi()).ok() + pub unsafe fn SetFullscreen(&self, ffullscreen: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetFullscreen)(windows_core::Interface::as_raw(self), ffullscreen.into()).ok() } pub unsafe fn GetFullscreen(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -37054,11 +36913,8 @@ impl IMFVideoProcessorControl2 { pub unsafe fn SetRotationOverride(&self, uirotation: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetRotationOverride)(windows_core::Interface::as_raw(self), core::mem::transmute(uirotation)).ok() } - pub unsafe fn EnableHardwareEffects(&self, fenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableHardwareEffects)(windows_core::Interface::as_raw(self), fenabled.param().abi()).ok() + pub unsafe fn EnableHardwareEffects(&self, fenabled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableHardwareEffects)(windows_core::Interface::as_raw(self), fenabled.into()).ok() } pub unsafe fn GetSupportedHardwareEffects(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -37122,11 +36978,8 @@ impl IMFVideoProcessorControl3 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNaturalOutputType)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn EnableSphericalVideoProcessing(&self, fenable: P0, eformat: MFVideoSphericalFormat, eprojectionmode: MFVideoSphericalProjectionMode) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableSphericalVideoProcessing)(windows_core::Interface::as_raw(self), fenable.param().abi(), core::mem::transmute(eformat), core::mem::transmute(eprojectionmode)).ok() + pub unsafe fn EnableSphericalVideoProcessing(&self, fenable: bool, eformat: MFVideoSphericalFormat, eprojectionmode: MFVideoSphericalProjectionMode) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableSphericalVideoProcessing)(windows_core::Interface::as_raw(self), fenable.into(), core::mem::transmute(eformat), core::mem::transmute(eprojectionmode)).ok() } pub unsafe fn SetSphericalVideoProperties(&self, x: f32, y: f32, z: f32, w: f32, fieldofview: f32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetSphericalVideoProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(z), core::mem::transmute(w), core::mem::transmute(fieldofview)).ok() @@ -39004,11 +38857,8 @@ impl IWMFrameInterpProps { pub unsafe fn SetFrameRateOut(&self, lframerate: i32, lscale: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetFrameRateOut)(windows_core::Interface::as_raw(self), core::mem::transmute(lframerate), core::mem::transmute(lscale)).ok() } - pub unsafe fn SetFrameInterpEnabled(&self, bfienabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetFrameInterpEnabled)(windows_core::Interface::as_raw(self), bfienabled.param().abi()).ok() + pub unsafe fn SetFrameInterpEnabled(&self, bfienabled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetFrameInterpEnabled)(windows_core::Interface::as_raw(self), bfienabled.into()).ok() } pub unsafe fn SetComplexityLevel(&self, icomplexity: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetComplexityLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(icomplexity)).ok() @@ -39225,11 +39075,8 @@ impl windows_core::RuntimeName for IWMResizerProps {} windows_core::imp::define_interface!(IWMSampleExtensionSupport, IWMSampleExtensionSupport_Vtbl, 0x9bca9884_0604_4c2a_87da_793ff4d586c3); windows_core::imp::interface_hierarchy!(IWMSampleExtensionSupport, windows_core::IUnknown); impl IWMSampleExtensionSupport { - pub unsafe fn SetUseSampleExtensions(&self, fuseextensions: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseSampleExtensions)(windows_core::Interface::as_raw(self), fuseextensions.param().abi()).ok() + pub unsafe fn SetUseSampleExtensions(&self, fuseextensions: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUseSampleExtensions)(windows_core::Interface::as_raw(self), fuseextensions.into()).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Media/MediaPlayer/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/MediaPlayer/mod.rs index 6e5ed0ea8c..3601e38f71 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/MediaPlayer/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/MediaPlayer/mod.rs @@ -5632,11 +5632,8 @@ impl IWMPEffects { pub unsafe fn DisplayPropertyPage(&self, hwndowner: super::super::Foundation::HWND) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DisplayPropertyPage)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndowner)).ok() } - pub unsafe fn GoFullscreen(&self, ffullscreen: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GoFullscreen)(windows_core::Interface::as_raw(self), ffullscreen.param().abi()).ok() + pub unsafe fn GoFullscreen(&self, ffullscreen: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GoFullscreen)(windows_core::Interface::as_raw(self), ffullscreen.into()).ok() } pub unsafe fn RenderFullScreen(&self, plevels: *mut TimedLevel) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RenderFullScreen)(windows_core::Interface::as_raw(self), core::mem::transmute(plevels)).ok() @@ -5774,11 +5771,8 @@ impl IWMPEffects2 { pub unsafe fn OnWindowMessage(&self, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM, plresultparam: *mut super::super::Foundation::LRESULT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnWindowMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(msg), core::mem::transmute(wparam), core::mem::transmute(lparam), core::mem::transmute(plresultparam)).ok() } - pub unsafe fn RenderWindowed(&self, pdata: *mut TimedLevel, frequiredrender: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).RenderWindowed)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata), frequiredrender.param().abi()).ok() + pub unsafe fn RenderWindowed(&self, pdata: *mut TimedLevel, frequiredrender: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RenderWindowed)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata), frequiredrender.into()).ok() } } #[repr(C)] @@ -8480,20 +8474,14 @@ impl IWMPNodeRealEstate { pub unsafe fn GetRects(&self, psrc: *mut super::super::Foundation::RECT, pdest: *mut super::super::Foundation::RECT, pclip: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetRects)(windows_core::Interface::as_raw(self), core::mem::transmute(psrc), core::mem::transmute(pdest), core::mem::transmute(pclip)).ok() } - pub unsafe fn SetWindowless(&self, fwindowless: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetWindowless)(windows_core::Interface::as_raw(self), fwindowless.param().abi()).ok() + pub unsafe fn SetWindowless(&self, fwindowless: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetWindowless)(windows_core::Interface::as_raw(self), fwindowless.into()).ok() } pub unsafe fn GetWindowless(&self, pfwindowless: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetWindowless)(windows_core::Interface::as_raw(self), core::mem::transmute(pfwindowless)).ok() } - pub unsafe fn SetFullScreen(&self, ffullscreen: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetFullScreen)(windows_core::Interface::as_raw(self), ffullscreen.param().abi()).ok() + pub unsafe fn SetFullScreen(&self, ffullscreen: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetFullScreen)(windows_core::Interface::as_raw(self), ffullscreen.into()).ok() } pub unsafe fn GetFullScreen(&self, pffullscreen: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetFullScreen)(windows_core::Interface::as_raw(self), core::mem::transmute(pffullscreen)).ok() @@ -8571,11 +8559,8 @@ impl IWMPNodeRealEstateHost { pub unsafe fn OnDesiredSizeChange(&self, psize: *mut super::super::Foundation::SIZE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnDesiredSizeChange)(windows_core::Interface::as_raw(self), core::mem::transmute(psize)).ok() } - pub unsafe fn OnFullScreenTransition(&self, ffullscreen: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnFullScreenTransition)(windows_core::Interface::as_raw(self), ffullscreen.param().abi()).ok() + pub unsafe fn OnFullScreenTransition(&self, ffullscreen: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnFullScreenTransition)(windows_core::Interface::as_raw(self), ffullscreen.into()).ok() } } #[repr(C)] @@ -8715,11 +8700,8 @@ impl windows_core::RuntimeName for IWMPNodeWindowless {} windows_core::imp::define_interface!(IWMPNodeWindowlessHost, IWMPNodeWindowlessHost_Vtbl, 0xbe7017c6_ce34_4901_8106_770381aa6e3e); windows_core::imp::interface_hierarchy!(IWMPNodeWindowlessHost, windows_core::IUnknown); impl IWMPNodeWindowlessHost { - pub unsafe fn InvalidateRect(&self, prc: *const super::super::Foundation::RECT, ferase: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).InvalidateRect)(windows_core::Interface::as_raw(self), core::mem::transmute(prc), ferase.param().abi()).ok() + pub unsafe fn InvalidateRect(&self, prc: *const super::super::Foundation::RECT, ferase: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InvalidateRect)(windows_core::Interface::as_raw(self), core::mem::transmute(prc), ferase.into()).ok() } } #[repr(C)] @@ -10004,11 +9986,8 @@ impl windows_core::RuntimeName for IWMPPlugin {} windows_core::imp::define_interface!(IWMPPluginEnable, IWMPPluginEnable_Vtbl, 0x5fca444c_7ad1_479d_a4ef_40566a5309d6); windows_core::imp::interface_hierarchy!(IWMPPluginEnable, windows_core::IUnknown); impl IWMPPluginEnable { - pub unsafe fn SetEnable(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnable)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn SetEnable(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnable)(windows_core::Interface::as_raw(self), fenable.into()).ok() } pub unsafe fn GetEnable(&self, pfenable: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetEnable)(windows_core::Interface::as_raw(self), core::mem::transmute(pfenable)).ok() @@ -10290,11 +10269,8 @@ impl windows_core::RuntimeName for IWMPRemoteMediaServices {} windows_core::imp::define_interface!(IWMPRenderConfig, IWMPRenderConfig_Vtbl, 0x959506c1_0314_4ec5_9e61_8528db5e5478); windows_core::imp::interface_hierarchy!(IWMPRenderConfig, windows_core::IUnknown); impl IWMPRenderConfig { - pub unsafe fn SetinProcOnly(&self, finproc: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetinProcOnly)(windows_core::Interface::as_raw(self), finproc.param().abi()).ok() + pub unsafe fn SetinProcOnly(&self, finproc: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetinProcOnly)(windows_core::Interface::as_raw(self), finproc.into()).ok() } pub unsafe fn inProcOnly(&self, pfinproc: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).inProcOnly)(windows_core::Interface::as_raw(self), core::mem::transmute(pfinproc)).ok() @@ -11610,11 +11586,8 @@ impl IXFeed { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DownloadEnclosuresAutomatically)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetDownloadEnclosuresAutomatically(&self, bdownloadenclosuresautomatically: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDownloadEnclosuresAutomatically)(windows_core::Interface::as_raw(self), bdownloadenclosuresautomatically.param().abi()).ok() + pub unsafe fn SetDownloadEnclosuresAutomatically(&self, bdownloadenclosuresautomatically: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDownloadEnclosuresAutomatically)(windows_core::Interface::as_raw(self), bdownloadenclosuresautomatically.into()).ok() } pub unsafe fn DownloadStatus(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -13224,11 +13197,8 @@ impl IXFeedItem { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsRead)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIsRead(&self, bisread: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIsRead)(windows_core::Interface::as_raw(self), bisread.param().abi()).ok() + pub unsafe fn SetIsRead(&self, bisread: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIsRead)(windows_core::Interface::as_raw(self), bisread.into()).ok() } pub unsafe fn LocalId(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Win32/Media/Multimedia/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/Multimedia/mod.rs index 5bd411ec73..a3b8bbc493 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Multimedia/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Multimedia/mod.rs @@ -1,18 +1,12 @@ #[inline] -pub unsafe fn AVIBuildFilterA(lpszfilter: &mut [u8], fsaving: P2) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn AVIBuildFilterA(lpszfilter: &mut [u8], fsaving: bool) -> windows_core::Result<()> { windows_targets::link!("avifil32.dll" "system" fn AVIBuildFilterA(lpszfilter : windows_core::PSTR, cbfilter : i32, fsaving : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - AVIBuildFilterA(core::mem::transmute(lpszfilter.as_ptr()), lpszfilter.len().try_into().unwrap(), fsaving.param().abi()).ok() + AVIBuildFilterA(core::mem::transmute(lpszfilter.as_ptr()), lpszfilter.len().try_into().unwrap(), fsaving.into()).ok() } #[inline] -pub unsafe fn AVIBuildFilterW(lpszfilter: &mut [u16], fsaving: P2) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn AVIBuildFilterW(lpszfilter: &mut [u16], fsaving: bool) -> windows_core::Result<()> { windows_targets::link!("avifil32.dll" "system" fn AVIBuildFilterW(lpszfilter : windows_core::PWSTR, cbfilter : i32, fsaving : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - AVIBuildFilterW(core::mem::transmute(lpszfilter.as_ptr()), lpszfilter.len().try_into().unwrap(), fsaving.param().abi()).ok() + AVIBuildFilterW(core::mem::transmute(lpszfilter.as_ptr()), lpszfilter.len().try_into().unwrap(), fsaving.into()).ok() } #[inline] pub unsafe fn AVIClearClipboard() -> windows_core::Result<()> { @@ -455,12 +449,9 @@ pub unsafe fn DrawDibProfileDisplay(lpbi: *const super::super::Graphics::Gdi::BI } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn DrawDibRealize(hdd: isize, hdc: super::super::Graphics::Gdi::HDC, fbackground: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn DrawDibRealize(hdd: isize, hdc: super::super::Graphics::Gdi::HDC, fbackground: bool) -> u32 { windows_targets::link!("msvfw32.dll" "system" fn DrawDibRealize(hdd : isize, hdc : super::super::Graphics::Gdi:: HDC, fbackground : super::super::Foundation:: BOOL) -> u32); - DrawDibRealize(core::mem::transmute(hdd), core::mem::transmute(hdc), fbackground.param().abi()) + DrawDibRealize(core::mem::transmute(hdd), core::mem::transmute(hdc), fbackground.into()) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -846,12 +837,9 @@ pub unsafe fn joyReleaseCapture(ujoyid: u32) -> u32 { joyReleaseCapture(core::mem::transmute(ujoyid)) } #[inline] -pub unsafe fn joySetCapture(hwnd: super::super::Foundation::HWND, ujoyid: u32, uperiod: u32, fchanged: P3) -> u32 -where - P3: windows_core::Param, -{ +pub unsafe fn joySetCapture(hwnd: super::super::Foundation::HWND, ujoyid: u32, uperiod: u32, fchanged: bool) -> u32 { windows_targets::link!("winmm.dll" "system" fn joySetCapture(hwnd : super::super::Foundation:: HWND, ujoyid : u32, uperiod : u32, fchanged : super::super::Foundation:: BOOL) -> u32); - joySetCapture(core::mem::transmute(hwnd), core::mem::transmute(ujoyid), core::mem::transmute(uperiod), fchanged.param().abi()) + joySetCapture(core::mem::transmute(hwnd), core::mem::transmute(ujoyid), core::mem::transmute(uperiod), fchanged.into()) } #[inline] pub unsafe fn joySetThreshold(ujoyid: u32, uthreshold: u32) -> u32 { @@ -1976,9 +1964,6 @@ impl Default for GSM610WAVEFORMAT { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HDRVR(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HDRVR { - type TypeKind = windows_core::CopyType; -} impl HDRVR { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1992,9 +1977,6 @@ impl Default for HDRVR { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HIC(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HIC { - type TypeKind = windows_core::CopyType; -} impl HIC { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2017,9 +1999,6 @@ impl Default for HIC { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HMMIO(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HMMIO { - type TypeKind = windows_core::CopyType; -} impl HMMIO { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2033,9 +2012,6 @@ impl Default for HMMIO { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HVIDEO(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HVIDEO { - type TypeKind = windows_core::CopyType; -} impl HVIDEO { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/Media/PictureAcquisition/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/PictureAcquisition/mod.rs index 8918055b7f..2069af73f1 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/PictureAcquisition/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/PictureAcquisition/mod.rs @@ -34,14 +34,13 @@ impl IPhotoAcquire { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreatePhotoSource)(windows_core::Interface::as_raw(self), pszdevice.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn Acquire(&self, pphotoacquiresource: P0, fshowprogress: P1, hwndparent: Option, pszapplicationname: P3, pphotoacquireprogresscb: P4) -> windows_core::Result<()> + pub unsafe fn Acquire(&self, pphotoacquiresource: P0, fshowprogress: bool, hwndparent: Option, pszapplicationname: P3, pphotoacquireprogresscb: P4) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).Acquire)(windows_core::Interface::as_raw(self), pphotoacquiresource.param().abi(), fshowprogress.param().abi(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), pszapplicationname.param().abi(), pphotoacquireprogresscb.param().abi()).ok() + (windows_core::Interface::vtable(self).Acquire)(windows_core::Interface::as_raw(self), pphotoacquiresource.param().abi(), fshowprogress.into(), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), pszapplicationname.param().abi(), pphotoacquireprogresscb.param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn EnumResults(&self) -> windows_core::Result { @@ -540,11 +539,8 @@ impl IPhotoAcquireProgressCB { { (windows_core::Interface::vtable(self).DirectoryCreated)(windows_core::Interface::as_raw(self), pszdirectory.param().abi()).ok() } - pub unsafe fn UpdateTransferPercent(&self, foverall: P0, npercent: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).UpdateTransferPercent)(windows_core::Interface::as_raw(self), foverall.param().abi(), core::mem::transmute(npercent)).ok() + pub unsafe fn UpdateTransferPercent(&self, foverall: bool, npercent: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).UpdateTransferPercent)(windows_core::Interface::as_raw(self), foverall.into(), core::mem::transmute(npercent)).ok() } pub unsafe fn EndItemTransfer(&self, nitemindex: u32, pphotoacquireitem: P1, hr: windows_core::HRESULT) -> windows_core::Result<()> where @@ -796,11 +792,8 @@ impl IPhotoAcquireSettings { pub unsafe fn SetSequencePaddingWidth(&self, dwwidth: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetSequencePaddingWidth)(windows_core::Interface::as_raw(self), core::mem::transmute(dwwidth)).ok() } - pub unsafe fn SetSequenceZeroPadding(&self, fzeropad: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSequenceZeroPadding)(windows_core::Interface::as_raw(self), fzeropad.param().abi()).ok() + pub unsafe fn SetSequenceZeroPadding(&self, fzeropad: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSequenceZeroPadding)(windows_core::Interface::as_raw(self), fzeropad.into()).ok() } pub unsafe fn SetGroupTag(&self, pszgrouptag: P0) -> windows_core::Result<()> where @@ -991,12 +984,11 @@ impl IPhotoAcquireSource { pub unsafe fn GetDeviceIcons(&self, nsize: u32, phlargeicon: Option<*mut super::super::UI::WindowsAndMessaging::HICON>, phsmallicon: Option<*mut super::super::UI::WindowsAndMessaging::HICON>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDeviceIcons)(windows_core::Interface::as_raw(self), core::mem::transmute(nsize), core::mem::transmute(phlargeicon.unwrap_or(core::mem::zeroed())), core::mem::transmute(phsmallicon.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn InitializeItemList(&self, fforceenumeration: P0, pphotoacquireprogresscb: P1, pnitemcount: Option<*mut u32>) -> windows_core::Result<()> + pub unsafe fn InitializeItemList(&self, fforceenumeration: bool, pphotoacquireprogresscb: P1, pnitemcount: Option<*mut u32>) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).InitializeItemList)(windows_core::Interface::as_raw(self), fforceenumeration.param().abi(), pphotoacquireprogresscb.param().abi(), core::mem::transmute(pnitemcount.unwrap_or(core::mem::zeroed()))).ok() + (windows_core::Interface::vtable(self).InitializeItemList)(windows_core::Interface::as_raw(self), fforceenumeration.into(), pphotoacquireprogresscb.param().abi(), core::mem::transmute(pnitemcount.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn GetItemCount(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1174,11 +1166,8 @@ impl IPhotoProgressDialog { { (windows_core::Interface::vtable(self).SetTitle)(windows_core::Interface::as_raw(self), psztitle.param().abi()).ok() } - pub unsafe fn ShowCheckbox(&self, ncheckboxid: PROGRESS_DIALOG_CHECKBOX_ID, fshow: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).ShowCheckbox)(windows_core::Interface::as_raw(self), core::mem::transmute(ncheckboxid), fshow.param().abi()).ok() + pub unsafe fn ShowCheckbox(&self, ncheckboxid: PROGRESS_DIALOG_CHECKBOX_ID, fshow: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ShowCheckbox)(windows_core::Interface::as_raw(self), core::mem::transmute(ncheckboxid), fshow.into()).ok() } pub unsafe fn SetCheckboxText(&self, ncheckboxid: PROGRESS_DIALOG_CHECKBOX_ID, pszcheckboxtext: P1) -> windows_core::Result<()> where @@ -1186,11 +1175,8 @@ impl IPhotoProgressDialog { { (windows_core::Interface::vtable(self).SetCheckboxText)(windows_core::Interface::as_raw(self), core::mem::transmute(ncheckboxid), pszcheckboxtext.param().abi()).ok() } - pub unsafe fn SetCheckboxCheck(&self, ncheckboxid: PROGRESS_DIALOG_CHECKBOX_ID, fchecked: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCheckboxCheck)(windows_core::Interface::as_raw(self), core::mem::transmute(ncheckboxid), fchecked.param().abi()).ok() + pub unsafe fn SetCheckboxCheck(&self, ncheckboxid: PROGRESS_DIALOG_CHECKBOX_ID, fchecked: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCheckboxCheck)(windows_core::Interface::as_raw(self), core::mem::transmute(ncheckboxid), fchecked.into()).ok() } pub unsafe fn SetCheckboxTooltip(&self, ncheckboxid: PROGRESS_DIALOG_CHECKBOX_ID, pszcheckboxtooltiptext: P1) -> windows_core::Result<()> where @@ -1233,11 +1219,8 @@ impl IPhotoProgressDialog { { (windows_core::Interface::vtable(self).SetActionLinkText)(windows_core::Interface::as_raw(self), pszcaption.param().abi()).ok() } - pub unsafe fn ShowActionLink(&self, fshow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ShowActionLink)(windows_core::Interface::as_raw(self), fshow.param().abi()).ok() + pub unsafe fn ShowActionLink(&self, fshow: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ShowActionLink)(windows_core::Interface::as_raw(self), fshow.into()).ok() } pub unsafe fn IsCancelled(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); 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 7d35245cbb..35d3aeffa6 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Speech/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Speech/mod.rs @@ -1421,12 +1421,11 @@ impl ISpGrammarBuilder { pub unsafe fn ResetGrammar(&self, newlanguage: u16) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetGrammar)(windows_core::Interface::as_raw(self), core::mem::transmute(newlanguage)).ok() } - pub unsafe fn GetRule(&self, pszrulename: P0, dwruleid: u32, dwattributes: u32, fcreateifnotexist: P3, phinitialstate: *mut SPSTATEHANDLE) -> windows_core::Result<()> + pub unsafe fn GetRule(&self, pszrulename: P0, dwruleid: u32, dwattributes: u32, fcreateifnotexist: bool, phinitialstate: *mut SPSTATEHANDLE) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).GetRule)(windows_core::Interface::as_raw(self), pszrulename.param().abi(), core::mem::transmute(dwruleid), core::mem::transmute(dwattributes), fcreateifnotexist.param().abi(), core::mem::transmute(phinitialstate)).ok() + (windows_core::Interface::vtable(self).GetRule)(windows_core::Interface::as_raw(self), pszrulename.param().abi(), core::mem::transmute(dwruleid), core::mem::transmute(dwattributes), fcreateifnotexist.into(), core::mem::transmute(phinitialstate)).ok() } pub unsafe fn ClearRule(&self, hstate: SPSTATEHANDLE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ClearRule)(windows_core::Interface::as_raw(self), core::mem::transmute(hstate)).ok() @@ -2027,11 +2026,8 @@ impl ISpNotifyTranslator { { (windows_core::Interface::vtable(self).InitSpNotifyCallback)(windows_core::Interface::as_raw(self), pspcallback.param().abi(), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } - pub unsafe fn InitWin32Event(&self, hevent: super::super::Foundation::HANDLE, fclosehandleonrelease: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).InitWin32Event)(windows_core::Interface::as_raw(self), core::mem::transmute(hevent), fclosehandleonrelease.param().abi()).ok() + pub unsafe fn InitWin32Event(&self, hevent: super::super::Foundation::HANDLE, fclosehandleonrelease: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InitWin32Event)(windows_core::Interface::as_raw(self), core::mem::transmute(hevent), fclosehandleonrelease.into()).ok() } pub unsafe fn Wait(&self, dwmilliseconds: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Wait)(windows_core::Interface::as_raw(self), core::mem::transmute(dwmilliseconds)).ok() @@ -2108,13 +2104,12 @@ impl core::ops::Deref for ISpObjectToken { } windows_core::imp::interface_hierarchy!(ISpObjectToken, windows_core::IUnknown, ISpDataKey); impl ISpObjectToken { - pub unsafe fn SetId(&self, pszcategoryid: P0, psztokenid: P1, fcreateifnotexist: P2) -> windows_core::Result<()> + pub unsafe fn SetId(&self, pszcategoryid: P0, psztokenid: P1, fcreateifnotexist: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).SetId)(windows_core::Interface::as_raw(self), pszcategoryid.param().abi(), psztokenid.param().abi(), fcreateifnotexist.param().abi()).ok() + (windows_core::Interface::vtable(self).SetId)(windows_core::Interface::as_raw(self), pszcategoryid.param().abi(), psztokenid.param().abi(), fcreateifnotexist.into()).ok() } pub unsafe fn GetId(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2138,12 +2133,11 @@ impl ISpObjectToken { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetStorageFileName)(windows_core::Interface::as_raw(self), core::mem::transmute(clsidcaller), pszvaluename.param().abi(), pszfilenamespecifier.param().abi(), core::mem::transmute(nfolder), &mut result__).map(|| result__) } - pub unsafe fn RemoveStorageFileName(&self, clsidcaller: *const windows_core::GUID, pszkeyname: P1, fdeletefile: P2) -> windows_core::Result<()> + pub unsafe fn RemoveStorageFileName(&self, clsidcaller: *const windows_core::GUID, pszkeyname: P1, fdeletefile: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).RemoveStorageFileName)(windows_core::Interface::as_raw(self), core::mem::transmute(clsidcaller), pszkeyname.param().abi(), fdeletefile.param().abi()).ok() + (windows_core::Interface::vtable(self).RemoveStorageFileName)(windows_core::Interface::as_raw(self), core::mem::transmute(clsidcaller), pszkeyname.param().abi(), fdeletefile.into()).ok() } pub unsafe fn Remove(&self, pclsidcaller: Option<*const windows_core::GUID>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Remove)(windows_core::Interface::as_raw(self), core::mem::transmute(pclsidcaller.unwrap_or(core::mem::zeroed()))).ok() @@ -2284,12 +2278,11 @@ impl core::ops::Deref for ISpObjectTokenCategory { } windows_core::imp::interface_hierarchy!(ISpObjectTokenCategory, windows_core::IUnknown, ISpDataKey); impl ISpObjectTokenCategory { - pub unsafe fn SetId(&self, pszcategoryid: P0, fcreateifnotexist: P1) -> windows_core::Result<()> + pub unsafe fn SetId(&self, pszcategoryid: P0, fcreateifnotexist: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetId)(windows_core::Interface::as_raw(self), pszcategoryid.param().abi(), fcreateifnotexist.param().abi()).ok() + (windows_core::Interface::vtable(self).SetId)(windows_core::Interface::as_raw(self), pszcategoryid.param().abi(), fcreateifnotexist.into()).ok() } pub unsafe fn GetId(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2652,12 +2645,9 @@ impl ISpPhoneticAlphabetConverter { pub unsafe fn UPS2SAPI(&self, pszupsid: *const u16, pszsapiid: &mut [u16]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UPS2SAPI)(windows_core::Interface::as_raw(self), core::mem::transmute(pszupsid), core::mem::transmute(pszsapiid.as_ptr()), pszsapiid.len().try_into().unwrap()).ok() } - pub unsafe fn GetMaxConvertLength(&self, csrclength: u32, bsapi2ups: P1) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn GetMaxConvertLength(&self, csrclength: u32, bsapi2ups: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetMaxConvertLength)(windows_core::Interface::as_raw(self), core::mem::transmute(csrclength), bsapi2ups.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetMaxConvertLength)(windows_core::Interface::as_raw(self), core::mem::transmute(csrclength), bsapi2ups.into(), &mut result__).map(|| result__) } } #[repr(C)] @@ -2731,11 +2721,8 @@ impl ISpPhoneticAlphabetSelection { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsAlphabetUPS)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAlphabetToUPS(&self, fforceups: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAlphabetToUPS)(windows_core::Interface::as_raw(self), fforceups.param().abi()).ok() + pub unsafe fn SetAlphabetToUPS(&self, fforceups: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAlphabetToUPS)(windows_core::Interface::as_raw(self), fforceups.into()).ok() } } #[repr(C)] @@ -2787,11 +2774,8 @@ impl ISpPhrase { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetSerializedPhrase)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn GetText(&self, ulstart: u32, ulcount: u32, fusetextreplacements: P2, ppszcomemtext: *mut windows_core::PWSTR, pbdisplayattributes: Option<*mut u8>) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), core::mem::transmute(ulstart), core::mem::transmute(ulcount), fusetextreplacements.param().abi(), core::mem::transmute(ppszcomemtext), core::mem::transmute(pbdisplayattributes.unwrap_or(core::mem::zeroed()))).ok() + pub unsafe fn GetText(&self, ulstart: u32, ulcount: u32, fusetextreplacements: bool, ppszcomemtext: *mut windows_core::PWSTR, pbdisplayattributes: Option<*mut u8>) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), core::mem::transmute(ulstart), core::mem::transmute(ulcount), fusetextreplacements.into(), core::mem::transmute(ppszcomemtext), core::mem::transmute(pbdisplayattributes.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn Discard(&self, dwvaluetypes: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Discard)(windows_core::Interface::as_raw(self), core::mem::transmute(dwvaluetypes)).ok() @@ -3264,12 +3248,11 @@ impl ISpRecoContext { pub unsafe fn Resume(&self, dwreserved: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Resume)(windows_core::Interface::as_raw(self), core::mem::transmute(dwreserved)).ok() } - pub unsafe fn SetVoice(&self, pvoice: P0, fallowformatchanges: P1) -> windows_core::Result<()> + pub unsafe fn SetVoice(&self, pvoice: P0, fallowformatchanges: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetVoice)(windows_core::Interface::as_raw(self), pvoice.param().abi(), fallowformatchanges.param().abi()).ok() + (windows_core::Interface::vtable(self).SetVoice)(windows_core::Interface::as_raw(self), pvoice.param().abi(), fallowformatchanges.into()).ok() } pub unsafe fn GetVoice(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4042,12 +4025,11 @@ impl ISpRecoResult2 { { (windows_core::Interface::vtable(self).CommitText)(windows_core::Interface::as_raw(self), core::mem::transmute(ulstartelement), core::mem::transmute(celements), pszcorrecteddata.param().abi(), core::mem::transmute(ecommitflags)).ok() } - pub unsafe fn SetTextFeedback(&self, pszfeedback: P0, fsuccessful: P1) -> windows_core::Result<()> + pub unsafe fn SetTextFeedback(&self, pszfeedback: P0, fsuccessful: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetTextFeedback)(windows_core::Interface::as_raw(self), pszfeedback.param().abi(), fsuccessful.param().abi()).ok() + (windows_core::Interface::vtable(self).SetTextFeedback)(windows_core::Interface::as_raw(self), pszfeedback.param().abi(), fsuccessful.into()).ok() } } #[repr(C)] @@ -4116,12 +4098,11 @@ impl ISpRecognizer { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetRecognizer)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetInput(&self, punkinput: P0, fallowformatchanges: P1) -> windows_core::Result<()> + pub unsafe fn SetInput(&self, punkinput: P0, fallowformatchanges: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetInput)(windows_core::Interface::as_raw(self), punkinput.param().abi(), fallowformatchanges.param().abi()).ok() + (windows_core::Interface::vtable(self).SetInput)(windows_core::Interface::as_raw(self), punkinput.param().abi(), fallowformatchanges.into()).ok() } pub unsafe fn GetInputObjectToken(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4359,12 +4340,8 @@ impl ISpRecognizer2 { { (windows_core::Interface::vtable(self).EmulateRecognitionEx)(windows_core::Interface::as_raw(self), pphrase.param().abi(), core::mem::transmute(dwcompareflags)).ok() } - pub unsafe fn SetTrainingState(&self, fdoingtraining: P0, fadaptfromtrainingdata: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetTrainingState)(windows_core::Interface::as_raw(self), fdoingtraining.param().abi(), fadaptfromtrainingdata.param().abi()).ok() + pub unsafe fn SetTrainingState(&self, fdoingtraining: bool, fadaptfromtrainingdata: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetTrainingState)(windows_core::Interface::as_raw(self), fdoingtraining.into(), fadaptfromtrainingdata.into()).ok() } pub unsafe fn ResetAcousticModelAdaptation(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetAcousticModelAdaptation)(windows_core::Interface::as_raw(self)).ok() @@ -4418,11 +4395,8 @@ impl core::ops::Deref for ISpRegDataKey { windows_core::imp::interface_hierarchy!(ISpRegDataKey, windows_core::IUnknown, ISpDataKey); impl ISpRegDataKey { #[cfg(feature = "Win32_System_Registry")] - pub unsafe fn SetKey(&self, hkey: super::super::System::Registry::HKEY, freadonly: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetKey)(windows_core::Interface::as_raw(self), core::mem::transmute(hkey), freadonly.param().abi()).ok() + pub unsafe fn SetKey(&self, hkey: super::super::System::Registry::HKEY, freadonly: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetKey)(windows_core::Interface::as_raw(self), core::mem::transmute(hkey), freadonly.into()).ok() } } #[repr(C)] @@ -4471,11 +4445,8 @@ impl ISpResourceManager { { (windows_core::Interface::vtable(self).SetObject)(windows_core::Interface::as_raw(self), core::mem::transmute(guidserviceid), punkobject.param().abi()).ok() } - pub unsafe fn GetObject(&self, guidserviceid: *const windows_core::GUID, objectclsid: *const windows_core::GUID, objectiid: *const windows_core::GUID, freleasewhenlastexternalrefreleased: P3, ppobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), core::mem::transmute(guidserviceid), core::mem::transmute(objectclsid), core::mem::transmute(objectiid), freleasewhenlastexternalrefreleased.param().abi(), core::mem::transmute(ppobject)).ok() + pub unsafe fn GetObject(&self, guidserviceid: *const windows_core::GUID, objectclsid: *const windows_core::GUID, objectiid: *const windows_core::GUID, freleasewhenlastexternalrefreleased: bool, ppobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), core::mem::transmute(guidserviceid), core::mem::transmute(objectclsid), core::mem::transmute(objectiid), freleasewhenlastexternalrefreleased.into(), core::mem::transmute(ppobject)).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -4605,13 +4576,11 @@ impl ISpSREngine { (windows_core::Interface::vtable(self).GetInputAudioFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidsourceformatid), core::mem::transmute(psourcewaveformatex), core::mem::transmute(pguiddesiredformatid), core::mem::transmute(ppcomemdesiredwaveformatex)).ok() } #[cfg(feature = "Win32_Media_Audio")] - pub unsafe fn RecognizeStream(&self, rguidfmtid: *const windows_core::GUID, pwaveformatex: *const super::Audio::WAVEFORMATEX, hrequestsync: super::super::Foundation::HANDLE, hdataavailable: super::super::Foundation::HANDLE, hexit: super::super::Foundation::HANDLE, fnewaudiostream: P5, frealtimeaudio: P6, paudioobjecttoken: P7) -> windows_core::Result<()> + pub unsafe fn RecognizeStream(&self, rguidfmtid: *const windows_core::GUID, pwaveformatex: *const super::Audio::WAVEFORMATEX, hrequestsync: super::super::Foundation::HANDLE, hdataavailable: super::super::Foundation::HANDLE, hexit: super::super::Foundation::HANDLE, fnewaudiostream: bool, frealtimeaudio: bool, paudioobjecttoken: P7) -> windows_core::Result<()> where - P5: windows_core::Param, - P6: windows_core::Param, P7: windows_core::Param, { - (windows_core::Interface::vtable(self).RecognizeStream)(windows_core::Interface::as_raw(self), core::mem::transmute(rguidfmtid), core::mem::transmute(pwaveformatex), core::mem::transmute(hrequestsync), core::mem::transmute(hdataavailable), core::mem::transmute(hexit), fnewaudiostream.param().abi(), frealtimeaudio.param().abi(), paudioobjecttoken.param().abi()).ok() + (windows_core::Interface::vtable(self).RecognizeStream)(windows_core::Interface::as_raw(self), core::mem::transmute(rguidfmtid), core::mem::transmute(pwaveformatex), core::mem::transmute(hrequestsync), core::mem::transmute(hdataavailable), core::mem::transmute(hexit), fnewaudiostream.into(), frealtimeaudio.into(), paudioobjecttoken.param().abi()).ok() } pub unsafe fn SetRecoProfile(&self, pprofile: P0) -> windows_core::Result<()> where @@ -4995,12 +4964,11 @@ impl ISpSREngine2 { { (windows_core::Interface::vtable(self).SetAdaptationData2)(windows_core::Interface::as_raw(self), core::mem::transmute(pvenginecontext), core::mem::transmute(padaptationdata.as_ptr()), padaptationdata.len().try_into().unwrap(), ptopicname.param().abi(), core::mem::transmute(esettings), core::mem::transmute(erelevance)).ok() } - pub unsafe fn SetGrammarPrefix(&self, pvenginegrammar: *const core::ffi::c_void, pszprefix: P1, fisprefixrequired: P2) -> windows_core::Result<()> + pub unsafe fn SetGrammarPrefix(&self, pvenginegrammar: *const core::ffi::c_void, pszprefix: P1, fisprefixrequired: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).SetGrammarPrefix)(windows_core::Interface::as_raw(self), core::mem::transmute(pvenginegrammar), pszprefix.param().abi(), fisprefixrequired.param().abi()).ok() + (windows_core::Interface::vtable(self).SetGrammarPrefix)(windows_core::Interface::as_raw(self), core::mem::transmute(pvenginegrammar), pszprefix.param().abi(), fisprefixrequired.into()).ok() } pub unsafe fn SetRulePriority(&self, hrule: SPRULEHANDLE, pvclientrulecontext: *const core::ffi::c_void, nrulepriority: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetRulePriority)(windows_core::Interface::as_raw(self), core::mem::transmute(hrule), core::mem::transmute(pvclientrulecontext), core::mem::transmute(nrulepriority)).ok() @@ -5017,12 +4985,8 @@ impl ISpSREngine2 { pub unsafe fn SetRuleWeight(&self, hrule: SPRULEHANDLE, pvclientrulecontext: *const core::ffi::c_void, flweight: f32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetRuleWeight)(windows_core::Interface::as_raw(self), core::mem::transmute(hrule), core::mem::transmute(pvclientrulecontext), core::mem::transmute(flweight)).ok() } - pub unsafe fn SetTrainingState(&self, fdoingtraining: P0, fadaptfromtrainingdata: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetTrainingState)(windows_core::Interface::as_raw(self), fdoingtraining.param().abi(), fadaptfromtrainingdata.param().abi()).ok() + pub unsafe fn SetTrainingState(&self, fdoingtraining: bool, fadaptfromtrainingdata: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetTrainingState)(windows_core::Interface::as_raw(self), fdoingtraining.into(), fadaptfromtrainingdata.into()).ok() } pub unsafe fn ResetAcousticModelAdaptation(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetAcousticModelAdaptation)(windows_core::Interface::as_raw(self)).ok() @@ -5780,13 +5744,11 @@ impl core::ops::Deref for ISpStreamFormatConverter { windows_core::imp::interface_hierarchy!(ISpStreamFormatConverter, windows_core::IUnknown, super::super::System::Com::ISequentialStream, super::super::System::Com::IStream, ISpStreamFormat); #[cfg(feature = "Win32_System_Com")] impl ISpStreamFormatConverter { - pub unsafe fn SetBaseStream(&self, pstream: P0, fsetformattobasestreamformat: P1, fwritetobasestream: P2) -> windows_core::Result<()> + pub unsafe fn SetBaseStream(&self, pstream: P0, fsetformattobasestreamformat: bool, fwritetobasestream: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).SetBaseStream)(windows_core::Interface::as_raw(self), pstream.param().abi(), fsetformattobasestreamformat.param().abi(), fwritetobasestream.param().abi()).ok() + (windows_core::Interface::vtable(self).SetBaseStream)(windows_core::Interface::as_raw(self), pstream.param().abi(), fsetformattobasestreamformat.into(), fwritetobasestream.into()).ok() } pub unsafe fn GetBaseStream(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6223,11 +6185,8 @@ impl ISpThreadControl { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).StartThread)(windows_core::Interface::as_raw(self), core::mem::transmute(dwflags), &mut result__).map(|| result__) } - pub unsafe fn WaitForThreadDone(&self, fforcestop: P0, phrthreadresult: *mut windows_core::HRESULT, mstimeout: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).WaitForThreadDone)(windows_core::Interface::as_raw(self), fforcestop.param().abi(), core::mem::transmute(phrthreadresult), core::mem::transmute(mstimeout)).ok() + pub unsafe fn WaitForThreadDone(&self, fforcestop: bool, phrthreadresult: *mut windows_core::HRESULT, mstimeout: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).WaitForThreadDone)(windows_core::Interface::as_raw(self), fforcestop.into(), core::mem::transmute(phrthreadresult), core::mem::transmute(mstimeout)).ok() } pub unsafe fn TerminateThread(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).TerminateThread)(windows_core::Interface::as_raw(self)).ok() @@ -6509,12 +6468,11 @@ impl core::ops::Deref for ISpVoice { } windows_core::imp::interface_hierarchy!(ISpVoice, windows_core::IUnknown, ISpNotifySource, ISpEventSource); impl ISpVoice { - pub unsafe fn SetOutput(&self, punkoutput: P0, fallowformatchanges: P1) -> windows_core::Result<()> + pub unsafe fn SetOutput(&self, punkoutput: P0, fallowformatchanges: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetOutput)(windows_core::Interface::as_raw(self), punkoutput.param().abi(), fallowformatchanges.param().abi()).ok() + (windows_core::Interface::vtable(self).SetOutput)(windows_core::Interface::as_raw(self), punkoutput.param().abi(), fallowformatchanges.into()).ok() } pub unsafe fn GetOutputObjectToken(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -15007,9 +14965,6 @@ pub const SPGO_UPS: SPGRAMMAROPTIONS = SPGRAMMAROPTIONS(4i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct SPGRAMMARHANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for SPGRAMMARHANDLE { - type TypeKind = windows_core::CopyType; -} impl SPGRAMMARHANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -15232,9 +15187,6 @@ impl Default for SPPHRASEPROPERTY_0_0 { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct SPPHRASEPROPERTYHANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for SPPHRASEPROPERTYHANDLE { - type TypeKind = windows_core::CopyType; -} impl SPPHRASEPROPERTYHANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -15284,9 +15236,6 @@ impl Default for SPPHRASERULE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct SPPHRASERULEHANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for SPPHRASERULEHANDLE { - type TypeKind = windows_core::CopyType; -} impl SPPHRASERULEHANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -15393,9 +15342,6 @@ pub const SPRAF_UserDelimited: SPCFGRULEATTRIBUTES = SPCFGRULEATTRIBUTES(131072i #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct SPRECOCONTEXTHANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for SPRECOCONTEXTHANDLE { - type TypeKind = windows_core::CopyType; -} impl SPRECOCONTEXTHANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -15551,9 +15497,6 @@ impl Default for SPRULEENTRY { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct SPRULEHANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for SPRULEHANDLE { - type TypeKind = windows_core::CopyType; -} impl SPRULEHANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -15757,9 +15700,6 @@ pub const SPSSuppressWord: SpeechPartOfSpeech = SpeechPartOfSpeech(61440i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct SPSTATEHANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for SPSTATEHANDLE { - type TypeKind = windows_core::CopyType; -} impl SPSTATEHANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -15904,9 +15844,6 @@ impl Default for SPTRANSITIONENTRY_1_2 { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct SPTRANSITIONID(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for SPTRANSITIONID { - type TypeKind = windows_core::CopyType; -} impl SPTRANSITIONID { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -16104,9 +16041,6 @@ impl Default for SPWORDENTRY { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct SPWORDHANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for SPWORDHANDLE { - type TypeKind = windows_core::CopyType; -} impl SPWORDHANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/Media/WindowsMediaFormat/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/WindowsMediaFormat/mod.rs index 51cf2af267..e84893b330 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/WindowsMediaFormat/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/WindowsMediaFormat/mod.rs @@ -1444,11 +1444,8 @@ impl core::ops::Deref for IWMDRMReader2 { } windows_core::imp::interface_hierarchy!(IWMDRMReader2, windows_core::IUnknown, IWMDRMReader); impl IWMDRMReader2 { - pub unsafe fn SetEvaluateOutputLevelLicenses(&self, fevaluate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEvaluateOutputLevelLicenses)(windows_core::Interface::as_raw(self), fevaluate.param().abi()).ok() + pub unsafe fn SetEvaluateOutputLevelLicenses(&self, fevaluate: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEvaluateOutputLevelLicenses)(windows_core::Interface::as_raw(self), fevaluate.into()).ok() } pub unsafe fn GetPlayOutputLevels(&self, pplayopl: *mut DRM_PLAY_OPL, pcblength: *mut u32, pdwminappcompliancelevel: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetPlayOutputLevels)(windows_core::Interface::as_raw(self), core::mem::transmute(pplayopl), core::mem::transmute(pcblength), core::mem::transmute(pdwminappcompliancelevel)).ok() @@ -1647,17 +1644,11 @@ impl core::ops::Deref for IWMDRMTranscryptor2 { } windows_core::imp::interface_hierarchy!(IWMDRMTranscryptor2, windows_core::IUnknown, IWMDRMTranscryptor); impl IWMDRMTranscryptor2 { - pub unsafe fn SeekEx(&self, cnsstarttime: u64, cnsduration: u64, flrate: f32, fincludefileheader: P3) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).SeekEx)(windows_core::Interface::as_raw(self), core::mem::transmute(cnsstarttime), core::mem::transmute(cnsduration), core::mem::transmute(flrate), fincludefileheader.param().abi()).ok() + pub unsafe fn SeekEx(&self, cnsstarttime: u64, cnsduration: u64, flrate: f32, fincludefileheader: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SeekEx)(windows_core::Interface::as_raw(self), core::mem::transmute(cnsstarttime), core::mem::transmute(cnsduration), core::mem::transmute(flrate), fincludefileheader.into()).ok() } - pub unsafe fn ZeroAdjustTimestamps(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ZeroAdjustTimestamps)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn ZeroAdjustTimestamps(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ZeroAdjustTimestamps)(windows_core::Interface::as_raw(self), fenable.into()).ok() } pub unsafe fn GetSeekStartTime(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1798,11 +1789,8 @@ impl core::ops::Deref for IWMDRMWriter2 { } windows_core::imp::interface_hierarchy!(IWMDRMWriter2, windows_core::IUnknown, IWMDRMWriter); impl IWMDRMWriter2 { - pub unsafe fn SetWMDRMNetEncryption(&self, fsamplesencrypted: P0, pbkeyid: *const u8, cbkeyid: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetWMDRMNetEncryption)(windows_core::Interface::as_raw(self), fsamplesencrypted.param().abi(), core::mem::transmute(pbkeyid), core::mem::transmute(cbkeyid)).ok() + pub unsafe fn SetWMDRMNetEncryption(&self, fsamplesencrypted: bool, pbkeyid: *const u8, cbkeyid: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetWMDRMNetEncryption)(windows_core::Interface::as_raw(self), fsamplesencrypted.into(), core::mem::transmute(pbkeyid), core::mem::transmute(cbkeyid)).ok() } } #[repr(C)] @@ -4373,11 +4361,8 @@ impl windows_core::RuntimeName for IWMReaderAccelerator {} windows_core::imp::define_interface!(IWMReaderAdvanced, IWMReaderAdvanced_Vtbl, 0x96406bea_2b2b_11d3_b36b_00c04f6108ff); windows_core::imp::interface_hierarchy!(IWMReaderAdvanced, windows_core::IUnknown); impl IWMReaderAdvanced { - pub unsafe fn SetUserProvidedClock(&self, fuserclock: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUserProvidedClock)(windows_core::Interface::as_raw(self), fuserclock.param().abi()).ok() + pub unsafe fn SetUserProvidedClock(&self, fuserclock: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUserProvidedClock)(windows_core::Interface::as_raw(self), fuserclock.into()).ok() } pub unsafe fn GetUserProvidedClock(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4386,11 +4371,8 @@ impl IWMReaderAdvanced { pub unsafe fn DeliverTime(&self, cnstime: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DeliverTime)(windows_core::Interface::as_raw(self), core::mem::transmute(cnstime)).ok() } - pub unsafe fn SetManualStreamSelection(&self, fselection: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetManualStreamSelection)(windows_core::Interface::as_raw(self), fselection.param().abi()).ok() + pub unsafe fn SetManualStreamSelection(&self, fselection: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetManualStreamSelection)(windows_core::Interface::as_raw(self), fselection.into()).ok() } pub unsafe fn GetManualStreamSelection(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4403,41 +4385,29 @@ impl IWMReaderAdvanced { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetStreamSelected)(windows_core::Interface::as_raw(self), core::mem::transmute(wstreamnum), &mut result__).map(|| result__) } - pub unsafe fn SetReceiveSelectionCallbacks(&self, fgetcallbacks: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetReceiveSelectionCallbacks)(windows_core::Interface::as_raw(self), fgetcallbacks.param().abi()).ok() + pub unsafe fn SetReceiveSelectionCallbacks(&self, fgetcallbacks: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetReceiveSelectionCallbacks)(windows_core::Interface::as_raw(self), fgetcallbacks.into()).ok() } pub unsafe fn GetReceiveSelectionCallbacks(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetReceiveSelectionCallbacks)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetReceiveStreamSamples(&self, wstreamnum: u16, freceivestreamsamples: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetReceiveStreamSamples)(windows_core::Interface::as_raw(self), core::mem::transmute(wstreamnum), freceivestreamsamples.param().abi()).ok() + pub unsafe fn SetReceiveStreamSamples(&self, wstreamnum: u16, freceivestreamsamples: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetReceiveStreamSamples)(windows_core::Interface::as_raw(self), core::mem::transmute(wstreamnum), freceivestreamsamples.into()).ok() } pub unsafe fn GetReceiveStreamSamples(&self, wstreamnum: u16) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetReceiveStreamSamples)(windows_core::Interface::as_raw(self), core::mem::transmute(wstreamnum), &mut result__).map(|| result__) } - pub unsafe fn SetAllocateForOutput(&self, dwoutputnum: u32, fallocate: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllocateForOutput)(windows_core::Interface::as_raw(self), core::mem::transmute(dwoutputnum), fallocate.param().abi()).ok() + pub unsafe fn SetAllocateForOutput(&self, dwoutputnum: u32, fallocate: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllocateForOutput)(windows_core::Interface::as_raw(self), core::mem::transmute(dwoutputnum), fallocate.into()).ok() } pub unsafe fn GetAllocateForOutput(&self, dwoutputnum: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetAllocateForOutput)(windows_core::Interface::as_raw(self), core::mem::transmute(dwoutputnum), &mut result__).map(|| result__) } - pub unsafe fn SetAllocateForStream(&self, wstreamnum: u16, fallocate: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllocateForStream)(windows_core::Interface::as_raw(self), core::mem::transmute(wstreamnum), fallocate.param().abi()).ok() + pub unsafe fn SetAllocateForStream(&self, wstreamnum: u16, fallocate: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllocateForStream)(windows_core::Interface::as_raw(self), core::mem::transmute(wstreamnum), fallocate.into()).ok() } pub unsafe fn GetAllocateForStream(&self, dwsreamnum: u16) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4725,11 +4695,8 @@ impl IWMReaderAdvanced2 { pub unsafe fn Preroll(&self, cnsstart: u64, cnsduration: u64, frate: f32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Preroll)(windows_core::Interface::as_raw(self), core::mem::transmute(cnsstart), core::mem::transmute(cnsduration), core::mem::transmute(frate)).ok() } - pub unsafe fn SetLogClientID(&self, flogclientid: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetLogClientID)(windows_core::Interface::as_raw(self), flogclientid.param().abi()).ok() + pub unsafe fn SetLogClientID(&self, flogclientid: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetLogClientID)(windows_core::Interface::as_raw(self), flogclientid.into()).ok() } pub unsafe fn GetLogClientID(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5410,62 +5377,46 @@ impl IWMReaderNetworkConfig { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetProxyBypassForLocal)(windows_core::Interface::as_raw(self), pwszprotocol.param().abi(), &mut result__).map(|| result__) } - pub unsafe fn SetProxyBypassForLocal(&self, pwszprotocol: P0, fbypassforlocal: P1) -> windows_core::Result<()> + pub unsafe fn SetProxyBypassForLocal(&self, pwszprotocol: P0, fbypassforlocal: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetProxyBypassForLocal)(windows_core::Interface::as_raw(self), pwszprotocol.param().abi(), fbypassforlocal.param().abi()).ok() + (windows_core::Interface::vtable(self).SetProxyBypassForLocal)(windows_core::Interface::as_raw(self), pwszprotocol.param().abi(), fbypassforlocal.into()).ok() } pub unsafe fn GetForceRerunAutoProxyDetection(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetForceRerunAutoProxyDetection)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetForceRerunAutoProxyDetection(&self, fforcererundetection: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetForceRerunAutoProxyDetection)(windows_core::Interface::as_raw(self), fforcererundetection.param().abi()).ok() + pub unsafe fn SetForceRerunAutoProxyDetection(&self, fforcererundetection: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetForceRerunAutoProxyDetection)(windows_core::Interface::as_raw(self), fforcererundetection.into()).ok() } pub unsafe fn GetEnableMulticast(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetEnableMulticast)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnableMulticast(&self, fenablemulticast: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableMulticast)(windows_core::Interface::as_raw(self), fenablemulticast.param().abi()).ok() + pub unsafe fn SetEnableMulticast(&self, fenablemulticast: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableMulticast)(windows_core::Interface::as_raw(self), fenablemulticast.into()).ok() } pub unsafe fn GetEnableHTTP(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetEnableHTTP)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnableHTTP(&self, fenablehttp: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableHTTP)(windows_core::Interface::as_raw(self), fenablehttp.param().abi()).ok() + pub unsafe fn SetEnableHTTP(&self, fenablehttp: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableHTTP)(windows_core::Interface::as_raw(self), fenablehttp.into()).ok() } pub unsafe fn GetEnableUDP(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetEnableUDP)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnableUDP(&self, fenableudp: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableUDP)(windows_core::Interface::as_raw(self), fenableudp.param().abi()).ok() + pub unsafe fn SetEnableUDP(&self, fenableudp: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableUDP)(windows_core::Interface::as_raw(self), fenableudp.into()).ok() } pub unsafe fn GetEnableTCP(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetEnableTCP)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnableTCP(&self, fenabletcp: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableTCP)(windows_core::Interface::as_raw(self), fenabletcp.param().abi()).ok() + pub unsafe fn SetEnableTCP(&self, fenabletcp: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableTCP)(windows_core::Interface::as_raw(self), fenabletcp.into()).ok() } pub unsafe fn ResetProtocolRollover(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetProtocolRollover)(windows_core::Interface::as_raw(self)).ok() @@ -5834,21 +5785,15 @@ impl IWMReaderNetworkConfig2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetEnableContentCaching)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnableContentCaching(&self, fenablecontentcaching: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableContentCaching)(windows_core::Interface::as_raw(self), fenablecontentcaching.param().abi()).ok() + pub unsafe fn SetEnableContentCaching(&self, fenablecontentcaching: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableContentCaching)(windows_core::Interface::as_raw(self), fenablecontentcaching.into()).ok() } pub unsafe fn GetEnableFastCache(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetEnableFastCache)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnableFastCache(&self, fenablefastcache: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableFastCache)(windows_core::Interface::as_raw(self), fenablefastcache.param().abi()).ok() + pub unsafe fn SetEnableFastCache(&self, fenablefastcache: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableFastCache)(windows_core::Interface::as_raw(self), fenablefastcache.into()).ok() } pub unsafe fn GetAcceleratedStreamingDuration(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5868,21 +5813,15 @@ impl IWMReaderNetworkConfig2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetEnableResends)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnableResends(&self, fenableresends: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableResends)(windows_core::Interface::as_raw(self), fenableresends.param().abi()).ok() + pub unsafe fn SetEnableResends(&self, fenableresends: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableResends)(windows_core::Interface::as_raw(self), fenableresends.into()).ok() } pub unsafe fn GetEnableThinning(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetEnableThinning)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnableThinning(&self, fenablethinning: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableThinning)(windows_core::Interface::as_raw(self), fenablethinning.param().abi()).ok() + pub unsafe fn SetEnableThinning(&self, fenablethinning: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableThinning)(windows_core::Interface::as_raw(self), fenablethinning.into()).ok() } pub unsafe fn GetMaxNetPacketSize(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6319,11 +6258,8 @@ impl IWMRegisteredDevice { pub unsafe fn SetAttributeByName(&self, bstrname: &windows_core::BSTR, bstrvalue: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetAttributeByName)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrname), core::mem::transmute_copy(bstrvalue)).ok() } - pub unsafe fn Approve(&self, fapprove: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Approve)(windows_core::Interface::as_raw(self), fapprove.param().abi()).ok() + pub unsafe fn Approve(&self, fapprove: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Approve)(windows_core::Interface::as_raw(self), fapprove.into()).ok() } pub unsafe fn IsValid(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6575,25 +6511,20 @@ impl windows_core::RuntimeName for IWMSBufferAllocator {} windows_core::imp::define_interface!(IWMSInternalAdminNetSource, IWMSInternalAdminNetSource_Vtbl, 0x8bb23e5f_d127_4afb_8d02_ae5b66d54c78); windows_core::imp::interface_hierarchy!(IWMSInternalAdminNetSource, windows_core::IUnknown); impl IWMSInternalAdminNetSource { - pub unsafe fn Initialize(&self, psharednamespace: P0, pnamespacenode: P1, pnetsourcecreator: P2, fembeddedinserver: P3) -> windows_core::Result<()> + pub unsafe fn Initialize(&self, psharednamespace: P0, pnamespacenode: P1, pnetsourcecreator: P2, fembeddedinserver: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), psharednamespace.param().abi(), pnamespacenode.param().abi(), pnetsourcecreator.param().abi(), fembeddedinserver.param().abi()).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), psharednamespace.param().abi(), pnamespacenode.param().abi(), pnetsourcecreator.param().abi(), fembeddedinserver.into()).ok() } pub unsafe fn GetNetSourceCreator(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNetSourceCreator)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetCredentials(&self, bstrrealm: &windows_core::BSTR, bstrname: &windows_core::BSTR, bstrpassword: &windows_core::BSTR, fpersist: P3, fconfirmedgood: P4) -> windows_core::Result<()> - where - P3: windows_core::Param, - P4: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCredentials)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute_copy(bstrname), core::mem::transmute_copy(bstrpassword), fpersist.param().abi(), fconfirmedgood.param().abi()).ok() + pub unsafe fn SetCredentials(&self, bstrrealm: &windows_core::BSTR, bstrname: &windows_core::BSTR, bstrpassword: &windows_core::BSTR, fpersist: bool, fconfirmedgood: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCredentials)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute_copy(bstrname), core::mem::transmute_copy(bstrpassword), fpersist.into(), fconfirmedgood.into()).ok() } pub unsafe fn GetCredentials(&self, bstrrealm: &windows_core::BSTR, pbstrname: *mut windows_core::BSTR, pbstrpassword: *mut windows_core::BSTR, pfconfirmedgood: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetCredentials)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute(pbstrname), core::mem::transmute(pbstrpassword), core::mem::transmute(pfconfirmedgood)).ok() @@ -6737,25 +6668,14 @@ impl windows_core::RuntimeName for IWMSInternalAdminNetSource {} windows_core::imp::define_interface!(IWMSInternalAdminNetSource2, IWMSInternalAdminNetSource2_Vtbl, 0xe74d58c3_cf77_4b51_af17_744687c43eae); windows_core::imp::interface_hierarchy!(IWMSInternalAdminNetSource2, windows_core::IUnknown); impl IWMSInternalAdminNetSource2 { - pub unsafe fn SetCredentialsEx(&self, bstrrealm: &windows_core::BSTR, bstrurl: &windows_core::BSTR, fproxy: P2, bstrname: &windows_core::BSTR, bstrpassword: &windows_core::BSTR, fpersist: P5, fconfirmedgood: P6) -> windows_core::Result<()> - where - P2: windows_core::Param, - P5: windows_core::Param, - P6: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCredentialsEx)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute_copy(bstrurl), fproxy.param().abi(), core::mem::transmute_copy(bstrname), core::mem::transmute_copy(bstrpassword), fpersist.param().abi(), fconfirmedgood.param().abi()).ok() + pub unsafe fn SetCredentialsEx(&self, bstrrealm: &windows_core::BSTR, bstrurl: &windows_core::BSTR, fproxy: bool, bstrname: &windows_core::BSTR, bstrpassword: &windows_core::BSTR, fpersist: bool, fconfirmedgood: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCredentialsEx)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute_copy(bstrurl), fproxy.into(), core::mem::transmute_copy(bstrname), core::mem::transmute_copy(bstrpassword), fpersist.into(), fconfirmedgood.into()).ok() } - pub unsafe fn GetCredentialsEx(&self, bstrrealm: &windows_core::BSTR, bstrurl: &windows_core::BSTR, fproxy: P2, pdwurlpolicy: *mut NETSOURCE_URLCREDPOLICY_SETTINGS, pbstrname: *mut windows_core::BSTR, pbstrpassword: *mut windows_core::BSTR, pfconfirmedgood: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCredentialsEx)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute_copy(bstrurl), fproxy.param().abi(), core::mem::transmute(pdwurlpolicy), core::mem::transmute(pbstrname), core::mem::transmute(pbstrpassword), core::mem::transmute(pfconfirmedgood)).ok() + pub unsafe fn GetCredentialsEx(&self, bstrrealm: &windows_core::BSTR, bstrurl: &windows_core::BSTR, fproxy: bool, pdwurlpolicy: *mut NETSOURCE_URLCREDPOLICY_SETTINGS, pbstrname: *mut windows_core::BSTR, pbstrpassword: *mut windows_core::BSTR, pfconfirmedgood: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCredentialsEx)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute_copy(bstrurl), fproxy.into(), core::mem::transmute(pdwurlpolicy), core::mem::transmute(pbstrname), core::mem::transmute(pbstrpassword), core::mem::transmute(pfconfirmedgood)).ok() } - pub unsafe fn DeleteCredentialsEx(&self, bstrrealm: &windows_core::BSTR, bstrurl: &windows_core::BSTR, fproxy: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).DeleteCredentialsEx)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute_copy(bstrurl), fproxy.param().abi()).ok() + pub unsafe fn DeleteCredentialsEx(&self, bstrrealm: &windows_core::BSTR, bstrurl: &windows_core::BSTR, fproxy: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DeleteCredentialsEx)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute_copy(bstrurl), fproxy.into()).ok() } pub unsafe fn FindProxyForURLEx(&self, bstrprotocol: &windows_core::BSTR, bstrhost: &windows_core::BSTR, bstrurl: &windows_core::BSTR, pfproxyenabled: *mut super::super::Foundation::BOOL, pbstrproxyserver: *mut windows_core::BSTR, pdwproxyport: *mut u32, pdwproxycontext: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).FindProxyForURLEx)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrprotocol), core::mem::transmute_copy(bstrhost), core::mem::transmute_copy(bstrurl), core::mem::transmute(pfproxyenabled), core::mem::transmute(pbstrproxyserver), core::mem::transmute(pdwproxyport), core::mem::transmute(pdwproxycontext)).ok() @@ -6832,21 +6752,11 @@ impl IWMSInternalAdminNetSource3 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsUsingIE2)(windows_core::Interface::as_raw(self), core::mem::transmute(qwproxycontext), &mut result__).map(|| result__) } - pub unsafe fn SetCredentialsEx2(&self, bstrrealm: &windows_core::BSTR, bstrurl: &windows_core::BSTR, fproxy: P2, bstrname: &windows_core::BSTR, bstrpassword: &windows_core::BSTR, fpersist: P5, fconfirmedgood: P6, fcleartextauthentication: P7) -> windows_core::Result<()> - where - P2: windows_core::Param, - P5: windows_core::Param, - P6: windows_core::Param, - P7: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCredentialsEx2)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute_copy(bstrurl), fproxy.param().abi(), core::mem::transmute_copy(bstrname), core::mem::transmute_copy(bstrpassword), fpersist.param().abi(), fconfirmedgood.param().abi(), fcleartextauthentication.param().abi()).ok() + pub unsafe fn SetCredentialsEx2(&self, bstrrealm: &windows_core::BSTR, bstrurl: &windows_core::BSTR, fproxy: bool, bstrname: &windows_core::BSTR, bstrpassword: &windows_core::BSTR, fpersist: bool, fconfirmedgood: bool, fcleartextauthentication: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCredentialsEx2)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute_copy(bstrurl), fproxy.into(), core::mem::transmute_copy(bstrname), core::mem::transmute_copy(bstrpassword), fpersist.into(), fconfirmedgood.into(), fcleartextauthentication.into()).ok() } - pub unsafe fn GetCredentialsEx2(&self, bstrrealm: &windows_core::BSTR, bstrurl: &windows_core::BSTR, fproxy: P2, fcleartextauthentication: P3, pdwurlpolicy: *mut NETSOURCE_URLCREDPOLICY_SETTINGS, pbstrname: *mut windows_core::BSTR, pbstrpassword: *mut windows_core::BSTR, pfconfirmedgood: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> - where - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetCredentialsEx2)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute_copy(bstrurl), fproxy.param().abi(), fcleartextauthentication.param().abi(), core::mem::transmute(pdwurlpolicy), core::mem::transmute(pbstrname), core::mem::transmute(pbstrpassword), core::mem::transmute(pfconfirmedgood)).ok() + pub unsafe fn GetCredentialsEx2(&self, bstrrealm: &windows_core::BSTR, bstrurl: &windows_core::BSTR, fproxy: bool, fcleartextauthentication: bool, pdwurlpolicy: *mut NETSOURCE_URLCREDPOLICY_SETTINGS, pbstrname: *mut windows_core::BSTR, pbstrpassword: *mut windows_core::BSTR, pfconfirmedgood: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetCredentialsEx2)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrrealm), core::mem::transmute_copy(bstrurl), fproxy.into(), fcleartextauthentication.into(), core::mem::transmute(pdwurlpolicy), core::mem::transmute(pbstrname), core::mem::transmute(pbstrpassword), core::mem::transmute(pfconfirmedgood)).ok() } } #[repr(C)] @@ -7541,11 +7451,8 @@ impl IWMSyncReader { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetStreamSelected)(windows_core::Interface::as_raw(self), core::mem::transmute(wstreamnum), &mut result__).map(|| result__) } - pub unsafe fn SetReadStreamSamples(&self, wstreamnum: u16, fcompressed: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetReadStreamSamples)(windows_core::Interface::as_raw(self), core::mem::transmute(wstreamnum), fcompressed.param().abi()).ok() + pub unsafe fn SetReadStreamSamples(&self, wstreamnum: u16, fcompressed: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetReadStreamSamples)(windows_core::Interface::as_raw(self), core::mem::transmute(wstreamnum), fcompressed.into()).ok() } pub unsafe fn GetReadStreamSamples(&self, wstreamnum: u16) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8312,11 +8219,8 @@ impl IWMWriterAdvanced { { (windows_core::Interface::vtable(self).WriteStreamSample)(windows_core::Interface::as_raw(self), core::mem::transmute(wstreamnum), core::mem::transmute(cnssampletime), core::mem::transmute(mssamplesendtime), core::mem::transmute(cnssampleduration), core::mem::transmute(dwflags), psample.param().abi()).ok() } - pub unsafe fn SetLiveSource(&self, fislivesource: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetLiveSource)(windows_core::Interface::as_raw(self), fislivesource.param().abi()).ok() + pub unsafe fn SetLiveSource(&self, fislivesource: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetLiveSource)(windows_core::Interface::as_raw(self), fislivesource.into()).ok() } pub unsafe fn IsRealTime(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8732,21 +8636,15 @@ impl core::ops::Deref for IWMWriterFileSink3 { } windows_core::imp::interface_hierarchy!(IWMWriterFileSink3, windows_core::IUnknown, IWMWriterSink, IWMWriterFileSink, IWMWriterFileSink2); impl IWMWriterFileSink3 { - pub unsafe fn SetAutoIndexing(&self, fdoautoindexing: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAutoIndexing)(windows_core::Interface::as_raw(self), fdoautoindexing.param().abi()).ok() + pub unsafe fn SetAutoIndexing(&self, fdoautoindexing: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAutoIndexing)(windows_core::Interface::as_raw(self), fdoautoindexing.into()).ok() } pub unsafe fn GetAutoIndexing(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetAutoIndexing)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetControlStream(&self, wstreamnumber: u16, fshouldcontrolstartandstop: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetControlStream)(windows_core::Interface::as_raw(self), core::mem::transmute(wstreamnumber), fshouldcontrolstartandstop.param().abi()).ok() + pub unsafe fn SetControlStream(&self, wstreamnumber: u16, fshouldcontrolstartandstop: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetControlStream)(windows_core::Interface::as_raw(self), core::mem::transmute(wstreamnumber), fshouldcontrolstartandstop.into()).ok() } pub unsafe fn GetMode(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8755,12 +8653,8 @@ impl IWMWriterFileSink3 { pub unsafe fn OnDataUnitEx(&self, pfilesinkdataunit: *const WMT_FILESINK_DATA_UNIT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnDataUnitEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pfilesinkdataunit)).ok() } - pub unsafe fn SetUnbufferedIO(&self, funbufferedio: P0, frestrictmemusage: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUnbufferedIO)(windows_core::Interface::as_raw(self), funbufferedio.param().abi(), frestrictmemusage.param().abi()).ok() + pub unsafe fn SetUnbufferedIO(&self, funbufferedio: bool, frestrictmemusage: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUnbufferedIO)(windows_core::Interface::as_raw(self), funbufferedio.into(), frestrictmemusage.into()).ok() } pub unsafe fn GetUnbufferedIO(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8991,11 +8885,8 @@ impl IWMWriterPostView { { (windows_core::Interface::vtable(self).SetPostViewCallback)(windows_core::Interface::as_raw(self), pcallback.param().abi(), core::mem::transmute(pvcontext)).ok() } - pub unsafe fn SetReceivePostViewSamples(&self, wstreamnum: u16, freceivepostviewsamples: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetReceivePostViewSamples)(windows_core::Interface::as_raw(self), core::mem::transmute(wstreamnum), freceivepostviewsamples.param().abi()).ok() + pub unsafe fn SetReceivePostViewSamples(&self, wstreamnum: u16, freceivepostviewsamples: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetReceivePostViewSamples)(windows_core::Interface::as_raw(self), core::mem::transmute(wstreamnum), freceivepostviewsamples.into()).ok() } pub unsafe fn GetReceivePostViewSamples(&self, wstreamnum: u16) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -9019,11 +8910,8 @@ impl IWMWriterPostView { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetPostViewFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(wstreamnumber), core::mem::transmute(dwformatnumber), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetAllocateForPostView(&self, wstreamnumber: u16, fallocate: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllocateForPostView)(windows_core::Interface::as_raw(self), core::mem::transmute(wstreamnumber), fallocate.param().abi()).ok() + pub unsafe fn SetAllocateForPostView(&self, wstreamnumber: u16, fallocate: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllocateForPostView)(windows_core::Interface::as_raw(self), core::mem::transmute(wstreamnumber), fallocate.into()).ok() } pub unsafe fn GetAllocateForPostView(&self, wstreamnumber: u16) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -9280,13 +9168,12 @@ impl core::ops::Deref for IWMWriterPushSink { } windows_core::imp::interface_hierarchy!(IWMWriterPushSink, windows_core::IUnknown, IWMWriterSink); impl IWMWriterPushSink { - pub unsafe fn Connect(&self, pwszurl: P0, pwsztemplateurl: P1, fautodestroy: P2) -> windows_core::Result<()> + pub unsafe fn Connect(&self, pwszurl: P0, pwsztemplateurl: P1, fautodestroy: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).Connect)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), pwsztemplateurl.param().abi(), fautodestroy.param().abi()).ok() + (windows_core::Interface::vtable(self).Connect)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), pwsztemplateurl.param().abi(), fautodestroy.into()).ok() } pub unsafe fn Disconnect(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Disconnect)(windows_core::Interface::as_raw(self)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Media/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/mod.rs index 4ac0776c63..033c8acf08 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/mod.rs @@ -65,9 +65,6 @@ pub const ED_DEVCAP_TIMECODE_READ: TIMECODE_SAMPLE_FLAGS = TIMECODE_SAMPLE_FLAGS #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HTASK(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HTASK { - type TypeKind = windows_core::CopyType; -} impl HTASK { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dhcp/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dhcp/mod.rs index 3bc4e549f8..388c5cd516 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dhcp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dhcp/mod.rs @@ -1,11 +1,10 @@ #[inline] -pub unsafe fn DhcpAddFilterV4(serveripaddress: P0, addfilterinfo: *const DHCP_FILTER_ADD_INFO, forceflag: P2) -> u32 +pub unsafe fn DhcpAddFilterV4(serveripaddress: P0, addfilterinfo: *const DHCP_FILTER_ADD_INFO, forceflag: bool) -> u32 where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpAddFilterV4(serveripaddress : windows_core::PCWSTR, addfilterinfo : *const DHCP_FILTER_ADD_INFO, forceflag : super::super::Foundation:: BOOL) -> u32); - DhcpAddFilterV4(serveripaddress.param().abi(), core::mem::transmute(addfilterinfo), forceflag.param().abi()) + DhcpAddFilterV4(serveripaddress.param().abi(), core::mem::transmute(addfilterinfo), forceflag.into()) } #[inline] pub unsafe fn DhcpAddSecurityGroup(pserver: P0) -> u32 @@ -711,26 +710,22 @@ pub unsafe fn DhcpHlprAddV4PolicyRange(policy: *mut DHCP_POLICY, range: *const D DhcpHlprAddV4PolicyRange(core::mem::transmute(policy), core::mem::transmute(range)) } #[inline] -pub unsafe fn DhcpHlprCreateV4Policy(policyname: P0, fglobalpolicy: P1, subnet: u32, processingorder: u32, rootoperator: DHCP_POL_LOGIC_OPER, description: P5, enabled: P6, policy: *mut *mut DHCP_POLICY) -> u32 +pub unsafe fn DhcpHlprCreateV4Policy(policyname: P0, fglobalpolicy: bool, subnet: u32, processingorder: u32, rootoperator: DHCP_POL_LOGIC_OPER, description: P5, enabled: bool, policy: *mut *mut DHCP_POLICY) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, P5: windows_core::Param, - P6: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpHlprCreateV4Policy(policyname : windows_core::PCWSTR, fglobalpolicy : super::super::Foundation:: BOOL, subnet : u32, processingorder : u32, rootoperator : DHCP_POL_LOGIC_OPER, description : windows_core::PCWSTR, enabled : super::super::Foundation:: BOOL, policy : *mut *mut DHCP_POLICY) -> u32); - DhcpHlprCreateV4Policy(policyname.param().abi(), fglobalpolicy.param().abi(), core::mem::transmute(subnet), core::mem::transmute(processingorder), core::mem::transmute(rootoperator), description.param().abi(), enabled.param().abi(), core::mem::transmute(policy)) + DhcpHlprCreateV4Policy(policyname.param().abi(), fglobalpolicy.into(), core::mem::transmute(subnet), core::mem::transmute(processingorder), core::mem::transmute(rootoperator), description.param().abi(), enabled.into(), core::mem::transmute(policy)) } #[inline] -pub unsafe fn DhcpHlprCreateV4PolicyEx(policyname: P0, fglobalpolicy: P1, subnet: u32, processingorder: u32, rootoperator: DHCP_POL_LOGIC_OPER, description: P5, enabled: P6, policy: *mut *mut DHCP_POLICY_EX) -> u32 +pub unsafe fn DhcpHlprCreateV4PolicyEx(policyname: P0, fglobalpolicy: bool, subnet: u32, processingorder: u32, rootoperator: DHCP_POL_LOGIC_OPER, description: P5, enabled: bool, policy: *mut *mut DHCP_POLICY_EX) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, P5: windows_core::Param, - P6: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpHlprCreateV4PolicyEx(policyname : windows_core::PCWSTR, fglobalpolicy : super::super::Foundation:: BOOL, subnet : u32, processingorder : u32, rootoperator : DHCP_POL_LOGIC_OPER, description : windows_core::PCWSTR, enabled : super::super::Foundation:: BOOL, policy : *mut *mut DHCP_POLICY_EX) -> u32); - DhcpHlprCreateV4PolicyEx(policyname.param().abi(), fglobalpolicy.param().abi(), core::mem::transmute(subnet), core::mem::transmute(processingorder), core::mem::transmute(rootoperator), description.param().abi(), enabled.param().abi(), core::mem::transmute(policy)) + DhcpHlprCreateV4PolicyEx(policyname.param().abi(), fglobalpolicy.into(), core::mem::transmute(subnet), core::mem::transmute(processingorder), core::mem::transmute(rootoperator), description.param().abi(), enabled.into(), core::mem::transmute(policy)) } #[inline] pub unsafe fn DhcpHlprFindV4DhcpProperty(propertyarray: *const DHCP_PROPERTY_ARRAY, id: DHCP_PROPERTY_ID, r#type: DHCP_PROPERTY_TYPE) -> *mut DHCP_PROPERTY { @@ -1235,14 +1230,13 @@ where DhcpSetSubnetInfoVQ(serveripaddress.param().abi(), core::mem::transmute(subnetaddress), core::mem::transmute(subnetinfo)) } #[inline] -pub unsafe fn DhcpSetSuperScopeV4(serveripaddress: P0, subnetaddress: u32, superscopename: P2, changeexisting: P3) -> u32 +pub unsafe fn DhcpSetSuperScopeV4(serveripaddress: P0, subnetaddress: u32, superscopename: P2, changeexisting: bool) -> u32 where P0: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpSetSuperScopeV4(serveripaddress : windows_core::PCWSTR, subnetaddress : u32, superscopename : windows_core::PCWSTR, changeexisting : super::super::Foundation:: BOOL) -> u32); - DhcpSetSuperScopeV4(serveripaddress.param().abi(), core::mem::transmute(subnetaddress), superscopename.param().abi(), changeexisting.param().abi()) + DhcpSetSuperScopeV4(serveripaddress.param().abi(), core::mem::transmute(subnetaddress), superscopename.param().abi(), changeexisting.into()) } #[inline] pub unsafe fn DhcpSetThreadOptions(flags: u32, reserved: *mut core::ffi::c_void) -> u32 { @@ -1300,32 +1294,29 @@ where DhcpV4CreatePolicyEx(serveripaddress.param().abi(), core::mem::transmute(policyex)) } #[inline] -pub unsafe fn DhcpV4DeletePolicy(serveripaddress: P0, fglobalpolicy: P1, subnetaddress: u32, policyname: P3) -> u32 +pub unsafe fn DhcpV4DeletePolicy(serveripaddress: P0, fglobalpolicy: bool, subnetaddress: u32, policyname: P3) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4DeletePolicy(serveripaddress : windows_core::PCWSTR, fglobalpolicy : super::super::Foundation:: BOOL, subnetaddress : u32, policyname : windows_core::PCWSTR) -> u32); - DhcpV4DeletePolicy(serveripaddress.param().abi(), fglobalpolicy.param().abi(), core::mem::transmute(subnetaddress), policyname.param().abi()) + DhcpV4DeletePolicy(serveripaddress.param().abi(), fglobalpolicy.into(), core::mem::transmute(subnetaddress), policyname.param().abi()) } #[inline] -pub unsafe fn DhcpV4EnumPolicies(serveripaddress: P0, resumehandle: *mut u32, preferredmaximum: u32, fglobalpolicy: P3, subnetaddress: u32, enuminfo: *mut *mut DHCP_POLICY_ARRAY, elementsread: *mut u32, elementstotal: *mut u32) -> u32 +pub unsafe fn DhcpV4EnumPolicies(serveripaddress: P0, resumehandle: *mut u32, preferredmaximum: u32, fglobalpolicy: bool, subnetaddress: u32, enuminfo: *mut *mut DHCP_POLICY_ARRAY, elementsread: *mut u32, elementstotal: *mut u32) -> u32 where P0: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4EnumPolicies(serveripaddress : windows_core::PCWSTR, resumehandle : *mut u32, preferredmaximum : u32, fglobalpolicy : super::super::Foundation:: BOOL, subnetaddress : u32, enuminfo : *mut *mut DHCP_POLICY_ARRAY, elementsread : *mut u32, elementstotal : *mut u32) -> u32); - DhcpV4EnumPolicies(serveripaddress.param().abi(), core::mem::transmute(resumehandle), core::mem::transmute(preferredmaximum), fglobalpolicy.param().abi(), core::mem::transmute(subnetaddress), core::mem::transmute(enuminfo), core::mem::transmute(elementsread), core::mem::transmute(elementstotal)) + DhcpV4EnumPolicies(serveripaddress.param().abi(), core::mem::transmute(resumehandle), core::mem::transmute(preferredmaximum), fglobalpolicy.into(), core::mem::transmute(subnetaddress), core::mem::transmute(enuminfo), core::mem::transmute(elementsread), core::mem::transmute(elementstotal)) } #[inline] -pub unsafe fn DhcpV4EnumPoliciesEx(serveripaddress: P0, resumehandle: *mut u32, preferredmaximum: u32, globalpolicy: P3, subnetaddress: u32, enuminfo: *mut *mut DHCP_POLICY_EX_ARRAY, elementsread: *mut u32, elementstotal: *mut u32) -> u32 +pub unsafe fn DhcpV4EnumPoliciesEx(serveripaddress: P0, resumehandle: *mut u32, preferredmaximum: u32, globalpolicy: bool, subnetaddress: u32, enuminfo: *mut *mut DHCP_POLICY_EX_ARRAY, elementsread: *mut u32, elementstotal: *mut u32) -> u32 where P0: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4EnumPoliciesEx(serveripaddress : windows_core::PCWSTR, resumehandle : *mut u32, preferredmaximum : u32, globalpolicy : super::super::Foundation:: BOOL, subnetaddress : u32, enuminfo : *mut *mut DHCP_POLICY_EX_ARRAY, elementsread : *mut u32, elementstotal : *mut u32) -> u32); - DhcpV4EnumPoliciesEx(serveripaddress.param().abi(), core::mem::transmute(resumehandle), core::mem::transmute(preferredmaximum), globalpolicy.param().abi(), core::mem::transmute(subnetaddress), core::mem::transmute(enuminfo), core::mem::transmute(elementsread), core::mem::transmute(elementstotal)) + DhcpV4EnumPoliciesEx(serveripaddress.param().abi(), core::mem::transmute(resumehandle), core::mem::transmute(preferredmaximum), globalpolicy.into(), core::mem::transmute(subnetaddress), core::mem::transmute(enuminfo), core::mem::transmute(elementsread), core::mem::transmute(elementstotal)) } #[inline] pub unsafe fn DhcpV4EnumSubnetClients(serveripaddress: P0, subnetaddress: u32, resumehandle: *mut u32, preferredmaximum: u32, clientinfo: *mut *mut DHCP_CLIENT_INFO_PB_ARRAY, clientsread: *mut u32, clientstotal: *mut u32) -> u32 @@ -1501,33 +1492,30 @@ where DhcpV4GetOptionValue(serveripaddress.param().abi(), core::mem::transmute(flags), core::mem::transmute(optionid), policyname.param().abi(), vendorname.param().abi(), core::mem::transmute(scopeinfo), core::mem::transmute(optionvalue)) } #[inline] -pub unsafe fn DhcpV4GetPolicy(serveripaddress: P0, fglobalpolicy: P1, subnetaddress: u32, policyname: P3, policy: *mut *mut DHCP_POLICY) -> u32 +pub unsafe fn DhcpV4GetPolicy(serveripaddress: P0, fglobalpolicy: bool, subnetaddress: u32, policyname: P3, policy: *mut *mut DHCP_POLICY) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4GetPolicy(serveripaddress : windows_core::PCWSTR, fglobalpolicy : super::super::Foundation:: BOOL, subnetaddress : u32, policyname : windows_core::PCWSTR, policy : *mut *mut DHCP_POLICY) -> u32); - DhcpV4GetPolicy(serveripaddress.param().abi(), fglobalpolicy.param().abi(), core::mem::transmute(subnetaddress), policyname.param().abi(), core::mem::transmute(policy)) + DhcpV4GetPolicy(serveripaddress.param().abi(), fglobalpolicy.into(), core::mem::transmute(subnetaddress), policyname.param().abi(), core::mem::transmute(policy)) } #[inline] -pub unsafe fn DhcpV4GetPolicyEx(serveripaddress: P0, globalpolicy: P1, subnetaddress: u32, policyname: P3, policy: *mut *mut DHCP_POLICY_EX) -> u32 +pub unsafe fn DhcpV4GetPolicyEx(serveripaddress: P0, globalpolicy: bool, subnetaddress: u32, policyname: P3, policy: *mut *mut DHCP_POLICY_EX) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4GetPolicyEx(serveripaddress : windows_core::PCWSTR, globalpolicy : super::super::Foundation:: BOOL, subnetaddress : u32, policyname : windows_core::PCWSTR, policy : *mut *mut DHCP_POLICY_EX) -> u32); - DhcpV4GetPolicyEx(serveripaddress.param().abi(), globalpolicy.param().abi(), core::mem::transmute(subnetaddress), policyname.param().abi(), core::mem::transmute(policy)) + DhcpV4GetPolicyEx(serveripaddress.param().abi(), globalpolicy.into(), core::mem::transmute(subnetaddress), policyname.param().abi(), core::mem::transmute(policy)) } #[inline] -pub unsafe fn DhcpV4QueryPolicyEnforcement(serveripaddress: P0, fglobalpolicy: P1, subnetaddress: u32, enabled: *mut super::super::Foundation::BOOL) -> u32 +pub unsafe fn DhcpV4QueryPolicyEnforcement(serveripaddress: P0, fglobalpolicy: bool, subnetaddress: u32, enabled: *mut super::super::Foundation::BOOL) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4QueryPolicyEnforcement(serveripaddress : windows_core::PCWSTR, fglobalpolicy : super::super::Foundation:: BOOL, subnetaddress : u32, enabled : *mut super::super::Foundation:: BOOL) -> u32); - DhcpV4QueryPolicyEnforcement(serveripaddress.param().abi(), fglobalpolicy.param().abi(), core::mem::transmute(subnetaddress), core::mem::transmute(enabled)) + DhcpV4QueryPolicyEnforcement(serveripaddress.param().abi(), fglobalpolicy.into(), core::mem::transmute(subnetaddress), core::mem::transmute(enabled)) } #[inline] pub unsafe fn DhcpV4RemoveOptionValue(serveripaddress: P0, flags: u32, optionid: u32, policyname: P3, vendorname: P4, scopeinfo: *mut DHCP_OPTION_SCOPE_INFO) -> u32 @@ -1569,34 +1557,30 @@ where DhcpV4SetOptionValues(serveripaddress.param().abi(), core::mem::transmute(flags), policyname.param().abi(), vendorname.param().abi(), core::mem::transmute(scopeinfo), core::mem::transmute(optionvalues)) } #[inline] -pub unsafe fn DhcpV4SetPolicy(serveripaddress: P0, fieldsmodified: u32, fglobalpolicy: P2, subnetaddress: u32, policyname: P4, policy: *const DHCP_POLICY) -> u32 +pub unsafe fn DhcpV4SetPolicy(serveripaddress: P0, fieldsmodified: u32, fglobalpolicy: bool, subnetaddress: u32, policyname: P4, policy: *const DHCP_POLICY) -> u32 where P0: windows_core::Param, - P2: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4SetPolicy(serveripaddress : windows_core::PCWSTR, fieldsmodified : u32, fglobalpolicy : super::super::Foundation:: BOOL, subnetaddress : u32, policyname : windows_core::PCWSTR, policy : *const DHCP_POLICY) -> u32); - DhcpV4SetPolicy(serveripaddress.param().abi(), core::mem::transmute(fieldsmodified), fglobalpolicy.param().abi(), core::mem::transmute(subnetaddress), policyname.param().abi(), core::mem::transmute(policy)) + DhcpV4SetPolicy(serveripaddress.param().abi(), core::mem::transmute(fieldsmodified), fglobalpolicy.into(), core::mem::transmute(subnetaddress), policyname.param().abi(), core::mem::transmute(policy)) } #[inline] -pub unsafe fn DhcpV4SetPolicyEnforcement(serveripaddress: P0, fglobalpolicy: P1, subnetaddress: u32, enable: P3) -> u32 +pub unsafe fn DhcpV4SetPolicyEnforcement(serveripaddress: P0, fglobalpolicy: bool, subnetaddress: u32, enable: bool) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4SetPolicyEnforcement(serveripaddress : windows_core::PCWSTR, fglobalpolicy : super::super::Foundation:: BOOL, subnetaddress : u32, enable : super::super::Foundation:: BOOL) -> u32); - DhcpV4SetPolicyEnforcement(serveripaddress.param().abi(), fglobalpolicy.param().abi(), core::mem::transmute(subnetaddress), enable.param().abi()) + DhcpV4SetPolicyEnforcement(serveripaddress.param().abi(), fglobalpolicy.into(), core::mem::transmute(subnetaddress), enable.into()) } #[inline] -pub unsafe fn DhcpV4SetPolicyEx(serveripaddress: P0, fieldsmodified: u32, globalpolicy: P2, subnetaddress: u32, policyname: P4, policy: *const DHCP_POLICY_EX) -> u32 +pub unsafe fn DhcpV4SetPolicyEx(serveripaddress: P0, fieldsmodified: u32, globalpolicy: bool, subnetaddress: u32, policyname: P4, policy: *const DHCP_POLICY_EX) -> u32 where P0: windows_core::Param, - P2: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV4SetPolicyEx(serveripaddress : windows_core::PCWSTR, fieldsmodified : u32, globalpolicy : super::super::Foundation:: BOOL, subnetaddress : u32, policyname : windows_core::PCWSTR, policy : *const DHCP_POLICY_EX) -> u32); - DhcpV4SetPolicyEx(serveripaddress.param().abi(), core::mem::transmute(fieldsmodified), globalpolicy.param().abi(), core::mem::transmute(subnetaddress), policyname.param().abi(), core::mem::transmute(policy)) + DhcpV4SetPolicyEx(serveripaddress.param().abi(), core::mem::transmute(fieldsmodified), globalpolicy.into(), core::mem::transmute(subnetaddress), policyname.param().abi(), core::mem::transmute(policy)) } #[inline] pub unsafe fn DhcpV6CreateClientInfo(serveripaddress: P0, clientinfo: *const DHCP_CLIENT_INFO_V6) -> u32 @@ -1623,22 +1607,20 @@ where DhcpV6GetStatelessStatistics(serveripaddress.param().abi(), core::mem::transmute(statelessstats)) } #[inline] -pub unsafe fn DhcpV6GetStatelessStoreParams(serveripaddress: P0, fserverlevel: P1, subnetaddress: DHCP_IPV6_ADDRESS, params: *mut *mut DHCPV6_STATELESS_PARAMS) -> u32 +pub unsafe fn DhcpV6GetStatelessStoreParams(serveripaddress: P0, fserverlevel: bool, subnetaddress: DHCP_IPV6_ADDRESS, params: *mut *mut DHCPV6_STATELESS_PARAMS) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV6GetStatelessStoreParams(serveripaddress : windows_core::PCWSTR, fserverlevel : super::super::Foundation:: BOOL, subnetaddress : DHCP_IPV6_ADDRESS, params : *mut *mut DHCPV6_STATELESS_PARAMS) -> u32); - DhcpV6GetStatelessStoreParams(serveripaddress.param().abi(), fserverlevel.param().abi(), core::mem::transmute(subnetaddress), core::mem::transmute(params)) + DhcpV6GetStatelessStoreParams(serveripaddress.param().abi(), fserverlevel.into(), core::mem::transmute(subnetaddress), core::mem::transmute(params)) } #[inline] -pub unsafe fn DhcpV6SetStatelessStoreParams(serveripaddress: P0, fserverlevel: P1, subnetaddress: DHCP_IPV6_ADDRESS, fieldmodified: u32, params: *const DHCPV6_STATELESS_PARAMS) -> u32 +pub unsafe fn DhcpV6SetStatelessStoreParams(serveripaddress: P0, fserverlevel: bool, subnetaddress: DHCP_IPV6_ADDRESS, fieldmodified: u32, params: *const DHCPV6_STATELESS_PARAMS) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("dhcpsapi.dll" "system" fn DhcpV6SetStatelessStoreParams(serveripaddress : windows_core::PCWSTR, fserverlevel : super::super::Foundation:: BOOL, subnetaddress : DHCP_IPV6_ADDRESS, fieldmodified : u32, params : *const DHCPV6_STATELESS_PARAMS) -> u32); - DhcpV6SetStatelessStoreParams(serveripaddress.param().abi(), fserverlevel.param().abi(), core::mem::transmute(subnetaddress), core::mem::transmute(fieldmodified), core::mem::transmute(params)) + DhcpV6SetStatelessStoreParams(serveripaddress.param().abi(), fserverlevel.into(), core::mem::transmute(subnetaddress), core::mem::transmute(fieldmodified), core::mem::transmute(params)) } #[inline] pub unsafe fn Dhcpv6CApiCleanup() { @@ -1667,13 +1649,12 @@ where Dhcpv6RenewPrefix(adaptername.param().abi(), core::mem::transmute(pclassid), core::mem::transmute(prefixleaseinfo), core::mem::transmute(pdwtimetowait), core::mem::transmute(bvalidateprefix)) } #[inline] -pub unsafe fn Dhcpv6RequestParams(forcenewinform: P0, reserved: *mut core::ffi::c_void, adaptername: P2, classid: *mut DHCPV6CAPI_CLASSID, recdparams: DHCPV6CAPI_PARAMS_ARRAY, buffer: *mut u8, psize: *mut u32) -> u32 +pub unsafe fn Dhcpv6RequestParams(forcenewinform: bool, reserved: *mut core::ffi::c_void, adaptername: P2, classid: *mut DHCPV6CAPI_CLASSID, recdparams: DHCPV6CAPI_PARAMS_ARRAY, buffer: *mut u8, psize: *mut u32) -> u32 where - P0: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("dhcpcsvc6.dll" "system" fn Dhcpv6RequestParams(forcenewinform : super::super::Foundation:: BOOL, reserved : *mut core::ffi::c_void, adaptername : windows_core::PCWSTR, classid : *mut DHCPV6CAPI_CLASSID, recdparams : DHCPV6CAPI_PARAMS_ARRAY, buffer : *mut u8, psize : *mut u32) -> u32); - Dhcpv6RequestParams(forcenewinform.param().abi(), core::mem::transmute(reserved), adaptername.param().abi(), core::mem::transmute(classid), core::mem::transmute(recdparams), core::mem::transmute(buffer), core::mem::transmute(psize)) + Dhcpv6RequestParams(forcenewinform.into(), core::mem::transmute(reserved), adaptername.param().abi(), core::mem::transmute(classid), core::mem::transmute(recdparams), core::mem::transmute(buffer), core::mem::transmute(psize)) } #[inline] pub unsafe fn Dhcpv6RequestPrefix(adaptername: P0, pclassid: *mut DHCPV6CAPI_CLASSID, prefixleaseinfo: *mut DHCPV6PrefixLeaseInformation, pdwtimetowait: *mut u32) -> u32 diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dns/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dns/mod.rs index bc744e81ab..349edd5a2e 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dns/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dns/mod.rs @@ -367,22 +367,20 @@ where DnsValidateName_W(pszname.param().abi(), core::mem::transmute(format)) } #[inline] -pub unsafe fn DnsWriteQuestionToBuffer_UTF8(pdnsbuffer: *mut DNS_MESSAGE_BUFFER, pdwbuffersize: *mut u32, pszname: P2, wtype: u16, xid: u16, frecursiondesired: P5) -> super::super::Foundation::BOOL +pub unsafe fn DnsWriteQuestionToBuffer_UTF8(pdnsbuffer: *mut DNS_MESSAGE_BUFFER, pdwbuffersize: *mut u32, pszname: P2, wtype: u16, xid: u16, frecursiondesired: bool) -> super::super::Foundation::BOOL where P2: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("dnsapi.dll" "system" fn DnsWriteQuestionToBuffer_UTF8(pdnsbuffer : *mut DNS_MESSAGE_BUFFER, pdwbuffersize : *mut u32, pszname : windows_core::PCSTR, wtype : u16, xid : u16, frecursiondesired : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - DnsWriteQuestionToBuffer_UTF8(core::mem::transmute(pdnsbuffer), core::mem::transmute(pdwbuffersize), pszname.param().abi(), core::mem::transmute(wtype), core::mem::transmute(xid), frecursiondesired.param().abi()) + DnsWriteQuestionToBuffer_UTF8(core::mem::transmute(pdnsbuffer), core::mem::transmute(pdwbuffersize), pszname.param().abi(), core::mem::transmute(wtype), core::mem::transmute(xid), frecursiondesired.into()) } #[inline] -pub unsafe fn DnsWriteQuestionToBuffer_W(pdnsbuffer: *mut DNS_MESSAGE_BUFFER, pdwbuffersize: *mut u32, pszname: P2, wtype: u16, xid: u16, frecursiondesired: P5) -> super::super::Foundation::BOOL +pub unsafe fn DnsWriteQuestionToBuffer_W(pdnsbuffer: *mut DNS_MESSAGE_BUFFER, pdwbuffersize: *mut u32, pszname: P2, wtype: u16, xid: u16, frecursiondesired: bool) -> super::super::Foundation::BOOL where P2: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("dnsapi.dll" "system" fn DnsWriteQuestionToBuffer_W(pdnsbuffer : *mut DNS_MESSAGE_BUFFER, pdwbuffersize : *mut u32, pszname : windows_core::PCWSTR, wtype : u16, xid : u16, frecursiondesired : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - DnsWriteQuestionToBuffer_W(core::mem::transmute(pdnsbuffer), core::mem::transmute(pdwbuffersize), pszname.param().abi(), core::mem::transmute(wtype), core::mem::transmute(xid), frecursiondesired.param().abi()) + DnsWriteQuestionToBuffer_W(core::mem::transmute(pdnsbuffer), core::mem::transmute(pdwbuffersize), pszname.param().abi(), core::mem::transmute(wtype), core::mem::transmute(xid), frecursiondesired.into()) } pub const DDR_MAX_IP_HINTS: u32 = 4u32; pub const DNSREC_ADDITIONAL: u32 = 3u32; diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/IpHelper/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/IpHelper/mod.rs index 28520b2bb3..a7e484eead 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/IpHelper/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/IpHelper/mod.rs @@ -352,20 +352,14 @@ pub unsafe fn GetDnsSettings(settings: *mut DNS_SETTINGS) -> super::super::Found GetDnsSettings(core::mem::transmute(settings)) } #[inline] -pub unsafe fn GetExtendedTcpTable(ptcptable: Option<*mut core::ffi::c_void>, pdwsize: *mut u32, border: P2, ulaf: u32, tableclass: TCP_TABLE_CLASS, reserved: u32) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn GetExtendedTcpTable(ptcptable: Option<*mut core::ffi::c_void>, pdwsize: *mut u32, border: bool, ulaf: u32, tableclass: TCP_TABLE_CLASS, reserved: u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetExtendedTcpTable(ptcptable : *mut core::ffi::c_void, pdwsize : *mut u32, border : super::super::Foundation:: BOOL, ulaf : u32, tableclass : TCP_TABLE_CLASS, reserved : u32) -> u32); - GetExtendedTcpTable(core::mem::transmute(ptcptable.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize), border.param().abi(), core::mem::transmute(ulaf), core::mem::transmute(tableclass), core::mem::transmute(reserved)) + GetExtendedTcpTable(core::mem::transmute(ptcptable.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize), border.into(), core::mem::transmute(ulaf), core::mem::transmute(tableclass), core::mem::transmute(reserved)) } #[inline] -pub unsafe fn GetExtendedUdpTable(pudptable: Option<*mut core::ffi::c_void>, pdwsize: *mut u32, border: P2, ulaf: u32, tableclass: UDP_TABLE_CLASS, reserved: u32) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn GetExtendedUdpTable(pudptable: Option<*mut core::ffi::c_void>, pdwsize: *mut u32, border: bool, ulaf: u32, tableclass: UDP_TABLE_CLASS, reserved: u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetExtendedUdpTable(pudptable : *mut core::ffi::c_void, pdwsize : *mut u32, border : super::super::Foundation:: BOOL, ulaf : u32, tableclass : UDP_TABLE_CLASS, reserved : u32) -> u32); - GetExtendedUdpTable(core::mem::transmute(pudptable.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize), border.param().abi(), core::mem::transmute(ulaf), core::mem::transmute(tableclass), core::mem::transmute(reserved)) + GetExtendedUdpTable(core::mem::transmute(pudptable.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize), border.into(), core::mem::transmute(ulaf), core::mem::transmute(tableclass), core::mem::transmute(reserved)) } #[inline] pub unsafe fn GetFriendlyIfIndex(ifindex: u32) -> u32 { @@ -405,12 +399,9 @@ pub unsafe fn GetIfStackTable(table: *mut *mut MIB_IFSTACK_TABLE) -> super::supe GetIfStackTable(core::mem::transmute(table)) } #[inline] -pub unsafe fn GetIfTable(piftable: Option<*mut MIB_IFTABLE>, pdwsize: *mut u32, border: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn GetIfTable(piftable: Option<*mut MIB_IFTABLE>, pdwsize: *mut u32, border: bool) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetIfTable(piftable : *mut MIB_IFTABLE, pdwsize : *mut u32, border : super::super::Foundation:: BOOL) -> u32); - GetIfTable(core::mem::transmute(piftable.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize), border.param().abi()) + GetIfTable(core::mem::transmute(piftable.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize), border.into()) } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] @@ -464,12 +455,9 @@ pub unsafe fn GetInvertedIfStackTable(table: *mut *mut MIB_INVERTEDIFSTACK_TABLE GetInvertedIfStackTable(core::mem::transmute(table)) } #[inline] -pub unsafe fn GetIpAddrTable(pipaddrtable: Option<*mut MIB_IPADDRTABLE>, pdwsize: *mut u32, border: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn GetIpAddrTable(pipaddrtable: Option<*mut MIB_IPADDRTABLE>, pdwsize: *mut u32, border: bool) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetIpAddrTable(pipaddrtable : *mut MIB_IPADDRTABLE, pdwsize : *mut u32, border : super::super::Foundation:: BOOL) -> u32); - GetIpAddrTable(core::mem::transmute(pipaddrtable.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize), border.param().abi()) + GetIpAddrTable(core::mem::transmute(pipaddrtable.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize), border.into()) } #[inline] pub unsafe fn GetIpErrorString(errorcode: u32, buffer: Option, size: *mut u32) -> u32 { @@ -484,12 +472,9 @@ pub unsafe fn GetIpForwardEntry2(row: *mut MIB_IPFORWARD_ROW2) -> super::super:: } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] -pub unsafe fn GetIpForwardTable(pipforwardtable: Option<*mut MIB_IPFORWARDTABLE>, pdwsize: *mut u32, border: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn GetIpForwardTable(pipforwardtable: Option<*mut MIB_IPFORWARDTABLE>, pdwsize: *mut u32, border: bool) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetIpForwardTable(pipforwardtable : *mut MIB_IPFORWARDTABLE, pdwsize : *mut u32, border : super::super::Foundation:: BOOL) -> u32); - GetIpForwardTable(core::mem::transmute(pipforwardtable.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize), border.param().abi()) + GetIpForwardTable(core::mem::transmute(pipforwardtable.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsize), border.into()) } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] @@ -516,12 +501,9 @@ pub unsafe fn GetIpNetEntry2(row: *mut MIB_IPNET_ROW2) -> super::super::Foundati GetIpNetEntry2(core::mem::transmute(row)) } #[inline] -pub unsafe fn GetIpNetTable(ipnettable: Option<*mut MIB_IPNETTABLE>, sizepointer: *mut u32, order: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn GetIpNetTable(ipnettable: Option<*mut MIB_IPNETTABLE>, sizepointer: *mut u32, order: bool) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetIpNetTable(ipnettable : *mut MIB_IPNETTABLE, sizepointer : *mut u32, order : super::super::Foundation:: BOOL) -> u32); - GetIpNetTable(core::mem::transmute(ipnettable.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizepointer), order.param().abi()) + GetIpNetTable(core::mem::transmute(ipnettable.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizepointer), order.into()) } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] @@ -680,21 +662,15 @@ pub unsafe fn GetSessionCompartmentId(sessionid: u32) -> super::Ndis::NET_IF_COM } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] -pub unsafe fn GetTcp6Table(tcptable: *mut MIB_TCP6TABLE, sizepointer: *mut u32, order: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn GetTcp6Table(tcptable: *mut MIB_TCP6TABLE, sizepointer: *mut u32, order: bool) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetTcp6Table(tcptable : *mut MIB_TCP6TABLE, sizepointer : *mut u32, order : super::super::Foundation:: BOOL) -> u32); - GetTcp6Table(core::mem::transmute(tcptable), core::mem::transmute(sizepointer), order.param().abi()) + GetTcp6Table(core::mem::transmute(tcptable), core::mem::transmute(sizepointer), order.into()) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] -pub unsafe fn GetTcp6Table2(tcptable: *mut MIB_TCP6TABLE2, sizepointer: *mut u32, order: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn GetTcp6Table2(tcptable: *mut MIB_TCP6TABLE2, sizepointer: *mut u32, order: bool) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetTcp6Table2(tcptable : *mut MIB_TCP6TABLE2, sizepointer : *mut u32, order : super::super::Foundation:: BOOL) -> u32); - GetTcp6Table2(core::mem::transmute(tcptable), core::mem::transmute(sizepointer), order.param().abi()) + GetTcp6Table2(core::mem::transmute(tcptable), core::mem::transmute(sizepointer), order.into()) } #[inline] pub unsafe fn GetTcpStatistics(statistics: *mut MIB_TCPSTATS_LH) -> u32 { @@ -712,20 +688,14 @@ pub unsafe fn GetTcpStatisticsEx2(statistics: *mut MIB_TCPSTATS2, family: u32) - GetTcpStatisticsEx2(core::mem::transmute(statistics), core::mem::transmute(family)) } #[inline] -pub unsafe fn GetTcpTable(tcptable: Option<*mut MIB_TCPTABLE>, sizepointer: *mut u32, order: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn GetTcpTable(tcptable: Option<*mut MIB_TCPTABLE>, sizepointer: *mut u32, order: bool) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetTcpTable(tcptable : *mut MIB_TCPTABLE, sizepointer : *mut u32, order : super::super::Foundation:: BOOL) -> u32); - GetTcpTable(core::mem::transmute(tcptable.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizepointer), order.param().abi()) + GetTcpTable(core::mem::transmute(tcptable.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizepointer), order.into()) } #[inline] -pub unsafe fn GetTcpTable2(tcptable: Option<*mut MIB_TCPTABLE2>, sizepointer: *mut u32, order: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn GetTcpTable2(tcptable: Option<*mut MIB_TCPTABLE2>, sizepointer: *mut u32, order: bool) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetTcpTable2(tcptable : *mut MIB_TCPTABLE2, sizepointer : *mut u32, order : super::super::Foundation:: BOOL) -> u32); - GetTcpTable2(core::mem::transmute(tcptable.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizepointer), order.param().abi()) + GetTcpTable2(core::mem::transmute(tcptable.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizepointer), order.into()) } #[inline] pub unsafe fn GetTeredoPort(port: *mut u16) -> super::super::Foundation::WIN32_ERROR { @@ -734,12 +704,9 @@ pub unsafe fn GetTeredoPort(port: *mut u16) -> super::super::Foundation::WIN32_E } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] -pub unsafe fn GetUdp6Table(udp6table: Option<*mut MIB_UDP6TABLE>, sizepointer: *mut u32, order: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn GetUdp6Table(udp6table: Option<*mut MIB_UDP6TABLE>, sizepointer: *mut u32, order: bool) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetUdp6Table(udp6table : *mut MIB_UDP6TABLE, sizepointer : *mut u32, order : super::super::Foundation:: BOOL) -> u32); - GetUdp6Table(core::mem::transmute(udp6table.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizepointer), order.param().abi()) + GetUdp6Table(core::mem::transmute(udp6table.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizepointer), order.into()) } #[inline] pub unsafe fn GetUdpStatistics(stats: *mut MIB_UDPSTATS) -> u32 { @@ -757,12 +724,9 @@ pub unsafe fn GetUdpStatisticsEx2(statistics: *mut MIB_UDPSTATS2, family: u32) - GetUdpStatisticsEx2(core::mem::transmute(statistics), core::mem::transmute(family)) } #[inline] -pub unsafe fn GetUdpTable(udptable: Option<*mut MIB_UDPTABLE>, sizepointer: *mut u32, order: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn GetUdpTable(udptable: Option<*mut MIB_UDPTABLE>, sizepointer: *mut u32, order: bool) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetUdpTable(udptable : *mut MIB_UDPTABLE, sizepointer : *mut u32, order : super::super::Foundation:: BOOL) -> u32); - GetUdpTable(core::mem::transmute(udptable.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizepointer), order.param().abi()) + GetUdpTable(core::mem::transmute(udptable.unwrap_or(core::mem::zeroed())), core::mem::transmute(sizepointer), order.into()) } #[inline] pub unsafe fn GetUniDirectionalAdapterInfo(pipifinfo: Option<*mut IP_UNIDIRECTIONAL_ADAPTER_ADDRESS>, dwoutbuflen: *mut u32) -> u32 { @@ -908,12 +872,9 @@ pub unsafe fn LookupPersistentUdpPortReservation(startport: u16, numberofports: LookupPersistentUdpPortReservation(core::mem::transmute(startport), core::mem::transmute(numberofports), core::mem::transmute(token)) } #[inline] -pub unsafe fn NhpAllocateAndGetInterfaceInfoFromStack(pptable: *mut *mut IP_INTERFACE_NAME_INFO_W2KSP1, pdwcount: *mut u32, border: P2, hheap: super::super::Foundation::HANDLE, dwflags: u32) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn NhpAllocateAndGetInterfaceInfoFromStack(pptable: *mut *mut IP_INTERFACE_NAME_INFO_W2KSP1, pdwcount: *mut u32, border: bool, hheap: super::super::Foundation::HANDLE, dwflags: u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn NhpAllocateAndGetInterfaceInfoFromStack(pptable : *mut *mut IP_INTERFACE_NAME_INFO_W2KSP1, pdwcount : *mut u32, border : super::super::Foundation:: BOOL, hheap : super::super::Foundation:: HANDLE, dwflags : u32) -> u32); - NhpAllocateAndGetInterfaceInfoFromStack(core::mem::transmute(pptable), core::mem::transmute(pdwcount), border.param().abi(), core::mem::transmute(hheap), core::mem::transmute(dwflags)) + NhpAllocateAndGetInterfaceInfoFromStack(core::mem::transmute(pptable), core::mem::transmute(pdwcount), border.into(), core::mem::transmute(hheap), core::mem::transmute(dwflags)) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -928,21 +889,15 @@ pub unsafe fn NotifyIfTimestampConfigChange(callercontext: Option<*const core::f } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn NotifyIpInterfaceChange(family: super::super::Networking::WinSock::ADDRESS_FAMILY, callback: PIPINTERFACE_CHANGE_CALLBACK, callercontext: Option<*const core::ffi::c_void>, initialnotification: P3, notificationhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR -where - P3: windows_core::Param, -{ +pub unsafe fn NotifyIpInterfaceChange(family: super::super::Networking::WinSock::ADDRESS_FAMILY, callback: PIPINTERFACE_CHANGE_CALLBACK, callercontext: Option<*const core::ffi::c_void>, initialnotification: bool, notificationhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn NotifyIpInterfaceChange(family : super::super::Networking::WinSock:: ADDRESS_FAMILY, callback : PIPINTERFACE_CHANGE_CALLBACK, callercontext : *const core::ffi::c_void, initialnotification : super::super::Foundation:: BOOLEAN, notificationhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - NotifyIpInterfaceChange(core::mem::transmute(family), core::mem::transmute(callback), core::mem::transmute(callercontext.unwrap_or(core::mem::zeroed())), initialnotification.param().abi(), core::mem::transmute(notificationhandle)) + NotifyIpInterfaceChange(core::mem::transmute(family), core::mem::transmute(callback), core::mem::transmute(callercontext.unwrap_or(core::mem::zeroed())), initialnotification.into(), core::mem::transmute(notificationhandle)) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] -pub unsafe fn NotifyNetworkConnectivityHintChange(callback: PNETWORK_CONNECTIVITY_HINT_CHANGE_CALLBACK, callercontext: Option<*const core::ffi::c_void>, initialnotification: P2, notificationhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR -where - P2: windows_core::Param, -{ +pub unsafe fn NotifyNetworkConnectivityHintChange(callback: PNETWORK_CONNECTIVITY_HINT_CHANGE_CALLBACK, callercontext: Option<*const core::ffi::c_void>, initialnotification: bool, notificationhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn NotifyNetworkConnectivityHintChange(callback : PNETWORK_CONNECTIVITY_HINT_CHANGE_CALLBACK, callercontext : *const core::ffi::c_void, initialnotification : super::super::Foundation:: BOOLEAN, notificationhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - NotifyNetworkConnectivityHintChange(core::mem::transmute(callback), core::mem::transmute(callercontext.unwrap_or(core::mem::zeroed())), initialnotification.param().abi(), core::mem::transmute(notificationhandle)) + NotifyNetworkConnectivityHintChange(core::mem::transmute(callback), core::mem::transmute(callercontext.unwrap_or(core::mem::zeroed())), initialnotification.into(), core::mem::transmute(notificationhandle)) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -952,12 +907,9 @@ pub unsafe fn NotifyRouteChange(handle: *mut super::super::Foundation::HANDLE, o } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn NotifyRouteChange2(addressfamily: super::super::Networking::WinSock::ADDRESS_FAMILY, callback: PIPFORWARD_CHANGE_CALLBACK, callercontext: *const core::ffi::c_void, initialnotification: P3, notificationhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR -where - P3: windows_core::Param, -{ +pub unsafe fn NotifyRouteChange2(addressfamily: super::super::Networking::WinSock::ADDRESS_FAMILY, callback: PIPFORWARD_CHANGE_CALLBACK, callercontext: *const core::ffi::c_void, initialnotification: bool, notificationhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn NotifyRouteChange2(addressfamily : super::super::Networking::WinSock:: ADDRESS_FAMILY, callback : PIPFORWARD_CHANGE_CALLBACK, callercontext : *const core::ffi::c_void, initialnotification : super::super::Foundation:: BOOLEAN, notificationhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - NotifyRouteChange2(core::mem::transmute(addressfamily), core::mem::transmute(callback), core::mem::transmute(callercontext), initialnotification.param().abi(), core::mem::transmute(notificationhandle)) + NotifyRouteChange2(core::mem::transmute(addressfamily), core::mem::transmute(callback), core::mem::transmute(callercontext), initialnotification.into(), core::mem::transmute(notificationhandle)) } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] @@ -966,21 +918,15 @@ pub unsafe fn NotifyStableUnicastIpAddressTable(family: super::super::Networking NotifyStableUnicastIpAddressTable(core::mem::transmute(family), core::mem::transmute(table), core::mem::transmute(callercallback), core::mem::transmute(callercontext), core::mem::transmute(notificationhandle)) } #[inline] -pub unsafe fn NotifyTeredoPortChange(callback: PTEREDO_PORT_CHANGE_CALLBACK, callercontext: *const core::ffi::c_void, initialnotification: P2, notificationhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR -where - P2: windows_core::Param, -{ +pub unsafe fn NotifyTeredoPortChange(callback: PTEREDO_PORT_CHANGE_CALLBACK, callercontext: *const core::ffi::c_void, initialnotification: bool, notificationhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn NotifyTeredoPortChange(callback : PTEREDO_PORT_CHANGE_CALLBACK, callercontext : *const core::ffi::c_void, initialnotification : super::super::Foundation:: BOOLEAN, notificationhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - NotifyTeredoPortChange(core::mem::transmute(callback), core::mem::transmute(callercontext), initialnotification.param().abi(), core::mem::transmute(notificationhandle)) + NotifyTeredoPortChange(core::mem::transmute(callback), core::mem::transmute(callercontext), initialnotification.into(), core::mem::transmute(notificationhandle)) } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn NotifyUnicastIpAddressChange(family: super::super::Networking::WinSock::ADDRESS_FAMILY, callback: PUNICAST_IPADDRESS_CHANGE_CALLBACK, callercontext: Option<*const core::ffi::c_void>, initialnotification: P3, notificationhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR -where - P3: windows_core::Param, -{ +pub unsafe fn NotifyUnicastIpAddressChange(family: super::super::Networking::WinSock::ADDRESS_FAMILY, callback: PUNICAST_IPADDRESS_CHANGE_CALLBACK, callercontext: Option<*const core::ffi::c_void>, initialnotification: bool, notificationhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("iphlpapi.dll" "system" fn NotifyUnicastIpAddressChange(family : super::super::Networking::WinSock:: ADDRESS_FAMILY, callback : PUNICAST_IPADDRESS_CHANGE_CALLBACK, callercontext : *const core::ffi::c_void, initialnotification : super::super::Foundation:: BOOLEAN, notificationhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - NotifyUnicastIpAddressChange(core::mem::transmute(family), core::mem::transmute(callback), core::mem::transmute(callercontext.unwrap_or(core::mem::zeroed())), initialnotification.param().abi(), core::mem::transmute(notificationhandle)) + NotifyUnicastIpAddressChange(core::mem::transmute(family), core::mem::transmute(callback), core::mem::transmute(callercontext.unwrap_or(core::mem::zeroed())), initialnotification.into(), core::mem::transmute(notificationhandle)) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -1012,13 +958,9 @@ pub unsafe fn PfBindInterfaceToIndex(pinterface: *mut core::ffi::c_void, dwindex PfBindInterfaceToIndex(core::mem::transmute(pinterface), core::mem::transmute(dwindex), core::mem::transmute(pfatlinktype), core::mem::transmute(linkipaddress)) } #[inline] -pub unsafe fn PfCreateInterface(dwname: u32, inaction: PFFORWARD_ACTION, outaction: PFFORWARD_ACTION, buselog: P3, bmustbeunique: P4, ppinterface: *mut *mut core::ffi::c_void) -> u32 -where - P3: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn PfCreateInterface(dwname: u32, inaction: PFFORWARD_ACTION, outaction: PFFORWARD_ACTION, buselog: bool, bmustbeunique: bool, ppinterface: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn PfCreateInterface(dwname : u32, inaction : PFFORWARD_ACTION, outaction : PFFORWARD_ACTION, buselog : super::super::Foundation:: BOOL, bmustbeunique : super::super::Foundation:: BOOL, ppinterface : *mut *mut core::ffi::c_void) -> u32); - PfCreateInterface(core::mem::transmute(dwname), core::mem::transmute(inaction), core::mem::transmute(outaction), buselog.param().abi(), bmustbeunique.param().abi(), core::mem::transmute(ppinterface)) + PfCreateInterface(core::mem::transmute(dwname), core::mem::transmute(inaction), core::mem::transmute(outaction), buselog.into(), bmustbeunique.into(), core::mem::transmute(ppinterface)) } #[inline] pub unsafe fn PfDeleteInterface(pinterface: *mut core::ffi::c_void) -> u32 { @@ -1031,12 +973,9 @@ pub unsafe fn PfDeleteLog() -> u32 { PfDeleteLog() } #[inline] -pub unsafe fn PfGetInterfaceStatistics(pinterface: *mut core::ffi::c_void, ppfstats: *mut PF_INTERFACE_STATS, pdwbuffersize: *mut u32, fresetcounters: P3) -> u32 -where - P3: windows_core::Param, -{ +pub unsafe fn PfGetInterfaceStatistics(pinterface: *mut core::ffi::c_void, ppfstats: *mut PF_INTERFACE_STATS, pdwbuffersize: *mut u32, fresetcounters: bool) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn PfGetInterfaceStatistics(pinterface : *mut core::ffi::c_void, ppfstats : *mut PF_INTERFACE_STATS, pdwbuffersize : *mut u32, fresetcounters : super::super::Foundation:: BOOL) -> u32); - PfGetInterfaceStatistics(core::mem::transmute(pinterface), core::mem::transmute(ppfstats), core::mem::transmute(pdwbuffersize), fresetcounters.param().abi()) + PfGetInterfaceStatistics(core::mem::transmute(pinterface), core::mem::transmute(ppfstats), core::mem::transmute(pdwbuffersize), fresetcounters.into()) } #[inline] pub unsafe fn PfMakeLog(hevent: super::super::Foundation::HANDLE) -> u32 { @@ -1529,9 +1468,6 @@ pub struct GLOBAL_FILTER(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HIFTIMESTAMPCHANGE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HIFTIMESTAMPCHANGE { - type TypeKind = windows_core::CopyType; -} impl HIFTIMESTAMPCHANGE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Multicast/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Multicast/mod.rs index 7ba71af328..1898259ac9 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Multicast/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Multicast/mod.rs @@ -9,12 +9,9 @@ pub unsafe fn McastApiStartup(version: *mut u32) -> u32 { McastApiStartup(core::mem::transmute(version)) } #[inline] -pub unsafe fn McastEnumerateScopes(addrfamily: u16, requery: P1, pscopelist: *mut MCAST_SCOPE_ENTRY, pscopelen: *mut u32, pscopecount: *mut u32) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn McastEnumerateScopes(addrfamily: u16, requery: bool, pscopelist: *mut MCAST_SCOPE_ENTRY, pscopelen: *mut u32, pscopecount: *mut u32) -> u32 { windows_targets::link!("dhcpcsvc.dll" "system" fn McastEnumerateScopes(addrfamily : u16, requery : super::super::Foundation:: BOOL, pscopelist : *mut MCAST_SCOPE_ENTRY, pscopelen : *mut u32, pscopecount : *mut u32) -> u32); - McastEnumerateScopes(core::mem::transmute(addrfamily), requery.param().abi(), core::mem::transmute(pscopelist), core::mem::transmute(pscopelen), core::mem::transmute(pscopecount)) + McastEnumerateScopes(core::mem::transmute(addrfamily), requery.into(), core::mem::transmute(pscopelist), core::mem::transmute(pscopelen), core::mem::transmute(pscopecount)) } #[inline] pub unsafe fn McastGenUID(prequestid: *mut MCAST_CLIENT_UID) -> u32 { diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Ndis/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Ndis/mod.rs index 156c889f7e..d604951d6f 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Ndis/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Ndis/mod.rs @@ -2789,9 +2789,6 @@ impl Default for NET_IF_ALIAS_LH { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct NET_IF_COMPARTMENT_ID(pub u32); -impl windows_core::TypeKind for NET_IF_COMPARTMENT_ID { - type TypeKind = windows_core::CopyType; -} pub const NET_IF_COMPARTMENT_ID_PRIMARY: u32 = 1u32; pub const NET_IF_COMPARTMENT_ID_UNSPECIFIED: u32 = 0u32; pub const NET_IF_CONNECTION_DEDICATED: NET_IF_CONNECTION_TYPE = NET_IF_CONNECTION_TYPE(1i32); diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetManagement/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetManagement/mod.rs index 6a430a0f34..8b92aefa12 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetManagement/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetManagement/mod.rs @@ -1309,22 +1309,20 @@ pub unsafe fn TraceDeregisterW(dwtraceid: u32) -> u32 { TraceDeregisterW(core::mem::transmute(dwtraceid)) } #[inline] -pub unsafe fn TraceDumpExA(dwtraceid: u32, dwflags: u32, lpbbytes: *mut u8, dwbytecount: u32, dwgroupsize: u32, baddressprefix: P5, lpszprefix: P6) -> u32 +pub unsafe fn TraceDumpExA(dwtraceid: u32, dwflags: u32, lpbbytes: *mut u8, dwbytecount: u32, dwgroupsize: u32, baddressprefix: bool, lpszprefix: P6) -> u32 where - P5: windows_core::Param, P6: windows_core::Param, { windows_targets::link!("rtutils.dll" "system" fn TraceDumpExA(dwtraceid : u32, dwflags : u32, lpbbytes : *mut u8, dwbytecount : u32, dwgroupsize : u32, baddressprefix : super::super::Foundation:: BOOL, lpszprefix : windows_core::PCSTR) -> u32); - TraceDumpExA(core::mem::transmute(dwtraceid), core::mem::transmute(dwflags), core::mem::transmute(lpbbytes), core::mem::transmute(dwbytecount), core::mem::transmute(dwgroupsize), baddressprefix.param().abi(), lpszprefix.param().abi()) + TraceDumpExA(core::mem::transmute(dwtraceid), core::mem::transmute(dwflags), core::mem::transmute(lpbbytes), core::mem::transmute(dwbytecount), core::mem::transmute(dwgroupsize), baddressprefix.into(), lpszprefix.param().abi()) } #[inline] -pub unsafe fn TraceDumpExW(dwtraceid: u32, dwflags: u32, lpbbytes: *mut u8, dwbytecount: u32, dwgroupsize: u32, baddressprefix: P5, lpszprefix: P6) -> u32 +pub unsafe fn TraceDumpExW(dwtraceid: u32, dwflags: u32, lpbbytes: *mut u8, dwbytecount: u32, dwgroupsize: u32, baddressprefix: bool, lpszprefix: P6) -> u32 where - P5: windows_core::Param, P6: windows_core::Param, { windows_targets::link!("rtutils.dll" "system" fn TraceDumpExW(dwtraceid : u32, dwflags : u32, lpbbytes : *mut u8, dwbytecount : u32, dwgroupsize : u32, baddressprefix : super::super::Foundation:: BOOL, lpszprefix : windows_core::PCWSTR) -> u32); - TraceDumpExW(core::mem::transmute(dwtraceid), core::mem::transmute(dwflags), core::mem::transmute(lpbbytes), core::mem::transmute(dwbytecount), core::mem::transmute(dwgroupsize), baddressprefix.param().abi(), lpszprefix.param().abi()) + TraceDumpExW(core::mem::transmute(dwtraceid), core::mem::transmute(dwflags), core::mem::transmute(lpbbytes), core::mem::transmute(dwbytecount), core::mem::transmute(dwgroupsize), baddressprefix.into(), lpszprefix.param().abi()) } #[inline] pub unsafe fn TraceGetConsoleA(dwtraceid: u32, lphconsole: *mut super::super::Foundation::HANDLE) -> u32 { @@ -3064,11 +3062,8 @@ impl INetCfgBindingPath { pub unsafe fn IsEnabled(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).IsEnabled)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn Enable(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn Enable(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), fenable.into()).ok() } pub unsafe fn GetPathToken(&self, ppszwpathtoken: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetPathToken)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwpathtoken.unwrap_or(core::mem::zeroed()))).ok() @@ -3598,13 +3593,12 @@ impl windows_core::RuntimeName for INetCfgComponentBindings {} windows_core::imp::define_interface!(INetCfgComponentControl, INetCfgComponentControl_Vtbl, 0x932238df_bea1_11d0_9298_00c04fc99dcf); windows_core::imp::interface_hierarchy!(INetCfgComponentControl, windows_core::IUnknown); impl INetCfgComponentControl { - pub unsafe fn Initialize(&self, picomp: P0, pinetcfg: P1, finstalling: P2) -> windows_core::Result<()> + pub unsafe fn Initialize(&self, picomp: P0, pinetcfg: P1, finstalling: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), picomp.param().abi(), pinetcfg.param().abi(), finstalling.param().abi()).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), picomp.param().abi(), pinetcfg.param().abi(), finstalling.into()).ok() } pub unsafe fn ApplyRegistryChanges(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ApplyRegistryChanges)(windows_core::Interface::as_raw(self)).ok() @@ -4153,13 +4147,12 @@ impl INetCfgSysPrep { { (windows_core::Interface::vtable(self).HrSetupSetFirstString)(windows_core::Interface::as_raw(self), pwszsection.param().abi(), pwszkey.param().abi(), pwszvalue.param().abi()).ok() } - pub unsafe fn HrSetupSetFirstStringAsBool(&self, pwszsection: P0, pwszkey: P1, fvalue: P2) -> windows_core::Result<()> + pub unsafe fn HrSetupSetFirstStringAsBool(&self, pwszsection: P0, pwszkey: P1, fvalue: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).HrSetupSetFirstStringAsBool)(windows_core::Interface::as_raw(self), pwszsection.param().abi(), pwszkey.param().abi(), fvalue.param().abi()).ok() + (windows_core::Interface::vtable(self).HrSetupSetFirstStringAsBool)(windows_core::Interface::as_raw(self), pwszsection.param().abi(), pwszkey.param().abi(), fvalue.into()).ok() } pub unsafe fn HrSetupSetFirstMultiSzField(&self, pwszsection: P0, pwszkey: P1, pmszvalue: P2) -> windows_core::Result<()> where diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkDiagnosticsFramework/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkDiagnosticsFramework/mod.rs index a6c61a5578..6e8ac7982d 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkDiagnosticsFramework/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkDiagnosticsFramework/mod.rs @@ -48,15 +48,14 @@ pub unsafe fn NdfCreateNetConnectionIncident(handle: *mut *mut core::ffi::c_void NdfCreateNetConnectionIncident(core::mem::transmute(handle), core::mem::transmute(id)).ok() } #[inline] -pub unsafe fn NdfCreatePnrpIncident(cloudname: P0, peername: P1, diagnosepublish: P2, appid: P3, handle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn NdfCreatePnrpIncident(cloudname: P0, peername: P1, diagnosepublish: bool, appid: P3, handle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("ndfapi.dll" "system" fn NdfCreatePnrpIncident(cloudname : windows_core::PCWSTR, peername : windows_core::PCWSTR, diagnosepublish : super::super::Foundation:: BOOL, appid : windows_core::PCWSTR, handle : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - NdfCreatePnrpIncident(cloudname.param().abi(), peername.param().abi(), diagnosepublish.param().abi(), appid.param().abi(), core::mem::transmute(handle)).ok() + NdfCreatePnrpIncident(cloudname.param().abi(), peername.param().abi(), diagnosepublish.into(), appid.param().abi(), core::mem::transmute(handle)).ok() } #[inline] pub unsafe fn NdfCreateSharingIncident(uncpath: P0, handle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -75,14 +74,13 @@ where NdfCreateWebIncident(url.param().abi(), core::mem::transmute(handle)).ok() } #[inline] -pub unsafe fn NdfCreateWebIncidentEx(url: P0, usewinhttp: P1, modulename: P2, handle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn NdfCreateWebIncidentEx(url: P0, usewinhttp: bool, modulename: P2, handle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("ndfapi.dll" "system" fn NdfCreateWebIncidentEx(url : windows_core::PCWSTR, usewinhttp : super::super::Foundation:: BOOL, modulename : windows_core::PCWSTR, handle : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - NdfCreateWebIncidentEx(url.param().abi(), usewinhttp.param().abi(), modulename.param().abi(), core::mem::transmute(handle)).ok() + NdfCreateWebIncidentEx(url.param().abi(), usewinhttp.into(), modulename.param().abi(), core::mem::transmute(handle)).ok() } #[cfg(all(feature = "Win32_Networking_WinSock", feature = "Win32_Security"))] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/P2P/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/P2P/mod.rs index 597b5914cf..d052fe348c 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/P2P/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/P2P/mod.rs @@ -43,16 +43,15 @@ pub unsafe fn DrtCreateNullSecurityProvider() -> windows_core::Result<*mut DRT_S DrtCreateNullSecurityProvider(&mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn DrtCreatePnrpBootstrapResolver(fpublish: P0, pwzpeername: P1, pwzcloudname: P2, pwzpublishingidentity: P3) -> windows_core::Result<*mut DRT_BOOTSTRAP_PROVIDER> +pub unsafe fn DrtCreatePnrpBootstrapResolver(fpublish: bool, pwzpeername: P1, pwzcloudname: P2, pwzpublishingidentity: P3) -> windows_core::Result<*mut DRT_BOOTSTRAP_PROVIDER> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("drtprov.dll" "system" fn DrtCreatePnrpBootstrapResolver(fpublish : super::super::Foundation:: BOOL, pwzpeername : windows_core::PCWSTR, pwzcloudname : windows_core::PCWSTR, pwzpublishingidentity : windows_core::PCWSTR, ppresolver : *mut *mut DRT_BOOTSTRAP_PROVIDER) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DrtCreatePnrpBootstrapResolver(fpublish.param().abi(), pwzpeername.param().abi(), pwzcloudname.param().abi(), pwzpublishingidentity.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + DrtCreatePnrpBootstrapResolver(fpublish.into(), pwzpeername.param().abi(), pwzcloudname.param().abi(), pwzpublishingidentity.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn DrtDeleteDerivedKeySecurityProvider(psecurityprovider: *const DRT_SECURITY_PROVIDER) { @@ -479,12 +478,9 @@ pub unsafe fn PeerDistClientStreamRead(hpeerdist: isize, hcontenthandle: isize, } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn PeerDistGetOverlappedResult(lpoverlapped: *const super::super::System::IO::OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: P2) -> super::super::Foundation::BOOL -where - P2: windows_core::Param, -{ +pub unsafe fn PeerDistGetOverlappedResult(lpoverlapped: *const super::super::System::IO::OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: bool) -> super::super::Foundation::BOOL { windows_targets::link!("peerdist.dll" "system" fn PeerDistGetOverlappedResult(lpoverlapped : *const super::super::System::IO:: OVERLAPPED, lpnumberofbytestransferred : *mut u32, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - PeerDistGetOverlappedResult(core::mem::transmute(lpoverlapped), core::mem::transmute(lpnumberofbytestransferred), bwait.param().abi()) + PeerDistGetOverlappedResult(core::mem::transmute(lpoverlapped), core::mem::transmute(lpnumberofbytestransferred), bwait.into()) } #[inline] pub unsafe fn PeerDistGetStatus(hpeerdist: isize, ppeerdiststatus: *mut PEERDIST_STATUS) -> u32 { @@ -656,12 +652,9 @@ where PeerGraphDelete(pwzgraphid.param().abi(), pwzpeerid.param().abi(), pwzdatabasename.param().abi()).ok() } #[inline] -pub unsafe fn PeerGraphDeleteRecord(hgraph: *const core::ffi::c_void, precordid: *const windows_core::GUID, flocal: P2) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn PeerGraphDeleteRecord(hgraph: *const core::ffi::c_void, precordid: *const windows_core::GUID, flocal: bool) -> windows_core::Result<()> { windows_targets::link!("p2pgraph.dll" "system" fn PeerGraphDeleteRecord(hgraph : *const core::ffi::c_void, precordid : *const windows_core::GUID, flocal : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - PeerGraphDeleteRecord(core::mem::transmute(hgraph), core::mem::transmute(precordid), flocal.param().abi()).ok() + PeerGraphDeleteRecord(core::mem::transmute(hgraph), core::mem::transmute(precordid), flocal.into()).ok() } #[inline] pub unsafe fn PeerGraphEndEnumeration(hpeerenum: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -810,12 +803,9 @@ where PeerGraphSetNodeAttributes(core::mem::transmute(hgraph), pwzattributes.param().abi()).ok() } #[inline] -pub unsafe fn PeerGraphSetPresence(hgraph: *const core::ffi::c_void, fpresent: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn PeerGraphSetPresence(hgraph: *const core::ffi::c_void, fpresent: bool) -> windows_core::Result<()> { windows_targets::link!("p2pgraph.dll" "system" fn PeerGraphSetPresence(hgraph : *const core::ffi::c_void, fpresent : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - PeerGraphSetPresence(core::mem::transmute(hgraph), fpresent.param().abi()).ok() + PeerGraphSetPresence(core::mem::transmute(hgraph), fpresent.into()).ok() } #[inline] pub unsafe fn PeerGraphSetProperties(hgraph: *const core::ffi::c_void, pgraphproperties: *const PEER_GRAPH_PROPERTIES) -> windows_core::Result<()> { @@ -975,14 +965,13 @@ pub unsafe fn PeerGroupGetStatus(hgroup: *const core::ffi::c_void) -> windows_co PeerGroupGetStatus(core::mem::transmute(hgroup), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn PeerGroupImportConfig(pwzxml: P0, pwzpassword: P1, foverwrite: P2, ppwzidentity: *mut windows_core::PWSTR, ppwzgroup: *mut windows_core::PWSTR) -> windows_core::Result<()> +pub unsafe fn PeerGroupImportConfig(pwzxml: P0, pwzpassword: P1, foverwrite: bool, ppwzidentity: *mut windows_core::PWSTR, ppwzgroup: *mut windows_core::PWSTR) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("p2p.dll" "system" fn PeerGroupImportConfig(pwzxml : windows_core::PCWSTR, pwzpassword : windows_core::PCWSTR, foverwrite : super::super::Foundation:: BOOL, ppwzidentity : *mut windows_core::PWSTR, ppwzgroup : *mut windows_core::PWSTR) -> windows_core::HRESULT); - PeerGroupImportConfig(pwzxml.param().abi(), pwzpassword.param().abi(), foverwrite.param().abi(), core::mem::transmute(ppwzidentity), core::mem::transmute(ppwzgroup)).ok() + PeerGroupImportConfig(pwzxml.param().abi(), pwzpassword.param().abi(), foverwrite.into(), core::mem::transmute(ppwzidentity), core::mem::transmute(ppwzgroup)).ok() } #[inline] pub unsafe fn PeerGroupImportDatabase(hgroup: *const core::ffi::c_void, pwzfilepath: P1) -> windows_core::Result<()> diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/QoS/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/QoS/mod.rs index ac3b36d8f5..fef417f16e 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/QoS/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/QoS/mod.rs @@ -153,12 +153,9 @@ where TcQueryFlowW(pflowname.param().abi(), core::mem::transmute(pguidparam), core::mem::transmute(pbuffersize), core::mem::transmute(buffer)) } #[inline] -pub unsafe fn TcQueryInterface(ifchandle: super::super::Foundation::HANDLE, pguidparam: *const windows_core::GUID, notifychange: P2, pbuffersize: *mut u32, buffer: *mut core::ffi::c_void) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn TcQueryInterface(ifchandle: super::super::Foundation::HANDLE, pguidparam: *const windows_core::GUID, notifychange: bool, pbuffersize: *mut u32, buffer: *mut core::ffi::c_void) -> u32 { windows_targets::link!("traffic.dll" "system" fn TcQueryInterface(ifchandle : super::super::Foundation:: HANDLE, pguidparam : *const windows_core::GUID, notifychange : super::super::Foundation:: BOOLEAN, pbuffersize : *mut u32, buffer : *mut core::ffi::c_void) -> u32); - TcQueryInterface(core::mem::transmute(ifchandle), core::mem::transmute(pguidparam), notifychange.param().abi(), core::mem::transmute(pbuffersize), core::mem::transmute(buffer)) + TcQueryInterface(core::mem::transmute(ifchandle), core::mem::transmute(pguidparam), notifychange.into(), core::mem::transmute(pbuffersize), core::mem::transmute(buffer)) } #[inline] pub unsafe fn TcRegisterClient(tciversion: u32, clregctx: super::super::Foundation::HANDLE, clienthandlerlist: *const TCI_CLIENT_FUNC_LIST, pclienthandle: *mut super::super::Foundation::HANDLE) -> u32 { @@ -912,9 +909,6 @@ pub const LPM_API_VERSION_1: u32 = 1u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct LPM_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for LPM_HANDLE { - type TypeKind = windows_core::CopyType; -} impl LPM_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1370,9 +1364,6 @@ impl Default for RESV_STYLE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct RHANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for RHANDLE { - type TypeKind = windows_core::CopyType; -} impl RHANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Rras/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Rras/mod.rs index d96d0bc4af..dd559fc8a7 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Rras/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Rras/mod.rs @@ -113,12 +113,9 @@ pub unsafe fn MprAdminConnectionGetInfoEx(hrasserver: isize, hrasconnection: sup MprAdminConnectionGetInfoEx(core::mem::transmute(hrasserver), core::mem::transmute(hrasconnection), core::mem::transmute(prasconnection)) } #[inline] -pub unsafe fn MprAdminConnectionRemoveQuarantine(hrasserver: super::super::Foundation::HANDLE, hrasconnection: super::super::Foundation::HANDLE, fisipaddress: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn MprAdminConnectionRemoveQuarantine(hrasserver: super::super::Foundation::HANDLE, hrasconnection: super::super::Foundation::HANDLE, fisipaddress: bool) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminConnectionRemoveQuarantine(hrasserver : super::super::Foundation:: HANDLE, hrasconnection : super::super::Foundation:: HANDLE, fisipaddress : super::super::Foundation:: BOOL) -> u32); - MprAdminConnectionRemoveQuarantine(core::mem::transmute(hrasserver), core::mem::transmute(hrasconnection), fisipaddress.param().abi()) + MprAdminConnectionRemoveQuarantine(core::mem::transmute(hrasserver), core::mem::transmute(hrasconnection), fisipaddress.into()) } #[inline] pub unsafe fn MprAdminDeregisterConnectionNotification(hmprserver: isize, heventnotification: super::super::Foundation::HANDLE) -> u32 { @@ -131,14 +128,13 @@ pub unsafe fn MprAdminDeviceEnum(hmprserver: isize, dwlevel: u32, lplpbbuffer: * MprAdminDeviceEnum(core::mem::transmute(hmprserver), core::mem::transmute(dwlevel), core::mem::transmute(lplpbbuffer), core::mem::transmute(lpdwtotalentries)) } #[inline] -pub unsafe fn MprAdminEstablishDomainRasServer(pszdomain: P0, pszmachine: P1, benable: P2) -> u32 +pub unsafe fn MprAdminEstablishDomainRasServer(pszdomain: P0, pszmachine: P1, benable: bool) -> u32 where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprAdminEstablishDomainRasServer(pszdomain : windows_core::PCWSTR, pszmachine : windows_core::PCWSTR, benable : super::super::Foundation:: BOOL) -> u32); - MprAdminEstablishDomainRasServer(pszdomain.param().abi(), pszmachine.param().abi(), benable.param().abi()) + MprAdminEstablishDomainRasServer(pszdomain.param().abi(), pszmachine.param().abi(), benable.into()) } #[inline] pub unsafe fn MprAdminGetErrorString(dwerror: u32, lplpwserrorstring: *mut windows_core::PWSTR) -> u32 { @@ -155,12 +151,9 @@ where MprAdminGetPDCServer(lpszdomain.param().abi(), lpszserver.param().abi(), core::mem::transmute(lpszpdcserver)) } #[inline] -pub unsafe fn MprAdminInterfaceConnect(hmprserver: isize, hinterface: super::super::Foundation::HANDLE, hevent: super::super::Foundation::HANDLE, fsynchronous: P3) -> u32 -where - P3: windows_core::Param, -{ +pub unsafe fn MprAdminInterfaceConnect(hmprserver: isize, hinterface: super::super::Foundation::HANDLE, hevent: super::super::Foundation::HANDLE, fsynchronous: bool) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceConnect(hmprserver : isize, hinterface : super::super::Foundation:: HANDLE, hevent : super::super::Foundation:: HANDLE, fsynchronous : super::super::Foundation:: BOOL) -> u32); - MprAdminInterfaceConnect(core::mem::transmute(hmprserver), core::mem::transmute(hinterface), core::mem::transmute(hevent), fsynchronous.param().abi()) + MprAdminInterfaceConnect(core::mem::transmute(hmprserver), core::mem::transmute(hinterface), core::mem::transmute(hevent), fsynchronous.into()) } #[inline] pub unsafe fn MprAdminInterfaceCreate(hmprserver: isize, dwlevel: u32, lpbbuffer: *const u8, phinterface: *mut super::super::Foundation::HANDLE) -> u32 { @@ -213,13 +206,12 @@ pub unsafe fn MprAdminInterfaceGetCustomInfoEx(hmprserver: isize, hinterface: su MprAdminInterfaceGetCustomInfoEx(core::mem::transmute(hmprserver), core::mem::transmute(hinterface), core::mem::transmute(pcustominfo)) } #[inline] -pub unsafe fn MprAdminInterfaceGetHandle(hmprserver: isize, lpwsinterfacename: P1, phinterface: *mut super::super::Foundation::HANDLE, fincludeclientinterfaces: P3) -> u32 +pub unsafe fn MprAdminInterfaceGetHandle(hmprserver: isize, lpwsinterfacename: P1, phinterface: *mut super::super::Foundation::HANDLE, fincludeclientinterfaces: bool) -> u32 where P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceGetHandle(hmprserver : isize, lpwsinterfacename : windows_core::PCWSTR, phinterface : *mut super::super::Foundation:: HANDLE, fincludeclientinterfaces : super::super::Foundation:: BOOL) -> u32); - MprAdminInterfaceGetHandle(core::mem::transmute(hmprserver), lpwsinterfacename.param().abi(), core::mem::transmute(phinterface), fincludeclientinterfaces.param().abi()) + MprAdminInterfaceGetHandle(core::mem::transmute(hmprserver), lpwsinterfacename.param().abi(), core::mem::transmute(phinterface), fincludeclientinterfaces.into()) } #[inline] pub unsafe fn MprAdminInterfaceGetInfo(hmprserver: isize, hinterface: super::super::Foundation::HANDLE, dwlevel: u32, lplpbbuffer: *const *const u8) -> u32 { @@ -1246,20 +1238,14 @@ where RasSetAutodialAddressW(param0.param().abi(), core::mem::transmute(param1), core::mem::transmute(param2.unwrap_or(core::mem::zeroed())), core::mem::transmute(param3), core::mem::transmute(param4)) } #[inline] -pub unsafe fn RasSetAutodialEnableA(param0: u32, param1: P1) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn RasSetAutodialEnableA(param0: u32, param1: bool) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasSetAutodialEnableA(param0 : u32, param1 : super::super::Foundation:: BOOL) -> u32); - RasSetAutodialEnableA(core::mem::transmute(param0), param1.param().abi()) + RasSetAutodialEnableA(core::mem::transmute(param0), param1.into()) } #[inline] -pub unsafe fn RasSetAutodialEnableW(param0: u32, param1: P1) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn RasSetAutodialEnableW(param0: u32, param1: bool) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasSetAutodialEnableW(param0 : u32, param1 : super::super::Foundation:: BOOL) -> u32); - RasSetAutodialEnableW(core::mem::transmute(param0), param1.param().abi()) + RasSetAutodialEnableW(core::mem::transmute(param0), param1.into()) } #[inline] pub unsafe fn RasSetAutodialParamA(param0: u32, param1: *const core::ffi::c_void, param2: u32) -> u32 { @@ -1272,24 +1258,22 @@ pub unsafe fn RasSetAutodialParamW(param0: u32, param1: *const core::ffi::c_void RasSetAutodialParamW(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2)) } #[inline] -pub unsafe fn RasSetCredentialsA(param0: P0, param1: P1, param2: *const RASCREDENTIALSA, param3: P3) -> u32 +pub unsafe fn RasSetCredentialsA(param0: P0, param1: P1, param2: *const RASCREDENTIALSA, param3: bool) -> u32 where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasSetCredentialsA(param0 : windows_core::PCSTR, param1 : windows_core::PCSTR, param2 : *const RASCREDENTIALSA, param3 : super::super::Foundation:: BOOL) -> u32); - RasSetCredentialsA(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2), param3.param().abi()) + RasSetCredentialsA(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2), param3.into()) } #[inline] -pub unsafe fn RasSetCredentialsW(param0: P0, param1: P1, param2: *const RASCREDENTIALSW, param3: P3) -> u32 +pub unsafe fn RasSetCredentialsW(param0: P0, param1: P1, param2: *const RASCREDENTIALSW, param3: bool) -> u32 where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasSetCredentialsW(param0 : windows_core::PCWSTR, param1 : windows_core::PCWSTR, param2 : *const RASCREDENTIALSW, param3 : super::super::Foundation:: BOOL) -> u32); - RasSetCredentialsW(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2), param3.param().abi()) + RasSetCredentialsW(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2), param3.into()) } #[inline] pub unsafe fn RasSetCustomAuthDataA(pszphonebook: P0, pszentry: P1, pbcustomauthdata: &[u8]) -> u32 @@ -1328,22 +1312,20 @@ where RasSetEapUserDataW(core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(pbeapdata), core::mem::transmute(dwsizeofeapdata)) } #[inline] -pub unsafe fn RasSetEntryDialParamsA(param0: P0, param1: *const RASDIALPARAMSA, param2: P2) -> u32 +pub unsafe fn RasSetEntryDialParamsA(param0: P0, param1: *const RASDIALPARAMSA, param2: bool) -> u32 where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasSetEntryDialParamsA(param0 : windows_core::PCSTR, param1 : *const RASDIALPARAMSA, param2 : super::super::Foundation:: BOOL) -> u32); - RasSetEntryDialParamsA(param0.param().abi(), core::mem::transmute(param1), param2.param().abi()) + RasSetEntryDialParamsA(param0.param().abi(), core::mem::transmute(param1), param2.into()) } #[inline] -pub unsafe fn RasSetEntryDialParamsW(param0: P0, param1: *const RASDIALPARAMSW, param2: P2) -> u32 +pub unsafe fn RasSetEntryDialParamsW(param0: P0, param1: *const RASDIALPARAMSW, param2: bool) -> u32 where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasSetEntryDialParamsW(param0 : windows_core::PCWSTR, param1 : *const RASDIALPARAMSW, param2 : super::super::Foundation:: BOOL) -> u32); - RasSetEntryDialParamsW(param0.param().abi(), core::mem::transmute(param1), param2.param().abi()) + RasSetEntryDialParamsW(param0.param().abi(), core::mem::transmute(param1), param2.into()) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -1620,39 +1602,24 @@ pub unsafe fn RtmIsMarkedForChangeNotification(rtmreghandle: isize, notifyhandle RtmIsMarkedForChangeNotification(core::mem::transmute(rtmreghandle), core::mem::transmute(notifyhandle), core::mem::transmute(desthandle), core::mem::transmute(destmarked)) } #[inline] -pub unsafe fn RtmLockDestination(rtmreghandle: isize, desthandle: isize, exclusive: P2, lockdest: P3) -> u32 -where - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn RtmLockDestination(rtmreghandle: isize, desthandle: isize, exclusive: bool, lockdest: bool) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmLockDestination(rtmreghandle : isize, desthandle : isize, exclusive : super::super::Foundation:: BOOL, lockdest : super::super::Foundation:: BOOL) -> u32); - RtmLockDestination(core::mem::transmute(rtmreghandle), core::mem::transmute(desthandle), exclusive.param().abi(), lockdest.param().abi()) + RtmLockDestination(core::mem::transmute(rtmreghandle), core::mem::transmute(desthandle), exclusive.into(), lockdest.into()) } #[inline] -pub unsafe fn RtmLockNextHop(rtmreghandle: isize, nexthophandle: isize, exclusive: P2, locknexthop: P3, nexthoppointer: *mut *mut RTM_NEXTHOP_INFO) -> u32 -where - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn RtmLockNextHop(rtmreghandle: isize, nexthophandle: isize, exclusive: bool, locknexthop: bool, nexthoppointer: *mut *mut RTM_NEXTHOP_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmLockNextHop(rtmreghandle : isize, nexthophandle : isize, exclusive : super::super::Foundation:: BOOL, locknexthop : super::super::Foundation:: BOOL, nexthoppointer : *mut *mut RTM_NEXTHOP_INFO) -> u32); - RtmLockNextHop(core::mem::transmute(rtmreghandle), core::mem::transmute(nexthophandle), exclusive.param().abi(), locknexthop.param().abi(), core::mem::transmute(nexthoppointer)) + RtmLockNextHop(core::mem::transmute(rtmreghandle), core::mem::transmute(nexthophandle), exclusive.into(), locknexthop.into(), core::mem::transmute(nexthoppointer)) } #[inline] -pub unsafe fn RtmLockRoute(rtmreghandle: isize, routehandle: isize, exclusive: P2, lockroute: P3, routepointer: *mut *mut RTM_ROUTE_INFO) -> u32 -where - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn RtmLockRoute(rtmreghandle: isize, routehandle: isize, exclusive: bool, lockroute: bool, routepointer: *mut *mut RTM_ROUTE_INFO) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmLockRoute(rtmreghandle : isize, routehandle : isize, exclusive : super::super::Foundation:: BOOL, lockroute : super::super::Foundation:: BOOL, routepointer : *mut *mut RTM_ROUTE_INFO) -> u32); - RtmLockRoute(core::mem::transmute(rtmreghandle), core::mem::transmute(routehandle), exclusive.param().abi(), lockroute.param().abi(), core::mem::transmute(routepointer)) + RtmLockRoute(core::mem::transmute(rtmreghandle), core::mem::transmute(routehandle), exclusive.into(), lockroute.into(), core::mem::transmute(routepointer)) } #[inline] -pub unsafe fn RtmMarkDestForChangeNotification(rtmreghandle: isize, notifyhandle: isize, desthandle: isize, markdest: P3) -> u32 -where - P3: windows_core::Param, -{ +pub unsafe fn RtmMarkDestForChangeNotification(rtmreghandle: isize, notifyhandle: isize, desthandle: isize, markdest: bool) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmMarkDestForChangeNotification(rtmreghandle : isize, notifyhandle : isize, desthandle : isize, markdest : super::super::Foundation:: BOOL) -> u32); - RtmMarkDestForChangeNotification(core::mem::transmute(rtmreghandle), core::mem::transmute(notifyhandle), core::mem::transmute(desthandle), markdest.param().abi()) + RtmMarkDestForChangeNotification(core::mem::transmute(rtmreghandle), core::mem::transmute(notifyhandle), core::mem::transmute(desthandle), markdest.into()) } #[inline] pub unsafe fn RtmReferenceHandles(rtmreghandle: isize, numhandles: u32, rtmhandles: *mut super::super::Foundation::HANDLE) -> u32 { @@ -1660,12 +1627,9 @@ pub unsafe fn RtmReferenceHandles(rtmreghandle: isize, numhandles: u32, rtmhandl RtmReferenceHandles(core::mem::transmute(rtmreghandle), core::mem::transmute(numhandles), core::mem::transmute(rtmhandles)) } #[inline] -pub unsafe fn RtmRegisterEntity(rtmentityinfo: *mut RTM_ENTITY_INFO, exportmethods: *mut RTM_ENTITY_EXPORT_METHODS, eventcallback: RTM_EVENT_CALLBACK, reserveopaquepointer: P3, rtmregprofile: *mut RTM_REGN_PROFILE, rtmreghandle: *mut isize) -> u32 -where - P3: windows_core::Param, -{ +pub unsafe fn RtmRegisterEntity(rtmentityinfo: *mut RTM_ENTITY_INFO, exportmethods: *mut RTM_ENTITY_EXPORT_METHODS, eventcallback: RTM_EVENT_CALLBACK, reserveopaquepointer: bool, rtmregprofile: *mut RTM_REGN_PROFILE, rtmreghandle: *mut isize) -> u32 { windows_targets::link!("rtm.dll" "system" fn RtmRegisterEntity(rtmentityinfo : *mut RTM_ENTITY_INFO, exportmethods : *mut RTM_ENTITY_EXPORT_METHODS, eventcallback : RTM_EVENT_CALLBACK, reserveopaquepointer : super::super::Foundation:: BOOL, rtmregprofile : *mut RTM_REGN_PROFILE, rtmreghandle : *mut isize) -> u32); - RtmRegisterEntity(core::mem::transmute(rtmentityinfo), core::mem::transmute(exportmethods), core::mem::transmute(eventcallback), reserveopaquepointer.param().abi(), core::mem::transmute(rtmregprofile), core::mem::transmute(rtmreghandle)) + RtmRegisterEntity(core::mem::transmute(rtmentityinfo), core::mem::transmute(exportmethods), core::mem::transmute(eventcallback), reserveopaquepointer.into(), core::mem::transmute(rtmregprofile), core::mem::transmute(rtmreghandle)) } #[inline] pub unsafe fn RtmRegisterForChangeNotification(rtmreghandle: isize, targetviews: u32, notifyflags: u32, notifycontext: *mut core::ffi::c_void, notifyhandle: *mut isize) -> u32 { @@ -2036,9 +2000,6 @@ impl Default for GRE_CONFIG_PARAMS0 { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HRASCONN(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HRASCONN { - type TypeKind = windows_core::CopyType; -} impl HRASCONN { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WNet/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WNet/mod.rs index 324a043d20..6b1891a5be 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WNet/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WNet/mod.rs @@ -32,22 +32,20 @@ pub unsafe fn NPAddConnection4(hwndowner: Option NPAddConnection4(core::mem::transmute(hwndowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpnetresource), core::mem::transmute(lpauthbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(cbauthbuffer), core::mem::transmute(dwflags), core::mem::transmute(lpuseoptions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpuseoptions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] -pub unsafe fn NPCancelConnection(lpname: P0, fforce: P1) -> u32 +pub unsafe fn NPCancelConnection(lpname: P0, fforce: bool) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("davclnt.dll" "system" fn NPCancelConnection(lpname : windows_core::PCWSTR, fforce : super::super::Foundation:: BOOL) -> u32); - NPCancelConnection(lpname.param().abi(), fforce.param().abi()) + NPCancelConnection(lpname.param().abi(), fforce.into()) } #[inline] -pub unsafe fn NPCancelConnection2(lpname: P0, fforce: P1, dwflags: u32) -> u32 +pub unsafe fn NPCancelConnection2(lpname: P0, fforce: bool, dwflags: u32) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("ntlanman.dll" "system" fn NPCancelConnection2(lpname : windows_core::PCWSTR, fforce : super::super::Foundation:: BOOL, dwflags : u32) -> u32); - NPCancelConnection2(lpname.param().abi(), fforce.param().abi(), core::mem::transmute(dwflags)) + NPCancelConnection2(lpname.param().abi(), fforce.into(), core::mem::transmute(dwflags)) } #[inline] pub unsafe fn NPCloseEnum(henum: super::super::Foundation::HANDLE) -> u32 { @@ -202,40 +200,36 @@ where WNetAddConnectionW(lpremotename.param().abi(), lppassword.param().abi(), lplocalname.param().abi()) } #[inline] -pub unsafe fn WNetCancelConnection2A(lpname: P0, dwflags: NET_CONNECT_FLAGS, fforce: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn WNetCancelConnection2A(lpname: P0, dwflags: NET_CONNECT_FLAGS, fforce: bool) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("mpr.dll" "system" fn WNetCancelConnection2A(lpname : windows_core::PCSTR, dwflags : NET_CONNECT_FLAGS, fforce : super::super::Foundation:: BOOL) -> super::super::Foundation:: WIN32_ERROR); - WNetCancelConnection2A(lpname.param().abi(), core::mem::transmute(dwflags), fforce.param().abi()) + WNetCancelConnection2A(lpname.param().abi(), core::mem::transmute(dwflags), fforce.into()) } #[inline] -pub unsafe fn WNetCancelConnection2W(lpname: P0, dwflags: NET_CONNECT_FLAGS, fforce: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn WNetCancelConnection2W(lpname: P0, dwflags: NET_CONNECT_FLAGS, fforce: bool) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("mpr.dll" "system" fn WNetCancelConnection2W(lpname : windows_core::PCWSTR, dwflags : NET_CONNECT_FLAGS, fforce : super::super::Foundation:: BOOL) -> super::super::Foundation:: WIN32_ERROR); - WNetCancelConnection2W(lpname.param().abi(), core::mem::transmute(dwflags), fforce.param().abi()) + WNetCancelConnection2W(lpname.param().abi(), core::mem::transmute(dwflags), fforce.into()) } #[inline] -pub unsafe fn WNetCancelConnectionA(lpname: P0, fforce: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn WNetCancelConnectionA(lpname: P0, fforce: bool) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("mpr.dll" "system" fn WNetCancelConnectionA(lpname : windows_core::PCSTR, fforce : super::super::Foundation:: BOOL) -> super::super::Foundation:: WIN32_ERROR); - WNetCancelConnectionA(lpname.param().abi(), fforce.param().abi()) + WNetCancelConnectionA(lpname.param().abi(), fforce.into()) } #[inline] -pub unsafe fn WNetCancelConnectionW(lpname: P0, fforce: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn WNetCancelConnectionW(lpname: P0, fforce: bool) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("mpr.dll" "system" fn WNetCancelConnectionW(lpname : windows_core::PCWSTR, fforce : super::super::Foundation:: BOOL) -> super::super::Foundation:: WIN32_ERROR); - WNetCancelConnectionW(lpname.param().abi(), fforce.param().abi()) + WNetCancelConnectionW(lpname.param().abi(), fforce.into()) } #[inline] pub unsafe fn WNetCloseEnum(henum: super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR { diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WebDav/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WebDav/mod.rs index b48481ae61..8cd9bc5aa5 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WebDav/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WebDav/mod.rs @@ -9,13 +9,12 @@ where DavAddConnection(core::mem::transmute(connectionhandle), remotename.param().abi(), username.param().abi(), password.param().abi(), core::mem::transmute(clientcert.as_ptr()), clientcert.len().try_into().unwrap()) } #[inline] -pub unsafe fn DavCancelConnectionsToServer(lpname: P0, fforce: P1) -> u32 +pub unsafe fn DavCancelConnectionsToServer(lpname: P0, fforce: bool) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("davclnt.dll" "system" fn DavCancelConnectionsToServer(lpname : windows_core::PCWSTR, fforce : super::super::Foundation:: BOOL) -> u32); - DavCancelConnectionsToServer(lpname.param().abi(), fforce.param().abi()) + DavCancelConnectionsToServer(lpname.param().abi(), fforce.into()) } #[inline] pub unsafe fn DavDeleteConnection(connectionhandle: super::super::Foundation::HANDLE) -> u32 { diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WiFi/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WiFi/mod.rs index bf3175db21..5bdeb47264 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WiFi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WiFi/mod.rs @@ -112,12 +112,9 @@ pub unsafe fn WlanGetInterfaceCapability(hclienthandle: super::super::Foundation WlanGetInterfaceCapability(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppcapability)) } #[inline] -pub unsafe fn WlanGetNetworkBssList(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, pdot11ssid: Option<*const DOT11_SSID>, dot11bsstype: DOT11_BSS_TYPE, bsecurityenabled: P4, preserved: Option<*const core::ffi::c_void>, ppwlanbsslist: *mut *mut WLAN_BSS_LIST) -> u32 -where - P4: windows_core::Param, -{ +pub unsafe fn WlanGetNetworkBssList(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, pdot11ssid: Option<*const DOT11_SSID>, dot11bsstype: DOT11_BSS_TYPE, bsecurityenabled: bool, preserved: Option<*const core::ffi::c_void>, ppwlanbsslist: *mut *mut WLAN_BSS_LIST) -> u32 { windows_targets::link!("wlanapi.dll" "system" fn WlanGetNetworkBssList(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, pdot11ssid : *const DOT11_SSID, dot11bsstype : DOT11_BSS_TYPE, bsecurityenabled : super::super::Foundation:: BOOL, preserved : *const core::ffi::c_void, ppwlanbsslist : *mut *mut WLAN_BSS_LIST) -> u32); - WlanGetNetworkBssList(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), core::mem::transmute(pdot11ssid.unwrap_or(core::mem::zeroed())), core::mem::transmute(dot11bsstype), bsecurityenabled.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppwlanbsslist)) + WlanGetNetworkBssList(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), core::mem::transmute(pdot11ssid.unwrap_or(core::mem::zeroed())), core::mem::transmute(dot11bsstype), bsecurityenabled.into(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppwlanbsslist)) } #[inline] pub unsafe fn WlanGetProfile(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, strprofilename: P2, preserved: Option<*const core::ffi::c_void>, pstrprofilexml: *mut windows_core::PWSTR, pdwflags: Option<*mut u32>, pdwgrantedaccess: Option<*mut u32>) -> u32 @@ -191,13 +188,9 @@ pub unsafe fn WlanHostedNetworkSetProperty(hclienthandle: super::super::Foundati WlanHostedNetworkSetProperty(core::mem::transmute(hclienthandle), core::mem::transmute(opcode), core::mem::transmute(dwdatasize), core::mem::transmute(pvdata), core::mem::transmute(pfailreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanHostedNetworkSetSecondaryKey(hclienthandle: super::super::Foundation::HANDLE, puckeydata: &[u8], bispassphrase: P3, bpersistent: P4, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 -where - P3: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn WlanHostedNetworkSetSecondaryKey(hclienthandle: super::super::Foundation::HANDLE, puckeydata: &[u8], bispassphrase: bool, bpersistent: bool, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 { windows_targets::link!("wlanapi.dll" "system" fn WlanHostedNetworkSetSecondaryKey(hclienthandle : super::super::Foundation:: HANDLE, dwkeylength : u32, puckeydata : *const u8, bispassphrase : super::super::Foundation:: BOOL, bpersistent : super::super::Foundation:: BOOL, pfailreason : *mut WLAN_HOSTED_NETWORK_REASON, pvreserved : *const core::ffi::c_void) -> u32); - WlanHostedNetworkSetSecondaryKey(core::mem::transmute(hclienthandle), puckeydata.len().try_into().unwrap(), core::mem::transmute(puckeydata.as_ptr()), bispassphrase.param().abi(), bpersistent.param().abi(), core::mem::transmute(pfailreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) + WlanHostedNetworkSetSecondaryKey(core::mem::transmute(hclienthandle), puckeydata.len().try_into().unwrap(), core::mem::transmute(puckeydata.as_ptr()), bispassphrase.into(), bpersistent.into(), core::mem::transmute(pfailreason.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvreserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn WlanHostedNetworkStartUsing(hclienthandle: super::super::Foundation::HANDLE, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 { @@ -240,20 +233,14 @@ pub unsafe fn WlanRegisterDeviceServiceNotification(hclienthandle: super::super: WlanRegisterDeviceServiceNotification(core::mem::transmute(hclienthandle), core::mem::transmute(pdevsvcguidlist.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanRegisterNotification(hclienthandle: super::super::Foundation::HANDLE, dwnotifsource: WLAN_NOTIFICATION_SOURCES, bignoreduplicate: P2, funccallback: Option, pcallbackcontext: Option<*const core::ffi::c_void>, preserved: Option<*const core::ffi::c_void>, pdwprevnotifsource: Option<*mut u32>) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn WlanRegisterNotification(hclienthandle: super::super::Foundation::HANDLE, dwnotifsource: WLAN_NOTIFICATION_SOURCES, bignoreduplicate: bool, funccallback: Option, pcallbackcontext: Option<*const core::ffi::c_void>, preserved: Option<*const core::ffi::c_void>, pdwprevnotifsource: Option<*mut u32>) -> u32 { windows_targets::link!("wlanapi.dll" "system" fn WlanRegisterNotification(hclienthandle : super::super::Foundation:: HANDLE, dwnotifsource : WLAN_NOTIFICATION_SOURCES, bignoreduplicate : super::super::Foundation:: BOOL, funccallback : WLAN_NOTIFICATION_CALLBACK, pcallbackcontext : *const core::ffi::c_void, preserved : *const core::ffi::c_void, pdwprevnotifsource : *mut u32) -> u32); - WlanRegisterNotification(core::mem::transmute(hclienthandle), core::mem::transmute(dwnotifsource), bignoreduplicate.param().abi(), core::mem::transmute(funccallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcallbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwprevnotifsource.unwrap_or(core::mem::zeroed()))) + WlanRegisterNotification(core::mem::transmute(hclienthandle), core::mem::transmute(dwnotifsource), bignoreduplicate.into(), core::mem::transmute(funccallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcallbackcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwprevnotifsource.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanRegisterVirtualStationNotification(hclienthandle: super::super::Foundation::HANDLE, bregister: P1, preserved: Option<*const core::ffi::c_void>) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn WlanRegisterVirtualStationNotification(hclienthandle: super::super::Foundation::HANDLE, bregister: bool, preserved: Option<*const core::ffi::c_void>) -> u32 { windows_targets::link!("wlanapi.dll" "system" fn WlanRegisterVirtualStationNotification(hclienthandle : super::super::Foundation:: HANDLE, bregister : super::super::Foundation:: BOOL, preserved : *const core::ffi::c_void) -> u32); - WlanRegisterVirtualStationNotification(core::mem::transmute(hclienthandle), bregister.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) + WlanRegisterVirtualStationNotification(core::mem::transmute(hclienthandle), bregister.into(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn WlanRenameProfile(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, stroldprofilename: P2, strnewprofilename: P3, preserved: Option<*const core::ffi::c_void>) -> u32 @@ -265,14 +252,13 @@ where WlanRenameProfile(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), stroldprofilename.param().abi(), strnewprofilename.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanSaveTemporaryProfile(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, strprofilename: P2, stralluserprofilesecurity: P3, dwflags: u32, boverwrite: P5, preserved: Option<*const core::ffi::c_void>) -> u32 +pub unsafe fn WlanSaveTemporaryProfile(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, strprofilename: P2, stralluserprofilesecurity: P3, dwflags: u32, boverwrite: bool, preserved: Option<*const core::ffi::c_void>) -> u32 where P2: windows_core::Param, P3: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanSaveTemporaryProfile(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, strprofilename : windows_core::PCWSTR, stralluserprofilesecurity : windows_core::PCWSTR, dwflags : u32, boverwrite : super::super::Foundation:: BOOL, preserved : *const core::ffi::c_void) -> u32); - WlanSaveTemporaryProfile(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), strprofilename.param().abi(), stralluserprofilesecurity.param().abi(), core::mem::transmute(dwflags), boverwrite.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) + WlanSaveTemporaryProfile(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), strprofilename.param().abi(), stralluserprofilesecurity.param().abi(), core::mem::transmute(dwflags), boverwrite.into(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn WlanScan(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, pdot11ssid: Option<*const DOT11_SSID>, piedata: Option<*const WLAN_RAW_DATA>, preserved: Option<*const core::ffi::c_void>) -> u32 { @@ -295,14 +281,13 @@ pub unsafe fn WlanSetInterface(hclienthandle: super::super::Foundation::HANDLE, WlanSetInterface(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), core::mem::transmute(opcode), core::mem::transmute(dwdatasize), core::mem::transmute(pdata), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WlanSetProfile(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, dwflags: u32, strprofilexml: P3, stralluserprofilesecurity: P4, boverwrite: P5, preserved: Option<*const core::ffi::c_void>, pdwreasoncode: *mut u32) -> u32 +pub unsafe fn WlanSetProfile(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, dwflags: u32, strprofilexml: P3, stralluserprofilesecurity: P4, boverwrite: bool, preserved: Option<*const core::ffi::c_void>, pdwreasoncode: *mut u32) -> u32 where P3: windows_core::Param, P4: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanSetProfile(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, dwflags : u32, strprofilexml : windows_core::PCWSTR, stralluserprofilesecurity : windows_core::PCWSTR, boverwrite : super::super::Foundation:: BOOL, preserved : *const core::ffi::c_void, pdwreasoncode : *mut u32) -> u32); - WlanSetProfile(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), core::mem::transmute(dwflags), strprofilexml.param().abi(), stralluserprofilesecurity.param().abi(), boverwrite.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwreasoncode)) + WlanSetProfile(core::mem::transmute(hclienthandle), core::mem::transmute(pinterfaceguid), core::mem::transmute(dwflags), strprofilexml.param().abi(), stralluserprofilesecurity.param().abi(), boverwrite.into(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwreasoncode)) } #[inline] pub unsafe fn WlanSetProfileCustomUserData(hclienthandle: super::super::Foundation::HANDLE, pinterfaceguid: *const windows_core::GUID, strprofilename: P2, pdata: &[u8], preserved: Option<*const core::ffi::c_void>) -> u32 @@ -4855,13 +4840,11 @@ impl IDot11AdHocManager { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateNetwork)(windows_core::Interface::as_raw(self), name.param().abi(), password.param().abi(), core::mem::transmute(geographicalid), pinterface.param().abi(), psecurity.param().abi(), core::mem::transmute(pcontextguid), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CommitCreatedNetwork(&self, piadhoc: P0, fsaveprofile: P1, fmakesavedprofileuserspecific: P2) -> windows_core::Result<()> + pub unsafe fn CommitCreatedNetwork(&self, piadhoc: P0, fsaveprofile: bool, fmakesavedprofileuserspecific: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).CommitCreatedNetwork)(windows_core::Interface::as_raw(self), piadhoc.param().abi(), fsaveprofile.param().abi(), fmakesavedprofileuserspecific.param().abi()).ok() + (windows_core::Interface::vtable(self).CommitCreatedNetwork)(windows_core::Interface::as_raw(self), piadhoc.param().abi(), fsaveprofile.into(), fmakesavedprofileuserspecific.into()).ok() } pub unsafe fn GetIEnumDot11AdHocNetworks(&self, pcontextguid: *const windows_core::GUID) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5056,13 +5039,11 @@ impl IDot11AdHocNetwork { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetInterface)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn Connect(&self, passphrase: P0, geographicalid: i32, fsaveprofile: P2, fmakesavedprofileuserspecific: P3) -> windows_core::Result<()> + pub unsafe fn Connect(&self, passphrase: P0, geographicalid: i32, fsaveprofile: bool, fmakesavedprofileuserspecific: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).Connect)(windows_core::Interface::as_raw(self), passphrase.param().abi(), core::mem::transmute(geographicalid), fsaveprofile.param().abi(), fmakesavedprofileuserspecific.param().abi()).ok() + (windows_core::Interface::vtable(self).Connect)(windows_core::Interface::as_raw(self), passphrase.param().abi(), core::mem::transmute(geographicalid), fsaveprofile.into(), fmakesavedprofileuserspecific.into()).ok() } pub unsafe fn Disconnect(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Disconnect)(windows_core::Interface::as_raw(self)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectionManager/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectionManager/mod.rs index c7efb597bf..baa0f24239 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectionManager/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectionManager/mod.rs @@ -52,12 +52,9 @@ where WcmQueryProperty(core::mem::transmute(pinterface.unwrap_or(core::mem::zeroed())), strprofilename.param().abi(), core::mem::transmute(property), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwdatasize), core::mem::transmute(ppdata)) } #[inline] -pub unsafe fn WcmSetProfileList(pprofilelist: *const WCM_PROFILE_INFO_LIST, dwposition: u32, fignoreunknownprofiles: P2, preserved: Option<*const core::ffi::c_void>) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn WcmSetProfileList(pprofilelist: *const WCM_PROFILE_INFO_LIST, dwposition: u32, fignoreunknownprofiles: bool, preserved: Option<*const core::ffi::c_void>) -> u32 { windows_targets::link!("wcmapi.dll" "system" fn WcmSetProfileList(pprofilelist : *const WCM_PROFILE_INFO_LIST, dwposition : u32, fignoreunknownprofiles : super::super::Foundation:: BOOL, preserved : *const core::ffi::c_void) -> u32); - WcmSetProfileList(core::mem::transmute(pprofilelist), core::mem::transmute(dwposition), fignoreunknownprofiles.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) + WcmSetProfileList(core::mem::transmute(pprofilelist), core::mem::transmute(dwposition), fignoreunknownprofiles.into(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn WcmSetProperty(pinterface: Option<*const windows_core::GUID>, strprofilename: P1, property: WCM_PROPERTY, preserved: Option<*const core::ffi::c_void>, pbdata: Option<&[u8]>) -> u32 diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFirewall/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFirewall/mod.rs index 2b84b592e0..02740d84ce 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFirewall/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFirewall/mod.rs @@ -53,12 +53,9 @@ where NetworkIsolationGetEnterpriseIdAsync(wszservername.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(context.unwrap_or(core::mem::zeroed())), core::mem::transmute(callback), core::mem::transmute(hoperation)) } #[inline] -pub unsafe fn NetworkIsolationGetEnterpriseIdClose(hoperation: super::super::Foundation::HANDLE, bwaitforoperation: P1) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn NetworkIsolationGetEnterpriseIdClose(hoperation: super::super::Foundation::HANDLE, bwaitforoperation: bool) -> u32 { windows_targets::link!("firewallapi.dll" "system" fn NetworkIsolationGetEnterpriseIdClose(hoperation : super::super::Foundation:: HANDLE, bwaitforoperation : super::super::Foundation:: BOOL) -> u32); - NetworkIsolationGetEnterpriseIdClose(core::mem::transmute(hoperation), bwaitforoperation.param().abi()) + NetworkIsolationGetEnterpriseIdClose(core::mem::transmute(hoperation), bwaitforoperation.into()) } #[cfg(feature = "Win32_Security")] #[inline] @@ -74,15 +71,14 @@ pub unsafe fn NetworkIsolationSetAppContainerConfig(appcontainersids: &[super::s } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn NetworkIsolationSetupAppContainerBinaries(applicationcontainersid: super::super::Security::PSID, packagefullname: P1, packagefolder: P2, displayname: P3, bbinariesfullycomputed: P4, binaries: &[windows_core::PCWSTR]) -> windows_core::Result<()> +pub unsafe fn NetworkIsolationSetupAppContainerBinaries(applicationcontainersid: super::super::Security::PSID, packagefullname: P1, packagefolder: P2, displayname: P3, bbinariesfullycomputed: bool, binaries: &[windows_core::PCWSTR]) -> windows_core::Result<()> where P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("api-ms-win-net-isolation-l1-1-0.dll" "system" fn NetworkIsolationSetupAppContainerBinaries(applicationcontainersid : super::super::Security:: PSID, packagefullname : windows_core::PCWSTR, packagefolder : windows_core::PCWSTR, displayname : windows_core::PCWSTR, bbinariesfullycomputed : super::super::Foundation:: BOOL, binaries : *const windows_core::PCWSTR, binariescount : u32) -> windows_core::HRESULT); - NetworkIsolationSetupAppContainerBinaries(core::mem::transmute(applicationcontainersid), packagefullname.param().abi(), packagefolder.param().abi(), displayname.param().abi(), bbinariesfullycomputed.param().abi(), core::mem::transmute(binaries.as_ptr()), binaries.len().try_into().unwrap()).ok() + NetworkIsolationSetupAppContainerBinaries(core::mem::transmute(applicationcontainersid), packagefullname.param().abi(), packagefolder.param().abi(), displayname.param().abi(), bbinariesfullycomputed.into(), core::mem::transmute(binaries.as_ptr()), binaries.len().try_into().unwrap()).ok() } #[inline] pub unsafe fn NetworkIsolationUnregisterForAppContainerChanges(registrationobject: super::super::Foundation::HANDLE) -> u32 { diff --git a/crates/libs/windows/src/Windows/Win32/Networking/ActiveDirectory/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/ActiveDirectory/mod.rs index 0fa34519fe..4f4a064100 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/ActiveDirectory/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/ActiveDirectory/mod.rs @@ -947,24 +947,22 @@ where DsRemoveDsDomainW(core::mem::transmute(hds), domaindn.param().abi()) } #[inline] -pub unsafe fn DsRemoveDsServerA(hds: super::super::Foundation::HANDLE, serverdn: P1, domaindn: P2, flastdcindomain: Option<*mut super::super::Foundation::BOOL>, fcommit: P4) -> u32 +pub unsafe fn DsRemoveDsServerA(hds: super::super::Foundation::HANDLE, serverdn: P1, domaindn: P2, flastdcindomain: Option<*mut super::super::Foundation::BOOL>, fcommit: bool) -> u32 where P1: windows_core::Param, P2: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsRemoveDsServerA(hds : super::super::Foundation:: HANDLE, serverdn : windows_core::PCSTR, domaindn : windows_core::PCSTR, flastdcindomain : *mut super::super::Foundation:: BOOL, fcommit : super::super::Foundation:: BOOL) -> u32); - DsRemoveDsServerA(core::mem::transmute(hds), serverdn.param().abi(), domaindn.param().abi(), core::mem::transmute(flastdcindomain.unwrap_or(core::mem::zeroed())), fcommit.param().abi()) + DsRemoveDsServerA(core::mem::transmute(hds), serverdn.param().abi(), domaindn.param().abi(), core::mem::transmute(flastdcindomain.unwrap_or(core::mem::zeroed())), fcommit.into()) } #[inline] -pub unsafe fn DsRemoveDsServerW(hds: super::super::Foundation::HANDLE, serverdn: P1, domaindn: P2, flastdcindomain: Option<*mut super::super::Foundation::BOOL>, fcommit: P4) -> u32 +pub unsafe fn DsRemoveDsServerW(hds: super::super::Foundation::HANDLE, serverdn: P1, domaindn: P2, flastdcindomain: Option<*mut super::super::Foundation::BOOL>, fcommit: bool) -> u32 where P1: windows_core::Param, P2: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsRemoveDsServerW(hds : super::super::Foundation:: HANDLE, serverdn : windows_core::PCWSTR, domaindn : windows_core::PCWSTR, flastdcindomain : *mut super::super::Foundation:: BOOL, fcommit : super::super::Foundation:: BOOL) -> u32); - DsRemoveDsServerW(core::mem::transmute(hds), serverdn.param().abi(), domaindn.param().abi(), core::mem::transmute(flastdcindomain.unwrap_or(core::mem::zeroed())), fcommit.param().abi()) + DsRemoveDsServerW(core::mem::transmute(hds), serverdn.param().abi(), domaindn.param().abi(), core::mem::transmute(flastdcindomain.unwrap_or(core::mem::zeroed())), fcommit.into()) } #[inline] pub unsafe fn DsReplicaAddA(hds: super::super::Foundation::HANDLE, namecontext: P1, sourcedsadn: P2, transportdn: P3, sourcedsaaddress: P4, pschedule: Option<*const SCHEDULE>, options: u32) -> u32 @@ -1889,9 +1887,6 @@ impl Default for ADS_SEARCH_COLUMN { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct ADS_SEARCH_HANDLE(pub isize); -impl windows_core::TypeKind for ADS_SEARCH_HANDLE { - type TypeKind = windows_core::CopyType; -} impl ADS_SEARCH_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 || self.0 == 0 @@ -14755,11 +14750,8 @@ impl windows_core::RuntimeName for IDsAdminCreateObj {} windows_core::imp::define_interface!(IDsAdminNewObj, IDsAdminNewObj_Vtbl, 0xf2573587_e6fc_11d2_82af_00c04f68928b); windows_core::imp::interface_hierarchy!(IDsAdminNewObj, windows_core::IUnknown); impl IDsAdminNewObj { - pub unsafe fn SetButtons(&self, ncurrindex: u32, bvalid: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetButtons)(windows_core::Interface::as_raw(self), core::mem::transmute(ncurrindex), bvalid.param().abi()).ok() + pub unsafe fn SetButtons(&self, ncurrindex: u32, bvalid: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetButtons)(windows_core::Interface::as_raw(self), core::mem::transmute(ncurrindex), bvalid.into()).ok() } pub unsafe fn GetPageCounts(&self, pntotal: *mut i32, pnstartindex: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetPageCounts)(windows_core::Interface::as_raw(self), core::mem::transmute(pntotal), core::mem::transmute(pnstartindex)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Networking/BackgroundIntelligentTransferService/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/BackgroundIntelligentTransferService/mod.rs index f7e1be7ed5..b9fc7ddcc1 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/BackgroundIntelligentTransferService/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/BackgroundIntelligentTransferService/mod.rs @@ -1099,11 +1099,8 @@ impl IBackgroundCopyFile3 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetTemporaryName)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetValidationState(&self, state: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetValidationState)(windows_core::Interface::as_raw(self), state.param().abi()).ok() + pub unsafe fn SetValidationState(&self, state: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetValidationState)(windows_core::Interface::as_raw(self), state.into()).ok() } pub unsafe fn GetValidationState(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Win32/Networking/Clustering/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/Clustering/mod.rs index b3da2ddef2..702042e380 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/Clustering/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/Clustering/mod.rs @@ -218,20 +218,14 @@ pub unsafe fn ClusWorkerTerminate(lpworker: *const CLUS_WORKER) { ClusWorkerTerminate(core::mem::transmute(lpworker)) } #[inline] -pub unsafe fn ClusWorkerTerminateEx(clusworker: *mut CLUS_WORKER, timeoutinmilliseconds: u32, waitonly: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn ClusWorkerTerminateEx(clusworker: *mut CLUS_WORKER, timeoutinmilliseconds: u32, waitonly: bool) -> u32 { windows_targets::link!("resutils.dll" "system" fn ClusWorkerTerminateEx(clusworker : *mut CLUS_WORKER, timeoutinmilliseconds : u32, waitonly : super::super::Foundation:: BOOL) -> u32); - ClusWorkerTerminateEx(core::mem::transmute(clusworker), core::mem::transmute(timeoutinmilliseconds), waitonly.param().abi()) + ClusWorkerTerminateEx(core::mem::transmute(clusworker), core::mem::transmute(timeoutinmilliseconds), waitonly.into()) } #[inline] -pub unsafe fn ClusWorkersTerminate(clusworkers: &mut [*mut CLUS_WORKER], timeoutinmilliseconds: u32, waitonly: P3) -> u32 -where - P3: windows_core::Param, -{ +pub unsafe fn ClusWorkersTerminate(clusworkers: &mut [*mut CLUS_WORKER], timeoutinmilliseconds: u32, waitonly: bool) -> u32 { windows_targets::link!("resutils.dll" "system" fn ClusWorkersTerminate(clusworkers : *mut *mut CLUS_WORKER, clusworkerscount : usize, timeoutinmilliseconds : u32, waitonly : super::super::Foundation:: BOOL) -> u32); - ClusWorkersTerminate(core::mem::transmute(clusworkers.as_ptr()), clusworkers.len().try_into().unwrap(), core::mem::transmute(timeoutinmilliseconds), waitonly.param().abi()) + ClusWorkersTerminate(core::mem::transmute(clusworkers.as_ptr()), clusworkers.len().try_into().unwrap(), core::mem::transmute(timeoutinmilliseconds), waitonly.into()) } #[inline] pub unsafe fn ClusapiSetReasonHandler(lphandler: *const CLUSAPI_REASON_HANDLER) -> *mut CLUSAPI_REASON_HANDLER { @@ -619,12 +613,9 @@ pub unsafe fn ClusterRegBatchReadCommand(hbatchnotification: HREGBATCHNOTIFICATI ClusterRegBatchReadCommand(core::mem::transmute(hbatchnotification), core::mem::transmute(pbatchcommand)) } #[inline] -pub unsafe fn ClusterRegCloseBatch(hregbatch: HREGBATCH, bcommit: P1, failedcommandnumber: Option<*mut i32>) -> i32 -where - P1: windows_core::Param, -{ +pub unsafe fn ClusterRegCloseBatch(hregbatch: HREGBATCH, bcommit: bool, failedcommandnumber: Option<*mut i32>) -> i32 { windows_targets::link!("clusapi.dll" "system" fn ClusterRegCloseBatch(hregbatch : HREGBATCH, bcommit : super::super::Foundation:: BOOL, failedcommandnumber : *mut i32) -> i32); - ClusterRegCloseBatch(core::mem::transmute(hregbatch), bcommit.param().abi(), core::mem::transmute(failedcommandnumber.unwrap_or(core::mem::zeroed()))) + ClusterRegCloseBatch(core::mem::transmute(hregbatch), bcommit.into(), core::mem::transmute(failedcommandnumber.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ClusterRegCloseBatchEx(hregbatch: HREGBATCH, flags: u32, failedcommandnumber: Option<*mut i32>) -> i32 { @@ -1005,12 +996,9 @@ where ClusterSharedVolumeSetSnapshotState(core::mem::transmute(guidsnapshotset), lpszvolumename.param().abi(), core::mem::transmute(state)) } #[inline] -pub unsafe fn ClusterUpgradeFunctionalLevel(hcluster: HCLUSTER, perform: P1, pfnprogresscallback: Option, pvcallbackarg: Option<*const core::ffi::c_void>) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn ClusterUpgradeFunctionalLevel(hcluster: HCLUSTER, perform: bool, pfnprogresscallback: Option, pvcallbackarg: Option<*const core::ffi::c_void>) -> u32 { windows_targets::link!("clusapi.dll" "system" fn ClusterUpgradeFunctionalLevel(hcluster : HCLUSTER, perform : super::super::Foundation:: BOOL, pfnprogresscallback : PCLUSTER_UPGRADE_PROGRESS_CALLBACK, pvcallbackarg : *const core::ffi::c_void) -> u32); - ClusterUpgradeFunctionalLevel(core::mem::transmute(hcluster), perform.param().abi(), core::mem::transmute(pfnprogresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcallbackarg.unwrap_or(core::mem::zeroed()))) + ClusterUpgradeFunctionalLevel(core::mem::transmute(hcluster), perform.into(), core::mem::transmute(pfnprogresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcallbackarg.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CreateCluster(pconfig: *const CREATE_CLUSTER_CONFIG, pfnprogresscallback: Option, pvcallbackarg: Option<*const core::ffi::c_void>) -> HCLUSTER { @@ -1161,12 +1149,9 @@ where DeleteClusterResourceTypeEx(core::mem::transmute(hcluster), lpsztypename.param().abi(), lpszreason.param().abi()) } #[inline] -pub unsafe fn DestroyCluster(hcluster: HCLUSTER, pfnprogresscallback: Option, pvcallbackarg: Option<*const core::ffi::c_void>, fdeletevirtualcomputerobjects: P3) -> u32 -where - P3: windows_core::Param, -{ +pub unsafe fn DestroyCluster(hcluster: HCLUSTER, pfnprogresscallback: Option, pvcallbackarg: Option<*const core::ffi::c_void>, fdeletevirtualcomputerobjects: bool) -> u32 { windows_targets::link!("clusapi.dll" "system" fn DestroyCluster(hcluster : HCLUSTER, pfnprogresscallback : PCLUSTER_SETUP_PROGRESS_CALLBACK, pvcallbackarg : *const core::ffi::c_void, fdeletevirtualcomputerobjects : super::super::Foundation:: BOOL) -> u32); - DestroyCluster(core::mem::transmute(hcluster), core::mem::transmute(pfnprogresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcallbackarg.unwrap_or(core::mem::zeroed())), fdeletevirtualcomputerobjects.param().abi()) + DestroyCluster(core::mem::transmute(hcluster), core::mem::transmute(pfnprogresscallback.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvcallbackarg.unwrap_or(core::mem::zeroed())), fdeletevirtualcomputerobjects.into()) } #[inline] pub unsafe fn DestroyClusterGroup(hgroup: HGROUP) -> u32 { @@ -1674,21 +1659,17 @@ pub unsafe fn PauseClusterNode(hnode: HNODE) -> u32 { PauseClusterNode(core::mem::transmute(hnode)) } #[inline] -pub unsafe fn PauseClusterNodeEx(hnode: HNODE, bdrainnode: P1, dwpauseflags: u32, hnodedraintarget: Option) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn PauseClusterNodeEx(hnode: HNODE, bdrainnode: bool, dwpauseflags: u32, hnodedraintarget: Option) -> u32 { windows_targets::link!("clusapi.dll" "system" fn PauseClusterNodeEx(hnode : HNODE, bdrainnode : super::super::Foundation:: BOOL, dwpauseflags : u32, hnodedraintarget : HNODE) -> u32); - PauseClusterNodeEx(core::mem::transmute(hnode), bdrainnode.param().abi(), core::mem::transmute(dwpauseflags), core::mem::transmute(hnodedraintarget.unwrap_or(core::mem::zeroed()))) + PauseClusterNodeEx(core::mem::transmute(hnode), bdrainnode.into(), core::mem::transmute(dwpauseflags), core::mem::transmute(hnodedraintarget.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn PauseClusterNodeEx2(hnode: HNODE, bdrainnode: P1, dwpauseflags: u32, hnodedraintarget: Option, lpszreason: P4) -> u32 +pub unsafe fn PauseClusterNodeEx2(hnode: HNODE, bdrainnode: bool, dwpauseflags: u32, hnodedraintarget: Option, lpszreason: P4) -> u32 where - P1: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn PauseClusterNodeEx2(hnode : HNODE, bdrainnode : super::super::Foundation:: BOOL, dwpauseflags : u32, hnodedraintarget : HNODE, lpszreason : windows_core::PCWSTR) -> u32); - PauseClusterNodeEx2(core::mem::transmute(hnode), bdrainnode.param().abi(), core::mem::transmute(dwpauseflags), core::mem::transmute(hnodedraintarget.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) + PauseClusterNodeEx2(core::mem::transmute(hnode), bdrainnode.into(), core::mem::transmute(dwpauseflags), core::mem::transmute(hnodedraintarget.unwrap_or(core::mem::zeroed())), lpszreason.param().abi()) } #[inline] pub unsafe fn QueryAppInstanceVersion(appinstanceid: *const windows_core::GUID, instanceversionhigh: *mut u64, instanceversionlow: *mut u64, versionstatus: *mut super::super::Foundation::NTSTATUS) -> u32 { @@ -1696,12 +1677,9 @@ pub unsafe fn QueryAppInstanceVersion(appinstanceid: *const windows_core::GUID, QueryAppInstanceVersion(core::mem::transmute(appinstanceid), core::mem::transmute(instanceversionhigh), core::mem::transmute(instanceversionlow), core::mem::transmute(versionstatus)) } #[inline] -pub unsafe fn RegisterAppInstance(processhandle: super::super::Foundation::HANDLE, appinstanceid: *const windows_core::GUID, childreninheritappinstance: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn RegisterAppInstance(processhandle: super::super::Foundation::HANDLE, appinstanceid: *const windows_core::GUID, childreninheritappinstance: bool) -> u32 { windows_targets::link!("ntlanman.dll" "system" fn RegisterAppInstance(processhandle : super::super::Foundation:: HANDLE, appinstanceid : *const windows_core::GUID, childreninheritappinstance : super::super::Foundation:: BOOL) -> u32); - RegisterAppInstance(core::mem::transmute(processhandle), core::mem::transmute(appinstanceid), childreninheritappinstance.param().abi()) + RegisterAppInstance(core::mem::transmute(processhandle), core::mem::transmute(appinstanceid), childreninheritappinstance.into()) } #[inline] pub unsafe fn RegisterAppInstanceVersion(appinstanceid: *const windows_core::GUID, instanceversionhigh: u64, instanceversionlow: u64) -> u32 { @@ -1766,12 +1744,9 @@ where RemoveClusterGroupToGroupSetDependencyEx(core::mem::transmute(hgroup), core::mem::transmute(hdependson), lpszreason.param().abi()) } #[inline] -pub unsafe fn RemoveClusterNameAccount(hcluster: HCLUSTER, bdeletecomputerobjects: P1) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn RemoveClusterNameAccount(hcluster: HCLUSTER, bdeletecomputerobjects: bool) -> u32 { windows_targets::link!("clusapi.dll" "system" fn RemoveClusterNameAccount(hcluster : HCLUSTER, bdeletecomputerobjects : super::super::Foundation:: BOOL) -> u32); - RemoveClusterNameAccount(core::mem::transmute(hcluster), bdeletecomputerobjects.param().abi()) + RemoveClusterNameAccount(core::mem::transmute(hcluster), bdeletecomputerobjects.into()) } #[inline] pub unsafe fn RemoveClusterResourceDependency(hresource: HRESOURCE, hdependson: HRESOURCE) -> u32 { @@ -2099,12 +2074,9 @@ pub unsafe fn ResUtilGetProperties(hkeyclusterkey: super::super::System::Registr } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilGetPropertiesToParameterBlock(hkeyclusterkey: super::super::System::Registry::HKEY, ppropertytable: *const RESUTIL_PROPERTY_ITEM, poutparams: *mut u8, bcheckforrequiredproperties: P3, psznameofpropinerror: *mut windows_core::PWSTR) -> u32 -where - P3: windows_core::Param, -{ +pub unsafe fn ResUtilGetPropertiesToParameterBlock(hkeyclusterkey: super::super::System::Registry::HKEY, ppropertytable: *const RESUTIL_PROPERTY_ITEM, poutparams: *mut u8, bcheckforrequiredproperties: bool, psznameofpropinerror: *mut windows_core::PWSTR) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilGetPropertiesToParameterBlock(hkeyclusterkey : super::super::System::Registry:: HKEY, ppropertytable : *const RESUTIL_PROPERTY_ITEM, poutparams : *mut u8, bcheckforrequiredproperties : super::super::Foundation:: BOOL, psznameofpropinerror : *mut windows_core::PWSTR) -> u32); - ResUtilGetPropertiesToParameterBlock(core::mem::transmute(hkeyclusterkey), core::mem::transmute(ppropertytable), core::mem::transmute(poutparams), bcheckforrequiredproperties.param().abi(), core::mem::transmute(psznameofpropinerror)) + ResUtilGetPropertiesToParameterBlock(core::mem::transmute(hkeyclusterkey), core::mem::transmute(ppropertytable), core::mem::transmute(poutparams), bcheckforrequiredproperties.into(), core::mem::transmute(psznameofpropinerror)) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -2141,38 +2113,30 @@ where ResUtilGetResourceDependency(core::mem::transmute(hself), lpszresourcetype.param().abi()) } #[inline] -pub unsafe fn ResUtilGetResourceDependencyByClass(hcluster: HCLUSTER, hself: super::super::Foundation::HANDLE, prci: *mut CLUS_RESOURCE_CLASS_INFO, brecurse: P3) -> HRESOURCE -where - P3: windows_core::Param, -{ +pub unsafe fn ResUtilGetResourceDependencyByClass(hcluster: HCLUSTER, hself: super::super::Foundation::HANDLE, prci: *mut CLUS_RESOURCE_CLASS_INFO, brecurse: bool) -> HRESOURCE { windows_targets::link!("resutils.dll" "system" fn ResUtilGetResourceDependencyByClass(hcluster : HCLUSTER, hself : super::super::Foundation:: HANDLE, prci : *mut CLUS_RESOURCE_CLASS_INFO, brecurse : super::super::Foundation:: BOOL) -> HRESOURCE); - ResUtilGetResourceDependencyByClass(core::mem::transmute(hcluster), core::mem::transmute(hself), core::mem::transmute(prci), brecurse.param().abi()) + ResUtilGetResourceDependencyByClass(core::mem::transmute(hcluster), core::mem::transmute(hself), core::mem::transmute(prci), brecurse.into()) } #[inline] -pub unsafe fn ResUtilGetResourceDependencyByClassEx(hcluster: HCLUSTER, hself: super::super::Foundation::HANDLE, prci: *mut CLUS_RESOURCE_CLASS_INFO, brecurse: P3, dwdesiredaccess: u32) -> HRESOURCE -where - P3: windows_core::Param, -{ +pub unsafe fn ResUtilGetResourceDependencyByClassEx(hcluster: HCLUSTER, hself: super::super::Foundation::HANDLE, prci: *mut CLUS_RESOURCE_CLASS_INFO, brecurse: bool, dwdesiredaccess: u32) -> HRESOURCE { windows_targets::link!("resutils.dll" "system" fn ResUtilGetResourceDependencyByClassEx(hcluster : HCLUSTER, hself : super::super::Foundation:: HANDLE, prci : *mut CLUS_RESOURCE_CLASS_INFO, brecurse : super::super::Foundation:: BOOL, dwdesiredaccess : u32) -> HRESOURCE); - ResUtilGetResourceDependencyByClassEx(core::mem::transmute(hcluster), core::mem::transmute(hself), core::mem::transmute(prci), brecurse.param().abi(), core::mem::transmute(dwdesiredaccess)) + ResUtilGetResourceDependencyByClassEx(core::mem::transmute(hcluster), core::mem::transmute(hself), core::mem::transmute(prci), brecurse.into(), core::mem::transmute(dwdesiredaccess)) } #[inline] -pub unsafe fn ResUtilGetResourceDependencyByName(hcluster: HCLUSTER, hself: super::super::Foundation::HANDLE, lpszresourcetype: P2, brecurse: P3) -> HRESOURCE +pub unsafe fn ResUtilGetResourceDependencyByName(hcluster: HCLUSTER, hself: super::super::Foundation::HANDLE, lpszresourcetype: P2, brecurse: bool) -> HRESOURCE where P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilGetResourceDependencyByName(hcluster : HCLUSTER, hself : super::super::Foundation:: HANDLE, lpszresourcetype : windows_core::PCWSTR, brecurse : super::super::Foundation:: BOOL) -> HRESOURCE); - ResUtilGetResourceDependencyByName(core::mem::transmute(hcluster), core::mem::transmute(hself), lpszresourcetype.param().abi(), brecurse.param().abi()) + ResUtilGetResourceDependencyByName(core::mem::transmute(hcluster), core::mem::transmute(hself), lpszresourcetype.param().abi(), brecurse.into()) } #[inline] -pub unsafe fn ResUtilGetResourceDependencyByNameEx(hcluster: HCLUSTER, hself: super::super::Foundation::HANDLE, lpszresourcetype: P2, brecurse: P3, dwdesiredaccess: u32) -> HRESOURCE +pub unsafe fn ResUtilGetResourceDependencyByNameEx(hcluster: HCLUSTER, hself: super::super::Foundation::HANDLE, lpszresourcetype: P2, brecurse: bool, dwdesiredaccess: u32) -> HRESOURCE where P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilGetResourceDependencyByNameEx(hcluster : HCLUSTER, hself : super::super::Foundation:: HANDLE, lpszresourcetype : windows_core::PCWSTR, brecurse : super::super::Foundation:: BOOL, dwdesiredaccess : u32) -> HRESOURCE); - ResUtilGetResourceDependencyByNameEx(core::mem::transmute(hcluster), core::mem::transmute(hself), lpszresourcetype.param().abi(), brecurse.param().abi(), core::mem::transmute(dwdesiredaccess)) + ResUtilGetResourceDependencyByNameEx(core::mem::transmute(hcluster), core::mem::transmute(hself), lpszresourcetype.param().abi(), brecurse.into(), core::mem::transmute(dwdesiredaccess)) } #[inline] pub unsafe fn ResUtilGetResourceDependencyEx(hself: super::super::Foundation::HANDLE, lpszresourcetype: P1, dwdesiredaccess: u32) -> HRESOURCE @@ -2343,31 +2307,21 @@ pub unsafe fn ResUtilSetPropertyParameterBlock(hkeyclusterkey: super::super::Sys } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilSetPropertyParameterBlockEx(hkeyclusterkey: super::super::System::Registry::HKEY, ppropertytable: *const RESUTIL_PROPERTY_ITEM, reserved: *mut core::ffi::c_void, pinparams: *const u8, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32, bforcewrite: P6, poutparams: *mut u8) -> u32 -where - P6: windows_core::Param, -{ +pub unsafe fn ResUtilSetPropertyParameterBlockEx(hkeyclusterkey: super::super::System::Registry::HKEY, ppropertytable: *const RESUTIL_PROPERTY_ITEM, reserved: *mut core::ffi::c_void, pinparams: *const u8, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32, bforcewrite: bool, poutparams: *mut u8) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilSetPropertyParameterBlockEx(hkeyclusterkey : super::super::System::Registry:: HKEY, ppropertytable : *const RESUTIL_PROPERTY_ITEM, reserved : *mut core::ffi::c_void, pinparams : *const u8, pinpropertylist : *const core::ffi::c_void, cbinpropertylistsize : u32, bforcewrite : super::super::Foundation:: BOOL, poutparams : *mut u8) -> u32); - ResUtilSetPropertyParameterBlockEx(core::mem::transmute(hkeyclusterkey), core::mem::transmute(ppropertytable), core::mem::transmute(reserved), core::mem::transmute(pinparams), core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize), bforcewrite.param().abi(), core::mem::transmute(poutparams)) + ResUtilSetPropertyParameterBlockEx(core::mem::transmute(hkeyclusterkey), core::mem::transmute(ppropertytable), core::mem::transmute(reserved), core::mem::transmute(pinparams), core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize), bforcewrite.into(), core::mem::transmute(poutparams)) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilSetPropertyTable(hkeyclusterkey: super::super::System::Registry::HKEY, ppropertytable: *const RESUTIL_PROPERTY_ITEM, reserved: Option<*const core::ffi::c_void>, ballowunknownproperties: P3, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32, poutparams: Option<*mut u8>) -> u32 -where - P3: windows_core::Param, -{ +pub unsafe fn ResUtilSetPropertyTable(hkeyclusterkey: super::super::System::Registry::HKEY, ppropertytable: *const RESUTIL_PROPERTY_ITEM, reserved: Option<*const core::ffi::c_void>, ballowunknownproperties: bool, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32, poutparams: Option<*mut u8>) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilSetPropertyTable(hkeyclusterkey : super::super::System::Registry:: HKEY, ppropertytable : *const RESUTIL_PROPERTY_ITEM, reserved : *const core::ffi::c_void, ballowunknownproperties : super::super::Foundation:: BOOL, pinpropertylist : *const core::ffi::c_void, cbinpropertylistsize : u32, poutparams : *mut u8) -> u32); - ResUtilSetPropertyTable(core::mem::transmute(hkeyclusterkey), core::mem::transmute(ppropertytable), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), ballowunknownproperties.param().abi(), core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize), core::mem::transmute(poutparams.unwrap_or(core::mem::zeroed()))) + ResUtilSetPropertyTable(core::mem::transmute(hkeyclusterkey), core::mem::transmute(ppropertytable), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), ballowunknownproperties.into(), core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize), core::mem::transmute(poutparams.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilSetPropertyTableEx(hkeyclusterkey: super::super::System::Registry::HKEY, ppropertytable: *const RESUTIL_PROPERTY_ITEM, reserved: *mut core::ffi::c_void, ballowunknownproperties: P3, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32, bforcewrite: P6, poutparams: *mut u8) -> u32 -where - P3: windows_core::Param, - P6: windows_core::Param, -{ +pub unsafe fn ResUtilSetPropertyTableEx(hkeyclusterkey: super::super::System::Registry::HKEY, ppropertytable: *const RESUTIL_PROPERTY_ITEM, reserved: *mut core::ffi::c_void, ballowunknownproperties: bool, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32, bforcewrite: bool, poutparams: *mut u8) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilSetPropertyTableEx(hkeyclusterkey : super::super::System::Registry:: HKEY, ppropertytable : *const RESUTIL_PROPERTY_ITEM, reserved : *mut core::ffi::c_void, ballowunknownproperties : super::super::Foundation:: BOOL, pinpropertylist : *const core::ffi::c_void, cbinpropertylistsize : u32, bforcewrite : super::super::Foundation:: BOOL, poutparams : *mut u8) -> u32); - ResUtilSetPropertyTableEx(core::mem::transmute(hkeyclusterkey), core::mem::transmute(ppropertytable), core::mem::transmute(reserved), ballowunknownproperties.param().abi(), core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize), bforcewrite.param().abi(), core::mem::transmute(poutparams)) + ResUtilSetPropertyTableEx(core::mem::transmute(hkeyclusterkey), core::mem::transmute(ppropertytable), core::mem::transmute(reserved), ballowunknownproperties.into(), core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize), bforcewrite.into(), core::mem::transmute(poutparams)) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -2453,12 +2407,9 @@ pub unsafe fn ResUtilStopService(hservicehandle: super::super::System::Services: ResUtilStopService(core::mem::transmute(hservicehandle)) } #[inline] -pub unsafe fn ResUtilTerminateServiceProcessFromResDll(dwservicepid: u32, boffline: P1, pdwresourcestate: *mut u32, pfnlogevent: PLOG_EVENT_ROUTINE, hresourcehandle: isize) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn ResUtilTerminateServiceProcessFromResDll(dwservicepid: u32, boffline: bool, pdwresourcestate: *mut u32, pfnlogevent: PLOG_EVENT_ROUTINE, hresourcehandle: isize) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilTerminateServiceProcessFromResDll(dwservicepid : u32, boffline : super::super::Foundation:: BOOL, pdwresourcestate : *mut u32, pfnlogevent : PLOG_EVENT_ROUTINE, hresourcehandle : isize) -> u32); - ResUtilTerminateServiceProcessFromResDll(core::mem::transmute(dwservicepid), boffline.param().abi(), core::mem::transmute(pdwresourcestate), core::mem::transmute(pfnlogevent), core::mem::transmute(hresourcehandle)) + ResUtilTerminateServiceProcessFromResDll(core::mem::transmute(dwservicepid), boffline.into(), core::mem::transmute(pdwresourcestate), core::mem::transmute(pfnlogevent), core::mem::transmute(hresourcehandle)) } #[inline] pub unsafe fn ResUtilVerifyPrivatePropertyList(pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32) -> u32 { @@ -2466,12 +2417,9 @@ pub unsafe fn ResUtilVerifyPrivatePropertyList(pinpropertylist: *const core::ffi ResUtilVerifyPrivatePropertyList(core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize)) } #[inline] -pub unsafe fn ResUtilVerifyPropertyTable(ppropertytable: *const RESUTIL_PROPERTY_ITEM, reserved: Option<*const core::ffi::c_void>, ballowunknownproperties: P2, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32, poutparams: Option<*mut u8>) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn ResUtilVerifyPropertyTable(ppropertytable: *const RESUTIL_PROPERTY_ITEM, reserved: Option<*const core::ffi::c_void>, ballowunknownproperties: bool, pinpropertylist: *const core::ffi::c_void, cbinpropertylistsize: u32, poutparams: Option<*mut u8>) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilVerifyPropertyTable(ppropertytable : *const RESUTIL_PROPERTY_ITEM, reserved : *const core::ffi::c_void, ballowunknownproperties : super::super::Foundation:: BOOL, pinpropertylist : *const core::ffi::c_void, cbinpropertylistsize : u32, poutparams : *mut u8) -> u32); - ResUtilVerifyPropertyTable(core::mem::transmute(ppropertytable), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), ballowunknownproperties.param().abi(), core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize), core::mem::transmute(poutparams.unwrap_or(core::mem::zeroed()))) + ResUtilVerifyPropertyTable(core::mem::transmute(ppropertytable), core::mem::transmute(reserved.unwrap_or(core::mem::zeroed())), ballowunknownproperties.into(), core::mem::transmute(pinpropertylist), core::mem::transmute(cbinpropertylistsize), core::mem::transmute(poutparams.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ResUtilVerifyResourceService(pszservicename: P0) -> u32 @@ -2494,13 +2442,12 @@ pub unsafe fn ResUtilVerifyShutdownSafe(flags: u32, reason: u32, presult: *mut u } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn ResUtilsDeleteKeyTree(key: super::super::System::Registry::HKEY, keyname: P1, treatnokeyaserror: P2) -> u32 +pub unsafe fn ResUtilsDeleteKeyTree(key: super::super::System::Registry::HKEY, keyname: P1, treatnokeyaserror: bool) -> u32 where P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilsDeleteKeyTree(key : super::super::System::Registry:: HKEY, keyname : windows_core::PCWSTR, treatnokeyaserror : super::super::Foundation:: BOOL) -> u32); - ResUtilsDeleteKeyTree(core::mem::transmute(key), keyname.param().abi(), treatnokeyaserror.param().abi()) + ResUtilsDeleteKeyTree(core::mem::transmute(key), keyname.param().abi(), treatnokeyaserror.into()) } #[inline] pub unsafe fn ResetAllAppInstanceVersions() -> u32 { @@ -2521,14 +2468,13 @@ where RestartClusterResourceEx(core::mem::transmute(hresource), core::mem::transmute(dwflags), lpszreason.param().abi()) } #[inline] -pub unsafe fn RestoreClusterDatabase(lpszpathname: P0, bforce: P1, lpszquorumdriveletter: P2) -> u32 +pub unsafe fn RestoreClusterDatabase(lpszpathname: P0, bforce: bool, lpszquorumdriveletter: P2) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn RestoreClusterDatabase(lpszpathname : windows_core::PCWSTR, bforce : super::super::Foundation:: BOOL, lpszquorumdriveletter : windows_core::PCWSTR) -> u32); - RestoreClusterDatabase(lpszpathname.param().abi(), bforce.param().abi(), lpszquorumdriveletter.param().abi()) + RestoreClusterDatabase(lpszpathname.param().abi(), bforce.into(), lpszquorumdriveletter.param().abi()) } #[inline] pub unsafe fn ResumeClusterNode(hnode: HNODE) -> u32 { @@ -5955,160 +5901,82 @@ pub const GUID_PRESENT: u32 = 1u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HCHANGE(pub isize); -impl windows_core::TypeKind for HCHANGE { - type TypeKind = windows_core::CopyType; -} pub const HCI_UPGRADE_BIT: u32 = 32768u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HCLUSCRYPTPROVIDER(pub isize); -impl windows_core::TypeKind for HCLUSCRYPTPROVIDER { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HCLUSENUM(pub isize); -impl windows_core::TypeKind for HCLUSENUM { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HCLUSENUMEX(pub isize); -impl windows_core::TypeKind for HCLUSENUMEX { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HCLUSTER(pub isize); -impl windows_core::TypeKind for HCLUSTER { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HGROUP(pub isize); -impl windows_core::TypeKind for HGROUP { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HGROUPENUM(pub isize); -impl windows_core::TypeKind for HGROUPENUM { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HGROUPENUMEX(pub isize); -impl windows_core::TypeKind for HGROUPENUMEX { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HGROUPSET(pub isize); -impl windows_core::TypeKind for HGROUPSET { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HGROUPSETENUM(pub isize); -impl windows_core::TypeKind for HGROUPSETENUM { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HNETINTERFACE(pub isize); -impl windows_core::TypeKind for HNETINTERFACE { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HNETINTERFACEENUM(pub isize); -impl windows_core::TypeKind for HNETINTERFACEENUM { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HNETWORK(pub isize); -impl windows_core::TypeKind for HNETWORK { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HNETWORKENUM(pub isize); -impl windows_core::TypeKind for HNETWORKENUM { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HNODE(pub isize); -impl windows_core::TypeKind for HNODE { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HNODEENUM(pub isize); -impl windows_core::TypeKind for HNODEENUM { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HNODEENUMEX(pub isize); -impl windows_core::TypeKind for HNODEENUMEX { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HREGBATCH(pub isize); -impl windows_core::TypeKind for HREGBATCH { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HREGBATCHNOTIFICATION(pub isize); -impl windows_core::TypeKind for HREGBATCHNOTIFICATION { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HREGBATCHPORT(pub isize); -impl windows_core::TypeKind for HREGBATCHPORT { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HREGREADBATCH(pub isize); -impl windows_core::TypeKind for HREGREADBATCH { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HREGREADBATCHREPLY(pub isize); -impl windows_core::TypeKind for HREGREADBATCHREPLY { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HRESENUM(pub isize); -impl windows_core::TypeKind for HRESENUM { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HRESENUMEX(pub isize); -impl windows_core::TypeKind for HRESENUMEX { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HRESOURCE(pub isize); -impl windows_core::TypeKind for HRESOURCE { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HRESTYPEENUM(pub isize); -impl windows_core::TypeKind for HRESTYPEENUM { - type TypeKind = windows_core::CopyType; -} windows_core::imp::define_interface!(IGetClusterDataInfo, IGetClusterDataInfo_Vtbl, 0x97dede51_fc6b_11cf_b5f5_00a0c90ab505); windows_core::imp::interface_hierarchy!(IGetClusterDataInfo, windows_core::IUnknown); impl IGetClusterDataInfo { @@ -11372,11 +11240,8 @@ impl ISClusResource { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).MaintenanceMode)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetMaintenanceMode(&self, bmaintenancemode: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMaintenanceMode)(windows_core::Interface::as_raw(self), bmaintenancemode.param().abi()).ok() + pub unsafe fn SetMaintenanceMode(&self, bmaintenancemode: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMaintenanceMode)(windows_core::Interface::as_raw(self), bmaintenancemode.into()).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -12875,11 +12740,8 @@ impl IWCWizard97Callback { pub unsafe fn AddWizard97Page(&self, hpage: *const i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AddWizard97Page)(windows_core::Interface::as_raw(self), core::mem::transmute(hpage)).ok() } - pub unsafe fn EnableNext(&self, hpage: *const i32, benable: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableNext)(windows_core::Interface::as_raw(self), core::mem::transmute(hpage), benable.param().abi()).ok() + pub unsafe fn EnableNext(&self, hpage: *const i32, benable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableNext)(windows_core::Interface::as_raw(self), core::mem::transmute(hpage), benable.into()).ok() } } #[repr(C)] @@ -12919,11 +12781,8 @@ impl IWCWizardCallback { pub unsafe fn AddWizardPage(&self, hpage: *const i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AddWizardPage)(windows_core::Interface::as_raw(self), core::mem::transmute(hpage)).ok() } - pub unsafe fn EnableNext(&self, hpage: *const i32, benable: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableNext)(windows_core::Interface::as_raw(self), core::mem::transmute(hpage), benable.param().abi()).ok() + pub unsafe fn EnableNext(&self, hpage: *const i32, benable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableNext)(windows_core::Interface::as_raw(self), core::mem::transmute(hpage), benable.into()).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Networking/Ldap/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/Ldap/mod.rs index c8a9034105..ec1e4bd814 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/Ldap/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/Ldap/mod.rs @@ -648,20 +648,14 @@ where ldap_dn2ufnW(dn.param().abi()) } #[inline] -pub unsafe fn ldap_encode_sort_controlA(externalhandle: *mut LDAP, sortkeys: *mut *mut LDAPSortKeyA, control: *mut LDAPControlA, criticality: P3) -> u32 -where - P3: windows_core::Param, -{ +pub unsafe fn ldap_encode_sort_controlA(externalhandle: *mut LDAP, sortkeys: *mut *mut LDAPSortKeyA, control: *mut LDAPControlA, criticality: bool) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_encode_sort_controlA(externalhandle : *mut LDAP, sortkeys : *mut *mut LDAPSortKeyA, control : *mut LDAPControlA, criticality : super::super::Foundation:: BOOLEAN) -> u32); - ldap_encode_sort_controlA(core::mem::transmute(externalhandle), core::mem::transmute(sortkeys), core::mem::transmute(control), criticality.param().abi()) + ldap_encode_sort_controlA(core::mem::transmute(externalhandle), core::mem::transmute(sortkeys), core::mem::transmute(control), criticality.into()) } #[inline] -pub unsafe fn ldap_encode_sort_controlW(externalhandle: *mut LDAP, sortkeys: *mut *mut LDAPSortKeyW, control: *mut LDAPControlW, criticality: P3) -> u32 -where - P3: windows_core::Param, -{ +pub unsafe fn ldap_encode_sort_controlW(externalhandle: *mut LDAP, sortkeys: *mut *mut LDAPSortKeyW, control: *mut LDAPControlW, criticality: bool) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_encode_sort_controlW(externalhandle : *mut LDAP, sortkeys : *mut *mut LDAPSortKeyW, control : *mut LDAPControlW, criticality : super::super::Foundation:: BOOLEAN) -> u32); - ldap_encode_sort_controlW(core::mem::transmute(externalhandle), core::mem::transmute(sortkeys), core::mem::transmute(control), criticality.param().abi()) + ldap_encode_sort_controlW(core::mem::transmute(externalhandle), core::mem::transmute(sortkeys), core::mem::transmute(control), criticality.into()) } #[inline] pub unsafe fn ldap_err2string(err: u32) -> windows_core::PSTR { @@ -1192,20 +1186,14 @@ where ldap_openW(hostname.param().abi(), core::mem::transmute(portnumber)) } #[inline] -pub unsafe fn ldap_parse_extended_resultA(connection: *mut LDAP, resultmessage: *mut LDAPMessage, resultoid: Option<*mut windows_core::PSTR>, resultdata: *mut *mut LDAP_BERVAL, freeit: P4) -> u32 -where - P4: windows_core::Param, -{ +pub unsafe fn ldap_parse_extended_resultA(connection: *mut LDAP, resultmessage: *mut LDAPMessage, resultoid: Option<*mut windows_core::PSTR>, resultdata: *mut *mut LDAP_BERVAL, freeit: bool) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_parse_extended_resultA(connection : *mut LDAP, resultmessage : *mut LDAPMessage, resultoid : *mut windows_core::PSTR, resultdata : *mut *mut LDAP_BERVAL, freeit : super::super::Foundation:: BOOLEAN) -> u32); - ldap_parse_extended_resultA(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(resultoid.unwrap_or(core::mem::zeroed())), core::mem::transmute(resultdata), freeit.param().abi()) + ldap_parse_extended_resultA(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(resultoid.unwrap_or(core::mem::zeroed())), core::mem::transmute(resultdata), freeit.into()) } #[inline] -pub unsafe fn ldap_parse_extended_resultW(connection: *mut LDAP, resultmessage: *mut LDAPMessage, resultoid: Option<*mut windows_core::PWSTR>, resultdata: *mut *mut LDAP_BERVAL, freeit: P4) -> u32 -where - P4: windows_core::Param, -{ +pub unsafe fn ldap_parse_extended_resultW(connection: *mut LDAP, resultmessage: *mut LDAPMessage, resultoid: Option<*mut windows_core::PWSTR>, resultdata: *mut *mut LDAP_BERVAL, freeit: bool) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_parse_extended_resultW(connection : *mut LDAP, resultmessage : *mut LDAPMessage, resultoid : *mut windows_core::PWSTR, resultdata : *mut *mut LDAP_BERVAL, freeit : super::super::Foundation:: BOOLEAN) -> u32); - ldap_parse_extended_resultW(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(resultoid.unwrap_or(core::mem::zeroed())), core::mem::transmute(resultdata), freeit.param().abi()) + ldap_parse_extended_resultW(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(resultoid.unwrap_or(core::mem::zeroed())), core::mem::transmute(resultdata), freeit.into()) } #[inline] pub unsafe fn ldap_parse_page_control(externalhandle: *mut LDAP, servercontrols: *mut *mut LDAPControlA, totalcount: *mut u32, cookie: *mut *mut LDAP_BERVAL) -> u32 { @@ -1238,28 +1226,19 @@ pub unsafe fn ldap_parse_referenceW(connection: *mut LDAP, resultmessage: *mut L ldap_parse_referenceW(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(referrals)) } #[inline] -pub unsafe fn ldap_parse_result(connection: *mut LDAP, resultmessage: *mut LDAPMessage, returncode: *mut u32, matcheddns: Option<*mut windows_core::PSTR>, errormessage: Option<*mut windows_core::PSTR>, referrals: Option<*mut *mut windows_core::PSTR>, servercontrols: *mut *mut *mut LDAPControlA, freeit: P7) -> u32 -where - P7: windows_core::Param, -{ +pub unsafe fn ldap_parse_result(connection: *mut LDAP, resultmessage: *mut LDAPMessage, returncode: *mut u32, matcheddns: Option<*mut windows_core::PSTR>, errormessage: Option<*mut windows_core::PSTR>, referrals: Option<*mut *mut windows_core::PSTR>, servercontrols: *mut *mut *mut LDAPControlA, freeit: bool) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_parse_result(connection : *mut LDAP, resultmessage : *mut LDAPMessage, returncode : *mut u32, matcheddns : *mut windows_core::PSTR, errormessage : *mut windows_core::PSTR, referrals : *mut *mut windows_core::PSTR, servercontrols : *mut *mut *mut LDAPControlA, freeit : super::super::Foundation:: BOOLEAN) -> u32); - ldap_parse_result(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(returncode), core::mem::transmute(matcheddns.unwrap_or(core::mem::zeroed())), core::mem::transmute(errormessage.unwrap_or(core::mem::zeroed())), core::mem::transmute(referrals.unwrap_or(core::mem::zeroed())), core::mem::transmute(servercontrols), freeit.param().abi()) + ldap_parse_result(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(returncode), core::mem::transmute(matcheddns.unwrap_or(core::mem::zeroed())), core::mem::transmute(errormessage.unwrap_or(core::mem::zeroed())), core::mem::transmute(referrals.unwrap_or(core::mem::zeroed())), core::mem::transmute(servercontrols), freeit.into()) } #[inline] -pub unsafe fn ldap_parse_resultA(connection: *mut LDAP, resultmessage: *mut LDAPMessage, returncode: *mut u32, matcheddns: Option<*mut windows_core::PSTR>, errormessage: Option<*mut windows_core::PSTR>, referrals: Option<*mut *mut *mut i8>, servercontrols: *mut *mut *mut LDAPControlA, freeit: P7) -> u32 -where - P7: windows_core::Param, -{ +pub unsafe fn ldap_parse_resultA(connection: *mut LDAP, resultmessage: *mut LDAPMessage, returncode: *mut u32, matcheddns: Option<*mut windows_core::PSTR>, errormessage: Option<*mut windows_core::PSTR>, referrals: Option<*mut *mut *mut i8>, servercontrols: *mut *mut *mut LDAPControlA, freeit: bool) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_parse_resultA(connection : *mut LDAP, resultmessage : *mut LDAPMessage, returncode : *mut u32, matcheddns : *mut windows_core::PSTR, errormessage : *mut windows_core::PSTR, referrals : *mut *mut *mut i8, servercontrols : *mut *mut *mut LDAPControlA, freeit : super::super::Foundation:: BOOLEAN) -> u32); - ldap_parse_resultA(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(returncode), core::mem::transmute(matcheddns.unwrap_or(core::mem::zeroed())), core::mem::transmute(errormessage.unwrap_or(core::mem::zeroed())), core::mem::transmute(referrals.unwrap_or(core::mem::zeroed())), core::mem::transmute(servercontrols), freeit.param().abi()) + ldap_parse_resultA(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(returncode), core::mem::transmute(matcheddns.unwrap_or(core::mem::zeroed())), core::mem::transmute(errormessage.unwrap_or(core::mem::zeroed())), core::mem::transmute(referrals.unwrap_or(core::mem::zeroed())), core::mem::transmute(servercontrols), freeit.into()) } #[inline] -pub unsafe fn ldap_parse_resultW(connection: *mut LDAP, resultmessage: *mut LDAPMessage, returncode: *mut u32, matcheddns: Option<*mut windows_core::PWSTR>, errormessage: Option<*mut windows_core::PWSTR>, referrals: Option<*mut *mut *mut u16>, servercontrols: *mut *mut *mut LDAPControlW, freeit: P7) -> u32 -where - P7: windows_core::Param, -{ +pub unsafe fn ldap_parse_resultW(connection: *mut LDAP, resultmessage: *mut LDAPMessage, returncode: *mut u32, matcheddns: Option<*mut windows_core::PWSTR>, errormessage: Option<*mut windows_core::PWSTR>, referrals: Option<*mut *mut *mut u16>, servercontrols: *mut *mut *mut LDAPControlW, freeit: bool) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_parse_resultW(connection : *mut LDAP, resultmessage : *mut LDAPMessage, returncode : *mut u32, matcheddns : *mut windows_core::PWSTR, errormessage : *mut windows_core::PWSTR, referrals : *mut *mut *mut u16, servercontrols : *mut *mut *mut LDAPControlW, freeit : super::super::Foundation:: BOOLEAN) -> u32); - ldap_parse_resultW(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(returncode), core::mem::transmute(matcheddns.unwrap_or(core::mem::zeroed())), core::mem::transmute(errormessage.unwrap_or(core::mem::zeroed())), core::mem::transmute(referrals.unwrap_or(core::mem::zeroed())), core::mem::transmute(servercontrols), freeit.param().abi()) + ldap_parse_resultW(core::mem::transmute(connection), core::mem::transmute(resultmessage), core::mem::transmute(returncode), core::mem::transmute(matcheddns.unwrap_or(core::mem::zeroed())), core::mem::transmute(errormessage.unwrap_or(core::mem::zeroed())), core::mem::transmute(referrals.unwrap_or(core::mem::zeroed())), core::mem::transmute(servercontrols), freeit.into()) } #[inline] pub unsafe fn ldap_parse_sort_control(externalhandle: *mut LDAP, control: *mut *mut LDAPControlA, result: *mut u32, attribute: *mut windows_core::PSTR) -> u32 { @@ -2415,9 +2394,6 @@ pub type NOTIFYOFNEWCONNECTION = Option super::super::Foundation::BOOLEAN>; pub type QUERYFORCONNECTION = Option u32>; diff --git a/crates/libs/windows/src/Windows/Win32/Networking/RemoteDifferentialCompression/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/RemoteDifferentialCompression/mod.rs index 2e0e90e2cb..cd945d887d 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/RemoteDifferentialCompression/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/RemoteDifferentialCompression/mod.rs @@ -64,11 +64,8 @@ impl windows_core::RuntimeName for IFindSimilarResults {} windows_core::imp::define_interface!(IRdcComparator, IRdcComparator_Vtbl, 0x96236a77_9dbc_11da_9e3f_0011114ae311); windows_core::imp::interface_hierarchy!(IRdcComparator, windows_core::IUnknown); impl IRdcComparator { - pub unsafe fn Process(&self, endofinput: P0, endofoutput: *mut super::super::Foundation::BOOL, inputbuffer: *mut RdcBufferPointer, outputbuffer: *mut RdcNeedPointer, rdc_errorcode: *mut RDC_ErrorCode) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Process)(windows_core::Interface::as_raw(self), endofinput.param().abi(), core::mem::transmute(endofoutput), core::mem::transmute(inputbuffer), core::mem::transmute(outputbuffer), core::mem::transmute(rdc_errorcode)).ok() + pub unsafe fn Process(&self, endofinput: bool, endofoutput: *mut super::super::Foundation::BOOL, inputbuffer: *mut RdcBufferPointer, outputbuffer: *mut RdcNeedPointer, rdc_errorcode: *mut RDC_ErrorCode) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Process)(windows_core::Interface::as_raw(self), endofinput.into(), core::mem::transmute(endofoutput), core::mem::transmute(inputbuffer), core::mem::transmute(outputbuffer), core::mem::transmute(rdc_errorcode)).ok() } } #[repr(C)] @@ -228,11 +225,8 @@ impl IRdcGenerator { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetGeneratorParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(level), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn Process(&self, endofinput: P0, endofoutput: *mut super::super::Foundation::BOOL, inputbuffer: *mut RdcBufferPointer, outputbuffers: &mut [*mut RdcBufferPointer], rdc_errorcode: *mut RDC_ErrorCode) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Process)(windows_core::Interface::as_raw(self), endofinput.param().abi(), core::mem::transmute(endofoutput), core::mem::transmute(inputbuffer), outputbuffers.len().try_into().unwrap(), core::mem::transmute(outputbuffers.as_ptr()), core::mem::transmute(rdc_errorcode)).ok() + pub unsafe fn Process(&self, endofinput: bool, endofoutput: *mut super::super::Foundation::BOOL, inputbuffer: *mut RdcBufferPointer, outputbuffers: &mut [*mut RdcBufferPointer], rdc_errorcode: *mut RDC_ErrorCode) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Process)(windows_core::Interface::as_raw(self), endofinput.into(), core::mem::transmute(endofoutput), core::mem::transmute(inputbuffer), outputbuffers.len().try_into().unwrap(), core::mem::transmute(outputbuffers.as_ptr()), core::mem::transmute(rdc_errorcode)).ok() } } #[repr(C)] @@ -660,28 +654,23 @@ impl windows_core::RuntimeName for IRdcSimilarityGenerator {} windows_core::imp::define_interface!(ISimilarity, ISimilarity_Vtbl, 0x96236a83_9dbc_11da_9e3f_0011114ae311); windows_core::imp::interface_hierarchy!(ISimilarity, windows_core::IUnknown); impl ISimilarity { - pub unsafe fn CreateTable(&self, path: P0, truncate: P1, securitydescriptor: *const u8, recordsize: u32) -> windows_core::Result + pub unsafe fn CreateTable(&self, path: P0, truncate: bool, securitydescriptor: *const u8, recordsize: u32) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateTable)(windows_core::Interface::as_raw(self), path.param().abi(), truncate.param().abi(), core::mem::transmute(securitydescriptor), core::mem::transmute(recordsize), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CreateTable)(windows_core::Interface::as_raw(self), path.param().abi(), truncate.into(), core::mem::transmute(securitydescriptor), core::mem::transmute(recordsize), &mut result__).map(|| result__) } - pub unsafe fn CreateTableIndirect(&self, mapping: P0, fileidfile: P1, truncate: P2, recordsize: u32) -> windows_core::Result + pub unsafe fn CreateTableIndirect(&self, mapping: P0, fileidfile: P1, truncate: bool, recordsize: u32) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateTableIndirect)(windows_core::Interface::as_raw(self), mapping.param().abi(), fileidfile.param().abi(), truncate.param().abi(), core::mem::transmute(recordsize), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CreateTableIndirect)(windows_core::Interface::as_raw(self), mapping.param().abi(), fileidfile.param().abi(), truncate.into(), core::mem::transmute(recordsize), &mut result__).map(|| result__) } - pub unsafe fn CloseTable(&self, isvalid: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).CloseTable)(windows_core::Interface::as_raw(self), isvalid.param().abi()).ok() + pub unsafe fn CloseTable(&self, isvalid: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CloseTable)(windows_core::Interface::as_raw(self), isvalid.into()).ok() } pub unsafe fn Append(&self, similarityfileid: *const SimilarityFileId, similaritydata: *const SimilarityData) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Append)(windows_core::Interface::as_raw(self), core::mem::transmute(similarityfileid), core::mem::transmute(similaritydata)).ok() @@ -795,27 +784,22 @@ impl windows_core::RuntimeName for ISimilarity {} windows_core::imp::define_interface!(ISimilarityFileIdTable, ISimilarityFileIdTable_Vtbl, 0x96236a7f_9dbc_11da_9e3f_0011114ae311); windows_core::imp::interface_hierarchy!(ISimilarityFileIdTable, windows_core::IUnknown); impl ISimilarityFileIdTable { - pub unsafe fn CreateTable(&self, path: P0, truncate: P1, securitydescriptor: *const u8, recordsize: u32) -> windows_core::Result + pub unsafe fn CreateTable(&self, path: P0, truncate: bool, securitydescriptor: *const u8, recordsize: u32) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateTable)(windows_core::Interface::as_raw(self), path.param().abi(), truncate.param().abi(), core::mem::transmute(securitydescriptor), core::mem::transmute(recordsize), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CreateTable)(windows_core::Interface::as_raw(self), path.param().abi(), truncate.into(), core::mem::transmute(securitydescriptor), core::mem::transmute(recordsize), &mut result__).map(|| result__) } - pub unsafe fn CreateTableIndirect(&self, fileidfile: P0, truncate: P1, recordsize: u32) -> windows_core::Result + pub unsafe fn CreateTableIndirect(&self, fileidfile: P0, truncate: bool, recordsize: u32) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateTableIndirect)(windows_core::Interface::as_raw(self), fileidfile.param().abi(), truncate.param().abi(), core::mem::transmute(recordsize), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CreateTableIndirect)(windows_core::Interface::as_raw(self), fileidfile.param().abi(), truncate.into(), core::mem::transmute(recordsize), &mut result__).map(|| result__) } - pub unsafe fn CloseTable(&self, isvalid: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).CloseTable)(windows_core::Interface::as_raw(self), isvalid.param().abi()).ok() + pub unsafe fn CloseTable(&self, isvalid: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CloseTable)(windows_core::Interface::as_raw(self), isvalid.into()).ok() } pub unsafe fn Append(&self, similarityfileid: *const SimilarityFileId) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -987,12 +971,9 @@ impl ISimilarityTraitsMappedView { pub unsafe fn Unmap(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Unmap)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn Get(&self, index: u64, dirty: P1, numelements: u32) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn Get(&self, index: u64, dirty: bool, numelements: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), core::mem::transmute(index), dirty.param().abi(), core::mem::transmute(numelements), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), core::mem::transmute(index), dirty.into(), core::mem::transmute(numelements), &mut result__).map(|| result__) } pub unsafe fn GetView(&self, mappedpagebegin: *mut *mut u8, mappedpageend: *mut *mut u8) { (windows_core::Interface::vtable(self).GetView)(windows_core::Interface::as_raw(self), core::mem::transmute(mappedpagebegin), core::mem::transmute(mappedpageend)) @@ -1173,27 +1154,22 @@ impl windows_core::RuntimeName for ISimilarityTraitsMapping {} windows_core::imp::define_interface!(ISimilarityTraitsTable, ISimilarityTraitsTable_Vtbl, 0x96236a7e_9dbc_11da_9e3f_0011114ae311); windows_core::imp::interface_hierarchy!(ISimilarityTraitsTable, windows_core::IUnknown); impl ISimilarityTraitsTable { - pub unsafe fn CreateTable(&self, path: P0, truncate: P1, securitydescriptor: *const u8) -> windows_core::Result + pub unsafe fn CreateTable(&self, path: P0, truncate: bool, securitydescriptor: *const u8) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateTable)(windows_core::Interface::as_raw(self), path.param().abi(), truncate.param().abi(), core::mem::transmute(securitydescriptor), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CreateTable)(windows_core::Interface::as_raw(self), path.param().abi(), truncate.into(), core::mem::transmute(securitydescriptor), &mut result__).map(|| result__) } - pub unsafe fn CreateTableIndirect(&self, mapping: P0, truncate: P1) -> windows_core::Result + pub unsafe fn CreateTableIndirect(&self, mapping: P0, truncate: bool) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateTableIndirect)(windows_core::Interface::as_raw(self), mapping.param().abi(), truncate.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CreateTableIndirect)(windows_core::Interface::as_raw(self), mapping.param().abi(), truncate.into(), &mut result__).map(|| result__) } - pub unsafe fn CloseTable(&self, isvalid: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).CloseTable)(windows_core::Interface::as_raw(self), isvalid.param().abi()).ok() + pub unsafe fn CloseTable(&self, isvalid: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CloseTable)(windows_core::Interface::as_raw(self), isvalid.into()).ok() } pub unsafe fn Append(&self, data: *const SimilarityData, fileindex: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Append)(windows_core::Interface::as_raw(self), core::mem::transmute(data), core::mem::transmute(fileindex)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Networking/WebSocket/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/WebSocket/mod.rs index fe9a81e31d..1766e73456 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WebSocket/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WebSocket/mod.rs @@ -138,9 +138,6 @@ pub const WEB_SOCKET_ENDPOINT_UNAVAILABLE_CLOSE_STATUS: WEB_SOCKET_CLOSE_STATUS #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct WEB_SOCKET_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for WEB_SOCKET_HANDLE { - type TypeKind = windows_core::CopyType; -} impl WEB_SOCKET_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/Networking/WinHttp/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/WinHttp/mod.rs index ade029db4c..879e1759c7 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WinHttp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WinHttp/mod.rs @@ -195,14 +195,12 @@ pub unsafe fn WinHttpReadDataEx(hrequest: *mut core::ffi::c_void, lpbuffer: *mut WinHttpReadDataEx(core::mem::transmute(hrequest), core::mem::transmute(lpbuffer), core::mem::transmute(dwnumberofbytestoread), core::mem::transmute(lpdwnumberofbytesread), core::mem::transmute(ullflags), core::mem::transmute(cbproperty), core::mem::transmute(pvproperty.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn WinHttpReadProxySettings(hsession: *const core::ffi::c_void, pcwszconnectionname: P1, ffallbacktodefaultsettings: P2, fsetautodiscoverfordefaultsettings: P3, pdwsettingsversion: *mut u32, pfdefaultsettingsarereturned: *mut super::super::Foundation::BOOL, pwinhttpproxysettings: *mut WINHTTP_PROXY_SETTINGS) -> u32 +pub unsafe fn WinHttpReadProxySettings(hsession: *const core::ffi::c_void, pcwszconnectionname: P1, ffallbacktodefaultsettings: bool, fsetautodiscoverfordefaultsettings: bool, pdwsettingsversion: *mut u32, pfdefaultsettingsarereturned: *mut super::super::Foundation::BOOL, pwinhttpproxysettings: *mut WINHTTP_PROXY_SETTINGS) -> u32 where P1: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("winhttp.dll" "system" fn WinHttpReadProxySettings(hsession : *const core::ffi::c_void, pcwszconnectionname : windows_core::PCWSTR, ffallbacktodefaultsettings : super::super::Foundation:: BOOL, fsetautodiscoverfordefaultsettings : super::super::Foundation:: BOOL, pdwsettingsversion : *mut u32, pfdefaultsettingsarereturned : *mut super::super::Foundation:: BOOL, pwinhttpproxysettings : *mut WINHTTP_PROXY_SETTINGS) -> u32); - WinHttpReadProxySettings(core::mem::transmute(hsession), pcwszconnectionname.param().abi(), ffallbacktodefaultsettings.param().abi(), fsetautodiscoverfordefaultsettings.param().abi(), core::mem::transmute(pdwsettingsversion), core::mem::transmute(pfdefaultsettingsarereturned), core::mem::transmute(pwinhttpproxysettings)) + WinHttpReadProxySettings(core::mem::transmute(hsession), pcwszconnectionname.param().abi(), ffallbacktodefaultsettings.into(), fsetautodiscoverfordefaultsettings.into(), core::mem::transmute(pdwsettingsversion), core::mem::transmute(pfdefaultsettingsarereturned), core::mem::transmute(pwinhttpproxysettings)) } #[inline] pub unsafe fn WinHttpReceiveResponse(hrequest: *mut core::ffi::c_void, lpreserved: *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -244,12 +242,9 @@ pub unsafe fn WinHttpSetOption(hinternet: Option<*const core::ffi::c_void>, dwop WinHttpSetOption(core::mem::transmute(hinternet.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwoption), core::mem::transmute(lpbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[inline] -pub unsafe fn WinHttpSetProxySettingsPerUser(fproxysettingsperuser: P0) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn WinHttpSetProxySettingsPerUser(fproxysettingsperuser: bool) -> u32 { windows_targets::link!("winhttp.dll" "system" fn WinHttpSetProxySettingsPerUser(fproxysettingsperuser : super::super::Foundation:: BOOL) -> u32); - WinHttpSetProxySettingsPerUser(fproxysettingsperuser.param().abi()) + WinHttpSetProxySettingsPerUser(fproxysettingsperuser.into()) } #[inline] pub unsafe fn WinHttpSetStatusCallback(hinternet: *mut core::ffi::c_void, lpfninternetcallback: WINHTTP_STATUS_CALLBACK, dwnotificationflags: u32, dwreserved: usize) -> WINHTTP_STATUS_CALLBACK { @@ -315,12 +310,9 @@ pub unsafe fn WinHttpWriteData(hrequest: *mut core::ffi::c_void, lpbuffer: Optio WinHttpWriteData(core::mem::transmute(hrequest), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwnumberofbytestowrite), core::mem::transmute(lpdwnumberofbyteswritten)).ok() } #[inline] -pub unsafe fn WinHttpWriteProxySettings(hsession: *const core::ffi::c_void, fforceupdate: P1, pwinhttpproxysettings: *const WINHTTP_PROXY_SETTINGS) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn WinHttpWriteProxySettings(hsession: *const core::ffi::c_void, fforceupdate: bool, pwinhttpproxysettings: *const WINHTTP_PROXY_SETTINGS) -> u32 { windows_targets::link!("winhttp.dll" "system" fn WinHttpWriteProxySettings(hsession : *const core::ffi::c_void, fforceupdate : super::super::Foundation:: BOOL, pwinhttpproxysettings : *const WINHTTP_PROXY_SETTINGS) -> u32); - WinHttpWriteProxySettings(core::mem::transmute(hsession), fforceupdate.param().abi(), core::mem::transmute(pwinhttpproxysettings)) + WinHttpWriteProxySettings(core::mem::transmute(hsession), fforceupdate.into(), core::mem::transmute(pwinhttpproxysettings)) } pub const API_GET_PROXY_FOR_URL: u32 = 6u32; pub const API_GET_PROXY_SETTINGS: u32 = 7u32; diff --git a/crates/libs/windows/src/Windows/Win32/Networking/WinInet/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/WinInet/mod.rs index 3a13a201e9..479ae178fc 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WinInet/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WinInet/mod.rs @@ -178,14 +178,13 @@ where CreateUrlCacheEntryA(lpszurlname.param().abi(), core::mem::transmute(dwexpectedfilesize), lpszfileextension.param().abi(), core::mem::transmute(lpszfilename.as_ptr()), core::mem::transmute(dwreserved)).ok() } #[inline] -pub unsafe fn CreateUrlCacheEntryExW(lpszurlname: P0, dwexpectedfilesize: u32, lpszfileextension: P2, lpszfilename: &mut [u16; 260], dwreserved: u32, fpreserveincomingfilename: P5) -> super::super::Foundation::BOOL +pub unsafe fn CreateUrlCacheEntryExW(lpszurlname: P0, dwexpectedfilesize: u32, lpszfileextension: P2, lpszfilename: &mut [u16; 260], dwreserved: u32, fpreserveincomingfilename: bool) -> super::super::Foundation::BOOL where P0: windows_core::Param, P2: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn CreateUrlCacheEntryExW(lpszurlname : windows_core::PCWSTR, dwexpectedfilesize : u32, lpszfileextension : windows_core::PCWSTR, lpszfilename : windows_core::PWSTR, dwreserved : u32, fpreserveincomingfilename : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - CreateUrlCacheEntryExW(lpszurlname.param().abi(), core::mem::transmute(dwexpectedfilesize), lpszfileextension.param().abi(), core::mem::transmute(lpszfilename.as_ptr()), core::mem::transmute(dwreserved), fpreserveincomingfilename.param().abi()) + CreateUrlCacheEntryExW(lpszurlname.param().abi(), core::mem::transmute(dwexpectedfilesize), lpszfileextension.param().abi(), core::mem::transmute(lpszfilename.as_ptr()), core::mem::transmute(dwreserved), fpreserveincomingfilename.into()) } #[inline] pub unsafe fn CreateUrlCacheEntryW(lpszurlname: P0, dwexpectedfilesize: u32, lpszfileextension: P2, lpszfilename: &mut [u16; 260], dwreserved: u32) -> windows_core::Result<()> @@ -270,22 +269,20 @@ pub unsafe fn DoConnectoidsExist() -> super::super::Foundation::BOOL { DoConnectoidsExist() } #[inline] -pub unsafe fn ExportCookieFileA(szfilename: P0, fappend: P1) -> super::super::Foundation::BOOL +pub unsafe fn ExportCookieFileA(szfilename: P0, fappend: bool) -> super::super::Foundation::BOOL where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn ExportCookieFileA(szfilename : windows_core::PCSTR, fappend : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - ExportCookieFileA(szfilename.param().abi(), fappend.param().abi()) + ExportCookieFileA(szfilename.param().abi(), fappend.into()) } #[inline] -pub unsafe fn ExportCookieFileW(szfilename: P0, fappend: P1) -> super::super::Foundation::BOOL +pub unsafe fn ExportCookieFileW(szfilename: P0, fappend: bool) -> super::super::Foundation::BOOL where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn ExportCookieFileW(szfilename : windows_core::PCWSTR, fappend : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - ExportCookieFileW(szfilename.param().abi(), fappend.param().abi()) + ExportCookieFileW(szfilename.param().abi(), fappend.into()) } #[inline] pub unsafe fn FindCloseUrlCache(henumhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -404,22 +401,20 @@ where FreeUrlCacheSpaceW(lpszcachepath.param().abi(), core::mem::transmute(dwsize), core::mem::transmute(dwfilter)).ok() } #[inline] -pub unsafe fn FtpCommandA(hconnect: *const core::ffi::c_void, fexpectresponse: P1, dwflags: FTP_FLAGS, lpszcommand: P3, dwcontext: Option, phftpcommand: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn FtpCommandA(hconnect: *const core::ffi::c_void, fexpectresponse: bool, dwflags: FTP_FLAGS, lpszcommand: P3, dwcontext: Option, phftpcommand: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> where - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn FtpCommandA(hconnect : *const core::ffi::c_void, fexpectresponse : super::super::Foundation:: BOOL, dwflags : FTP_FLAGS, lpszcommand : windows_core::PCSTR, dwcontext : usize, phftpcommand : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - FtpCommandA(core::mem::transmute(hconnect), fexpectresponse.param().abi(), core::mem::transmute(dwflags), lpszcommand.param().abi(), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(phftpcommand.unwrap_or(core::mem::zeroed()))).ok() + FtpCommandA(core::mem::transmute(hconnect), fexpectresponse.into(), core::mem::transmute(dwflags), lpszcommand.param().abi(), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(phftpcommand.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn FtpCommandW(hconnect: *const core::ffi::c_void, fexpectresponse: P1, dwflags: FTP_FLAGS, lpszcommand: P3, dwcontext: Option, phftpcommand: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn FtpCommandW(hconnect: *const core::ffi::c_void, fexpectresponse: bool, dwflags: FTP_FLAGS, lpszcommand: P3, dwcontext: Option, phftpcommand: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> where - P1: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn FtpCommandW(hconnect : *const core::ffi::c_void, fexpectresponse : super::super::Foundation:: BOOL, dwflags : FTP_FLAGS, lpszcommand : windows_core::PCWSTR, dwcontext : usize, phftpcommand : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - FtpCommandW(core::mem::transmute(hconnect), fexpectresponse.param().abi(), core::mem::transmute(dwflags), lpszcommand.param().abi(), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(phftpcommand.unwrap_or(core::mem::zeroed()))).ok() + FtpCommandW(core::mem::transmute(hconnect), fexpectresponse.into(), core::mem::transmute(dwflags), lpszcommand.param().abi(), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(phftpcommand.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn FtpCreateDirectoryA(hconnect: *const core::ffi::c_void, lpszdirectory: P1) -> windows_core::Result<()> @@ -482,24 +477,22 @@ pub unsafe fn FtpGetCurrentDirectoryW(hconnect: *const core::ffi::c_void, lpszcu FtpGetCurrentDirectoryW(core::mem::transmute(hconnect), core::mem::transmute(lpszcurrentdirectory), core::mem::transmute(lpdwcurrentdirectory)).ok() } #[inline] -pub unsafe fn FtpGetFileA(hconnect: *const core::ffi::c_void, lpszremotefile: P1, lpsznewfile: P2, ffailifexists: P3, dwflagsandattributes: u32, dwflags: u32, dwcontext: Option) -> windows_core::Result<()> +pub unsafe fn FtpGetFileA(hconnect: *const core::ffi::c_void, lpszremotefile: P1, lpsznewfile: P2, ffailifexists: bool, dwflagsandattributes: u32, dwflags: u32, dwcontext: Option) -> windows_core::Result<()> where P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn FtpGetFileA(hconnect : *const core::ffi::c_void, lpszremotefile : windows_core::PCSTR, lpsznewfile : windows_core::PCSTR, ffailifexists : super::super::Foundation:: BOOL, dwflagsandattributes : u32, dwflags : u32, dwcontext : usize) -> super::super::Foundation:: BOOL); - FtpGetFileA(core::mem::transmute(hconnect), lpszremotefile.param().abi(), lpsznewfile.param().abi(), ffailifexists.param().abi(), core::mem::transmute(dwflagsandattributes), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() + FtpGetFileA(core::mem::transmute(hconnect), lpszremotefile.param().abi(), lpsznewfile.param().abi(), ffailifexists.into(), core::mem::transmute(dwflagsandattributes), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn FtpGetFileEx(hftpsession: *const core::ffi::c_void, lpszremotefile: P1, lpsznewfile: P2, ffailifexists: P3, dwflagsandattributes: u32, dwflags: u32, dwcontext: Option) -> super::super::Foundation::BOOL +pub unsafe fn FtpGetFileEx(hftpsession: *const core::ffi::c_void, lpszremotefile: P1, lpsznewfile: P2, ffailifexists: bool, dwflagsandattributes: u32, dwflags: u32, dwcontext: Option) -> super::super::Foundation::BOOL where P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn FtpGetFileEx(hftpsession : *const core::ffi::c_void, lpszremotefile : windows_core::PCSTR, lpsznewfile : windows_core::PCWSTR, ffailifexists : super::super::Foundation:: BOOL, dwflagsandattributes : u32, dwflags : u32, dwcontext : usize) -> super::super::Foundation:: BOOL); - FtpGetFileEx(core::mem::transmute(hftpsession), lpszremotefile.param().abi(), lpsznewfile.param().abi(), ffailifexists.param().abi(), core::mem::transmute(dwflagsandattributes), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) + FtpGetFileEx(core::mem::transmute(hftpsession), lpszremotefile.param().abi(), lpsznewfile.param().abi(), ffailifexists.into(), core::mem::transmute(dwflagsandattributes), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn FtpGetFileSize(hfile: *const core::ffi::c_void, lpdwfilesizehigh: Option<*mut u32>) -> u32 { @@ -507,14 +500,13 @@ pub unsafe fn FtpGetFileSize(hfile: *const core::ffi::c_void, lpdwfilesizehigh: FtpGetFileSize(core::mem::transmute(hfile), core::mem::transmute(lpdwfilesizehigh.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn FtpGetFileW(hconnect: *const core::ffi::c_void, lpszremotefile: P1, lpsznewfile: P2, ffailifexists: P3, dwflagsandattributes: u32, dwflags: u32, dwcontext: Option) -> windows_core::Result<()> +pub unsafe fn FtpGetFileW(hconnect: *const core::ffi::c_void, lpszremotefile: P1, lpsznewfile: P2, ffailifexists: bool, dwflagsandattributes: u32, dwflags: u32, dwcontext: Option) -> windows_core::Result<()> where P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn FtpGetFileW(hconnect : *const core::ffi::c_void, lpszremotefile : windows_core::PCWSTR, lpsznewfile : windows_core::PCWSTR, ffailifexists : super::super::Foundation:: BOOL, dwflagsandattributes : u32, dwflags : u32, dwcontext : usize) -> super::super::Foundation:: BOOL); - FtpGetFileW(core::mem::transmute(hconnect), lpszremotefile.param().abi(), lpsznewfile.param().abi(), ffailifexists.param().abi(), core::mem::transmute(dwflagsandattributes), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() + FtpGetFileW(core::mem::transmute(hconnect), lpszremotefile.param().abi(), lpsznewfile.param().abi(), ffailifexists.into(), core::mem::transmute(dwflagsandattributes), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn FtpOpenFileA(hconnect: *const core::ffi::c_void, lpszfilename: P1, dwaccess: u32, dwflags: FTP_FLAGS, dwcontext: Option) -> *mut core::ffi::c_void @@ -844,12 +836,9 @@ where HttpIsHostHstsEnabled(pcwszurl.param().abi(), core::mem::transmute(pfishsts)) } #[inline] -pub unsafe fn HttpOpenDependencyHandle(hrequesthandle: *const core::ffi::c_void, fbackground: P1, phdependencyhandle: *mut *mut core::ffi::c_void) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn HttpOpenDependencyHandle(hrequesthandle: *const core::ffi::c_void, fbackground: bool, phdependencyhandle: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("wininet.dll" "system" fn HttpOpenDependencyHandle(hrequesthandle : *const core::ffi::c_void, fbackground : super::super::Foundation:: BOOL, phdependencyhandle : *mut *mut core::ffi::c_void) -> u32); - HttpOpenDependencyHandle(core::mem::transmute(hrequesthandle), fbackground.param().abi(), core::mem::transmute(phdependencyhandle)) + HttpOpenDependencyHandle(core::mem::transmute(hrequesthandle), fbackground.into(), core::mem::transmute(phdependencyhandle)) } #[inline] pub unsafe fn HttpOpenRequestA(hconnect: *const core::ffi::c_void, lpszverb: P1, lpszobjectname: P2, lpszversion: P3, lpszreferrer: P4, lplpszaccepttypes: Option<*const windows_core::PCSTR>, dwflags: u32, dwcontext: Option) -> *mut core::ffi::c_void @@ -1065,34 +1054,31 @@ where InternetCombineUrlW(lpszbaseurl.param().abi(), lpszrelativeurl.param().abi(), core::mem::transmute(lpszbuffer), core::mem::transmute(lpdwbufferlength), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn InternetConfirmZoneCrossing(hwnd: super::super::Foundation::HWND, szurlprev: P1, szurlnew: P2, bpost: P3) -> u32 +pub unsafe fn InternetConfirmZoneCrossing(hwnd: super::super::Foundation::HWND, szurlprev: P1, szurlnew: P2, bpost: bool) -> u32 where P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetConfirmZoneCrossing(hwnd : super::super::Foundation:: HWND, szurlprev : windows_core::PCSTR, szurlnew : windows_core::PCSTR, bpost : super::super::Foundation:: BOOL) -> u32); - InternetConfirmZoneCrossing(core::mem::transmute(hwnd), szurlprev.param().abi(), szurlnew.param().abi(), bpost.param().abi()) + InternetConfirmZoneCrossing(core::mem::transmute(hwnd), szurlprev.param().abi(), szurlnew.param().abi(), bpost.into()) } #[inline] -pub unsafe fn InternetConfirmZoneCrossingA(hwnd: super::super::Foundation::HWND, szurlprev: P1, szurlnew: P2, bpost: P3) -> u32 +pub unsafe fn InternetConfirmZoneCrossingA(hwnd: super::super::Foundation::HWND, szurlprev: P1, szurlnew: P2, bpost: bool) -> u32 where P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetConfirmZoneCrossingA(hwnd : super::super::Foundation:: HWND, szurlprev : windows_core::PCSTR, szurlnew : windows_core::PCSTR, bpost : super::super::Foundation:: BOOL) -> u32); - InternetConfirmZoneCrossingA(core::mem::transmute(hwnd), szurlprev.param().abi(), szurlnew.param().abi(), bpost.param().abi()) + InternetConfirmZoneCrossingA(core::mem::transmute(hwnd), szurlprev.param().abi(), szurlnew.param().abi(), bpost.into()) } #[inline] -pub unsafe fn InternetConfirmZoneCrossingW(hwnd: super::super::Foundation::HWND, szurlprev: P1, szurlnew: P2, bpost: P3) -> u32 +pub unsafe fn InternetConfirmZoneCrossingW(hwnd: super::super::Foundation::HWND, szurlprev: P1, szurlnew: P2, bpost: bool) -> u32 where P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetConfirmZoneCrossingW(hwnd : super::super::Foundation:: HWND, szurlprev : windows_core::PCWSTR, szurlnew : windows_core::PCWSTR, bpost : super::super::Foundation:: BOOL) -> u32); - InternetConfirmZoneCrossingW(core::mem::transmute(hwnd), szurlprev.param().abi(), szurlnew.param().abi(), bpost.param().abi()) + InternetConfirmZoneCrossingW(core::mem::transmute(hwnd), szurlprev.param().abi(), szurlnew.param().abi(), bpost.into()) } #[inline] pub unsafe fn InternetConnectA(hinternet: *const core::ffi::c_void, lpszservername: P1, nserverport: u16, lpszusername: P3, lpszpassword: P4, dwservice: u32, dwflags: u32, dwcontext: Option) -> *mut core::ffi::c_void @@ -1115,13 +1101,12 @@ where InternetConnectW(core::mem::transmute(hinternet), lpszservername.param().abi(), core::mem::transmute(nserverport), lpszusername.param().abi(), lpszpassword.param().abi(), core::mem::transmute(dwservice), core::mem::transmute(dwflags), core::mem::transmute(dwcontext.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn InternetConvertUrlFromWireToWideChar(pcszurl: &[u8], pcwszbaseurl: P2, dwcodepagehost: u32, dwcodepagepath: u32, fencodepathextra: P5, dwcodepageextra: u32, ppwszconvertedurl: *mut windows_core::PWSTR) -> u32 +pub unsafe fn InternetConvertUrlFromWireToWideChar(pcszurl: &[u8], pcwszbaseurl: P2, dwcodepagehost: u32, dwcodepagepath: u32, fencodepathextra: bool, dwcodepageextra: u32, ppwszconvertedurl: *mut windows_core::PWSTR) -> u32 where P2: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetConvertUrlFromWireToWideChar(pcszurl : windows_core::PCSTR, cchurl : u32, pcwszbaseurl : windows_core::PCWSTR, dwcodepagehost : u32, dwcodepagepath : u32, fencodepathextra : super::super::Foundation:: BOOL, dwcodepageextra : u32, ppwszconvertedurl : *mut windows_core::PWSTR) -> u32); - InternetConvertUrlFromWireToWideChar(core::mem::transmute(pcszurl.as_ptr()), pcszurl.len().try_into().unwrap(), pcwszbaseurl.param().abi(), core::mem::transmute(dwcodepagehost), core::mem::transmute(dwcodepagepath), fencodepathextra.param().abi(), core::mem::transmute(dwcodepageextra), core::mem::transmute(ppwszconvertedurl)) + InternetConvertUrlFromWireToWideChar(core::mem::transmute(pcszurl.as_ptr()), pcszurl.len().try_into().unwrap(), pcwszbaseurl.param().abi(), core::mem::transmute(dwcodepagehost), core::mem::transmute(dwcodepagepath), fencodepathextra.into(), core::mem::transmute(dwcodepageextra), core::mem::transmute(ppwszconvertedurl)) } #[cfg(feature = "Win32_Networking_WinHttp")] #[inline] @@ -1786,23 +1771,21 @@ where RetrieveUrlCacheEntryFileW(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn RetrieveUrlCacheEntryStreamA(lpszurlname: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: *mut u32, frandomread: P3, dwreserved: Option) -> windows_core::Result +pub unsafe fn RetrieveUrlCacheEntryStreamA(lpszurlname: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: *mut u32, frandomread: bool, dwreserved: Option) -> windows_core::Result where P0: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn RetrieveUrlCacheEntryStreamA(lpszurlname : windows_core::PCSTR, lpcacheentryinfo : *mut INTERNET_CACHE_ENTRY_INFOA, lpcbcacheentryinfo : *mut u32, frandomread : super::super::Foundation:: BOOL, dwreserved : u32) -> super::super::Foundation:: HANDLE); - let result__ = RetrieveUrlCacheEntryStreamA(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo), frandomread.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))); + let result__ = RetrieveUrlCacheEntryStreamA(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo), frandomread.into(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn RetrieveUrlCacheEntryStreamW(lpszurlname: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: *mut u32, frandomread: P3, dwreserved: Option) -> windows_core::Result +pub unsafe fn RetrieveUrlCacheEntryStreamW(lpszurlname: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: *mut u32, frandomread: bool, dwreserved: Option) -> windows_core::Result where P0: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn RetrieveUrlCacheEntryStreamW(lpszurlname : windows_core::PCWSTR, lpcacheentryinfo : *mut INTERNET_CACHE_ENTRY_INFOW, lpcbcacheentryinfo : *mut u32, frandomread : super::super::Foundation:: BOOL, dwreserved : u32) -> super::super::Foundation:: HANDLE); - let result__ = RetrieveUrlCacheEntryStreamW(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo), frandomread.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))); + let result__ = RetrieveUrlCacheEntryStreamW(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcbcacheentryinfo), frandomread.into(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -2024,13 +2007,12 @@ where UrlCacheRetrieveEntryFile(core::mem::transmute(happcache.unwrap_or(core::mem::zeroed())), pcwszurl.param().abi(), core::mem::transmute(pcacheentryinfo), core::mem::transmute(phentryfile)) } #[inline] -pub unsafe fn UrlCacheRetrieveEntryStream(happcache: Option<*const core::ffi::c_void>, pcwszurl: P1, frandomread: P2, pcacheentryinfo: *mut URLCACHE_ENTRY_INFO, phentrystream: *mut *mut core::ffi::c_void) -> u32 +pub unsafe fn UrlCacheRetrieveEntryStream(happcache: Option<*const core::ffi::c_void>, pcwszurl: P1, frandomread: bool, pcacheentryinfo: *mut URLCACHE_ENTRY_INFO, phentrystream: *mut *mut core::ffi::c_void) -> u32 where P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn UrlCacheRetrieveEntryStream(happcache : *const core::ffi::c_void, pcwszurl : windows_core::PCWSTR, frandomread : super::super::Foundation:: BOOL, pcacheentryinfo : *mut URLCACHE_ENTRY_INFO, phentrystream : *mut *mut core::ffi::c_void) -> u32); - UrlCacheRetrieveEntryStream(core::mem::transmute(happcache.unwrap_or(core::mem::zeroed())), pcwszurl.param().abi(), frandomread.param().abi(), core::mem::transmute(pcacheentryinfo), core::mem::transmute(phentrystream)) + UrlCacheRetrieveEntryStream(core::mem::transmute(happcache.unwrap_or(core::mem::zeroed())), pcwszurl.param().abi(), frandomread.into(), core::mem::transmute(pcacheentryinfo), core::mem::transmute(phentrystream)) } #[inline] pub unsafe fn UrlCacheServer() -> u32 { @@ -2893,9 +2875,6 @@ impl Default for HTTP_PUSH_TRANSPORT_SETTING { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HTTP_PUSH_WAIT_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HTTP_PUSH_WAIT_HANDLE { - type TypeKind = windows_core::CopyType; -} impl HTTP_PUSH_WAIT_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/Networking/WinSock/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/WinSock/mod.rs index 6261682456..9e47956dd4 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WinSock/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WinSock/mod.rs @@ -238,40 +238,36 @@ pub unsafe fn RtlIpv4AddressToStringW(addr: *const IN_ADDR, s: &mut [u16; 16]) - RtlIpv4AddressToStringW(core::mem::transmute(addr), core::mem::transmute(s.as_ptr())) } #[inline] -pub unsafe fn RtlIpv4StringToAddressA(s: P0, strict: P1, terminator: *mut windows_core::PCSTR, addr: *mut IN_ADDR) -> i32 +pub unsafe fn RtlIpv4StringToAddressA(s: P0, strict: bool, terminator: *mut windows_core::PCSTR, addr: *mut IN_ADDR) -> i32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlIpv4StringToAddressA(s : windows_core::PCSTR, strict : super::super::Foundation:: BOOLEAN, terminator : *mut windows_core::PCSTR, addr : *mut IN_ADDR) -> i32); - RtlIpv4StringToAddressA(s.param().abi(), strict.param().abi(), core::mem::transmute(terminator), core::mem::transmute(addr)) + RtlIpv4StringToAddressA(s.param().abi(), strict.into(), core::mem::transmute(terminator), core::mem::transmute(addr)) } #[inline] -pub unsafe fn RtlIpv4StringToAddressExA(addressstring: P0, strict: P1, address: *mut IN_ADDR, port: *mut u16) -> i32 +pub unsafe fn RtlIpv4StringToAddressExA(addressstring: P0, strict: bool, address: *mut IN_ADDR, port: *mut u16) -> i32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlIpv4StringToAddressExA(addressstring : windows_core::PCSTR, strict : super::super::Foundation:: BOOLEAN, address : *mut IN_ADDR, port : *mut u16) -> i32); - RtlIpv4StringToAddressExA(addressstring.param().abi(), strict.param().abi(), core::mem::transmute(address), core::mem::transmute(port)) + RtlIpv4StringToAddressExA(addressstring.param().abi(), strict.into(), core::mem::transmute(address), core::mem::transmute(port)) } #[inline] -pub unsafe fn RtlIpv4StringToAddressExW(addressstring: P0, strict: P1, address: *mut IN_ADDR, port: *mut u16) -> i32 +pub unsafe fn RtlIpv4StringToAddressExW(addressstring: P0, strict: bool, address: *mut IN_ADDR, port: *mut u16) -> i32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlIpv4StringToAddressExW(addressstring : windows_core::PCWSTR, strict : super::super::Foundation:: BOOLEAN, address : *mut IN_ADDR, port : *mut u16) -> i32); - RtlIpv4StringToAddressExW(addressstring.param().abi(), strict.param().abi(), core::mem::transmute(address), core::mem::transmute(port)) + RtlIpv4StringToAddressExW(addressstring.param().abi(), strict.into(), core::mem::transmute(address), core::mem::transmute(port)) } #[inline] -pub unsafe fn RtlIpv4StringToAddressW(s: P0, strict: P1, terminator: *mut windows_core::PCWSTR, addr: *mut IN_ADDR) -> i32 +pub unsafe fn RtlIpv4StringToAddressW(s: P0, strict: bool, terminator: *mut windows_core::PCWSTR, addr: *mut IN_ADDR) -> i32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlIpv4StringToAddressW(s : windows_core::PCWSTR, strict : super::super::Foundation:: BOOLEAN, terminator : *mut windows_core::PCWSTR, addr : *mut IN_ADDR) -> i32); - RtlIpv4StringToAddressW(s.param().abi(), strict.param().abi(), core::mem::transmute(terminator), core::mem::transmute(addr)) + RtlIpv4StringToAddressW(s.param().abi(), strict.into(), core::mem::transmute(terminator), core::mem::transmute(addr)) } #[inline] pub unsafe fn RtlIpv6AddressToStringA(addr: *const IN6_ADDR, s: &mut [u8; 46]) -> windows_core::PSTR { @@ -384,12 +380,9 @@ pub unsafe fn SetServiceW(dwnamespace: u32, dwoperation: SET_SERVICE_OPERATION, SetServiceW(core::mem::transmute(dwnamespace), core::mem::transmute(dwoperation), core::mem::transmute(dwflags), core::mem::transmute(lpserviceinfo), core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdwstatusflags)) } #[inline] -pub unsafe fn SetSocketMediaStreamingMode(value: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetSocketMediaStreamingMode(value: bool) -> windows_core::Result<()> { windows_targets::link!("windows.networking.dll" "system" fn SetSocketMediaStreamingMode(value : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - SetSocketMediaStreamingMode(value.param().abi()).ok() + SetSocketMediaStreamingMode(value.into()).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -623,12 +616,9 @@ pub unsafe fn WSAGetLastError() -> WSA_ERROR { } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn WSAGetOverlappedResult(s: SOCKET, lpoverlapped: *const super::super::System::IO::OVERLAPPED, lpcbtransfer: *mut u32, fwait: P3, lpdwflags: *mut u32) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn WSAGetOverlappedResult(s: SOCKET, lpoverlapped: *const super::super::System::IO::OVERLAPPED, lpcbtransfer: *mut u32, fwait: bool, lpdwflags: *mut u32) -> windows_core::Result<()> { windows_targets::link!("ws2_32.dll" "system" fn WSAGetOverlappedResult(s : SOCKET, lpoverlapped : *const super::super::System::IO:: OVERLAPPED, lpcbtransfer : *mut u32, fwait : super::super::Foundation:: BOOL, lpdwflags : *mut u32) -> super::super::Foundation:: BOOL); - WSAGetOverlappedResult(core::mem::transmute(s), core::mem::transmute(lpoverlapped), core::mem::transmute(lpcbtransfer), fwait.param().abi(), core::mem::transmute(lpdwflags)).ok() + WSAGetOverlappedResult(core::mem::transmute(s), core::mem::transmute(lpoverlapped), core::mem::transmute(lpcbtransfer), fwait.into(), core::mem::transmute(lpdwflags)).ok() } #[inline] pub unsafe fn WSAGetQOSByName(s: SOCKET, lpqosname: *const WSABUF, lpqos: *mut QOS) -> windows_core::Result<()> { @@ -907,13 +897,9 @@ pub unsafe fn WSAUnhookBlockingHook() -> i32 { WSAUnhookBlockingHook() } #[inline] -pub unsafe fn WSAWaitForMultipleEvents(lphevents: &[super::super::Foundation::HANDLE], fwaitall: P2, dwtimeout: u32, falertable: P4) -> super::super::Foundation::WAIT_EVENT -where - P2: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn WSAWaitForMultipleEvents(lphevents: &[super::super::Foundation::HANDLE], fwaitall: bool, dwtimeout: u32, falertable: bool) -> super::super::Foundation::WAIT_EVENT { windows_targets::link!("ws2_32.dll" "system" fn WSAWaitForMultipleEvents(cevents : u32, lphevents : *const super::super::Foundation:: HANDLE, fwaitall : super::super::Foundation:: BOOL, dwtimeout : u32, falertable : super::super::Foundation:: BOOL) -> super::super::Foundation:: WAIT_EVENT); - WSAWaitForMultipleEvents(lphevents.len().try_into().unwrap(), core::mem::transmute(lphevents.as_ptr()), fwaitall.param().abi(), core::mem::transmute(dwtimeout), falertable.param().abi()) + WSAWaitForMultipleEvents(lphevents.len().try_into().unwrap(), core::mem::transmute(lphevents.as_ptr()), fwaitall.into(), core::mem::transmute(dwtimeout), falertable.into()) } #[inline] pub unsafe fn WSCDeinstallProvider(lpproviderid: *const windows_core::GUID, lperrno: *mut i32) -> i32 { @@ -927,21 +913,15 @@ pub unsafe fn WSCDeinstallProvider32(lpproviderid: *const windows_core::GUID, lp WSCDeinstallProvider32(core::mem::transmute(lpproviderid), core::mem::transmute(lperrno)) } #[inline] -pub unsafe fn WSCEnableNSProvider(lpproviderid: *const windows_core::GUID, fenable: P1) -> i32 -where - P1: windows_core::Param, -{ +pub unsafe fn WSCEnableNSProvider(lpproviderid: *const windows_core::GUID, fenable: bool) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSCEnableNSProvider(lpproviderid : *const windows_core::GUID, fenable : super::super::Foundation:: BOOL) -> i32); - WSCEnableNSProvider(core::mem::transmute(lpproviderid), fenable.param().abi()) + WSCEnableNSProvider(core::mem::transmute(lpproviderid), fenable.into()) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] -pub unsafe fn WSCEnableNSProvider32(lpproviderid: *const windows_core::GUID, fenable: P1) -> i32 -where - P1: windows_core::Param, -{ +pub unsafe fn WSCEnableNSProvider32(lpproviderid: *const windows_core::GUID, fenable: bool) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSCEnableNSProvider32(lpproviderid : *const windows_core::GUID, fenable : super::super::Foundation:: BOOL) -> i32); - WSCEnableNSProvider32(core::mem::transmute(lpproviderid), fenable.param().abi()) + WSCEnableNSProvider32(core::mem::transmute(lpproviderid), fenable.into()) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] @@ -5125,9 +5105,6 @@ impl Default for RIO_BUF { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct RIO_BUFFERID(pub isize); -impl windows_core::TypeKind for RIO_BUFFERID { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct RIO_CMSG_BUFFER { @@ -5142,9 +5119,6 @@ pub const RIO_CORRUPT_CQ: u32 = 4294967295u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct RIO_CQ(pub isize); -impl windows_core::TypeKind for RIO_CQ { - type TypeKind = windows_core::CopyType; -} pub const RIO_EVENT_COMPLETION: RIO_NOTIFICATION_COMPLETION_TYPE = RIO_NOTIFICATION_COMPLETION_TYPE(1i32); #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] @@ -5226,9 +5200,6 @@ pub struct RIO_NOTIFICATION_COMPLETION_TYPE(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct RIO_RQ(pub isize); -impl windows_core::TypeKind for RIO_RQ { - type TypeKind = windows_core::CopyType; -} pub const RM_ADD_RECEIVE_IF: i32 = 1008i32; pub const RM_DEL_RECEIVE_IF: i32 = 1009i32; #[repr(C)] @@ -5990,9 +5961,6 @@ impl Default for SOCKADDR_VNS { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct SOCKET(pub usize); -impl windows_core::TypeKind for SOCKET { - type TypeKind = windows_core::CopyType; -} impl SOCKET { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ @@ -7055,9 +7023,6 @@ pub const WSAEUSERS: WSA_ERROR = WSA_ERROR(10068i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct WSAEVENT(pub isize); -impl windows_core::TypeKind for WSAEVENT { - type TypeKind = windows_core::CopyType; -} impl WSAEVENT { pub fn is_invalid(&self) -> bool { self.0 == 0 @@ -7755,9 +7720,6 @@ impl Default for sockaddr_in6_old { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct socklen_t(pub i32); -impl windows_core::TypeKind for socklen_t { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct sockproto { diff --git a/crates/libs/windows/src/Windows/Win32/Networking/WindowsWebServices/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/WindowsWebServices/mod.rs index bed5a76118..eacd39924d 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WindowsWebServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WindowsWebServices/mod.rs @@ -347,12 +347,9 @@ pub unsafe fn WsFillReader(reader: *const WS_XML_READER, minsize: u32, asynccont WsFillReader(core::mem::transmute(reader), core::mem::transmute(minsize), core::mem::transmute(asynccontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WsFindAttribute(reader: *const WS_XML_READER, localname: *const WS_XML_STRING, ns: *const WS_XML_STRING, required: P3, attributeindex: *mut u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn WsFindAttribute(reader: *const WS_XML_READER, localname: *const WS_XML_STRING, ns: *const WS_XML_STRING, required: bool, attributeindex: *mut u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsFindAttribute(reader : *const WS_XML_READER, localname : *const WS_XML_STRING, ns : *const WS_XML_STRING, required : super::super::Foundation:: BOOL, attributeindex : *mut u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsFindAttribute(core::mem::transmute(reader), core::mem::transmute(localname), core::mem::transmute(ns), required.param().abi(), core::mem::transmute(attributeindex), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() + WsFindAttribute(core::mem::transmute(reader), core::mem::transmute(localname), core::mem::transmute(ns), required.into(), core::mem::transmute(attributeindex), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WsFlushBody(message: *const WS_MESSAGE, minsize: u32, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { @@ -501,12 +498,9 @@ pub unsafe fn WsGetMissingMetadataDocumentAddress(metadata: *const WS_METADATA, WsGetMissingMetadataDocumentAddress(core::mem::transmute(metadata), core::mem::transmute(address), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WsGetNamespaceFromPrefix(reader: *const WS_XML_READER, prefix: *const WS_XML_STRING, required: P2, ns: *mut *mut WS_XML_STRING, error: Option<*const WS_ERROR>) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn WsGetNamespaceFromPrefix(reader: *const WS_XML_READER, prefix: *const WS_XML_STRING, required: bool, ns: *mut *mut WS_XML_STRING, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetNamespaceFromPrefix(reader : *const WS_XML_READER, prefix : *const WS_XML_STRING, required : super::super::Foundation:: BOOL, ns : *mut *mut WS_XML_STRING, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetNamespaceFromPrefix(core::mem::transmute(reader), core::mem::transmute(prefix), required.param().abi(), core::mem::transmute(ns), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() + WsGetNamespaceFromPrefix(core::mem::transmute(reader), core::mem::transmute(prefix), required.into(), core::mem::transmute(ns), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WsGetOperationContextProperty(context: *const WS_OPERATION_CONTEXT, id: WS_OPERATION_CONTEXT_PROPERTY_ID, value: *mut core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { @@ -524,12 +518,9 @@ pub unsafe fn WsGetPolicyProperty(policy: *const WS_POLICY, id: WS_POLICY_PROPER WsGetPolicyProperty(core::mem::transmute(policy), core::mem::transmute(id), core::mem::transmute(value), core::mem::transmute(valuesize), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WsGetPrefixFromNamespace(writer: *const WS_XML_WRITER, ns: *const WS_XML_STRING, required: P2, prefix: *mut *mut WS_XML_STRING, error: Option<*const WS_ERROR>) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn WsGetPrefixFromNamespace(writer: *const WS_XML_WRITER, ns: *const WS_XML_STRING, required: bool, prefix: *mut *mut WS_XML_STRING, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetPrefixFromNamespace(writer : *const WS_XML_WRITER, ns : *const WS_XML_STRING, required : super::super::Foundation:: BOOL, prefix : *mut *mut WS_XML_STRING, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetPrefixFromNamespace(core::mem::transmute(writer), core::mem::transmute(ns), required.param().abi(), core::mem::transmute(prefix), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() + WsGetPrefixFromNamespace(core::mem::transmute(writer), core::mem::transmute(ns), required.into(), core::mem::transmute(prefix), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WsGetReaderNode(xmlreader: *const WS_XML_READER, node: *mut *mut WS_XML_NODE, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { @@ -592,12 +583,9 @@ pub unsafe fn WsMarkHeaderAsUnderstood(message: *const WS_MESSAGE, headerpositio WsMarkHeaderAsUnderstood(core::mem::transmute(message), core::mem::transmute(headerposition), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WsMatchPolicyAlternative(policy: *const WS_POLICY, alternativeindex: u32, policyconstraints: *const WS_POLICY_CONSTRAINTS, matchrequired: P3, heap: *const WS_HEAP, error: Option<*const WS_ERROR>) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn WsMatchPolicyAlternative(policy: *const WS_POLICY, alternativeindex: u32, policyconstraints: *const WS_POLICY_CONSTRAINTS, matchrequired: bool, heap: *const WS_HEAP, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsMatchPolicyAlternative(policy : *const WS_POLICY, alternativeindex : u32, policyconstraints : *const WS_POLICY_CONSTRAINTS, matchrequired : super::super::Foundation:: BOOL, heap : *const WS_HEAP, error : *const WS_ERROR) -> windows_core::HRESULT); - WsMatchPolicyAlternative(core::mem::transmute(policy), core::mem::transmute(alternativeindex), core::mem::transmute(policyconstraints), matchrequired.param().abi(), core::mem::transmute(heap), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() + WsMatchPolicyAlternative(core::mem::transmute(policy), core::mem::transmute(alternativeindex), core::mem::transmute(policyconstraints), matchrequired.into(), core::mem::transmute(heap), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WsMoveReader(reader: *const WS_XML_READER, moveto: WS_MOVE_TO, found: Option<*mut super::super::Foundation::BOOL>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { @@ -1070,12 +1058,9 @@ pub unsafe fn WsWriteQualifiedName(writer: *const WS_XML_WRITER, prefix: Option< WsWriteQualifiedName(core::mem::transmute(writer), core::mem::transmute(prefix.unwrap_or(core::mem::zeroed())), core::mem::transmute(localname), core::mem::transmute(ns.unwrap_or(core::mem::zeroed())), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WsWriteStartAttribute(writer: *const WS_XML_WRITER, prefix: Option<*const WS_XML_STRING>, localname: *const WS_XML_STRING, ns: *const WS_XML_STRING, singlequote: P4, error: Option<*const WS_ERROR>) -> windows_core::Result<()> -where - P4: windows_core::Param, -{ +pub unsafe fn WsWriteStartAttribute(writer: *const WS_XML_WRITER, prefix: Option<*const WS_XML_STRING>, localname: *const WS_XML_STRING, ns: *const WS_XML_STRING, singlequote: bool, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteStartAttribute(writer : *const WS_XML_WRITER, prefix : *const WS_XML_STRING, localname : *const WS_XML_STRING, ns : *const WS_XML_STRING, singlequote : super::super::Foundation:: BOOL, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteStartAttribute(core::mem::transmute(writer), core::mem::transmute(prefix.unwrap_or(core::mem::zeroed())), core::mem::transmute(localname), core::mem::transmute(ns), singlequote.param().abi(), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() + WsWriteStartAttribute(core::mem::transmute(writer), core::mem::transmute(prefix.unwrap_or(core::mem::zeroed())), core::mem::transmute(localname), core::mem::transmute(ns), singlequote.into(), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WsWriteStartCData(writer: *const WS_XML_WRITER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { @@ -1113,12 +1098,9 @@ pub unsafe fn WsWriteXmlBufferToBytes(writer: *const WS_XML_WRITER, xmlbuffer: * WsWriteXmlBufferToBytes(core::mem::transmute(writer), core::mem::transmute(xmlbuffer), core::mem::transmute(encoding.unwrap_or(core::mem::zeroed())), core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(heap), core::mem::transmute(bytes), core::mem::transmute(bytecount), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn WsWriteXmlnsAttribute(writer: *const WS_XML_WRITER, prefix: Option<*const WS_XML_STRING>, ns: *const WS_XML_STRING, singlequote: P3, error: Option<*const WS_ERROR>) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn WsWriteXmlnsAttribute(writer: *const WS_XML_WRITER, prefix: Option<*const WS_XML_STRING>, ns: *const WS_XML_STRING, singlequote: bool, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteXmlnsAttribute(writer : *const WS_XML_WRITER, prefix : *const WS_XML_STRING, ns : *const WS_XML_STRING, singlequote : super::super::Foundation:: BOOL, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteXmlnsAttribute(core::mem::transmute(writer), core::mem::transmute(prefix.unwrap_or(core::mem::zeroed())), core::mem::transmute(ns), singlequote.param().abi(), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() + WsWriteXmlnsAttribute(core::mem::transmute(writer), core::mem::transmute(prefix.unwrap_or(core::mem::zeroed())), core::mem::transmute(ns), singlequote.into(), core::mem::transmute(error.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn WsXmlStringEquals(string1: *const WS_XML_STRING, string2: *const WS_XML_STRING, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { @@ -1967,9 +1949,6 @@ pub const WS_CERT_SIGNED_SAML_AUTHENTICATOR_TYPE: WS_SAML_AUTHENTICATOR_TYPE = W #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct WS_CHANNEL(pub isize); -impl windows_core::TypeKind for WS_CHANNEL { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct WS_CHANNEL_BINDING(pub i32); @@ -2526,9 +2505,6 @@ pub const WS_ENVELOPE_VERSION_SOAP_1_2: WS_ENVELOPE_VERSION = WS_ENVELOPE_VERSIO #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct WS_ERROR(pub isize); -impl windows_core::TypeKind for WS_ERROR { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct WS_ERROR_PROPERTY { @@ -2705,9 +2681,6 @@ pub struct WS_HEADER_TYPE(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct WS_HEAP(pub isize); -impl windows_core::TypeKind for WS_HEAP { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct WS_HEAP_PROPERTIES { @@ -3247,9 +3220,6 @@ pub const WS_KERBEROS_APREQ_MESSAGE_SECURITY_BINDING_TYPE: WS_SECURITY_BINDING_T #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct WS_LISTENER(pub isize); -impl windows_core::TypeKind for WS_LISTENER { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct WS_LISTENER_PROPERTIES { @@ -3317,9 +3287,6 @@ pub const WS_MATCH_URL_THIS_HOST: i32 = 31i32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct WS_MESSAGE(pub isize); -impl windows_core::TypeKind for WS_MESSAGE { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct WS_MESSAGE_DESCRIPTION { @@ -3398,9 +3365,6 @@ pub const WS_MESSAGE_STATE_WRITING: WS_MESSAGE_STATE = WS_MESSAGE_STATE(4i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct WS_METADATA(pub isize); -impl windows_core::TypeKind for WS_METADATA { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct WS_METADATA_ENDPOINT { @@ -3560,9 +3524,6 @@ pub type WS_OPERATION_CANCEL_CALLBACK = Option(szfullpathname: P0, bfromshellexecute: P1) -> super::super::Foundation::BOOL +pub unsafe fn SaferiIsExecutableFileType(szfullpathname: P0, bfromshellexecute: bool) -> super::super::Foundation::BOOL where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn SaferiIsExecutableFileType(szfullpathname : windows_core::PCWSTR, bfromshellexecute : super::super::Foundation:: BOOLEAN) -> super::super::Foundation:: BOOL); - SaferiIsExecutableFileType(szfullpathname.param().abi(), bfromshellexecute.param().abi()) + SaferiIsExecutableFileType(szfullpathname.param().abi(), bfromshellexecute.into()) } #[repr(C)] #[cfg(feature = "Win32_Security_Cryptography")] diff --git a/crates/libs/windows/src/Windows/Win32/Security/Authentication/Identity/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Authentication/Identity/mod.rs index 996db9f354..610023d4c2 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Authentication/Identity/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Authentication/Identity/mod.rs @@ -99,12 +99,9 @@ pub unsafe fn AuditEnumeratePerUserPolicy(ppauditsidarray: *mut *mut POLICY_AUDI AuditEnumeratePerUserPolicy(core::mem::transmute(ppauditsidarray)) } #[inline] -pub unsafe fn AuditEnumerateSubCategories(pauditcategoryguid: Option<*const windows_core::GUID>, bretrieveallsubcategories: P1, ppauditsubcategoriesarray: *mut *mut windows_core::GUID, pdwcountreturned: *mut u32) -> super::super::super::Foundation::BOOLEAN -where - P1: windows_core::Param, -{ +pub unsafe fn AuditEnumerateSubCategories(pauditcategoryguid: Option<*const windows_core::GUID>, bretrieveallsubcategories: bool, ppauditsubcategoriesarray: *mut *mut windows_core::GUID, pdwcountreturned: *mut u32) -> super::super::super::Foundation::BOOLEAN { windows_targets::link!("advapi32.dll" "system" fn AuditEnumerateSubCategories(pauditcategoryguid : *const windows_core::GUID, bretrieveallsubcategories : super::super::super::Foundation:: BOOLEAN, ppauditsubcategoriesarray : *mut *mut windows_core::GUID, pdwcountreturned : *mut u32) -> super::super::super::Foundation:: BOOLEAN); - AuditEnumerateSubCategories(core::mem::transmute(pauditcategoryguid.unwrap_or(core::mem::zeroed())), bretrieveallsubcategories.param().abi(), core::mem::transmute(ppauditsubcategoriesarray), core::mem::transmute(pdwcountreturned)) + AuditEnumerateSubCategories(core::mem::transmute(pauditcategoryguid.unwrap_or(core::mem::zeroed())), bretrieveallsubcategories.into(), core::mem::transmute(ppauditsubcategoriesarray), core::mem::transmute(pdwcountreturned)) } #[inline] pub unsafe fn AuditFree(buffer: *const core::ffi::c_void) { @@ -204,20 +201,14 @@ pub unsafe fn AuditSetSystemPolicy(pauditpolicy: &[AUDIT_POLICY_INFORMATION]) -> AuditSetSystemPolicy(core::mem::transmute(pauditpolicy.as_ptr()), pauditpolicy.len().try_into().unwrap()) } #[inline] -pub unsafe fn ChangeAccountPasswordA(pszpackagename: *const i8, pszdomainname: *const i8, pszaccountname: *const i8, pszoldpassword: *const i8, psznewpassword: *const i8, bimpersonating: P5, dwreserved: u32, poutput: *mut SecBufferDesc) -> windows_core::Result<()> -where - P5: windows_core::Param, -{ +pub unsafe fn ChangeAccountPasswordA(pszpackagename: *const i8, pszdomainname: *const i8, pszaccountname: *const i8, pszoldpassword: *const i8, psznewpassword: *const i8, bimpersonating: bool, dwreserved: u32, poutput: *mut SecBufferDesc) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn ChangeAccountPasswordA(pszpackagename : *const i8, pszdomainname : *const i8, pszaccountname : *const i8, pszoldpassword : *const i8, psznewpassword : *const i8, bimpersonating : super::super::super::Foundation:: BOOLEAN, dwreserved : u32, poutput : *mut SecBufferDesc) -> windows_core::HRESULT); - ChangeAccountPasswordA(core::mem::transmute(pszpackagename), core::mem::transmute(pszdomainname), core::mem::transmute(pszaccountname), core::mem::transmute(pszoldpassword), core::mem::transmute(psznewpassword), bimpersonating.param().abi(), core::mem::transmute(dwreserved), core::mem::transmute(poutput)).ok() + ChangeAccountPasswordA(core::mem::transmute(pszpackagename), core::mem::transmute(pszdomainname), core::mem::transmute(pszaccountname), core::mem::transmute(pszoldpassword), core::mem::transmute(psznewpassword), bimpersonating.into(), core::mem::transmute(dwreserved), core::mem::transmute(poutput)).ok() } #[inline] -pub unsafe fn ChangeAccountPasswordW(pszpackagename: *const u16, pszdomainname: *const u16, pszaccountname: *const u16, pszoldpassword: *const u16, psznewpassword: *const u16, bimpersonating: P5, dwreserved: u32, poutput: *mut SecBufferDesc) -> windows_core::Result<()> -where - P5: windows_core::Param, -{ +pub unsafe fn ChangeAccountPasswordW(pszpackagename: *const u16, pszdomainname: *const u16, pszaccountname: *const u16, pszoldpassword: *const u16, psznewpassword: *const u16, bimpersonating: bool, dwreserved: u32, poutput: *mut SecBufferDesc) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn ChangeAccountPasswordW(pszpackagename : *const u16, pszdomainname : *const u16, pszaccountname : *const u16, pszoldpassword : *const u16, psznewpassword : *const u16, bimpersonating : super::super::super::Foundation:: BOOLEAN, dwreserved : u32, poutput : *mut SecBufferDesc) -> windows_core::HRESULT); - ChangeAccountPasswordW(core::mem::transmute(pszpackagename), core::mem::transmute(pszdomainname), core::mem::transmute(pszaccountname), core::mem::transmute(pszoldpassword), core::mem::transmute(psznewpassword), bimpersonating.param().abi(), core::mem::transmute(dwreserved), core::mem::transmute(poutput)).ok() + ChangeAccountPasswordW(core::mem::transmute(pszpackagename), core::mem::transmute(pszdomainname), core::mem::transmute(pszaccountname), core::mem::transmute(pszoldpassword), core::mem::transmute(psznewpassword), bimpersonating.into(), core::mem::transmute(dwreserved), core::mem::transmute(poutput)).ok() } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -580,12 +571,9 @@ pub unsafe fn LsaRegisterPolicyChangeNotification(informationclass: POLICY_NOTIF LsaRegisterPolicyChangeNotification(core::mem::transmute(informationclass), core::mem::transmute(notificationeventhandle)) } #[inline] -pub unsafe fn LsaRemoveAccountRights(policyhandle: LSA_HANDLE, accountsid: super::super::PSID, allrights: P2, userrights: Option<&[LSA_UNICODE_STRING]>) -> super::super::super::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn LsaRemoveAccountRights(policyhandle: LSA_HANDLE, accountsid: super::super::PSID, allrights: bool, userrights: Option<&[LSA_UNICODE_STRING]>) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaRemoveAccountRights(policyhandle : LSA_HANDLE, accountsid : super::super:: PSID, allrights : super::super::super::Foundation:: BOOLEAN, userrights : *const LSA_UNICODE_STRING, countofrights : u32) -> super::super::super::Foundation:: NTSTATUS); - LsaRemoveAccountRights(core::mem::transmute(policyhandle), core::mem::transmute(accountsid), allrights.param().abi(), core::mem::transmute(userrights.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), userrights.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + LsaRemoveAccountRights(core::mem::transmute(policyhandle), core::mem::transmute(accountsid), allrights.into(), core::mem::transmute(userrights.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), userrights.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn LsaRetrievePrivateData(policyhandle: LSA_HANDLE, keyname: *const LSA_UNICODE_STRING, privatedata: *mut *mut LSA_UNICODE_STRING) -> super::super::super::Foundation::NTSTATUS { @@ -603,20 +591,14 @@ pub unsafe fn LsaSetDomainInformationPolicy(policyhandle: LSA_HANDLE, informatio LsaSetDomainInformationPolicy(core::mem::transmute(policyhandle), core::mem::transmute(informationclass), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn LsaSetForestTrustInformation(policyhandle: LSA_HANDLE, trusteddomainname: *const LSA_UNICODE_STRING, foresttrustinfo: *const LSA_FOREST_TRUST_INFORMATION, checkonly: P3, collisioninfo: *mut *mut LSA_FOREST_TRUST_COLLISION_INFORMATION) -> super::super::super::Foundation::NTSTATUS -where - P3: windows_core::Param, -{ +pub unsafe fn LsaSetForestTrustInformation(policyhandle: LSA_HANDLE, trusteddomainname: *const LSA_UNICODE_STRING, foresttrustinfo: *const LSA_FOREST_TRUST_INFORMATION, checkonly: bool, collisioninfo: *mut *mut LSA_FOREST_TRUST_COLLISION_INFORMATION) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaSetForestTrustInformation(policyhandle : LSA_HANDLE, trusteddomainname : *const LSA_UNICODE_STRING, foresttrustinfo : *const LSA_FOREST_TRUST_INFORMATION, checkonly : super::super::super::Foundation:: BOOLEAN, collisioninfo : *mut *mut LSA_FOREST_TRUST_COLLISION_INFORMATION) -> super::super::super::Foundation:: NTSTATUS); - LsaSetForestTrustInformation(core::mem::transmute(policyhandle), core::mem::transmute(trusteddomainname), core::mem::transmute(foresttrustinfo), checkonly.param().abi(), core::mem::transmute(collisioninfo)) + LsaSetForestTrustInformation(core::mem::transmute(policyhandle), core::mem::transmute(trusteddomainname), core::mem::transmute(foresttrustinfo), checkonly.into(), core::mem::transmute(collisioninfo)) } #[inline] -pub unsafe fn LsaSetForestTrustInformation2(policyhandle: LSA_HANDLE, trusteddomainname: *const LSA_UNICODE_STRING, highestrecordtype: LSA_FOREST_TRUST_RECORD_TYPE, foresttrustinfo: *const LSA_FOREST_TRUST_INFORMATION2, checkonly: P4, collisioninfo: *mut *mut LSA_FOREST_TRUST_COLLISION_INFORMATION) -> super::super::super::Foundation::NTSTATUS -where - P4: windows_core::Param, -{ +pub unsafe fn LsaSetForestTrustInformation2(policyhandle: LSA_HANDLE, trusteddomainname: *const LSA_UNICODE_STRING, highestrecordtype: LSA_FOREST_TRUST_RECORD_TYPE, foresttrustinfo: *const LSA_FOREST_TRUST_INFORMATION2, checkonly: bool, collisioninfo: *mut *mut LSA_FOREST_TRUST_COLLISION_INFORMATION) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaSetForestTrustInformation2(policyhandle : LSA_HANDLE, trusteddomainname : *const LSA_UNICODE_STRING, highestrecordtype : LSA_FOREST_TRUST_RECORD_TYPE, foresttrustinfo : *const LSA_FOREST_TRUST_INFORMATION2, checkonly : super::super::super::Foundation:: BOOLEAN, collisioninfo : *mut *mut LSA_FOREST_TRUST_COLLISION_INFORMATION) -> super::super::super::Foundation:: NTSTATUS); - LsaSetForestTrustInformation2(core::mem::transmute(policyhandle), core::mem::transmute(trusteddomainname), core::mem::transmute(highestrecordtype), core::mem::transmute(foresttrustinfo), checkonly.param().abi(), core::mem::transmute(collisioninfo)) + LsaSetForestTrustInformation2(core::mem::transmute(policyhandle), core::mem::transmute(trusteddomainname), core::mem::transmute(highestrecordtype), core::mem::transmute(foresttrustinfo), checkonly.into(), core::mem::transmute(collisioninfo)) } #[inline] pub unsafe fn LsaSetInformationPolicy(policyhandle: LSA_HANDLE, informationclass: POLICY_INFORMATION_CLASS, buffer: *const core::ffi::c_void) -> super::super::super::Foundation::NTSTATUS { @@ -1138,12 +1120,9 @@ pub unsafe fn SaslSetContextOption(contexthandle: *const super::super::Credentia SaslSetContextOption(core::mem::transmute(contexthandle), core::mem::transmute(option), core::mem::transmute(value), core::mem::transmute(size)).ok() } #[inline] -pub unsafe fn SendSAS(asuser: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn SendSAS(asuser: bool) { windows_targets::link!("sas.dll" "system" fn SendSAS(asuser : super::super::super::Foundation:: BOOL)); - SendSAS(asuser.param().abi()) + SendSAS(asuser.into()) } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -3609,9 +3588,6 @@ pub const LSA_GLOBAL_SECRET_PREFIX_LENGTH: u32 = 2u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct LSA_HANDLE(pub isize); -impl windows_core::TypeKind for LSA_HANDLE { - type TypeKind = windows_core::CopyType; -} impl LSA_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 || self.0 == 0 @@ -9241,9 +9217,6 @@ pub const _FACILITY_WINDOWS_STORE: u32 = 63u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct _HMAPPER(pub isize); -impl windows_core::TypeKind for _HMAPPER { - type TypeKind = windows_core::CopyType; -} #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct eTlsAlgorithmUsage(pub i32); diff --git a/crates/libs/windows/src/Windows/Win32/Security/Authorization/UI/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Authorization/UI/mod.rs index dd2da249a3..394252e3a4 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Authorization/UI/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Authorization/UI/mod.rs @@ -196,11 +196,8 @@ impl ISecurityInformation { pub unsafe fn GetObjectInformation(&self, pobjectinfo: *mut SI_OBJECT_INFO) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetObjectInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(pobjectinfo)).ok() } - pub unsafe fn GetSecurity(&self, requestedinformation: super::super::OBJECT_SECURITY_INFORMATION, ppsecuritydescriptor: *mut super::super::PSECURITY_DESCRIPTOR, fdefault: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetSecurity)(windows_core::Interface::as_raw(self), core::mem::transmute(requestedinformation), core::mem::transmute(ppsecuritydescriptor), fdefault.param().abi()).ok() + pub unsafe fn GetSecurity(&self, requestedinformation: super::super::OBJECT_SECURITY_INFORMATION, ppsecuritydescriptor: *mut super::super::PSECURITY_DESCRIPTOR, fdefault: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetSecurity)(windows_core::Interface::as_raw(self), core::mem::transmute(requestedinformation), core::mem::transmute(ppsecuritydescriptor), fdefault.into()).ok() } pub unsafe fn SetSecurity(&self, securityinformation: super::super::OBJECT_SECURITY_INFORMATION, psecuritydescriptor: super::super::PSECURITY_DESCRIPTOR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetSecurity)(windows_core::Interface::as_raw(self), core::mem::transmute(securityinformation), core::mem::transmute(psecuritydescriptor)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Security/Authorization/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Authorization/mod.rs index 6f5f2987e6..67354871d8 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Authorization/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Authorization/mod.rs @@ -32,12 +32,9 @@ pub unsafe fn AuthzEnumerateSecurityEventSources(dwflags: u32, buffer: *mut AUTH AuthzEnumerateSecurityEventSources(core::mem::transmute(dwflags), core::mem::transmute(buffer), core::mem::transmute(pdwcount), core::mem::transmute(pdwlength)).ok() } #[inline] -pub unsafe fn AuthzEvaluateSacl(authzclientcontext: AUTHZ_CLIENT_CONTEXT_HANDLE, prequest: *const AUTHZ_ACCESS_REQUEST, sacl: *const super::ACL, grantedaccess: u32, accessgranted: P4, pbgenerateaudit: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL -where - P4: windows_core::Param, -{ +pub unsafe fn AuthzEvaluateSacl(authzclientcontext: AUTHZ_CLIENT_CONTEXT_HANDLE, prequest: *const AUTHZ_ACCESS_REQUEST, sacl: *const super::ACL, grantedaccess: u32, accessgranted: bool, pbgenerateaudit: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL { windows_targets::link!("authz.dll" "system" fn AuthzEvaluateSacl(authzclientcontext : AUTHZ_CLIENT_CONTEXT_HANDLE, prequest : *const AUTHZ_ACCESS_REQUEST, sacl : *const super:: ACL, grantedaccess : u32, accessgranted : super::super::Foundation:: BOOL, pbgenerateaudit : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - AuthzEvaluateSacl(core::mem::transmute(authzclientcontext), core::mem::transmute(prequest), core::mem::transmute(sacl), core::mem::transmute(grantedaccess), accessgranted.param().abi(), core::mem::transmute(pbgenerateaudit)) + AuthzEvaluateSacl(core::mem::transmute(authzclientcontext), core::mem::transmute(prequest), core::mem::transmute(sacl), core::mem::transmute(grantedaccess), accessgranted.into(), core::mem::transmute(pbgenerateaudit)) } #[inline] pub unsafe fn AuthzFreeAuditEvent(hauditevent: AUTHZ_AUDIT_EVENT_HANDLE) -> windows_core::Result<()> { @@ -418,22 +415,20 @@ pub unsafe fn GetExplicitEntriesFromAclW(pacl: *const super::ACL, pccountofexpli GetExplicitEntriesFromAclW(core::mem::transmute(pacl), core::mem::transmute(pccountofexplicitentries), core::mem::transmute(plistofexplicitentries)) } #[inline] -pub unsafe fn GetInheritanceSourceA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, container: P3, pobjectclassguids: Option<&[*const windows_core::GUID]>, pacl: *const super::ACL, pfnarray: Option<*const FN_OBJECT_MGR_FUNCTS>, pgenericmapping: *const super::GENERIC_MAPPING, pinheritarray: *mut INHERITED_FROMA) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn GetInheritanceSourceA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, container: bool, pobjectclassguids: Option<&[*const windows_core::GUID]>, pacl: *const super::ACL, pfnarray: Option<*const FN_OBJECT_MGR_FUNCTS>, pgenericmapping: *const super::GENERIC_MAPPING, pinheritarray: *mut INHERITED_FROMA) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn GetInheritanceSourceA(pobjectname : windows_core::PCSTR, objecttype : SE_OBJECT_TYPE, securityinfo : super:: OBJECT_SECURITY_INFORMATION, container : super::super::Foundation:: BOOL, pobjectclassguids : *const *const windows_core::GUID, guidcount : u32, pacl : *const super:: ACL, pfnarray : *const FN_OBJECT_MGR_FUNCTS, pgenericmapping : *const super:: GENERIC_MAPPING, pinheritarray : *mut INHERITED_FROMA) -> super::super::Foundation:: WIN32_ERROR); - GetInheritanceSourceA(pobjectname.param().abi(), core::mem::transmute(objecttype), core::mem::transmute(securityinfo), container.param().abi(), core::mem::transmute(pobjectclassguids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pobjectclassguids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pacl), core::mem::transmute(pfnarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(pgenericmapping), core::mem::transmute(pinheritarray)) + GetInheritanceSourceA(pobjectname.param().abi(), core::mem::transmute(objecttype), core::mem::transmute(securityinfo), container.into(), core::mem::transmute(pobjectclassguids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pobjectclassguids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pacl), core::mem::transmute(pfnarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(pgenericmapping), core::mem::transmute(pinheritarray)) } #[inline] -pub unsafe fn GetInheritanceSourceW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, container: P3, pobjectclassguids: Option<&[*const windows_core::GUID]>, pacl: *const super::ACL, pfnarray: Option<*const FN_OBJECT_MGR_FUNCTS>, pgenericmapping: *const super::GENERIC_MAPPING, pinheritarray: *mut INHERITED_FROMW) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn GetInheritanceSourceW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, container: bool, pobjectclassguids: Option<&[*const windows_core::GUID]>, pacl: *const super::ACL, pfnarray: Option<*const FN_OBJECT_MGR_FUNCTS>, pgenericmapping: *const super::GENERIC_MAPPING, pinheritarray: *mut INHERITED_FROMW) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn GetInheritanceSourceW(pobjectname : windows_core::PCWSTR, objecttype : SE_OBJECT_TYPE, securityinfo : super:: OBJECT_SECURITY_INFORMATION, container : super::super::Foundation:: BOOL, pobjectclassguids : *const *const windows_core::GUID, guidcount : u32, pacl : *const super:: ACL, pfnarray : *const FN_OBJECT_MGR_FUNCTS, pgenericmapping : *const super:: GENERIC_MAPPING, pinheritarray : *mut INHERITED_FROMW) -> super::super::Foundation:: WIN32_ERROR); - GetInheritanceSourceW(pobjectname.param().abi(), core::mem::transmute(objecttype), core::mem::transmute(securityinfo), container.param().abi(), core::mem::transmute(pobjectclassguids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pobjectclassguids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pacl), core::mem::transmute(pfnarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(pgenericmapping), core::mem::transmute(pinheritarray)) + GetInheritanceSourceW(pobjectname.param().abi(), core::mem::transmute(objecttype), core::mem::transmute(securityinfo), container.into(), core::mem::transmute(pobjectclassguids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pobjectclassguids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pacl), core::mem::transmute(pfnarray.unwrap_or(core::mem::zeroed())), core::mem::transmute(pgenericmapping), core::mem::transmute(pinheritarray)) } #[inline] pub unsafe fn GetMultipleTrusteeA(ptrustee: Option<*const TRUSTEE_A>) -> *mut TRUSTEE_A { @@ -548,10 +543,9 @@ pub unsafe fn SetSecurityInfo(handle: super::super::Foundation::HANDLE, objectty SetSecurityInfo(core::mem::transmute(handle), core::mem::transmute(objecttype), core::mem::transmute(securityinfo), core::mem::transmute(psidowner.unwrap_or(core::mem::zeroed())), core::mem::transmute(psidgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(psacl.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn TreeResetNamedSecurityInfoA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, powner: Option, pgroup: Option, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>, keepexplicit: P7, fnprogress: Option, progressinvokesetting: PROG_INVOKE_SETTING, args: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn TreeResetNamedSecurityInfoA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, powner: Option, pgroup: Option, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>, keepexplicit: bool, fnprogress: Option, progressinvokesetting: PROG_INVOKE_SETTING, args: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, - P7: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn TreeResetNamedSecurityInfoA(pobjectname : windows_core::PCSTR, objecttype : SE_OBJECT_TYPE, securityinfo : super:: OBJECT_SECURITY_INFORMATION, powner : super:: PSID, pgroup : super:: PSID, pdacl : *const super:: ACL, psacl : *const super:: ACL, keepexplicit : super::super::Foundation:: BOOL, fnprogress : FN_PROGRESS, progressinvokesetting : PROG_INVOKE_SETTING, args : *const core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); TreeResetNamedSecurityInfoA( @@ -562,17 +556,16 @@ where core::mem::transmute(pgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(psacl.unwrap_or(core::mem::zeroed())), - keepexplicit.param().abi(), + keepexplicit.into(), core::mem::transmute(fnprogress.unwrap_or(core::mem::zeroed())), core::mem::transmute(progressinvokesetting), core::mem::transmute(args.unwrap_or(core::mem::zeroed())), ) } #[inline] -pub unsafe fn TreeResetNamedSecurityInfoW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, powner: Option, pgroup: Option, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>, keepexplicit: P7, fnprogress: Option, progressinvokesetting: PROG_INVOKE_SETTING, args: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn TreeResetNamedSecurityInfoW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, powner: Option, pgroup: Option, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>, keepexplicit: bool, fnprogress: Option, progressinvokesetting: PROG_INVOKE_SETTING, args: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, - P7: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn TreeResetNamedSecurityInfoW(pobjectname : windows_core::PCWSTR, objecttype : SE_OBJECT_TYPE, securityinfo : super:: OBJECT_SECURITY_INFORMATION, powner : super:: PSID, pgroup : super:: PSID, pdacl : *const super:: ACL, psacl : *const super:: ACL, keepexplicit : super::super::Foundation:: BOOL, fnprogress : FN_PROGRESS, progressinvokesetting : PROG_INVOKE_SETTING, args : *const core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); TreeResetNamedSecurityInfoW( @@ -583,7 +576,7 @@ where core::mem::transmute(pgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdacl.unwrap_or(core::mem::zeroed())), core::mem::transmute(psacl.unwrap_or(core::mem::zeroed())), - keepexplicit.param().abi(), + keepexplicit.into(), core::mem::transmute(fnprogress.unwrap_or(core::mem::zeroed())), core::mem::transmute(progressinvokesetting), core::mem::transmute(args.unwrap_or(core::mem::zeroed())), @@ -1018,9 +1011,6 @@ pub const AUTHZ_ACCESS_CHECK_NO_DEEP_COPY_SD: AUTHZ_ACCESS_CHECK_FLAGS = AUTHZ_A #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct AUTHZ_ACCESS_CHECK_RESULTS_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for AUTHZ_ACCESS_CHECK_RESULTS_HANDLE { - type TypeKind = windows_core::CopyType; -} impl AUTHZ_ACCESS_CHECK_RESULTS_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1071,9 +1061,6 @@ pub const AUTHZ_ALLOW_MULTIPLE_SOURCE_INSTANCES: u32 = 1u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct AUTHZ_AUDIT_EVENT_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for AUTHZ_AUDIT_EVENT_HANDLE { - type TypeKind = windows_core::CopyType; -} impl AUTHZ_AUDIT_EVENT_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1099,9 +1086,6 @@ pub struct AUTHZ_AUDIT_EVENT_INFORMATION_CLASS(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct AUTHZ_AUDIT_EVENT_TYPE_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for AUTHZ_AUDIT_EVENT_TYPE_HANDLE { - type TypeKind = windows_core::CopyType; -} impl AUTHZ_AUDIT_EVENT_TYPE_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1153,9 +1137,6 @@ pub const AUTHZ_AUDIT_INSTANCE_INFORMATION: u32 = 2u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE { - type TypeKind = windows_core::CopyType; -} impl AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1178,9 +1159,6 @@ impl Default for AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct AUTHZ_CLIENT_CONTEXT_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for AUTHZ_CLIENT_CONTEXT_HANDLE { - type TypeKind = windows_core::CopyType; -} impl AUTHZ_CLIENT_CONTEXT_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1285,9 +1263,6 @@ impl core::ops::Not for AUTHZ_RESOURCE_MANAGER_FLAGS { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct AUTHZ_RESOURCE_MANAGER_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for AUTHZ_RESOURCE_MANAGER_HANDLE { - type TypeKind = windows_core::CopyType; -} impl AUTHZ_RESOURCE_MANAGER_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1460,9 +1435,6 @@ pub const AUTHZ_SECURITY_ATTRIBUTE_VALUE_CASE_SENSITIVE: AUTHZ_SECURITY_ATTRIBUT #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE { - type TypeKind = windows_core::CopyType; -} impl AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1728,21 +1700,15 @@ impl IAzApplication { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GenerateAudits)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetGenerateAudits(&self, bprop: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetGenerateAudits)(windows_core::Interface::as_raw(self), bprop.param().abi()).ok() + pub unsafe fn SetGenerateAudits(&self, bprop: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetGenerateAudits)(windows_core::Interface::as_raw(self), bprop.into()).ok() } pub unsafe fn ApplyStoreSacl(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ApplyStoreSacl)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetApplyStoreSacl(&self, bprop: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetApplyStoreSacl)(windows_core::Interface::as_raw(self), bprop.param().abi()).ok() + pub unsafe fn SetApplyStoreSacl(&self, bprop: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetApplyStoreSacl)(windows_core::Interface::as_raw(self), bprop.into()).ok() } pub unsafe fn Writable(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3940,11 +3906,8 @@ impl IAzAuthorizationStore { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GenerateAudits)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetGenerateAudits(&self, bprop: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetGenerateAudits)(windows_core::Interface::as_raw(self), bprop.param().abi()).ok() + pub unsafe fn SetGenerateAudits(&self, bprop: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetGenerateAudits)(windows_core::Interface::as_raw(self), bprop.into()).ok() } pub unsafe fn Writable(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4066,11 +4029,8 @@ impl IAzAuthorizationStore { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ApplyStoreSacl)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetApplyStoreSacl(&self, bapplystoresacl: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetApplyStoreSacl)(windows_core::Interface::as_raw(self), bapplystoresacl.param().abi()).ok() + pub unsafe fn SetApplyStoreSacl(&self, bapplystoresacl: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetApplyStoreSacl)(windows_core::Interface::as_raw(self), bapplystoresacl.into()).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn PolicyAdministratorsName(&self) -> windows_core::Result { @@ -4917,11 +4877,8 @@ impl core::ops::Deref for IAzBizRuleContext { windows_core::imp::interface_hierarchy!(IAzBizRuleContext, windows_core::IUnknown, super::super::System::Com::IDispatch); #[cfg(feature = "Win32_System_Com")] impl IAzBizRuleContext { - pub unsafe fn SetBusinessRuleResult(&self, bresult: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBusinessRuleResult)(windows_core::Interface::as_raw(self), bresult.param().abi()).ok() + pub unsafe fn SetBusinessRuleResult(&self, bresult: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBusinessRuleResult)(windows_core::Interface::as_raw(self), bresult.into()).ok() } pub unsafe fn SetBusinessRuleString(&self, bstrbusinessrulestring: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetBusinessRuleString)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrbusinessrulestring)).ok() @@ -8203,11 +8160,8 @@ impl IAzTask { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsRoleDefinition)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIsRoleDefinition(&self, fprop: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIsRoleDefinition)(windows_core::Interface::as_raw(self), fprop.param().abi()).ok() + pub unsafe fn SetIsRoleDefinition(&self, fprop: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIsRoleDefinition)(windows_core::Interface::as_raw(self), fprop.into()).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Operations(&self) -> windows_core::Result { diff --git a/crates/libs/windows/src/Windows/Win32/Security/Credentials/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Credentials/mod.rs index 484b1a3dcf..8362f365c9 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Credentials/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Credentials/mod.rs @@ -133,20 +133,14 @@ where CredPackAuthenticationBufferW(core::mem::transmute(dwflags), pszusername.param().abi(), pszpassword.param().abi(), core::mem::transmute(ppackedcredentials.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbpackedcredentials)).ok() } #[inline] -pub unsafe fn CredProtectA(fasself: P0, pszcredentials: &[u8], pszprotectedcredentials: windows_core::PSTR, pcchmaxchars: *mut u32, protectiontype: Option<*mut CRED_PROTECTION_TYPE>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CredProtectA(fasself: bool, pszcredentials: &[u8], pszprotectedcredentials: windows_core::PSTR, pcchmaxchars: *mut u32, protectiontype: Option<*mut CRED_PROTECTION_TYPE>) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CredProtectA(fasself : super::super::Foundation:: BOOL, pszcredentials : windows_core::PCSTR, cchcredentials : u32, pszprotectedcredentials : windows_core::PSTR, pcchmaxchars : *mut u32, protectiontype : *mut CRED_PROTECTION_TYPE) -> super::super::Foundation:: BOOL); - CredProtectA(fasself.param().abi(), core::mem::transmute(pszcredentials.as_ptr()), pszcredentials.len().try_into().unwrap(), core::mem::transmute(pszprotectedcredentials), core::mem::transmute(pcchmaxchars), core::mem::transmute(protectiontype.unwrap_or(core::mem::zeroed()))).ok() + CredProtectA(fasself.into(), core::mem::transmute(pszcredentials.as_ptr()), pszcredentials.len().try_into().unwrap(), core::mem::transmute(pszprotectedcredentials), core::mem::transmute(pcchmaxchars), core::mem::transmute(protectiontype.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CredProtectW(fasself: P0, pszcredentials: &[u16], pszprotectedcredentials: windows_core::PWSTR, pcchmaxchars: *mut u32, protectiontype: Option<*mut CRED_PROTECTION_TYPE>) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CredProtectW(fasself: bool, pszcredentials: &[u16], pszprotectedcredentials: windows_core::PWSTR, pcchmaxchars: *mut u32, protectiontype: Option<*mut CRED_PROTECTION_TYPE>) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CredProtectW(fasself : super::super::Foundation:: BOOL, pszcredentials : windows_core::PCWSTR, cchcredentials : u32, pszprotectedcredentials : windows_core::PWSTR, pcchmaxchars : *mut u32, protectiontype : *mut CRED_PROTECTION_TYPE) -> super::super::Foundation:: BOOL); - CredProtectW(fasself.param().abi(), core::mem::transmute(pszcredentials.as_ptr()), pszcredentials.len().try_into().unwrap(), core::mem::transmute(pszprotectedcredentials), core::mem::transmute(pcchmaxchars), core::mem::transmute(protectiontype.unwrap_or(core::mem::zeroed()))).ok() + CredProtectW(fasself.into(), core::mem::transmute(pszcredentials.as_ptr()), pszcredentials.len().try_into().unwrap(), core::mem::transmute(pszprotectedcredentials), core::mem::transmute(pcchmaxchars), core::mem::transmute(protectiontype.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CredReadA(targetname: P0, r#type: CRED_TYPE, flags: Option, credential: *mut *mut CREDENTIALA) -> windows_core::Result<()> @@ -209,22 +203,20 @@ where CredUICmdLinePromptForCredentialsW(psztargetname.param().abi(), core::mem::transmute(pcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwautherror), core::mem::transmute(username.as_ptr()), username.len().try_into().unwrap(), core::mem::transmute(pszpassword.as_ptr()), pszpassword.len().try_into().unwrap(), core::mem::transmute(pfsave.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn CredUIConfirmCredentialsA(psztargetname: P0, bconfirm: P1) -> u32 +pub unsafe fn CredUIConfirmCredentialsA(psztargetname: P0, bconfirm: bool) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("credui.dll" "system" fn CredUIConfirmCredentialsA(psztargetname : windows_core::PCSTR, bconfirm : super::super::Foundation:: BOOL) -> u32); - CredUIConfirmCredentialsA(psztargetname.param().abi(), bconfirm.param().abi()) + CredUIConfirmCredentialsA(psztargetname.param().abi(), bconfirm.into()) } #[inline] -pub unsafe fn CredUIConfirmCredentialsW(psztargetname: P0, bconfirm: P1) -> u32 +pub unsafe fn CredUIConfirmCredentialsW(psztargetname: P0, bconfirm: bool) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("credui.dll" "system" fn CredUIConfirmCredentialsW(psztargetname : windows_core::PCWSTR, bconfirm : super::super::Foundation:: BOOL) -> u32); - CredUIConfirmCredentialsW(psztargetname.param().abi(), bconfirm.param().abi()) + CredUIConfirmCredentialsW(psztargetname.param().abi(), bconfirm.into()) } #[inline] pub unsafe fn CredUIParseUserNameA(username: P0, user: &mut [u8], domain: &mut [u8]) -> super::super::Foundation::WIN32_ERROR @@ -281,15 +273,14 @@ where CredUIReadSSOCredW(pszrealm.param().abi(), core::mem::transmute(ppszusername)) } #[inline] -pub unsafe fn CredUIStoreSSOCredW(pszrealm: P0, pszusername: P1, pszpassword: P2, bpersist: P3) -> u32 +pub unsafe fn CredUIStoreSSOCredW(pszrealm: P0, pszusername: P1, pszpassword: P2, bpersist: bool) -> u32 where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("credui.dll" "system" fn CredUIStoreSSOCredW(pszrealm : windows_core::PCWSTR, pszusername : windows_core::PCWSTR, pszpassword : windows_core::PCWSTR, bpersist : super::super::Foundation:: BOOL) -> u32); - CredUIStoreSSOCredW(pszrealm.param().abi(), pszusername.param().abi(), pszpassword.param().abi(), bpersist.param().abi()) + CredUIStoreSSOCredW(pszrealm.param().abi(), pszusername.param().abi(), pszpassword.param().abi(), bpersist.into()) } #[inline] pub unsafe fn CredUnPackAuthenticationBufferA(dwflags: CRED_PACK_FLAGS, pauthbuffer: *const core::ffi::c_void, cbauthbuffer: u32, pszusername: Option, pcchlmaxusername: *mut u32, pszdomainname: Option, pcchmaxdomainname: Option<*mut u32>, pszpassword: Option, pcchmaxpassword: *mut u32) -> windows_core::Result<()> { @@ -318,20 +309,14 @@ where CredUnmarshalCredentialW(marshaledcredential.param().abi(), core::mem::transmute(credtype), core::mem::transmute(credential)).ok() } #[inline] -pub unsafe fn CredUnprotectA(fasself: P0, pszprotectedcredentials: &[u8], pszcredentials: Option, pcchmaxchars: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CredUnprotectA(fasself: bool, pszprotectedcredentials: &[u8], pszcredentials: Option, pcchmaxchars: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CredUnprotectA(fasself : super::super::Foundation:: BOOL, pszprotectedcredentials : windows_core::PCSTR, cchprotectedcredentials : u32, pszcredentials : windows_core::PSTR, pcchmaxchars : *mut u32) -> super::super::Foundation:: BOOL); - CredUnprotectA(fasself.param().abi(), core::mem::transmute(pszprotectedcredentials.as_ptr()), pszprotectedcredentials.len().try_into().unwrap(), core::mem::transmute(pszcredentials.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchmaxchars)).ok() + CredUnprotectA(fasself.into(), core::mem::transmute(pszprotectedcredentials.as_ptr()), pszprotectedcredentials.len().try_into().unwrap(), core::mem::transmute(pszcredentials.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchmaxchars)).ok() } #[inline] -pub unsafe fn CredUnprotectW(fasself: P0, pszprotectedcredentials: &[u16], pszcredentials: Option, pcchmaxchars: *mut u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn CredUnprotectW(fasself: bool, pszprotectedcredentials: &[u16], pszcredentials: Option, pcchmaxchars: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CredUnprotectW(fasself : super::super::Foundation:: BOOL, pszprotectedcredentials : windows_core::PCWSTR, cchprotectedcredentials : u32, pszcredentials : windows_core::PWSTR, pcchmaxchars : *mut u32) -> super::super::Foundation:: BOOL); - CredUnprotectW(fasself.param().abi(), core::mem::transmute(pszprotectedcredentials.as_ptr()), pszprotectedcredentials.len().try_into().unwrap(), core::mem::transmute(pszcredentials.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchmaxchars)).ok() + CredUnprotectW(fasself.into(), core::mem::transmute(pszprotectedcredentials.as_ptr()), pszprotectedcredentials.len().try_into().unwrap(), core::mem::transmute(pszcredentials.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchmaxchars)).ok() } #[inline] pub unsafe fn CredWriteA(credential: *const CREDENTIALA, flags: u32) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Catalog/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Catalog/mod.rs index fd6628b2f5..a6f8922536 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Catalog/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Catalog/mod.rs @@ -36,12 +36,9 @@ pub unsafe fn CryptCATAdminEnumCatalogFromHash(hcatadmin: isize, pbhash: &[u8], CryptCATAdminEnumCatalogFromHash(core::mem::transmute(hcatadmin), core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), core::mem::transmute(dwflags.unwrap_or(core::mem::zeroed())), core::mem::transmute(phprevcatinfo.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CryptCATAdminPauseServiceForBackup(dwflags: u32, fresume: P1) -> super::super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn CryptCATAdminPauseServiceForBackup(dwflags: u32, fresume: bool) -> super::super::super::Foundation::BOOL { windows_targets::link!("wintrust.dll" "system" fn CryptCATAdminPauseServiceForBackup(dwflags : u32, fresume : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - CryptCATAdminPauseServiceForBackup(core::mem::transmute(dwflags), fresume.param().abi()) + CryptCATAdminPauseServiceForBackup(core::mem::transmute(dwflags), fresume.into()) } #[inline] pub unsafe fn CryptCATAdminReleaseCatalogContext(hcatadmin: isize, hcatinfo: isize, dwflags: u32) -> super::super::super::Foundation::BOOL { @@ -111,12 +108,9 @@ pub unsafe fn CryptCATCDFEnumMembers(pcdf: *mut CRYPTCATCDF, pprevmember: *mut C } #[cfg(feature = "Win32_Security_Cryptography_Sip")] #[inline] -pub unsafe fn CryptCATCDFEnumMembersByCDFTagEx(pcdf: *const CRYPTCATCDF, pwszprevcdftag: windows_core::PWSTR, pfnparseerror: PFN_CDF_PARSE_ERROR_CALLBACK, ppmember: *const *const CRYPTCATMEMBER, fcontinueonerror: P4, pvreserved: *const core::ffi::c_void) -> windows_core::PWSTR -where - P4: windows_core::Param, -{ +pub unsafe fn CryptCATCDFEnumMembersByCDFTagEx(pcdf: *const CRYPTCATCDF, pwszprevcdftag: windows_core::PWSTR, pfnparseerror: PFN_CDF_PARSE_ERROR_CALLBACK, ppmember: *const *const CRYPTCATMEMBER, fcontinueonerror: bool, pvreserved: *const core::ffi::c_void) -> windows_core::PWSTR { windows_targets::link!("wintrust.dll" "system" fn CryptCATCDFEnumMembersByCDFTagEx(pcdf : *const CRYPTCATCDF, pwszprevcdftag : windows_core::PWSTR, pfnparseerror : PFN_CDF_PARSE_ERROR_CALLBACK, ppmember : *const *const CRYPTCATMEMBER, fcontinueonerror : super::super::super::Foundation:: BOOL, pvreserved : *const core::ffi::c_void) -> windows_core::PWSTR); - CryptCATCDFEnumMembersByCDFTagEx(core::mem::transmute(pcdf), core::mem::transmute(pwszprevcdftag), core::mem::transmute(pfnparseerror), core::mem::transmute(ppmember), fcontinueonerror.param().abi(), core::mem::transmute(pvreserved)) + CryptCATCDFEnumMembersByCDFTagEx(core::mem::transmute(pcdf), core::mem::transmute(pwszprevcdftag), core::mem::transmute(pfnparseerror), core::mem::transmute(ppmember), fcontinueonerror.into(), core::mem::transmute(pvreserved)) } #[inline] pub unsafe fn CryptCATCDFOpen(pwszfilepath: P0, pfnparseerror: Option) -> *mut CRYPTCATCDF diff --git a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Certificates/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Certificates/mod.rs index 3211007bf8..b6e2c96731 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Certificates/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Certificates/mod.rs @@ -125,12 +125,9 @@ pub unsafe fn PstGetCertificateChain(pcert: *const super::CERT_CONTEXT, ptrusted PstGetCertificateChain(core::mem::transmute(pcert), core::mem::transmute(ptrustedissuers), core::mem::transmute(ppcertchaincontext)) } #[inline] -pub unsafe fn PstGetCertificates(ptargetname: *const super::super::super::Foundation::UNICODE_STRING, rgpcriteria: Option<&[super::CERT_SELECT_CRITERIA]>, bisclient: P3, pdwcertchaincontextcount: *mut u32, ppcertchaincontexts: *mut *mut *mut super::CERT_CHAIN_CONTEXT) -> super::super::super::Foundation::NTSTATUS -where - P3: windows_core::Param, -{ +pub unsafe fn PstGetCertificates(ptargetname: *const super::super::super::Foundation::UNICODE_STRING, rgpcriteria: Option<&[super::CERT_SELECT_CRITERIA]>, bisclient: bool, pdwcertchaincontextcount: *mut u32, ppcertchaincontexts: *mut *mut *mut super::CERT_CHAIN_CONTEXT) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("certpoleng.dll" "system" fn PstGetCertificates(ptargetname : *const super::super::super::Foundation:: UNICODE_STRING, ccriteria : u32, rgpcriteria : *const super:: CERT_SELECT_CRITERIA, bisclient : super::super::super::Foundation:: BOOL, pdwcertchaincontextcount : *mut u32, ppcertchaincontexts : *mut *mut *mut super:: CERT_CHAIN_CONTEXT) -> super::super::super::Foundation:: NTSTATUS); - PstGetCertificates(core::mem::transmute(ptargetname), rgpcriteria.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgpcriteria.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), bisclient.param().abi(), core::mem::transmute(pdwcertchaincontextcount), core::mem::transmute(ppcertchaincontexts)) + PstGetCertificates(core::mem::transmute(ptargetname), rgpcriteria.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgpcriteria.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), bisclient.into(), core::mem::transmute(pdwcertchaincontextcount), core::mem::transmute(ppcertchaincontexts)) } #[cfg(feature = "Win32_Security_Authentication_Identity")] #[inline] @@ -156,12 +153,9 @@ pub unsafe fn PstMapCertificate(pcert: *const super::CERT_CONTEXT, ptokeninforma PstMapCertificate(core::mem::transmute(pcert), core::mem::transmute(ptokeninformationtype), core::mem::transmute(pptokeninformation)) } #[inline] -pub unsafe fn PstValidate(ptargetname: Option<*const super::super::super::Foundation::UNICODE_STRING>, bisclient: P1, prequestedissuancepolicy: Option<*const super::CERT_USAGE_MATCH>, phadditionalcertstore: Option<*const super::HCERTSTORE>, pcert: *const super::CERT_CONTEXT, pprovguid: Option<*mut windows_core::GUID>) -> super::super::super::Foundation::NTSTATUS -where - P1: windows_core::Param, -{ +pub unsafe fn PstValidate(ptargetname: Option<*const super::super::super::Foundation::UNICODE_STRING>, bisclient: bool, prequestedissuancepolicy: Option<*const super::CERT_USAGE_MATCH>, phadditionalcertstore: Option<*const super::HCERTSTORE>, pcert: *const super::CERT_CONTEXT, pprovguid: Option<*mut windows_core::GUID>) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("certpoleng.dll" "system" fn PstValidate(ptargetname : *const super::super::super::Foundation:: UNICODE_STRING, bisclient : super::super::super::Foundation:: BOOL, prequestedissuancepolicy : *const super:: CERT_USAGE_MATCH, phadditionalcertstore : *const super:: HCERTSTORE, pcert : *const super:: CERT_CONTEXT, pprovguid : *mut windows_core::GUID) -> super::super::super::Foundation:: NTSTATUS); - PstValidate(core::mem::transmute(ptargetname.unwrap_or(core::mem::zeroed())), bisclient.param().abi(), core::mem::transmute(prequestedissuancepolicy.unwrap_or(core::mem::zeroed())), core::mem::transmute(phadditionalcertstore.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcert), core::mem::transmute(pprovguid.unwrap_or(core::mem::zeroed()))) + PstValidate(core::mem::transmute(ptargetname.unwrap_or(core::mem::zeroed())), bisclient.into(), core::mem::transmute(prequestedissuancepolicy.unwrap_or(core::mem::zeroed())), core::mem::transmute(phadditionalcertstore.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcert), core::mem::transmute(pprovguid.unwrap_or(core::mem::zeroed()))) } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] @@ -1573,11 +1567,8 @@ impl ICEnroll { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).UseExistingKeySet)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetUseExistingKeySet(&self, fuseexistingkeys: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseExistingKeySet)(windows_core::Interface::as_raw(self), fuseexistingkeys.param().abi()).ok() + pub unsafe fn SetUseExistingKeySet(&self, fuseexistingkeys: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUseExistingKeySet)(windows_core::Interface::as_raw(self), fuseexistingkeys.into()).ok() } pub unsafe fn GenKeyFlags(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1590,21 +1581,15 @@ impl ICEnroll { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DeleteRequestCert)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetDeleteRequestCert(&self, fdelete: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDeleteRequestCert)(windows_core::Interface::as_raw(self), fdelete.param().abi()).ok() + pub unsafe fn SetDeleteRequestCert(&self, fdelete: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDeleteRequestCert)(windows_core::Interface::as_raw(self), fdelete.into()).ok() } pub unsafe fn WriteCertToCSP(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).WriteCertToCSP)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetWriteCertToCSP(&self, fbool: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetWriteCertToCSP)(windows_core::Interface::as_raw(self), fbool.param().abi()).ok() + pub unsafe fn SetWriteCertToCSP(&self, fbool: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetWriteCertToCSP)(windows_core::Interface::as_raw(self), fbool.into()).ok() } pub unsafe fn SPCFileName(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2232,21 +2217,15 @@ impl ICEnroll2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).WriteCertToUserDS)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetWriteCertToUserDS(&self, fbool: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetWriteCertToUserDS)(windows_core::Interface::as_raw(self), fbool.param().abi()).ok() + pub unsafe fn SetWriteCertToUserDS(&self, fbool: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetWriteCertToUserDS)(windows_core::Interface::as_raw(self), fbool.into()).ok() } pub unsafe fn EnableT61DNEncoding(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EnableT61DNEncoding)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnableT61DNEncoding(&self, fbool: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableT61DNEncoding)(windows_core::Interface::as_raw(self), fbool.param().abi()).ok() + pub unsafe fn SetEnableT61DNEncoding(&self, fbool: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableT61DNEncoding)(windows_core::Interface::as_raw(self), fbool.into()).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -2347,13 +2326,9 @@ impl ICEnroll3 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetSupportedKeySpec)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn GetKeyLen(&self, fmin: P0, fexchange: P1) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - { + pub unsafe fn GetKeyLen(&self, fmin: bool, fexchange: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetKeyLen)(windows_core::Interface::as_raw(self), fmin.param().abi(), fexchange.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetKeyLen)(windows_core::Interface::as_raw(self), fmin.into(), fexchange.into(), &mut result__).map(|| result__) } pub unsafe fn EnumAlgs(&self, dwindex: i32, algclass: i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2363,11 +2338,8 @@ impl ICEnroll3 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetAlgName)(windows_core::Interface::as_raw(self), core::mem::transmute(algid), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn SetReuseHardwareKeyIfUnableToGenNew(&self, freusehardwarekeyifunabletogennew: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetReuseHardwareKeyIfUnableToGenNew)(windows_core::Interface::as_raw(self), freusehardwarekeyifunabletogennew.param().abi()).ok() + pub unsafe fn SetReuseHardwareKeyIfUnableToGenNew(&self, freusehardwarekeyifunabletogennew: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetReuseHardwareKeyIfUnableToGenNew)(windows_core::Interface::as_raw(self), freusehardwarekeyifunabletogennew.into()).ok() } pub unsafe fn ReuseHardwareKeyIfUnableToGenNew(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2380,21 +2352,15 @@ impl ICEnroll3 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).HashAlgID)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetLimitExchangeKeyToEncipherment(&self, flimitexchangekeytoencipherment: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetLimitExchangeKeyToEncipherment)(windows_core::Interface::as_raw(self), flimitexchangekeytoencipherment.param().abi()).ok() + pub unsafe fn SetLimitExchangeKeyToEncipherment(&self, flimitexchangekeytoencipherment: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetLimitExchangeKeyToEncipherment)(windows_core::Interface::as_raw(self), flimitexchangekeytoencipherment.into()).ok() } pub unsafe fn LimitExchangeKeyToEncipherment(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).LimitExchangeKeyToEncipherment)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnableSMIMECapabilities(&self, fenablesmimecapabilities: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableSMIMECapabilities)(windows_core::Interface::as_raw(self), fenablesmimecapabilities.param().abi()).ok() + pub unsafe fn SetEnableSMIMECapabilities(&self, fenablesmimecapabilities: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableSMIMECapabilities)(windows_core::Interface::as_raw(self), fenablesmimecapabilities.into()).ok() } pub unsafe fn EnableSMIMECapabilities(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2665,11 +2631,8 @@ impl ICEnroll4 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).InstallPKCS7Ex)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(pkcs7), &mut result__).map(|| result__) } - pub unsafe fn addCertTypeToRequestEx(&self, ltype: ADDED_CERT_TYPE, bstroidorname: &windows_core::BSTR, lmajorversion: i32, fminorversion: P3, lminorversion: i32) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).addCertTypeToRequestEx)(windows_core::Interface::as_raw(self), core::mem::transmute(ltype), core::mem::transmute_copy(bstroidorname), core::mem::transmute(lmajorversion), fminorversion.param().abi(), core::mem::transmute(lminorversion)).ok() + pub unsafe fn addCertTypeToRequestEx(&self, ltype: ADDED_CERT_TYPE, bstroidorname: &windows_core::BSTR, lmajorversion: i32, fminorversion: bool, lminorversion: i32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).addCertTypeToRequestEx)(windows_core::Interface::as_raw(self), core::mem::transmute(ltype), core::mem::transmute_copy(bstroidorname), core::mem::transmute(lmajorversion), fminorversion.into(), core::mem::transmute(lminorversion)).ok() } pub unsafe fn getProviderType(&self, strprovname: &windows_core::BSTR) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2691,11 +2654,8 @@ impl ICEnroll4 { pub unsafe fn resetBlobProperties(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).resetBlobProperties)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetIncludeSubjectKeyID(&self, finclude: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIncludeSubjectKeyID)(windows_core::Interface::as_raw(self), finclude.param().abi()).ok() + pub unsafe fn SetIncludeSubjectKeyID(&self, finclude: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIncludeSubjectKeyID)(windows_core::Interface::as_raw(self), finclude.into()).ok() } pub unsafe fn IncludeSubjectKeyID(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -9721,11 +9681,8 @@ impl IEnroll { pub unsafe fn UseExistingKeySet(&self, fuseexistingkeys: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UseExistingKeySet)(windows_core::Interface::as_raw(self), core::mem::transmute(fuseexistingkeys)).ok() } - pub unsafe fn SetUseExistingKeySet(&self, fuseexistingkeys: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseExistingKeySet)(windows_core::Interface::as_raw(self), fuseexistingkeys.param().abi()).ok() + pub unsafe fn SetUseExistingKeySet(&self, fuseexistingkeys: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUseExistingKeySet)(windows_core::Interface::as_raw(self), fuseexistingkeys.into()).ok() } pub unsafe fn GenKeyFlags(&self, pdwflags: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GenKeyFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwflags)).ok() @@ -9736,38 +9693,26 @@ impl IEnroll { pub unsafe fn DeleteRequestCert(&self, fdelete: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DeleteRequestCert)(windows_core::Interface::as_raw(self), core::mem::transmute(fdelete)).ok() } - pub unsafe fn SetDeleteRequestCert(&self, fdelete: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDeleteRequestCert)(windows_core::Interface::as_raw(self), fdelete.param().abi()).ok() + pub unsafe fn SetDeleteRequestCert(&self, fdelete: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDeleteRequestCert)(windows_core::Interface::as_raw(self), fdelete.into()).ok() } pub unsafe fn WriteCertToUserDS(&self, fbool: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).WriteCertToUserDS)(windows_core::Interface::as_raw(self), core::mem::transmute(fbool)).ok() } - pub unsafe fn SetWriteCertToUserDS(&self, fbool: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetWriteCertToUserDS)(windows_core::Interface::as_raw(self), fbool.param().abi()).ok() + pub unsafe fn SetWriteCertToUserDS(&self, fbool: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetWriteCertToUserDS)(windows_core::Interface::as_raw(self), fbool.into()).ok() } pub unsafe fn EnableT61DNEncoding(&self, fbool: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EnableT61DNEncoding)(windows_core::Interface::as_raw(self), core::mem::transmute(fbool)).ok() } - pub unsafe fn SetEnableT61DNEncoding(&self, fbool: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableT61DNEncoding)(windows_core::Interface::as_raw(self), fbool.param().abi()).ok() + pub unsafe fn SetEnableT61DNEncoding(&self, fbool: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableT61DNEncoding)(windows_core::Interface::as_raw(self), fbool.into()).ok() } pub unsafe fn WriteCertToCSP(&self, fbool: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).WriteCertToCSP)(windows_core::Interface::as_raw(self), core::mem::transmute(fbool)).ok() } - pub unsafe fn SetWriteCertToCSP(&self, fbool: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetWriteCertToCSP)(windows_core::Interface::as_raw(self), fbool.param().abi()).ok() + pub unsafe fn SetWriteCertToCSP(&self, fbool: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetWriteCertToCSP)(windows_core::Interface::as_raw(self), fbool.into()).ok() } pub unsafe fn SPCFileNameWStr(&self, szw: *mut windows_core::PWSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SPCFileNameWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(szw)).ok() @@ -10350,12 +10295,8 @@ impl IEnroll2 { pub unsafe fn GetSupportedKeySpec(&self, pdwkeyspec: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetSupportedKeySpec)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwkeyspec)).ok() } - pub unsafe fn GetKeyLen(&self, fmin: P0, fexchange: P1, pdwkeysize: *mut i32) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetKeyLen)(windows_core::Interface::as_raw(self), fmin.param().abi(), fexchange.param().abi(), core::mem::transmute(pdwkeysize)).ok() + pub unsafe fn GetKeyLen(&self, fmin: bool, fexchange: bool, pdwkeysize: *mut i32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetKeyLen)(windows_core::Interface::as_raw(self), fmin.into(), fexchange.into(), core::mem::transmute(pdwkeysize)).ok() } pub unsafe fn EnumAlgs(&self, dwindex: i32, algclass: i32, pdwalgid: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EnumAlgs)(windows_core::Interface::as_raw(self), core::mem::transmute(dwindex), core::mem::transmute(algclass), core::mem::transmute(pdwalgid)).ok() @@ -10363,11 +10304,8 @@ impl IEnroll2 { pub unsafe fn GetAlgNameWStr(&self, algid: i32, ppwsz: *mut windows_core::PWSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetAlgNameWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(algid), core::mem::transmute(ppwsz)).ok() } - pub unsafe fn SetReuseHardwareKeyIfUnableToGenNew(&self, freusehardwarekeyifunabletogennew: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetReuseHardwareKeyIfUnableToGenNew)(windows_core::Interface::as_raw(self), freusehardwarekeyifunabletogennew.param().abi()).ok() + pub unsafe fn SetReuseHardwareKeyIfUnableToGenNew(&self, freusehardwarekeyifunabletogennew: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetReuseHardwareKeyIfUnableToGenNew)(windows_core::Interface::as_raw(self), freusehardwarekeyifunabletogennew.into()).ok() } pub unsafe fn ReuseHardwareKeyIfUnableToGenNew(&self, freusehardwarekeyifunabletogennew: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReuseHardwareKeyIfUnableToGenNew)(windows_core::Interface::as_raw(self), core::mem::transmute(freusehardwarekeyifunabletogennew)).ok() @@ -10390,20 +10328,14 @@ impl IEnroll2 { pub unsafe fn SetHStoreRequest(&self, hstore: super::HCERTSTORE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetHStoreRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(hstore)).ok() } - pub unsafe fn SetLimitExchangeKeyToEncipherment(&self, flimitexchangekeytoencipherment: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetLimitExchangeKeyToEncipherment)(windows_core::Interface::as_raw(self), flimitexchangekeytoencipherment.param().abi()).ok() + pub unsafe fn SetLimitExchangeKeyToEncipherment(&self, flimitexchangekeytoencipherment: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetLimitExchangeKeyToEncipherment)(windows_core::Interface::as_raw(self), flimitexchangekeytoencipherment.into()).ok() } pub unsafe fn LimitExchangeKeyToEncipherment(&self, flimitexchangekeytoencipherment: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).LimitExchangeKeyToEncipherment)(windows_core::Interface::as_raw(self), core::mem::transmute(flimitexchangekeytoencipherment)).ok() } - pub unsafe fn SetEnableSMIMECapabilities(&self, fenablesmimecapabilities: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnableSMIMECapabilities)(windows_core::Interface::as_raw(self), fenablesmimecapabilities.param().abi()).ok() + pub unsafe fn SetEnableSMIMECapabilities(&self, fenablesmimecapabilities: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnableSMIMECapabilities)(windows_core::Interface::as_raw(self), fenablesmimecapabilities.into()).ok() } pub unsafe fn EnableSMIMECapabilities(&self, fenablesmimecapabilities: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EnableSMIMECapabilities)(windows_core::Interface::as_raw(self), core::mem::transmute(fenablesmimecapabilities)).ok() @@ -10673,12 +10605,11 @@ impl IEnroll4 { pub unsafe fn InstallPKCS7BlobEx(&self, pblobpkcs7: *mut super::CRYPT_INTEGER_BLOB, plcertinstalled: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).InstallPKCS7BlobEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pblobpkcs7), core::mem::transmute(plcertinstalled)).ok() } - pub unsafe fn AddCertTypeToRequestWStrEx(&self, ltype: ADDED_CERT_TYPE, pwszoidorname: P1, lmajorversion: i32, fminorversion: P3, lminorversion: i32) -> windows_core::Result<()> + pub unsafe fn AddCertTypeToRequestWStrEx(&self, ltype: ADDED_CERT_TYPE, pwszoidorname: P1, lmajorversion: i32, fminorversion: bool, lminorversion: i32) -> windows_core::Result<()> where P1: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).AddCertTypeToRequestWStrEx)(windows_core::Interface::as_raw(self), core::mem::transmute(ltype), pwszoidorname.param().abi(), core::mem::transmute(lmajorversion), fminorversion.param().abi(), core::mem::transmute(lminorversion)).ok() + (windows_core::Interface::vtable(self).AddCertTypeToRequestWStrEx)(windows_core::Interface::as_raw(self), core::mem::transmute(ltype), pwszoidorname.param().abi(), core::mem::transmute(lmajorversion), fminorversion.into(), core::mem::transmute(lminorversion)).ok() } pub unsafe fn getProviderTypeWStr(&self, pwszprovname: P0, plprovtype: *mut i32) -> windows_core::Result<()> where @@ -10698,11 +10629,8 @@ impl IEnroll4 { pub unsafe fn ClientId(&self, plclientid: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ClientId)(windows_core::Interface::as_raw(self), core::mem::transmute(plclientid)).ok() } - pub unsafe fn SetIncludeSubjectKeyID(&self, finclude: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIncludeSubjectKeyID)(windows_core::Interface::as_raw(self), finclude.param().abi()).ok() + pub unsafe fn SetIncludeSubjectKeyID(&self, finclude: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIncludeSubjectKeyID)(windows_core::Interface::as_raw(self), finclude.into()).ok() } pub unsafe fn IncludeSubjectKeyID(&self, pfinclude: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).IncludeSubjectKeyID)(windows_core::Interface::as_raw(self), core::mem::transmute(pfinclude)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/mod.rs index cf5fdc8d40..92cfe507cb 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/mod.rs @@ -1205,12 +1205,9 @@ where CryptDecodeObjectEx(core::mem::transmute(dwcertencodingtype), lpszstructtype.param().abi(), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), core::mem::transmute(dwflags), core::mem::transmute(pdecodepara.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvstructinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbstructinfo)).ok() } #[inline] -pub unsafe fn CryptDecrypt(hkey: usize, hhash: usize, r#final: P2, dwflags: u32, pbdata: *mut u8, pdwdatalen: *mut u32) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn CryptDecrypt(hkey: usize, hhash: usize, r#final: bool, dwflags: u32, pbdata: *mut u8, pdwdatalen: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CryptDecrypt(hkey : usize, hhash : usize, r#final : super::super::Foundation:: BOOL, dwflags : u32, pbdata : *mut u8, pdwdatalen : *mut u32) -> super::super::Foundation:: BOOL); - CryptDecrypt(core::mem::transmute(hkey), core::mem::transmute(hhash), r#final.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pbdata), core::mem::transmute(pdwdatalen)).ok() + CryptDecrypt(core::mem::transmute(hkey), core::mem::transmute(hhash), r#final.into(), core::mem::transmute(dwflags), core::mem::transmute(pbdata), core::mem::transmute(pdwdatalen)).ok() } #[inline] pub unsafe fn CryptDecryptAndVerifyMessageSignature(pdecryptpara: *const CRYPT_DECRYPT_MESSAGE_PARA, pverifypara: *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex: u32, pbencryptedblob: &[u8], pbdecrypted: Option<*mut u8>, pcbdecrypted: Option<*mut u32>, ppxchgcert: Option<*mut *mut CERT_CONTEXT>, ppsignercert: Option<*mut *mut CERT_CONTEXT>) -> windows_core::Result<()> { @@ -1264,12 +1261,9 @@ where CryptEncodeObjectEx(core::mem::transmute(dwcertencodingtype), lpszstructtype.param().abi(), core::mem::transmute(pvstructinfo), core::mem::transmute(dwflags), core::mem::transmute(pencodepara.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvencoded.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbencoded)).ok() } #[inline] -pub unsafe fn CryptEncrypt(hkey: usize, hhash: usize, r#final: P2, dwflags: u32, pbdata: Option<&mut [u8]>, pdwdatalen: *mut u32) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn CryptEncrypt(hkey: usize, hhash: usize, r#final: bool, dwflags: u32, pbdata: Option<&mut [u8]>, pdwdatalen: *mut u32) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CryptEncrypt(hkey : usize, hhash : usize, r#final : super::super::Foundation:: BOOL, dwflags : u32, pbdata : *mut u8, pdwdatalen : *mut u32, dwbuflen : u32) -> super::super::Foundation:: BOOL); - CryptEncrypt(core::mem::transmute(hkey), core::mem::transmute(hhash), r#final.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pbdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwdatalen), pbdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() + CryptEncrypt(core::mem::transmute(hkey), core::mem::transmute(hhash), r#final.into(), core::mem::transmute(dwflags), core::mem::transmute(pbdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwdatalen), pbdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[inline] pub unsafe fn CryptEncryptMessage(pencryptpara: *const CRYPT_ENCRYPT_MESSAGE_PARA, rgprecipientcert: &[*const CERT_CONTEXT], pbtobeencrypted: Option<&[u8]>, pbencryptedblob: Option<*mut u8>, pcbencryptedblob: *mut u32) -> windows_core::Result<()> { @@ -1508,12 +1502,9 @@ pub unsafe fn CryptHashData(hhash: usize, pbdata: &[u8], dwflags: u32) -> window CryptHashData(core::mem::transmute(hhash), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn CryptHashMessage(phashpara: *const CRYPT_HASH_MESSAGE_PARA, fdetachedhash: P1, ctobehashed: u32, rgpbtobehashed: *const *const u8, rgcbtobehashed: *const u32, pbhashedblob: Option<*mut u8>, pcbhashedblob: Option<*mut u32>, pbcomputedhash: Option<*mut u8>, pcbcomputedhash: Option<*mut u32>) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn CryptHashMessage(phashpara: *const CRYPT_HASH_MESSAGE_PARA, fdetachedhash: bool, ctobehashed: u32, rgpbtobehashed: *const *const u8, rgcbtobehashed: *const u32, pbhashedblob: Option<*mut u8>, pcbhashedblob: Option<*mut u32>, pbcomputedhash: Option<*mut u8>, pcbcomputedhash: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("crypt32.dll" "system" fn CryptHashMessage(phashpara : *const CRYPT_HASH_MESSAGE_PARA, fdetachedhash : super::super::Foundation:: BOOL, ctobehashed : u32, rgpbtobehashed : *const *const u8, rgcbtobehashed : *const u32, pbhashedblob : *mut u8, pcbhashedblob : *mut u32, pbcomputedhash : *mut u8, pcbcomputedhash : *mut u32) -> super::super::Foundation:: BOOL); - CryptHashMessage(core::mem::transmute(phashpara), fdetachedhash.param().abi(), core::mem::transmute(ctobehashed), core::mem::transmute(rgpbtobehashed), core::mem::transmute(rgcbtobehashed), core::mem::transmute(pbhashedblob.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbhashedblob.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbcomputedhash.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbcomputedhash.unwrap_or(core::mem::zeroed()))).ok() + CryptHashMessage(core::mem::transmute(phashpara), fdetachedhash.into(), core::mem::transmute(ctobehashed), core::mem::transmute(rgpbtobehashed), core::mem::transmute(rgcbtobehashed), core::mem::transmute(pbhashedblob.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbhashedblob.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbcomputedhash.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbcomputedhash.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CryptHashPublicKeyInfo(hcryptprov: Option, algid: ALG_ID, dwflags: u32, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pinfo: *const CERT_PUBLIC_KEY_INFO, pbcomputedhash: Option<*mut u8>, pcbcomputedhash: *mut u32) -> windows_core::Result<()> { @@ -1663,12 +1654,9 @@ pub unsafe fn CryptMsgSignCTL(dwmsgencodingtype: u32, pbctlcontent: &[u8], psign CryptMsgSignCTL(core::mem::transmute(dwmsgencodingtype), core::mem::transmute(pbctlcontent.as_ptr()), pbctlcontent.len().try_into().unwrap(), core::mem::transmute(psigninfo), core::mem::transmute(dwflags), core::mem::transmute(pbencoded.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbencoded)).ok() } #[inline] -pub unsafe fn CryptMsgUpdate(hcryptmsg: *const core::ffi::c_void, pbdata: Option<&[u8]>, ffinal: P3) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn CryptMsgUpdate(hcryptmsg: *const core::ffi::c_void, pbdata: Option<&[u8]>, ffinal: bool) -> windows_core::Result<()> { windows_targets::link!("crypt32.dll" "system" fn CryptMsgUpdate(hcryptmsg : *const core::ffi::c_void, pbdata : *const u8, cbdata : u32, ffinal : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - CryptMsgUpdate(core::mem::transmute(hcryptmsg), core::mem::transmute(pbdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ffinal.param().abi()).ok() + CryptMsgUpdate(core::mem::transmute(hcryptmsg), core::mem::transmute(pbdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ffinal.into()).ok() } #[inline] pub unsafe fn CryptMsgVerifyCountersignatureEncoded(hcryptprov: Option, dwencodingtype: u32, pbsignerinfo: &[u8], pbsignerinfocountersignature: &[u8], pcicountersigner: *const CERT_INFO) -> windows_core::Result<()> { @@ -1888,12 +1876,9 @@ where CryptSignHashW(core::mem::transmute(hhash), core::mem::transmute(dwkeyspec), szdescription.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(pbsignature.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdwsiglen)).ok() } #[inline] -pub unsafe fn CryptSignMessage(psignpara: *const CRYPT_SIGN_MESSAGE_PARA, fdetachedsignature: P1, ctobesigned: u32, rgpbtobesigned: Option<*const *const u8>, rgcbtobesigned: *const u32, pbsignedblob: Option<*mut u8>, pcbsignedblob: *mut u32) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn CryptSignMessage(psignpara: *const CRYPT_SIGN_MESSAGE_PARA, fdetachedsignature: bool, ctobesigned: u32, rgpbtobesigned: Option<*const *const u8>, rgcbtobesigned: *const u32, pbsignedblob: Option<*mut u8>, pcbsignedblob: *mut u32) -> windows_core::Result<()> { windows_targets::link!("crypt32.dll" "system" fn CryptSignMessage(psignpara : *const CRYPT_SIGN_MESSAGE_PARA, fdetachedsignature : super::super::Foundation:: BOOL, ctobesigned : u32, rgpbtobesigned : *const *const u8, rgcbtobesigned : *const u32, pbsignedblob : *mut u8, pcbsignedblob : *mut u32) -> super::super::Foundation:: BOOL); - CryptSignMessage(core::mem::transmute(psignpara), fdetachedsignature.param().abi(), core::mem::transmute(ctobesigned), core::mem::transmute(rgpbtobesigned.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgcbtobesigned), core::mem::transmute(pbsignedblob.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbsignedblob)).ok() + CryptSignMessage(core::mem::transmute(psignpara), fdetachedsignature.into(), core::mem::transmute(ctobesigned), core::mem::transmute(rgpbtobesigned.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgcbtobesigned), core::mem::transmute(pbsignedblob.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbsignedblob)).ok() } #[inline] pub unsafe fn CryptSignMessageWithKey(psignpara: *const CRYPT_KEY_SIGN_MESSAGE_PARA, pbtobesigned: &[u8], pbsignedblob: Option<*mut u8>, pcbsignedblob: *mut u32) -> windows_core::Result<()> { @@ -2129,20 +2114,14 @@ pub unsafe fn CryptXmlVerifySignature(hsignature: *const core::ffi::c_void, hkey CryptXmlVerifySignature(core::mem::transmute(hsignature), core::mem::transmute(hkey.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn Decrypt(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, foaep: P1, pindata: &[u8], pcboutdata: *mut u32, ppoutdata: *mut *mut u8) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn Decrypt(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, foaep: bool, pindata: &[u8], pcboutdata: *mut u32, ppoutdata: *mut *mut u8) -> windows_core::Result<()> { windows_targets::link!("infocardapi.dll" "system" fn Decrypt(hcrypto : *const INFORMATIONCARD_CRYPTO_HANDLE, foaep : super::super::Foundation:: BOOL, cbindata : u32, pindata : *const u8, pcboutdata : *mut u32, ppoutdata : *mut *mut u8) -> windows_core::HRESULT); - Decrypt(core::mem::transmute(hcrypto), foaep.param().abi(), pindata.len().try_into().unwrap(), core::mem::transmute(pindata.as_ptr()), core::mem::transmute(pcboutdata), core::mem::transmute(ppoutdata)).ok() + Decrypt(core::mem::transmute(hcrypto), foaep.into(), pindata.len().try_into().unwrap(), core::mem::transmute(pindata.as_ptr()), core::mem::transmute(pcboutdata), core::mem::transmute(ppoutdata)).ok() } #[inline] -pub unsafe fn Encrypt(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, foaep: P1, pindata: &[u8], pcboutdata: *mut u32, ppoutdata: *mut *mut u8) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn Encrypt(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, foaep: bool, pindata: &[u8], pcboutdata: *mut u32, ppoutdata: *mut *mut u8) -> windows_core::Result<()> { windows_targets::link!("infocardapi.dll" "system" fn Encrypt(hcrypto : *const INFORMATIONCARD_CRYPTO_HANDLE, foaep : super::super::Foundation:: BOOL, cbindata : u32, pindata : *const u8, pcboutdata : *mut u32, ppoutdata : *mut *mut u8) -> windows_core::HRESULT); - Encrypt(core::mem::transmute(hcrypto), foaep.param().abi(), pindata.len().try_into().unwrap(), core::mem::transmute(pindata.as_ptr()), core::mem::transmute(pcboutdata), core::mem::transmute(ppoutdata)).ok() + Encrypt(core::mem::transmute(hcrypto), foaep.into(), pindata.len().try_into().unwrap(), core::mem::transmute(pindata.as_ptr()), core::mem::transmute(pcboutdata), core::mem::transmute(ppoutdata)).ok() } #[inline] pub unsafe fn FindCertsByIssuer(pcertchains: Option<*mut CERT_CHAIN>, pcbcertchains: *mut u32, pccertchains: *mut u32, pbencodedissuername: Option<&[u8]>, pwszpurpose: P5, dwkeyspec: u32) -> windows_core::Result<()> @@ -2524,12 +2503,9 @@ pub unsafe fn NCryptStreamOpenToUnprotectEx(pstreaminfo: *const NCRYPT_PROTECT_S NCryptStreamOpenToUnprotectEx(core::mem::transmute(pstreaminfo), core::mem::transmute(dwflags), core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn NCryptStreamUpdate(hstream: super::NCRYPT_STREAM_HANDLE, pbdata: &[u8], ffinal: P3) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn NCryptStreamUpdate(hstream: super::NCRYPT_STREAM_HANDLE, pbdata: &[u8], ffinal: bool) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn NCryptStreamUpdate(hstream : super:: NCRYPT_STREAM_HANDLE, pbdata : *const u8, cbdata : usize, ffinal : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - NCryptStreamUpdate(core::mem::transmute(hstream), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), ffinal.param().abi()).ok() + NCryptStreamUpdate(core::mem::transmute(hstream), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), ffinal.into()).ok() } #[inline] pub unsafe fn NCryptTranslateHandle(phprovider: Option<*mut NCRYPT_PROV_HANDLE>, phkey: *mut NCRYPT_KEY_HANDLE, hlegacyprov: usize, hlegacykey: Option, dwlegacykeyspec: Option, dwflags: u32) -> windows_core::Result<()> { @@ -3188,9 +3164,6 @@ pub const BCRYPT_ALGORITHM_NAME: windows_core::PCWSTR = windows_core::w!("Algori #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct BCRYPT_ALG_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for BCRYPT_ALG_HANDLE { - type TypeKind = windows_core::CopyType; -} impl BCRYPT_ALG_HANDLE { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -3615,9 +3588,6 @@ pub const BCRYPT_GLOBAL_PARAMETERS: windows_core::PCWSTR = windows_core::w!("Sec #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct BCRYPT_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for BCRYPT_HANDLE { - type TypeKind = windows_core::CopyType; -} impl BCRYPT_HANDLE { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -3653,9 +3623,6 @@ impl Default for BCRYPT_HASH_FUNCTION_TABLE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct BCRYPT_HASH_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for BCRYPT_HASH_HANDLE { - type TypeKind = windows_core::CopyType; -} impl BCRYPT_HASH_HANDLE { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -3778,9 +3745,6 @@ pub const BCRYPT_KEY_DERIVATION_OPERATION: u32 = 64u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct BCRYPT_KEY_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for BCRYPT_KEY_HANDLE { - type TypeKind = windows_core::CopyType; -} impl BCRYPT_KEY_HANDLE { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -4145,9 +4109,6 @@ pub const BCRYPT_SECRET_AGREEMENT_OPERATION: BCRYPT_OPERATION = BCRYPT_OPERATION #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct BCRYPT_SECRET_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for BCRYPT_SECRET_HANDLE { - type TypeKind = windows_core::CopyType; -} impl BCRYPT_SECRET_HANDLE { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -11390,9 +11351,6 @@ pub struct HASHALGORITHM_ENUM(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HCERTCHAINENGINE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HCERTCHAINENGINE { - type TypeKind = windows_core::CopyType; -} impl HCERTCHAINENGINE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -11415,9 +11373,6 @@ impl Default for HCERTCHAINENGINE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HCERTSTORE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HCERTSTORE { - type TypeKind = windows_core::CopyType; -} impl HCERTSTORE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -11431,9 +11386,6 @@ impl Default for HCERTSTORE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HCERTSTOREPROV(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HCERTSTOREPROV { - type TypeKind = windows_core::CopyType; -} impl HCERTSTOREPROV { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -11447,9 +11399,6 @@ impl Default for HCERTSTOREPROV { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HCRYPTASYNC(pub isize); -impl windows_core::TypeKind for HCRYPTASYNC { - type TypeKind = windows_core::CopyType; -} impl HCRYPTASYNC { pub fn is_invalid(&self) -> bool { self.0 == -1 || self.0 == 0 @@ -11467,9 +11416,6 @@ impl windows_core::Free for HCRYPTASYNC { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HCRYPTPROV_LEGACY(pub usize); -impl windows_core::TypeKind for HCRYPTPROV_LEGACY { - type TypeKind = windows_core::CopyType; -} impl HCRYPTPROV_LEGACY { pub fn is_invalid(&self) -> bool { self.0 == 0 @@ -11478,9 +11424,6 @@ impl HCRYPTPROV_LEGACY { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HCRYPTPROV_OR_NCRYPT_KEY_HANDLE(pub usize); -impl windows_core::TypeKind for HCRYPTPROV_OR_NCRYPT_KEY_HANDLE { - type TypeKind = windows_core::CopyType; -} impl HCRYPTPROV_OR_NCRYPT_KEY_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == 0 @@ -13088,9 +13031,6 @@ impl core::ops::Not for NCRYPT_FLAGS { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct NCRYPT_HANDLE(pub usize); -impl windows_core::TypeKind for NCRYPT_HANDLE { - type TypeKind = windows_core::CopyType; -} impl NCRYPT_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == 0 @@ -13108,9 +13048,6 @@ impl windows_core::Free for NCRYPT_HANDLE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct NCRYPT_HASH_HANDLE(pub usize); -impl windows_core::TypeKind for NCRYPT_HASH_HANDLE { - type TypeKind = windows_core::CopyType; -} impl NCRYPT_HASH_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == 0 @@ -13195,9 +13132,6 @@ pub const NCRYPT_KEY_DERIVATION_OPERATION: u32 = 64u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct NCRYPT_KEY_HANDLE(pub usize); -impl windows_core::TypeKind for NCRYPT_KEY_HANDLE { - type TypeKind = windows_core::CopyType; -} impl NCRYPT_KEY_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == 0 @@ -13505,9 +13439,6 @@ pub const NCRYPT_PROVIDER_HANDLE_PROPERTY: windows_core::PCWSTR = windows_core:: #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct NCRYPT_PROV_HANDLE(pub usize); -impl windows_core::TypeKind for NCRYPT_PROV_HANDLE { - type TypeKind = windows_core::CopyType; -} impl NCRYPT_PROV_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == 0 @@ -13550,9 +13481,6 @@ pub const NCRYPT_SECRET_AGREEMENT_OPERATION: NCRYPT_OPERATION = NCRYPT_OPERATION #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct NCRYPT_SECRET_HANDLE(pub usize); -impl windows_core::TypeKind for NCRYPT_SECRET_HANDLE { - type TypeKind = windows_core::CopyType; -} impl NCRYPT_SECRET_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == 0 diff --git a/crates/libs/windows/src/Windows/Win32/Security/DiagnosticDataQuery/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/DiagnosticDataQuery/mod.rs index 4bd674ea56..4af9143156 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/DiagnosticDataQuery/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/DiagnosticDataQuery/mod.rs @@ -386,9 +386,6 @@ pub struct DdqAccessLevel(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HDIAGNOSTIC_DATA_QUERY_SESSION(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HDIAGNOSTIC_DATA_QUERY_SESSION { - type TypeKind = windows_core::CopyType; -} impl HDIAGNOSTIC_DATA_QUERY_SESSION { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -411,9 +408,6 @@ impl Default for HDIAGNOSTIC_DATA_QUERY_SESSION { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HDIAGNOSTIC_EVENT_CATEGORY_DESCRIPTION(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HDIAGNOSTIC_EVENT_CATEGORY_DESCRIPTION { - type TypeKind = windows_core::CopyType; -} impl HDIAGNOSTIC_EVENT_CATEGORY_DESCRIPTION { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -436,9 +430,6 @@ impl Default for HDIAGNOSTIC_EVENT_CATEGORY_DESCRIPTION { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION { - type TypeKind = windows_core::CopyType; -} impl HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -461,9 +452,6 @@ impl Default for HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HDIAGNOSTIC_EVENT_TAG_DESCRIPTION(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HDIAGNOSTIC_EVENT_TAG_DESCRIPTION { - type TypeKind = windows_core::CopyType; -} impl HDIAGNOSTIC_EVENT_TAG_DESCRIPTION { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -486,9 +474,6 @@ impl Default for HDIAGNOSTIC_EVENT_TAG_DESCRIPTION { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HDIAGNOSTIC_RECORD(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HDIAGNOSTIC_RECORD { - type TypeKind = windows_core::CopyType; -} impl HDIAGNOSTIC_RECORD { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -511,9 +496,6 @@ impl Default for HDIAGNOSTIC_RECORD { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HDIAGNOSTIC_REPORT(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HDIAGNOSTIC_REPORT { - type TypeKind = windows_core::CopyType; -} impl HDIAGNOSTIC_REPORT { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/Security/Isolation/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Isolation/mod.rs index a35fa2181d..d41847a8a2 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Isolation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Isolation/mod.rs @@ -123,13 +123,12 @@ impl IIsolatedProcessLauncher { { (windows_core::Interface::vtable(self).LaunchProcess)(windows_core::Interface::as_raw(self), process.param().abi(), arguments.param().abi(), workingdirectory.param().abi()).ok() } - pub unsafe fn ShareDirectory(&self, hostpath: P0, containerpath: P1, readonly: P2) -> windows_core::Result<()> + pub unsafe fn ShareDirectory(&self, hostpath: P0, containerpath: P1, readonly: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).ShareDirectory)(windows_core::Interface::as_raw(self), hostpath.param().abi(), containerpath.param().abi(), readonly.param().abi()).ok() + (windows_core::Interface::vtable(self).ShareDirectory)(windows_core::Interface::as_raw(self), hostpath.param().abi(), containerpath.param().abi(), readonly.into()).ok() } pub unsafe fn GetContainerGuid(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Win32/Security/Tpm/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Tpm/mod.rs index c32124703e..9b1630294a 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Tpm/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Tpm/mod.rs @@ -1,10 +1,9 @@ windows_core::imp::define_interface!(ITpmVirtualSmartCardManager, ITpmVirtualSmartCardManager_Vtbl, 0x112b1dff_d9dc_41f7_869f_d67fee7cb591); windows_core::imp::interface_hierarchy!(ITpmVirtualSmartCardManager, windows_core::IUnknown); impl ITpmVirtualSmartCardManager { - pub unsafe fn CreateVirtualSmartCard(&self, pszfriendlyname: P0, badminalgid: u8, pbadminkey: &[u8], pbadminkcv: &[u8], pbpuk: &[u8], pbpin: &[u8], fgenerate: P10, pstatuscallback: P11, ppszinstanceid: *mut windows_core::PWSTR, pfneedreboot: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> + pub unsafe fn CreateVirtualSmartCard(&self, pszfriendlyname: P0, badminalgid: u8, pbadminkey: &[u8], pbadminkcv: &[u8], pbpuk: &[u8], pbpin: &[u8], fgenerate: bool, pstatuscallback: P11, ppszinstanceid: *mut windows_core::PWSTR, pfneedreboot: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> where P0: windows_core::Param, - P10: windows_core::Param, P11: windows_core::Param, { (windows_core::Interface::vtable(self).CreateVirtualSmartCard)( @@ -19,7 +18,7 @@ impl ITpmVirtualSmartCardManager { pbpuk.len().try_into().unwrap(), core::mem::transmute(pbpin.as_ptr()), pbpin.len().try_into().unwrap(), - fgenerate.param().abi(), + fgenerate.into(), pstatuscallback.param().abi(), core::mem::transmute(ppszinstanceid), core::mem::transmute(pfneedreboot), @@ -98,10 +97,9 @@ impl core::ops::Deref for ITpmVirtualSmartCardManager2 { } windows_core::imp::interface_hierarchy!(ITpmVirtualSmartCardManager2, windows_core::IUnknown, ITpmVirtualSmartCardManager); impl ITpmVirtualSmartCardManager2 { - pub unsafe fn CreateVirtualSmartCardWithPinPolicy(&self, pszfriendlyname: P0, badminalgid: u8, pbadminkey: &[u8], pbadminkcv: &[u8], pbpuk: &[u8], pbpin: &[u8], pbpinpolicy: &[u8], fgenerate: P12, pstatuscallback: P13, ppszinstanceid: *mut windows_core::PWSTR, pfneedreboot: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> + pub unsafe fn CreateVirtualSmartCardWithPinPolicy(&self, pszfriendlyname: P0, badminalgid: u8, pbadminkey: &[u8], pbadminkcv: &[u8], pbpuk: &[u8], pbpin: &[u8], pbpinpolicy: &[u8], fgenerate: bool, pstatuscallback: P13, ppszinstanceid: *mut windows_core::PWSTR, pfneedreboot: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> where P0: windows_core::Param, - P12: windows_core::Param, P13: windows_core::Param, { (windows_core::Interface::vtable(self).CreateVirtualSmartCardWithPinPolicy)( @@ -118,7 +116,7 @@ impl ITpmVirtualSmartCardManager2 { pbpin.len().try_into().unwrap(), core::mem::transmute(pbpinpolicy.as_ptr()), pbpinpolicy.len().try_into().unwrap(), - fgenerate.param().abi(), + fgenerate.into(), pstatuscallback.param().abi(), core::mem::transmute(ppszinstanceid), core::mem::transmute(pfneedreboot), @@ -178,10 +176,9 @@ impl core::ops::Deref for ITpmVirtualSmartCardManager3 { } windows_core::imp::interface_hierarchy!(ITpmVirtualSmartCardManager3, windows_core::IUnknown, ITpmVirtualSmartCardManager, ITpmVirtualSmartCardManager2); impl ITpmVirtualSmartCardManager3 { - pub unsafe fn CreateVirtualSmartCardWithAttestation(&self, pszfriendlyname: P0, badminalgid: u8, pbadminkey: &[u8], pbadminkcv: &[u8], pbpuk: &[u8], pbpin: &[u8], pbpinpolicy: &[u8], attestationtype: TPMVSC_ATTESTATION_TYPE, fgenerate: P13, pstatuscallback: P14) -> windows_core::Result + pub unsafe fn CreateVirtualSmartCardWithAttestation(&self, pszfriendlyname: P0, badminalgid: u8, pbadminkey: &[u8], pbadminkcv: &[u8], pbpuk: &[u8], pbpin: &[u8], pbpinpolicy: &[u8], attestationtype: TPMVSC_ATTESTATION_TYPE, fgenerate: bool, pstatuscallback: P14) -> windows_core::Result where P0: windows_core::Param, - P13: windows_core::Param, P14: windows_core::Param, { let mut result__ = core::mem::zeroed(); @@ -200,7 +197,7 @@ impl ITpmVirtualSmartCardManager3 { core::mem::transmute(pbpinpolicy.as_ptr()), pbpinpolicy.len().try_into().unwrap(), core::mem::transmute(attestationtype), - fgenerate.param().abi(), + fgenerate.into(), pstatuscallback.param().abi(), &mut result__, ) diff --git a/crates/libs/windows/src/Windows/Win32/Security/WinTrust/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/WinTrust/mod.rs index d400274409..84b7511a8d 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/WinTrust/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/WinTrust/mod.rs @@ -34,12 +34,9 @@ pub unsafe fn WTHelperGetProvPrivateDataFromChain(pprovdata: *mut CRYPT_PROVIDER } #[cfg(all(feature = "Win32_Security_Cryptography_Catalog", feature = "Win32_Security_Cryptography_Sip"))] #[inline] -pub unsafe fn WTHelperGetProvSignerFromChain(pprovdata: *mut CRYPT_PROVIDER_DATA, idxsigner: u32, fcountersigner: P2, idxcountersigner: u32) -> *mut CRYPT_PROVIDER_SGNR -where - P2: windows_core::Param, -{ +pub unsafe fn WTHelperGetProvSignerFromChain(pprovdata: *mut CRYPT_PROVIDER_DATA, idxsigner: u32, fcountersigner: bool, idxcountersigner: u32) -> *mut CRYPT_PROVIDER_SGNR { windows_targets::link!("wintrust.dll" "system" fn WTHelperGetProvSignerFromChain(pprovdata : *mut CRYPT_PROVIDER_DATA, idxsigner : u32, fcountersigner : super::super::Foundation:: BOOL, idxcountersigner : u32) -> *mut CRYPT_PROVIDER_SGNR); - WTHelperGetProvSignerFromChain(core::mem::transmute(pprovdata), core::mem::transmute(idxsigner), fcountersigner.param().abi(), core::mem::transmute(idxcountersigner)) + WTHelperGetProvSignerFromChain(core::mem::transmute(pprovdata), core::mem::transmute(idxsigner), fcountersigner.into(), core::mem::transmute(idxcountersigner)) } #[cfg(all(feature = "Win32_Security_Cryptography_Catalog", feature = "Win32_Security_Cryptography_Sip"))] #[inline] @@ -96,12 +93,9 @@ pub unsafe fn WintrustRemoveActionID(pgactionid: *const windows_core::GUID) -> s WintrustRemoveActionID(core::mem::transmute(pgactionid)) } #[inline] -pub unsafe fn WintrustSetDefaultIncludePEPageHashes(fincludepepagehashes: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn WintrustSetDefaultIncludePEPageHashes(fincludepepagehashes: bool) { windows_targets::link!("wintrust.dll" "system" fn WintrustSetDefaultIncludePEPageHashes(fincludepepagehashes : super::super::Foundation:: BOOL)); - WintrustSetDefaultIncludePEPageHashes(fincludepepagehashes.param().abi()) + WintrustSetDefaultIncludePEPageHashes(fincludepepagehashes.into()) } #[inline] pub unsafe fn WintrustSetRegPolicyFlags(dwpolicyflags: WINTRUST_POLICY_FLAGS) -> super::super::Foundation::BOOL { diff --git a/crates/libs/windows/src/Windows/Win32/Security/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/mod.rs index 96865560fc..bbe156b1e3 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/mod.rs @@ -36,26 +36,24 @@ pub unsafe fn AccessCheck(psecuritydescriptor: PSECURITY_DESCRIPTOR, clienttoken AccessCheck(core::mem::transmute(psecuritydescriptor), core::mem::transmute(clienttoken), core::mem::transmute(desiredaccess), core::mem::transmute(genericmapping), core::mem::transmute(privilegeset.unwrap_or(core::mem::zeroed())), core::mem::transmute(privilegesetlength), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus)).ok() } #[inline] -pub unsafe fn AccessCheckAndAuditAlarmA(subsystemname: P0, handleid: Option<*const core::ffi::c_void>, objecttypename: P2, objectname: P3, securitydescriptor: PSECURITY_DESCRIPTOR, desiredaccess: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P7, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> +pub unsafe fn AccessCheckAndAuditAlarmA(subsystemname: P0, handleid: Option<*const core::ffi::c_void>, objecttypename: P2, objectname: P3, securitydescriptor: PSECURITY_DESCRIPTOR, desiredaccess: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: bool, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - P7: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AccessCheckAndAuditAlarmA(subsystemname : windows_core::PCSTR, handleid : *const core::ffi::c_void, objecttypename : windows_core::PCSTR, objectname : windows_core::PCSTR, securitydescriptor : PSECURITY_DESCRIPTOR, desiredaccess : u32, genericmapping : *const GENERIC_MAPPING, objectcreation : super::Foundation:: BOOL, grantedaccess : *mut u32, accessstatus : *mut super::Foundation:: BOOL, pfgenerateonclose : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); - AccessCheckAndAuditAlarmA(subsystemname.param().abi(), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), objecttypename.param().abi(), objectname.param().abi(), core::mem::transmute(securitydescriptor), core::mem::transmute(desiredaccess), core::mem::transmute(genericmapping), objectcreation.param().abi(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(pfgenerateonclose)).ok() + AccessCheckAndAuditAlarmA(subsystemname.param().abi(), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), objecttypename.param().abi(), objectname.param().abi(), core::mem::transmute(securitydescriptor), core::mem::transmute(desiredaccess), core::mem::transmute(genericmapping), objectcreation.into(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(pfgenerateonclose)).ok() } #[inline] -pub unsafe fn AccessCheckAndAuditAlarmW(subsystemname: P0, handleid: Option<*const core::ffi::c_void>, objecttypename: P2, objectname: P3, securitydescriptor: PSECURITY_DESCRIPTOR, desiredaccess: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P7, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL +pub unsafe fn AccessCheckAndAuditAlarmW(subsystemname: P0, handleid: Option<*const core::ffi::c_void>, objecttypename: P2, objectname: P3, securitydescriptor: PSECURITY_DESCRIPTOR, desiredaccess: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: bool, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL where P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - P7: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AccessCheckAndAuditAlarmW(subsystemname : windows_core::PCWSTR, handleid : *const core::ffi::c_void, objecttypename : windows_core::PCWSTR, objectname : windows_core::PCWSTR, securitydescriptor : PSECURITY_DESCRIPTOR, desiredaccess : u32, genericmapping : *const GENERIC_MAPPING, objectcreation : super::Foundation:: BOOL, grantedaccess : *mut u32, accessstatus : *mut super::Foundation:: BOOL, pfgenerateonclose : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); - AccessCheckAndAuditAlarmW(subsystemname.param().abi(), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), objecttypename.param().abi(), objectname.param().abi(), core::mem::transmute(securitydescriptor), core::mem::transmute(desiredaccess), core::mem::transmute(genericmapping), objectcreation.param().abi(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(pfgenerateonclose)) + AccessCheckAndAuditAlarmW(subsystemname.param().abi(), core::mem::transmute(handleid.unwrap_or(core::mem::zeroed())), objecttypename.param().abi(), objectname.param().abi(), core::mem::transmute(securitydescriptor), core::mem::transmute(desiredaccess), core::mem::transmute(genericmapping), objectcreation.into(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(pfgenerateonclose)) } #[inline] pub unsafe fn AccessCheckByType(psecuritydescriptor: PSECURITY_DESCRIPTOR, principalselfsid: Option, clienttoken: super::Foundation::HANDLE, desiredaccess: u32, objecttypelist: Option<&mut [OBJECT_TYPE_LIST]>, genericmapping: *const GENERIC_MAPPING, privilegeset: Option<*mut PRIVILEGE_SET>, privilegesetlength: *mut u32, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL) -> windows_core::Result<()> { @@ -76,12 +74,11 @@ pub unsafe fn AccessCheckByType(psecuritydescriptor: PSECURITY_DESCRIPTOR, princ .ok() } #[inline] -pub unsafe fn AccessCheckByTypeAndAuditAlarmA(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P2, objectname: P3, securitydescriptor: PSECURITY_DESCRIPTOR, principalselfsid: Option, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: Option<&mut [OBJECT_TYPE_LIST]>, genericmapping: *const GENERIC_MAPPING, objectcreation: P12, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> +pub unsafe fn AccessCheckByTypeAndAuditAlarmA(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P2, objectname: P3, securitydescriptor: PSECURITY_DESCRIPTOR, principalselfsid: Option, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: Option<&mut [OBJECT_TYPE_LIST]>, genericmapping: *const GENERIC_MAPPING, objectcreation: bool, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - P12: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AccessCheckByTypeAndAuditAlarmA(subsystemname : windows_core::PCSTR, handleid : *const core::ffi::c_void, objecttypename : windows_core::PCSTR, objectname : windows_core::PCSTR, securitydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : PSID, desiredaccess : u32, audittype : AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *mut OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const GENERIC_MAPPING, objectcreation : super::Foundation:: BOOL, grantedaccess : *mut u32, accessstatus : *mut super::Foundation:: BOOL, pfgenerateonclose : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); AccessCheckByTypeAndAuditAlarmA( @@ -97,7 +94,7 @@ where core::mem::transmute(objecttypelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), objecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(genericmapping), - objectcreation.param().abi(), + objectcreation.into(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(pfgenerateonclose), @@ -105,12 +102,11 @@ where .ok() } #[inline] -pub unsafe fn AccessCheckByTypeAndAuditAlarmW(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P2, objectname: P3, securitydescriptor: PSECURITY_DESCRIPTOR, principalselfsid: Option, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: Option<&mut [OBJECT_TYPE_LIST]>, genericmapping: *const GENERIC_MAPPING, objectcreation: P12, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL +pub unsafe fn AccessCheckByTypeAndAuditAlarmW(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P2, objectname: P3, securitydescriptor: PSECURITY_DESCRIPTOR, principalselfsid: Option, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: Option<&mut [OBJECT_TYPE_LIST]>, genericmapping: *const GENERIC_MAPPING, objectcreation: bool, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL where P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - P12: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AccessCheckByTypeAndAuditAlarmW(subsystemname : windows_core::PCWSTR, handleid : *const core::ffi::c_void, objecttypename : windows_core::PCWSTR, objectname : windows_core::PCWSTR, securitydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : PSID, desiredaccess : u32, audittype : AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *mut OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const GENERIC_MAPPING, objectcreation : super::Foundation:: BOOL, grantedaccess : *mut u32, accessstatus : *mut super::Foundation:: BOOL, pfgenerateonclose : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); AccessCheckByTypeAndAuditAlarmW( @@ -126,7 +122,7 @@ where core::mem::transmute(objecttypelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), objecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(genericmapping), - objectcreation.param().abi(), + objectcreation.into(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatus), core::mem::transmute(pfgenerateonclose), @@ -151,12 +147,11 @@ pub unsafe fn AccessCheckByTypeResultList(psecuritydescriptor: PSECURITY_DESCRIP .ok() } #[inline] -pub unsafe fn AccessCheckByTypeResultListAndAuditAlarmA(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P2, objectname: P3, securitydescriptor: PSECURITY_DESCRIPTOR, principalselfsid: Option, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P12, grantedaccess: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> +pub unsafe fn AccessCheckByTypeResultListAndAuditAlarmA(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P2, objectname: P3, securitydescriptor: PSECURITY_DESCRIPTOR, principalselfsid: Option, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: bool, grantedaccess: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - P12: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AccessCheckByTypeResultListAndAuditAlarmA(subsystemname : windows_core::PCSTR, handleid : *const core::ffi::c_void, objecttypename : windows_core::PCSTR, objectname : windows_core::PCSTR, securitydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : PSID, desiredaccess : u32, audittype : AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *mut OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const GENERIC_MAPPING, objectcreation : super::Foundation:: BOOL, grantedaccess : *mut u32, accessstatuslist : *mut u32, pfgenerateonclose : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); AccessCheckByTypeResultListAndAuditAlarmA( @@ -172,7 +167,7 @@ where core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypelistlength), core::mem::transmute(genericmapping), - objectcreation.param().abi(), + objectcreation.into(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatuslist), core::mem::transmute(pfgenerateonclose), @@ -180,12 +175,11 @@ where .ok() } #[inline] -pub unsafe fn AccessCheckByTypeResultListAndAuditAlarmByHandleA(subsystemname: P0, handleid: *const core::ffi::c_void, clienttoken: super::Foundation::HANDLE, objecttypename: P3, objectname: P4, securitydescriptor: PSECURITY_DESCRIPTOR, principalselfsid: Option, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P13, grantedaccess: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> +pub unsafe fn AccessCheckByTypeResultListAndAuditAlarmByHandleA(subsystemname: P0, handleid: *const core::ffi::c_void, clienttoken: super::Foundation::HANDLE, objecttypename: P3, objectname: P4, securitydescriptor: PSECURITY_DESCRIPTOR, principalselfsid: Option, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: bool, grantedaccess: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> where P0: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, - P13: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AccessCheckByTypeResultListAndAuditAlarmByHandleA(subsystemname : windows_core::PCSTR, handleid : *const core::ffi::c_void, clienttoken : super::Foundation:: HANDLE, objecttypename : windows_core::PCSTR, objectname : windows_core::PCSTR, securitydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : PSID, desiredaccess : u32, audittype : AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *mut OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const GENERIC_MAPPING, objectcreation : super::Foundation:: BOOL, grantedaccess : *mut u32, accessstatuslist : *mut u32, pfgenerateonclose : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); AccessCheckByTypeResultListAndAuditAlarmByHandleA( @@ -202,7 +196,7 @@ where core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypelistlength), core::mem::transmute(genericmapping), - objectcreation.param().abi(), + objectcreation.into(), core::mem::transmute(grantedaccess), core::mem::transmute(accessstatuslist), core::mem::transmute(pfgenerateonclose), @@ -210,12 +204,11 @@ where .ok() } #[inline] -pub unsafe fn AccessCheckByTypeResultListAndAuditAlarmByHandleW(subsystemname: P0, handleid: *const core::ffi::c_void, clienttoken: super::Foundation::HANDLE, objecttypename: P3, objectname: P4, securitydescriptor: PSECURITY_DESCRIPTOR, principalselfsid: Option, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P13, grantedaccesslist: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL +pub unsafe fn AccessCheckByTypeResultListAndAuditAlarmByHandleW(subsystemname: P0, handleid: *const core::ffi::c_void, clienttoken: super::Foundation::HANDLE, objecttypename: P3, objectname: P4, securitydescriptor: PSECURITY_DESCRIPTOR, principalselfsid: Option, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: bool, grantedaccesslist: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL where P0: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, - P13: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AccessCheckByTypeResultListAndAuditAlarmByHandleW(subsystemname : windows_core::PCWSTR, handleid : *const core::ffi::c_void, clienttoken : super::Foundation:: HANDLE, objecttypename : windows_core::PCWSTR, objectname : windows_core::PCWSTR, securitydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : PSID, desiredaccess : u32, audittype : AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *mut OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const GENERIC_MAPPING, objectcreation : super::Foundation:: BOOL, grantedaccesslist : *mut u32, accessstatuslist : *mut u32, pfgenerateonclose : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); AccessCheckByTypeResultListAndAuditAlarmByHandleW( @@ -232,19 +225,18 @@ where core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypelistlength), core::mem::transmute(genericmapping), - objectcreation.param().abi(), + objectcreation.into(), core::mem::transmute(grantedaccesslist), core::mem::transmute(accessstatuslist), core::mem::transmute(pfgenerateonclose), ) } #[inline] -pub unsafe fn AccessCheckByTypeResultListAndAuditAlarmW(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P2, objectname: P3, securitydescriptor: PSECURITY_DESCRIPTOR, principalselfsid: Option, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P12, grantedaccesslist: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL +pub unsafe fn AccessCheckByTypeResultListAndAuditAlarmW(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P2, objectname: P3, securitydescriptor: PSECURITY_DESCRIPTOR, principalselfsid: Option, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: bool, grantedaccesslist: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL where P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - P12: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AccessCheckByTypeResultListAndAuditAlarmW(subsystemname : windows_core::PCWSTR, handleid : *const core::ffi::c_void, objecttypename : windows_core::PCWSTR, objectname : windows_core::PCWSTR, securitydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : PSID, desiredaccess : u32, audittype : AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *mut OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const GENERIC_MAPPING, objectcreation : super::Foundation:: BOOL, grantedaccesslist : *mut u32, accessstatuslist : *mut u32, pfgenerateonclose : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); AccessCheckByTypeResultListAndAuditAlarmW( @@ -260,7 +252,7 @@ where core::mem::transmute(objecttypelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(objecttypelistlength), core::mem::transmute(genericmapping), - objectcreation.param().abi(), + objectcreation.into(), core::mem::transmute(grantedaccesslist), core::mem::transmute(accessstatuslist), core::mem::transmute(pfgenerateonclose), @@ -302,31 +294,19 @@ pub unsafe fn AddAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, dwstartingacei AddAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(dwstartingaceindex), core::mem::transmute(pacelist), core::mem::transmute(nacelistlength)).ok() } #[inline] -pub unsafe fn AddAuditAccessAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, dwaccessmask: u32, psid: PSID, bauditsuccess: P4, bauditfailure: P5) -> windows_core::Result<()> -where - P4: windows_core::Param, - P5: windows_core::Param, -{ +pub unsafe fn AddAuditAccessAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, dwaccessmask: u32, psid: PSID, bauditsuccess: bool, bauditfailure: bool) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn AddAuditAccessAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, dwaccessmask : u32, psid : PSID, bauditsuccess : super::Foundation:: BOOL, bauditfailure : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - AddAuditAccessAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(dwaccessmask), core::mem::transmute(psid), bauditsuccess.param().abi(), bauditfailure.param().abi()).ok() + AddAuditAccessAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(dwaccessmask), core::mem::transmute(psid), bauditsuccess.into(), bauditfailure.into()).ok() } #[inline] -pub unsafe fn AddAuditAccessAceEx(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, dwaccessmask: u32, psid: PSID, bauditsuccess: P5, bauditfailure: P6) -> windows_core::Result<()> -where - P5: windows_core::Param, - P6: windows_core::Param, -{ +pub unsafe fn AddAuditAccessAceEx(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, dwaccessmask: u32, psid: PSID, bauditsuccess: bool, bauditfailure: bool) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn AddAuditAccessAceEx(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, dwaccessmask : u32, psid : PSID, bauditsuccess : super::Foundation:: BOOL, bauditfailure : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - AddAuditAccessAceEx(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(dwaccessmask), core::mem::transmute(psid), bauditsuccess.param().abi(), bauditfailure.param().abi()).ok() + AddAuditAccessAceEx(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(dwaccessmask), core::mem::transmute(psid), bauditsuccess.into(), bauditfailure.into()).ok() } #[inline] -pub unsafe fn AddAuditAccessObjectAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, objecttypeguid: Option<*const windows_core::GUID>, inheritedobjecttypeguid: Option<*const windows_core::GUID>, psid: PSID, bauditsuccess: P7, bauditfailure: P8) -> windows_core::Result<()> -where - P7: windows_core::Param, - P8: windows_core::Param, -{ +pub unsafe fn AddAuditAccessObjectAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, objecttypeguid: Option<*const windows_core::GUID>, inheritedobjecttypeguid: Option<*const windows_core::GUID>, psid: PSID, bauditsuccess: bool, bauditfailure: bool) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn AddAuditAccessObjectAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, accessmask : u32, objecttypeguid : *const windows_core::GUID, inheritedobjecttypeguid : *const windows_core::GUID, psid : PSID, bauditsuccess : super::Foundation:: BOOL, bauditfailure : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - AddAuditAccessObjectAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(accessmask), core::mem::transmute(objecttypeguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(inheritedobjecttypeguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(psid), bauditsuccess.param().abi(), bauditfailure.param().abi()).ok() + AddAuditAccessObjectAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(accessmask), core::mem::transmute(objecttypeguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(inheritedobjecttypeguid.unwrap_or(core::mem::zeroed())), core::mem::transmute(psid), bauditsuccess.into(), bauditfailure.into()).ok() } #[inline] pub unsafe fn AddConditionalAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, acetype: u8, accessmask: u32, psid: PSID, conditionstr: P6, returnlength: *mut u32) -> windows_core::Result<()> @@ -352,20 +332,14 @@ pub unsafe fn AddScopedPolicyIDAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, AddScopedPolicyIDAce(core::mem::transmute(pacl), core::mem::transmute(dwacerevision), core::mem::transmute(aceflags), core::mem::transmute(accessmask), core::mem::transmute(psid)).ok() } #[inline] -pub unsafe fn AdjustTokenGroups(tokenhandle: super::Foundation::HANDLE, resettodefault: P1, newstate: Option<*const TOKEN_GROUPS>, bufferlength: u32, previousstate: Option<*mut TOKEN_GROUPS>, returnlength: Option<*mut u32>) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn AdjustTokenGroups(tokenhandle: super::Foundation::HANDLE, resettodefault: bool, newstate: Option<*const TOKEN_GROUPS>, bufferlength: u32, previousstate: Option<*mut TOKEN_GROUPS>, returnlength: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn AdjustTokenGroups(tokenhandle : super::Foundation:: HANDLE, resettodefault : super::Foundation:: BOOL, newstate : *const TOKEN_GROUPS, bufferlength : u32, previousstate : *mut TOKEN_GROUPS, returnlength : *mut u32) -> super::Foundation:: BOOL); - AdjustTokenGroups(core::mem::transmute(tokenhandle), resettodefault.param().abi(), core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))).ok() + AdjustTokenGroups(core::mem::transmute(tokenhandle), resettodefault.into(), core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn AdjustTokenPrivileges(tokenhandle: super::Foundation::HANDLE, disableallprivileges: P1, newstate: Option<*const TOKEN_PRIVILEGES>, bufferlength: u32, previousstate: Option<*mut TOKEN_PRIVILEGES>, returnlength: Option<*mut u32>) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn AdjustTokenPrivileges(tokenhandle: super::Foundation::HANDLE, disableallprivileges: bool, newstate: Option<*const TOKEN_PRIVILEGES>, bufferlength: u32, previousstate: Option<*mut TOKEN_PRIVILEGES>, returnlength: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn AdjustTokenPrivileges(tokenhandle : super::Foundation:: HANDLE, disableallprivileges : super::Foundation:: BOOL, newstate : *const TOKEN_PRIVILEGES, bufferlength : u32, previousstate : *mut TOKEN_PRIVILEGES, returnlength : *mut u32) -> super::Foundation:: BOOL); - AdjustTokenPrivileges(core::mem::transmute(tokenhandle), disableallprivileges.param().abi(), core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))).ok() + AdjustTokenPrivileges(core::mem::transmute(tokenhandle), disableallprivileges.into(), core::mem::transmute(newstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(bufferlength), core::mem::transmute(previousstate.unwrap_or(core::mem::zeroed())), core::mem::transmute(returnlength.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn AllocateAndInitializeSid(pidentifierauthority: *const SID_IDENTIFIER_AUTHORITY, nsubauthoritycount: u8, nsubauthority0: u32, nsubauthority1: u32, nsubauthority2: u32, nsubauthority3: u32, nsubauthority4: u32, nsubauthority5: u32, nsubauthority6: u32, nsubauthority7: u32, psid: *mut PSID) -> windows_core::Result<()> { @@ -403,12 +377,9 @@ pub unsafe fn CheckTokenMembershipEx(tokenhandle: Option(parentdescriptor: Option, currentsecuritydescriptor: PSECURITY_DESCRIPTOR, newsecuritydescriptor: *mut PSECURITY_DESCRIPTOR, objecttype: Option<*const windows_core::GUID>, isdirectoryobject: P4, genericmapping: *const GENERIC_MAPPING) -> windows_core::Result<()> -where - P4: windows_core::Param, -{ +pub unsafe fn ConvertToAutoInheritPrivateObjectSecurity(parentdescriptor: Option, currentsecuritydescriptor: PSECURITY_DESCRIPTOR, newsecuritydescriptor: *mut PSECURITY_DESCRIPTOR, objecttype: Option<*const windows_core::GUID>, isdirectoryobject: bool, genericmapping: *const GENERIC_MAPPING) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn ConvertToAutoInheritPrivateObjectSecurity(parentdescriptor : PSECURITY_DESCRIPTOR, currentsecuritydescriptor : PSECURITY_DESCRIPTOR, newsecuritydescriptor : *mut PSECURITY_DESCRIPTOR, objecttype : *const windows_core::GUID, isdirectoryobject : super::Foundation:: BOOLEAN, genericmapping : *const GENERIC_MAPPING) -> super::Foundation:: BOOL); - ConvertToAutoInheritPrivateObjectSecurity(core::mem::transmute(parentdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(currentsecuritydescriptor), core::mem::transmute(newsecuritydescriptor), core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), isdirectoryobject.param().abi(), core::mem::transmute(genericmapping)).ok() + ConvertToAutoInheritPrivateObjectSecurity(core::mem::transmute(parentdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(currentsecuritydescriptor), core::mem::transmute(newsecuritydescriptor), core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), isdirectoryobject.into(), core::mem::transmute(genericmapping)).ok() } #[inline] pub unsafe fn CopySid(ndestinationsidlength: u32, pdestinationsid: PSID, psourcesid: PSID) -> windows_core::Result<()> { @@ -416,26 +387,17 @@ pub unsafe fn CopySid(ndestinationsidlength: u32, pdestinationsid: PSID, psource CopySid(core::mem::transmute(ndestinationsidlength), core::mem::transmute(pdestinationsid), core::mem::transmute(psourcesid)).ok() } #[inline] -pub unsafe fn CreatePrivateObjectSecurity(parentdescriptor: Option, creatordescriptor: Option, newdescriptor: *mut PSECURITY_DESCRIPTOR, isdirectoryobject: P3, token: Option, genericmapping: *const GENERIC_MAPPING) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn CreatePrivateObjectSecurity(parentdescriptor: Option, creatordescriptor: Option, newdescriptor: *mut PSECURITY_DESCRIPTOR, isdirectoryobject: bool, token: Option, genericmapping: *const GENERIC_MAPPING) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CreatePrivateObjectSecurity(parentdescriptor : PSECURITY_DESCRIPTOR, creatordescriptor : PSECURITY_DESCRIPTOR, newdescriptor : *mut PSECURITY_DESCRIPTOR, isdirectoryobject : super::Foundation:: BOOL, token : super::Foundation:: HANDLE, genericmapping : *const GENERIC_MAPPING) -> super::Foundation:: BOOL); - CreatePrivateObjectSecurity(core::mem::transmute(parentdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(creatordescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(newdescriptor), isdirectoryobject.param().abi(), core::mem::transmute(token.unwrap_or(core::mem::zeroed())), core::mem::transmute(genericmapping)).ok() + CreatePrivateObjectSecurity(core::mem::transmute(parentdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(creatordescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(newdescriptor), isdirectoryobject.into(), core::mem::transmute(token.unwrap_or(core::mem::zeroed())), core::mem::transmute(genericmapping)).ok() } #[inline] -pub unsafe fn CreatePrivateObjectSecurityEx(parentdescriptor: Option, creatordescriptor: Option, newdescriptor: *mut PSECURITY_DESCRIPTOR, objecttype: Option<*const windows_core::GUID>, iscontainerobject: P4, autoinheritflags: SECURITY_AUTO_INHERIT_FLAGS, token: Option, genericmapping: *const GENERIC_MAPPING) -> windows_core::Result<()> -where - P4: windows_core::Param, -{ +pub unsafe fn CreatePrivateObjectSecurityEx(parentdescriptor: Option, creatordescriptor: Option, newdescriptor: *mut PSECURITY_DESCRIPTOR, objecttype: Option<*const windows_core::GUID>, iscontainerobject: bool, autoinheritflags: SECURITY_AUTO_INHERIT_FLAGS, token: Option, genericmapping: *const GENERIC_MAPPING) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CreatePrivateObjectSecurityEx(parentdescriptor : PSECURITY_DESCRIPTOR, creatordescriptor : PSECURITY_DESCRIPTOR, newdescriptor : *mut PSECURITY_DESCRIPTOR, objecttype : *const windows_core::GUID, iscontainerobject : super::Foundation:: BOOL, autoinheritflags : SECURITY_AUTO_INHERIT_FLAGS, token : super::Foundation:: HANDLE, genericmapping : *const GENERIC_MAPPING) -> super::Foundation:: BOOL); - CreatePrivateObjectSecurityEx(core::mem::transmute(parentdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(creatordescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(newdescriptor), core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), iscontainerobject.param().abi(), core::mem::transmute(autoinheritflags), core::mem::transmute(token.unwrap_or(core::mem::zeroed())), core::mem::transmute(genericmapping)).ok() + CreatePrivateObjectSecurityEx(core::mem::transmute(parentdescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(creatordescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(newdescriptor), core::mem::transmute(objecttype.unwrap_or(core::mem::zeroed())), iscontainerobject.into(), core::mem::transmute(autoinheritflags), core::mem::transmute(token.unwrap_or(core::mem::zeroed())), core::mem::transmute(genericmapping)).ok() } #[inline] -pub unsafe fn CreatePrivateObjectSecurityWithMultipleInheritance(parentdescriptor: Option, creatordescriptor: Option, newdescriptor: *mut PSECURITY_DESCRIPTOR, objecttypes: Option<&[*const windows_core::GUID]>, iscontainerobject: P5, autoinheritflags: SECURITY_AUTO_INHERIT_FLAGS, token: Option, genericmapping: *const GENERIC_MAPPING) -> windows_core::Result<()> -where - P5: windows_core::Param, -{ +pub unsafe fn CreatePrivateObjectSecurityWithMultipleInheritance(parentdescriptor: Option, creatordescriptor: Option, newdescriptor: *mut PSECURITY_DESCRIPTOR, objecttypes: Option<&[*const windows_core::GUID]>, iscontainerobject: bool, autoinheritflags: SECURITY_AUTO_INHERIT_FLAGS, token: Option, genericmapping: *const GENERIC_MAPPING) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn CreatePrivateObjectSecurityWithMultipleInheritance(parentdescriptor : PSECURITY_DESCRIPTOR, creatordescriptor : PSECURITY_DESCRIPTOR, newdescriptor : *mut PSECURITY_DESCRIPTOR, objecttypes : *const *const windows_core::GUID, guidcount : u32, iscontainerobject : super::Foundation:: BOOL, autoinheritflags : SECURITY_AUTO_INHERIT_FLAGS, token : super::Foundation:: HANDLE, genericmapping : *const GENERIC_MAPPING) -> super::Foundation:: BOOL); CreatePrivateObjectSecurityWithMultipleInheritance( core::mem::transmute(parentdescriptor.unwrap_or(core::mem::zeroed())), @@ -443,7 +405,7 @@ where core::mem::transmute(newdescriptor), core::mem::transmute(objecttypes.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), objecttypes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - iscontainerobject.param().abi(), + iscontainerobject.into(), core::mem::transmute(autoinheritflags), core::mem::transmute(token.unwrap_or(core::mem::zeroed())), core::mem::transmute(genericmapping), @@ -879,82 +841,72 @@ pub unsafe fn MapGenericMask(accessmask: *mut u32, genericmapping: *const GENERI MapGenericMask(core::mem::transmute(accessmask), core::mem::transmute(genericmapping)) } #[inline] -pub unsafe fn ObjectCloseAuditAlarmA(subsystemname: P0, handleid: *const core::ffi::c_void, generateonclose: P2) -> windows_core::Result<()> +pub unsafe fn ObjectCloseAuditAlarmA(subsystemname: P0, handleid: *const core::ffi::c_void, generateonclose: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ObjectCloseAuditAlarmA(subsystemname : windows_core::PCSTR, handleid : *const core::ffi::c_void, generateonclose : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - ObjectCloseAuditAlarmA(subsystemname.param().abi(), core::mem::transmute(handleid), generateonclose.param().abi()).ok() + ObjectCloseAuditAlarmA(subsystemname.param().abi(), core::mem::transmute(handleid), generateonclose.into()).ok() } #[inline] -pub unsafe fn ObjectCloseAuditAlarmW(subsystemname: P0, handleid: *const core::ffi::c_void, generateonclose: P2) -> super::Foundation::BOOL +pub unsafe fn ObjectCloseAuditAlarmW(subsystemname: P0, handleid: *const core::ffi::c_void, generateonclose: bool) -> super::Foundation::BOOL where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ObjectCloseAuditAlarmW(subsystemname : windows_core::PCWSTR, handleid : *const core::ffi::c_void, generateonclose : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - ObjectCloseAuditAlarmW(subsystemname.param().abi(), core::mem::transmute(handleid), generateonclose.param().abi()) + ObjectCloseAuditAlarmW(subsystemname.param().abi(), core::mem::transmute(handleid), generateonclose.into()) } #[inline] -pub unsafe fn ObjectDeleteAuditAlarmA(subsystemname: P0, handleid: *const core::ffi::c_void, generateonclose: P2) -> windows_core::Result<()> +pub unsafe fn ObjectDeleteAuditAlarmA(subsystemname: P0, handleid: *const core::ffi::c_void, generateonclose: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ObjectDeleteAuditAlarmA(subsystemname : windows_core::PCSTR, handleid : *const core::ffi::c_void, generateonclose : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - ObjectDeleteAuditAlarmA(subsystemname.param().abi(), core::mem::transmute(handleid), generateonclose.param().abi()).ok() + ObjectDeleteAuditAlarmA(subsystemname.param().abi(), core::mem::transmute(handleid), generateonclose.into()).ok() } #[inline] -pub unsafe fn ObjectDeleteAuditAlarmW(subsystemname: P0, handleid: *const core::ffi::c_void, generateonclose: P2) -> super::Foundation::BOOL +pub unsafe fn ObjectDeleteAuditAlarmW(subsystemname: P0, handleid: *const core::ffi::c_void, generateonclose: bool) -> super::Foundation::BOOL where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ObjectDeleteAuditAlarmW(subsystemname : windows_core::PCWSTR, handleid : *const core::ffi::c_void, generateonclose : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - ObjectDeleteAuditAlarmW(subsystemname.param().abi(), core::mem::transmute(handleid), generateonclose.param().abi()) + ObjectDeleteAuditAlarmW(subsystemname.param().abi(), core::mem::transmute(handleid), generateonclose.into()) } #[inline] -pub unsafe fn ObjectOpenAuditAlarmA(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P2, objectname: P3, psecuritydescriptor: PSECURITY_DESCRIPTOR, clienttoken: super::Foundation::HANDLE, desiredaccess: u32, grantedaccess: u32, privileges: Option<*const PRIVILEGE_SET>, objectcreation: P9, accessgranted: P10, generateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> +pub unsafe fn ObjectOpenAuditAlarmA(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P2, objectname: P3, psecuritydescriptor: PSECURITY_DESCRIPTOR, clienttoken: super::Foundation::HANDLE, desiredaccess: u32, grantedaccess: u32, privileges: Option<*const PRIVILEGE_SET>, objectcreation: bool, accessgranted: bool, generateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - P9: windows_core::Param, - P10: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ObjectOpenAuditAlarmA(subsystemname : windows_core::PCSTR, handleid : *const core::ffi::c_void, objecttypename : windows_core::PCSTR, objectname : windows_core::PCSTR, psecuritydescriptor : PSECURITY_DESCRIPTOR, clienttoken : super::Foundation:: HANDLE, desiredaccess : u32, grantedaccess : u32, privileges : *const PRIVILEGE_SET, objectcreation : super::Foundation:: BOOL, accessgranted : super::Foundation:: BOOL, generateonclose : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); - ObjectOpenAuditAlarmA(subsystemname.param().abi(), core::mem::transmute(handleid), objecttypename.param().abi(), objectname.param().abi(), core::mem::transmute(psecuritydescriptor), core::mem::transmute(clienttoken), core::mem::transmute(desiredaccess), core::mem::transmute(grantedaccess), core::mem::transmute(privileges.unwrap_or(core::mem::zeroed())), objectcreation.param().abi(), accessgranted.param().abi(), core::mem::transmute(generateonclose)).ok() + ObjectOpenAuditAlarmA(subsystemname.param().abi(), core::mem::transmute(handleid), objecttypename.param().abi(), objectname.param().abi(), core::mem::transmute(psecuritydescriptor), core::mem::transmute(clienttoken), core::mem::transmute(desiredaccess), core::mem::transmute(grantedaccess), core::mem::transmute(privileges.unwrap_or(core::mem::zeroed())), objectcreation.into(), accessgranted.into(), core::mem::transmute(generateonclose)).ok() } #[inline] -pub unsafe fn ObjectOpenAuditAlarmW(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P2, objectname: P3, psecuritydescriptor: PSECURITY_DESCRIPTOR, clienttoken: super::Foundation::HANDLE, desiredaccess: u32, grantedaccess: u32, privileges: Option<*const PRIVILEGE_SET>, objectcreation: P9, accessgranted: P10, generateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL +pub unsafe fn ObjectOpenAuditAlarmW(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P2, objectname: P3, psecuritydescriptor: PSECURITY_DESCRIPTOR, clienttoken: super::Foundation::HANDLE, desiredaccess: u32, grantedaccess: u32, privileges: Option<*const PRIVILEGE_SET>, objectcreation: bool, accessgranted: bool, generateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL where P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - P9: windows_core::Param, - P10: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ObjectOpenAuditAlarmW(subsystemname : windows_core::PCWSTR, handleid : *const core::ffi::c_void, objecttypename : windows_core::PCWSTR, objectname : windows_core::PCWSTR, psecuritydescriptor : PSECURITY_DESCRIPTOR, clienttoken : super::Foundation:: HANDLE, desiredaccess : u32, grantedaccess : u32, privileges : *const PRIVILEGE_SET, objectcreation : super::Foundation:: BOOL, accessgranted : super::Foundation:: BOOL, generateonclose : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); - ObjectOpenAuditAlarmW(subsystemname.param().abi(), core::mem::transmute(handleid), objecttypename.param().abi(), objectname.param().abi(), core::mem::transmute(psecuritydescriptor), core::mem::transmute(clienttoken), core::mem::transmute(desiredaccess), core::mem::transmute(grantedaccess), core::mem::transmute(privileges.unwrap_or(core::mem::zeroed())), objectcreation.param().abi(), accessgranted.param().abi(), core::mem::transmute(generateonclose)) + ObjectOpenAuditAlarmW(subsystemname.param().abi(), core::mem::transmute(handleid), objecttypename.param().abi(), objectname.param().abi(), core::mem::transmute(psecuritydescriptor), core::mem::transmute(clienttoken), core::mem::transmute(desiredaccess), core::mem::transmute(grantedaccess), core::mem::transmute(privileges.unwrap_or(core::mem::zeroed())), objectcreation.into(), accessgranted.into(), core::mem::transmute(generateonclose)) } #[inline] -pub unsafe fn ObjectPrivilegeAuditAlarmA(subsystemname: P0, handleid: *const core::ffi::c_void, clienttoken: super::Foundation::HANDLE, desiredaccess: u32, privileges: *const PRIVILEGE_SET, accessgranted: P5) -> windows_core::Result<()> +pub unsafe fn ObjectPrivilegeAuditAlarmA(subsystemname: P0, handleid: *const core::ffi::c_void, clienttoken: super::Foundation::HANDLE, desiredaccess: u32, privileges: *const PRIVILEGE_SET, accessgranted: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ObjectPrivilegeAuditAlarmA(subsystemname : windows_core::PCSTR, handleid : *const core::ffi::c_void, clienttoken : super::Foundation:: HANDLE, desiredaccess : u32, privileges : *const PRIVILEGE_SET, accessgranted : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - ObjectPrivilegeAuditAlarmA(subsystemname.param().abi(), core::mem::transmute(handleid), core::mem::transmute(clienttoken), core::mem::transmute(desiredaccess), core::mem::transmute(privileges), accessgranted.param().abi()).ok() + ObjectPrivilegeAuditAlarmA(subsystemname.param().abi(), core::mem::transmute(handleid), core::mem::transmute(clienttoken), core::mem::transmute(desiredaccess), core::mem::transmute(privileges), accessgranted.into()).ok() } #[inline] -pub unsafe fn ObjectPrivilegeAuditAlarmW(subsystemname: P0, handleid: *const core::ffi::c_void, clienttoken: super::Foundation::HANDLE, desiredaccess: u32, privileges: *const PRIVILEGE_SET, accessgranted: P5) -> super::Foundation::BOOL +pub unsafe fn ObjectPrivilegeAuditAlarmW(subsystemname: P0, handleid: *const core::ffi::c_void, clienttoken: super::Foundation::HANDLE, desiredaccess: u32, privileges: *const PRIVILEGE_SET, accessgranted: bool) -> super::Foundation::BOOL where P0: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ObjectPrivilegeAuditAlarmW(subsystemname : windows_core::PCWSTR, handleid : *const core::ffi::c_void, clienttoken : super::Foundation:: HANDLE, desiredaccess : u32, privileges : *const PRIVILEGE_SET, accessgranted : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - ObjectPrivilegeAuditAlarmW(subsystemname.param().abi(), core::mem::transmute(handleid), core::mem::transmute(clienttoken), core::mem::transmute(desiredaccess), core::mem::transmute(privileges), accessgranted.param().abi()) + ObjectPrivilegeAuditAlarmW(subsystemname.param().abi(), core::mem::transmute(handleid), core::mem::transmute(clienttoken), core::mem::transmute(desiredaccess), core::mem::transmute(privileges), accessgranted.into()) } #[inline] pub unsafe fn PrivilegeCheck(clienttoken: super::Foundation::HANDLE, requiredprivileges: *mut PRIVILEGE_SET, pfresult: *mut super::Foundation::BOOL) -> windows_core::Result<()> { @@ -962,24 +914,22 @@ pub unsafe fn PrivilegeCheck(clienttoken: super::Foundation::HANDLE, requiredpri PrivilegeCheck(core::mem::transmute(clienttoken), core::mem::transmute(requiredprivileges), core::mem::transmute(pfresult)).ok() } #[inline] -pub unsafe fn PrivilegedServiceAuditAlarmA(subsystemname: P0, servicename: P1, clienttoken: super::Foundation::HANDLE, privileges: *const PRIVILEGE_SET, accessgranted: P4) -> windows_core::Result<()> +pub unsafe fn PrivilegedServiceAuditAlarmA(subsystemname: P0, servicename: P1, clienttoken: super::Foundation::HANDLE, privileges: *const PRIVILEGE_SET, accessgranted: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn PrivilegedServiceAuditAlarmA(subsystemname : windows_core::PCSTR, servicename : windows_core::PCSTR, clienttoken : super::Foundation:: HANDLE, privileges : *const PRIVILEGE_SET, accessgranted : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - PrivilegedServiceAuditAlarmA(subsystemname.param().abi(), servicename.param().abi(), core::mem::transmute(clienttoken), core::mem::transmute(privileges), accessgranted.param().abi()).ok() + PrivilegedServiceAuditAlarmA(subsystemname.param().abi(), servicename.param().abi(), core::mem::transmute(clienttoken), core::mem::transmute(privileges), accessgranted.into()).ok() } #[inline] -pub unsafe fn PrivilegedServiceAuditAlarmW(subsystemname: P0, servicename: P1, clienttoken: super::Foundation::HANDLE, privileges: *const PRIVILEGE_SET, accessgranted: P4) -> super::Foundation::BOOL +pub unsafe fn PrivilegedServiceAuditAlarmW(subsystemname: P0, servicename: P1, clienttoken: super::Foundation::HANDLE, privileges: *const PRIVILEGE_SET, accessgranted: bool) -> super::Foundation::BOOL where P0: windows_core::Param, P1: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn PrivilegedServiceAuditAlarmW(subsystemname : windows_core::PCWSTR, servicename : windows_core::PCWSTR, clienttoken : super::Foundation:: HANDLE, privileges : *const PRIVILEGE_SET, accessgranted : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - PrivilegedServiceAuditAlarmW(subsystemname.param().abi(), servicename.param().abi(), core::mem::transmute(clienttoken), core::mem::transmute(privileges), accessgranted.param().abi()) + PrivilegedServiceAuditAlarmW(subsystemname.param().abi(), servicename.param().abi(), core::mem::transmute(clienttoken), core::mem::transmute(privileges), accessgranted.into()) } #[inline] pub unsafe fn QuerySecurityAccessMask(securityinformation: OBJECT_SECURITY_INFORMATION) -> u32 { @@ -994,20 +944,14 @@ pub unsafe fn RevertToSelf() -> windows_core::Result<()> { RevertToSelf().ok() } #[inline] -pub unsafe fn RtlConvertSidToUnicodeString(unicodestring: *mut super::Foundation::UNICODE_STRING, sid: PSID, allocatedestinationstring: P2) -> super::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn RtlConvertSidToUnicodeString(unicodestring: *mut super::Foundation::UNICODE_STRING, sid: PSID, allocatedestinationstring: bool) -> super::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlConvertSidToUnicodeString(unicodestring : *mut super::Foundation:: UNICODE_STRING, sid : PSID, allocatedestinationstring : super::Foundation:: BOOLEAN) -> super::Foundation:: NTSTATUS); - RtlConvertSidToUnicodeString(core::mem::transmute(unicodestring), core::mem::transmute(sid), allocatedestinationstring.param().abi()) + RtlConvertSidToUnicodeString(core::mem::transmute(unicodestring), core::mem::transmute(sid), allocatedestinationstring.into()) } #[inline] -pub unsafe fn RtlNormalizeSecurityDescriptor(securitydescriptor: *mut PSECURITY_DESCRIPTOR, securitydescriptorlength: u32, newsecuritydescriptor: Option<*mut PSECURITY_DESCRIPTOR>, newsecuritydescriptorlength: Option<*mut u32>, checkonly: P4) -> super::Foundation::BOOLEAN -where - P4: windows_core::Param, -{ +pub unsafe fn RtlNormalizeSecurityDescriptor(securitydescriptor: *mut PSECURITY_DESCRIPTOR, securitydescriptorlength: u32, newsecuritydescriptor: Option<*mut PSECURITY_DESCRIPTOR>, newsecuritydescriptorlength: Option<*mut u32>, checkonly: bool) -> super::Foundation::BOOLEAN { windows_targets::link!("ntdll.dll" "system" fn RtlNormalizeSecurityDescriptor(securitydescriptor : *mut PSECURITY_DESCRIPTOR, securitydescriptorlength : u32, newsecuritydescriptor : *mut PSECURITY_DESCRIPTOR, newsecuritydescriptorlength : *mut u32, checkonly : super::Foundation:: BOOLEAN) -> super::Foundation:: BOOLEAN); - RtlNormalizeSecurityDescriptor(core::mem::transmute(securitydescriptor), core::mem::transmute(securitydescriptorlength), core::mem::transmute(newsecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(newsecuritydescriptorlength.unwrap_or(core::mem::zeroed())), checkonly.param().abi()) + RtlNormalizeSecurityDescriptor(core::mem::transmute(securitydescriptor), core::mem::transmute(securitydescriptorlength), core::mem::transmute(newsecuritydescriptor.unwrap_or(core::mem::zeroed())), core::mem::transmute(newsecuritydescriptorlength.unwrap_or(core::mem::zeroed())), checkonly.into()) } #[inline] pub unsafe fn SetAclInformation(pacl: *mut ACL, paclinformation: *const core::ffi::c_void, naclinformationlength: u32, dwaclinformationclass: ACL_INFORMATION_CLASS) -> windows_core::Result<()> { @@ -1063,29 +1007,19 @@ pub unsafe fn SetSecurityDescriptorControl(psecuritydescriptor: PSECURITY_DESCRI SetSecurityDescriptorControl(core::mem::transmute(psecuritydescriptor), core::mem::transmute(controlbitsofinterest), core::mem::transmute(controlbitstoset)).ok() } #[inline] -pub unsafe fn SetSecurityDescriptorDacl(psecuritydescriptor: PSECURITY_DESCRIPTOR, bdaclpresent: P1, pdacl: Option<*const ACL>, bdacldefaulted: P3) -> windows_core::Result<()> -where - P1: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn SetSecurityDescriptorDacl(psecuritydescriptor: PSECURITY_DESCRIPTOR, bdaclpresent: bool, pdacl: Option<*const ACL>, bdacldefaulted: bool) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn SetSecurityDescriptorDacl(psecuritydescriptor : PSECURITY_DESCRIPTOR, bdaclpresent : super::Foundation:: BOOL, pdacl : *const ACL, bdacldefaulted : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - SetSecurityDescriptorDacl(core::mem::transmute(psecuritydescriptor), bdaclpresent.param().abi(), core::mem::transmute(pdacl.unwrap_or(core::mem::zeroed())), bdacldefaulted.param().abi()).ok() + SetSecurityDescriptorDacl(core::mem::transmute(psecuritydescriptor), bdaclpresent.into(), core::mem::transmute(pdacl.unwrap_or(core::mem::zeroed())), bdacldefaulted.into()).ok() } #[inline] -pub unsafe fn SetSecurityDescriptorGroup(psecuritydescriptor: PSECURITY_DESCRIPTOR, pgroup: Option, bgroupdefaulted: P2) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn SetSecurityDescriptorGroup(psecuritydescriptor: PSECURITY_DESCRIPTOR, pgroup: Option, bgroupdefaulted: bool) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn SetSecurityDescriptorGroup(psecuritydescriptor : PSECURITY_DESCRIPTOR, pgroup : PSID, bgroupdefaulted : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - SetSecurityDescriptorGroup(core::mem::transmute(psecuritydescriptor), core::mem::transmute(pgroup.unwrap_or(core::mem::zeroed())), bgroupdefaulted.param().abi()).ok() + SetSecurityDescriptorGroup(core::mem::transmute(psecuritydescriptor), core::mem::transmute(pgroup.unwrap_or(core::mem::zeroed())), bgroupdefaulted.into()).ok() } #[inline] -pub unsafe fn SetSecurityDescriptorOwner(psecuritydescriptor: PSECURITY_DESCRIPTOR, powner: Option, bownerdefaulted: P2) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn SetSecurityDescriptorOwner(psecuritydescriptor: PSECURITY_DESCRIPTOR, powner: Option, bownerdefaulted: bool) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn SetSecurityDescriptorOwner(psecuritydescriptor : PSECURITY_DESCRIPTOR, powner : PSID, bownerdefaulted : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - SetSecurityDescriptorOwner(core::mem::transmute(psecuritydescriptor), core::mem::transmute(powner.unwrap_or(core::mem::zeroed())), bownerdefaulted.param().abi()).ok() + SetSecurityDescriptorOwner(core::mem::transmute(psecuritydescriptor), core::mem::transmute(powner.unwrap_or(core::mem::zeroed())), bownerdefaulted.into()).ok() } #[inline] pub unsafe fn SetSecurityDescriptorRMControl(securitydescriptor: PSECURITY_DESCRIPTOR, rmcontrol: Option<*const u8>) -> u32 { @@ -1093,13 +1027,9 @@ pub unsafe fn SetSecurityDescriptorRMControl(securitydescriptor: PSECURITY_DESCR SetSecurityDescriptorRMControl(core::mem::transmute(securitydescriptor), core::mem::transmute(rmcontrol.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetSecurityDescriptorSacl(psecuritydescriptor: PSECURITY_DESCRIPTOR, bsaclpresent: P1, psacl: Option<*const ACL>, bsacldefaulted: P3) -> windows_core::Result<()> -where - P1: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn SetSecurityDescriptorSacl(psecuritydescriptor: PSECURITY_DESCRIPTOR, bsaclpresent: bool, psacl: Option<*const ACL>, bsacldefaulted: bool) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn SetSecurityDescriptorSacl(psecuritydescriptor : PSECURITY_DESCRIPTOR, bsaclpresent : super::Foundation:: BOOL, psacl : *const ACL, bsacldefaulted : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - SetSecurityDescriptorSacl(core::mem::transmute(psecuritydescriptor), bsaclpresent.param().abi(), core::mem::transmute(psacl.unwrap_or(core::mem::zeroed())), bsacldefaulted.param().abi()).ok() + SetSecurityDescriptorSacl(core::mem::transmute(psecuritydescriptor), bsaclpresent.into(), core::mem::transmute(psacl.unwrap_or(core::mem::zeroed())), bsacldefaulted.into()).ok() } #[inline] pub unsafe fn SetTokenInformation(tokenhandle: super::Foundation::HANDLE, tokeninformationclass: TOKEN_INFORMATION_CLASS, tokeninformation: *const core::ffi::c_void, tokeninformationlength: u32) -> windows_core::Result<()> { @@ -1621,9 +1551,6 @@ pub const MaxTokenInfoClass: TOKEN_INFORMATION_CLASS = TOKEN_INFORMATION_CLASS(4 #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct NCRYPT_DESCRIPTOR_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for NCRYPT_DESCRIPTOR_HANDLE { - type TypeKind = windows_core::CopyType; -} impl NCRYPT_DESCRIPTOR_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1637,9 +1564,6 @@ impl Default for NCRYPT_DESCRIPTOR_HANDLE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct NCRYPT_STREAM_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for NCRYPT_STREAM_HANDLE { - type TypeKind = windows_core::CopyType; -} impl NCRYPT_STREAM_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1720,9 +1644,6 @@ pub const PROTECTED_SACL_SECURITY_INFORMATION: OBJECT_SECURITY_INFORMATION = OBJ #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct PSECURITY_DESCRIPTOR(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for PSECURITY_DESCRIPTOR { - type TypeKind = windows_core::CopyType; -} impl PSECURITY_DESCRIPTOR { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1736,9 +1657,6 @@ impl Default for PSECURITY_DESCRIPTOR { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct PSID(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for PSID { - type TypeKind = windows_core::CopyType; -} impl PSID { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -1768,9 +1686,6 @@ pub const SACL_SECURITY_INFORMATION: OBJECT_SECURITY_INFORMATION = OBJECT_SECURI #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct SAFER_LEVEL_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for SAFER_LEVEL_HANDLE { - type TypeKind = windows_core::CopyType; -} impl SAFER_LEVEL_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Cabinets/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Cabinets/mod.rs index 5bd275468f..fa53acec48 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Cabinets/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Cabinets/mod.rs @@ -1,12 +1,11 @@ #[inline] -pub unsafe fn FCIAddFile(hfci: *const core::ffi::c_void, pszsourcefile: P1, pszfilename: P2, fexecute: P3, pfnfcignc: PFNFCIGETNEXTCABINET, pfnfcis: PFNFCISTATUS, pfnfcigoi: PFNFCIGETOPENINFO, typecompress: u16) -> super::super::Foundation::BOOL +pub unsafe fn FCIAddFile(hfci: *const core::ffi::c_void, pszsourcefile: P1, pszfilename: P2, fexecute: bool, pfnfcignc: PFNFCIGETNEXTCABINET, pfnfcis: PFNFCISTATUS, pfnfcigoi: PFNFCIGETOPENINFO, typecompress: u16) -> super::super::Foundation::BOOL where P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("cabinet.dll" "cdecl" fn FCIAddFile(hfci : *const core::ffi::c_void, pszsourcefile : windows_core::PCSTR, pszfilename : windows_core::PCSTR, fexecute : super::super::Foundation:: BOOL, pfnfcignc : PFNFCIGETNEXTCABINET, pfnfcis : PFNFCISTATUS, pfnfcigoi : PFNFCIGETOPENINFO, typecompress : u16) -> super::super::Foundation:: BOOL); - FCIAddFile(core::mem::transmute(hfci), pszsourcefile.param().abi(), pszfilename.param().abi(), fexecute.param().abi(), core::mem::transmute(pfnfcignc), core::mem::transmute(pfnfcis), core::mem::transmute(pfnfcigoi), core::mem::transmute(typecompress)) + FCIAddFile(core::mem::transmute(hfci), pszsourcefile.param().abi(), pszfilename.param().abi(), fexecute.into(), core::mem::transmute(pfnfcignc), core::mem::transmute(pfnfcis), core::mem::transmute(pfnfcigoi), core::mem::transmute(typecompress)) } #[inline] pub unsafe fn FCICreate(perf: *const ERF, pfnfcifp: PFNFCIFILEPLACED, pfna: PFNFCIALLOC, pfnf: PFNFCIFREE, pfnopen: PFNFCIOPEN, pfnread: PFNFCIREAD, pfnwrite: PFNFCIWRITE, pfnclose: PFNFCICLOSE, pfnseek: PFNFCISEEK, pfndelete: PFNFCIDELETE, pfnfcigtf: PFNFCIGETTEMPFILE, pccab: *const CCAB, pv: Option<*const core::ffi::c_void>) -> *mut core::ffi::c_void { @@ -19,12 +18,9 @@ pub unsafe fn FCIDestroy(hfci: *const core::ffi::c_void) -> super::super::Founda FCIDestroy(core::mem::transmute(hfci)) } #[inline] -pub unsafe fn FCIFlushCabinet(hfci: *const core::ffi::c_void, fgetnextcab: P1, pfnfcignc: PFNFCIGETNEXTCABINET, pfnfcis: PFNFCISTATUS) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn FCIFlushCabinet(hfci: *const core::ffi::c_void, fgetnextcab: bool, pfnfcignc: PFNFCIGETNEXTCABINET, pfnfcis: PFNFCISTATUS) -> super::super::Foundation::BOOL { windows_targets::link!("cabinet.dll" "cdecl" fn FCIFlushCabinet(hfci : *const core::ffi::c_void, fgetnextcab : super::super::Foundation:: BOOL, pfnfcignc : PFNFCIGETNEXTCABINET, pfnfcis : PFNFCISTATUS) -> super::super::Foundation:: BOOL); - FCIFlushCabinet(core::mem::transmute(hfci), fgetnextcab.param().abi(), core::mem::transmute(pfnfcignc), core::mem::transmute(pfnfcis)) + FCIFlushCabinet(core::mem::transmute(hfci), fgetnextcab.into(), core::mem::transmute(pfnfcignc), core::mem::transmute(pfnfcis)) } #[inline] pub unsafe fn FCIFlushFolder(hfci: *const core::ffi::c_void, pfnfcignc: PFNFCIGETNEXTCABINET, pfnfcis: PFNFCISTATUS) -> super::super::Foundation::BOOL { diff --git a/crates/libs/windows/src/Windows/Win32/Storage/CloudFilters/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/CloudFilters/mod.rs index fe19b1a2c2..a29fb5c97f 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/CloudFilters/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/CloudFilters/mod.rs @@ -948,9 +948,6 @@ pub const CF_CALLBACK_VALIDATE_DATA_FLAG_NONE: CF_CALLBACK_VALIDATE_DATA_FLAGS = #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct CF_CONNECTION_KEY(pub i64); -impl windows_core::TypeKind for CF_CONNECTION_KEY { - type TypeKind = windows_core::CopyType; -} impl CF_CONNECTION_KEY { pub fn is_invalid(&self) -> bool { self.0 == -1 || self.0 == 0 diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Compression/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Compression/mod.rs index c5a1b81a10..c18906ca4d 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Compression/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Compression/mod.rs @@ -61,9 +61,6 @@ pub unsafe fn SetDecompressorInformation(decompressorhandle: DECOMPRESSOR_HANDLE #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct COMPRESSOR_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for COMPRESSOR_HANDLE { - type TypeKind = windows_core::CopyType; -} impl COMPRESSOR_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -115,9 +112,6 @@ pub const COMPRESS_RAW: u32 = 536870912u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct DECOMPRESSOR_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for DECOMPRESSOR_HANDLE { - type TypeKind = windows_core::CopyType; -} impl DECOMPRESSOR_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/Storage/FileHistory/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/FileHistory/mod.rs index 7a6f358bb8..dee29dcea3 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/FileHistory/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/FileHistory/mod.rs @@ -9,13 +9,10 @@ pub unsafe fn FhServiceClosePipe(pipe: FH_SERVICE_PIPE_HANDLE) -> windows_core:: FhServiceClosePipe(core::mem::transmute(pipe)).ok() } #[inline] -pub unsafe fn FhServiceOpenPipe(startserviceifstopped: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn FhServiceOpenPipe(startserviceifstopped: bool) -> windows_core::Result { windows_targets::link!("fhsvcctl.dll" "system" fn FhServiceOpenPipe(startserviceifstopped : super::super::Foundation:: BOOL, pipe : *mut FH_SERVICE_PIPE_HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - FhServiceOpenPipe(startserviceifstopped.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + FhServiceOpenPipe(startserviceifstopped.into(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn FhServiceReloadConfiguration(pipe: FH_SERVICE_PIPE_HANDLE) -> windows_core::Result<()> { @@ -23,20 +20,14 @@ pub unsafe fn FhServiceReloadConfiguration(pipe: FH_SERVICE_PIPE_HANDLE) -> wind FhServiceReloadConfiguration(core::mem::transmute(pipe)).ok() } #[inline] -pub unsafe fn FhServiceStartBackup(pipe: FH_SERVICE_PIPE_HANDLE, lowpriorityio: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn FhServiceStartBackup(pipe: FH_SERVICE_PIPE_HANDLE, lowpriorityio: bool) -> windows_core::Result<()> { windows_targets::link!("fhsvcctl.dll" "system" fn FhServiceStartBackup(pipe : FH_SERVICE_PIPE_HANDLE, lowpriorityio : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - FhServiceStartBackup(core::mem::transmute(pipe), lowpriorityio.param().abi()).ok() + FhServiceStartBackup(core::mem::transmute(pipe), lowpriorityio.into()).ok() } #[inline] -pub unsafe fn FhServiceStopBackup(pipe: FH_SERVICE_PIPE_HANDLE, stoptracking: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn FhServiceStopBackup(pipe: FH_SERVICE_PIPE_HANDLE, stoptracking: bool) -> windows_core::Result<()> { windows_targets::link!("fhsvcctl.dll" "system" fn FhServiceStopBackup(pipe : FH_SERVICE_PIPE_HANDLE, stoptracking : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - FhServiceStopBackup(core::mem::transmute(pipe), stoptracking.param().abi()).ok() + FhServiceStopBackup(core::mem::transmute(pipe), stoptracking.into()).ok() } #[inline] pub unsafe fn FhServiceUnblockBackup(pipe: FH_SERVICE_PIPE_HANDLE) -> windows_core::Result<()> { @@ -106,9 +97,6 @@ pub const FH_RETENTION_UNLIMITED: FH_RETENTION_TYPES = FH_RETENTION_TYPES(1i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct FH_SERVICE_PIPE_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for FH_SERVICE_PIPE_HANDLE { - type TypeKind = windows_core::CopyType; -} impl FH_SERVICE_PIPE_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -173,27 +161,18 @@ impl IFhConfigMgr { pub unsafe fn LoadConfiguration(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).LoadConfiguration)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn CreateDefaultConfiguration(&self, overwriteifexists: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).CreateDefaultConfiguration)(windows_core::Interface::as_raw(self), overwriteifexists.param().abi()).ok() + pub unsafe fn CreateDefaultConfiguration(&self, overwriteifexists: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).CreateDefaultConfiguration)(windows_core::Interface::as_raw(self), overwriteifexists.into()).ok() } pub unsafe fn SaveConfiguration(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SaveConfiguration)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn AddRemoveExcludeRule(&self, add: P0, category: FH_PROTECTED_ITEM_CATEGORY, item: &windows_core::BSTR) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddRemoveExcludeRule)(windows_core::Interface::as_raw(self), add.param().abi(), core::mem::transmute(category), core::mem::transmute_copy(item)).ok() + pub unsafe fn AddRemoveExcludeRule(&self, add: bool, category: FH_PROTECTED_ITEM_CATEGORY, item: &windows_core::BSTR) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddRemoveExcludeRule)(windows_core::Interface::as_raw(self), add.into(), core::mem::transmute(category), core::mem::transmute_copy(item)).ok() } - pub unsafe fn GetIncludeExcludeRules(&self, include: P0, category: FH_PROTECTED_ITEM_CATEGORY) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetIncludeExcludeRules(&self, include: bool, category: FH_PROTECTED_ITEM_CATEGORY) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetIncludeExcludeRules)(windows_core::Interface::as_raw(self), include.param().abi(), core::mem::transmute(category), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetIncludeExcludeRules)(windows_core::Interface::as_raw(self), include.into(), core::mem::transmute(category), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetLocalPolicy(&self, localpolicytype: FH_LOCAL_POLICY_TYPE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -220,11 +199,8 @@ impl IFhConfigMgr { pub unsafe fn ProvisionAndSetNewTarget(&self, targeturl: &windows_core::BSTR, targetname: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ProvisionAndSetNewTarget)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(targeturl), core::mem::transmute_copy(targetname)).ok() } - pub unsafe fn ChangeDefaultTargetRecommendation(&self, recommend: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ChangeDefaultTargetRecommendation)(windows_core::Interface::as_raw(self), recommend.param().abi()).ok() + pub unsafe fn ChangeDefaultTargetRecommendation(&self, recommend: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ChangeDefaultTargetRecommendation)(windows_core::Interface::as_raw(self), recommend.into()).ok() } pub unsafe fn QueryProtectionStatus(&self, protectionstate: *mut u32, protecteduntiltime: *mut windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).QueryProtectionStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(protectionstate), core::mem::transmute(protecteduntiltime)).ok() @@ -391,11 +367,8 @@ impl IFhReassociation { pub unsafe fn SelectConfiguration(&self, index: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SelectConfiguration)(windows_core::Interface::as_raw(self), core::mem::transmute(index)).ok() } - pub unsafe fn PerformReassociation(&self, overwriteifexists: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).PerformReassociation)(windows_core::Interface::as_raw(self), overwriteifexists.param().abi()).ok() + pub unsafe fn PerformReassociation(&self, overwriteifexists: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PerformReassociation)(windows_core::Interface::as_raw(self), overwriteifexists.into()).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Storage/FileSystem/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/FileSystem/mod.rs index 0d12bfba8d..ffdeb88b9a 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/FileSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/FileSystem/mod.rs @@ -47,13 +47,9 @@ pub unsafe fn AreShortNamesEnabled(handle: super::super::Foundation::HANDLE, ena AreShortNamesEnabled(core::mem::transmute(handle), core::mem::transmute(enabled)) } #[inline] -pub unsafe fn BackupRead(hfile: super::super::Foundation::HANDLE, lpbuffer: &mut [u8], lpnumberofbytesread: *mut u32, babort: P4, bprocesssecurity: P5, lpcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P4: windows_core::Param, - P5: windows_core::Param, -{ +pub unsafe fn BackupRead(hfile: super::super::Foundation::HANDLE, lpbuffer: &mut [u8], lpnumberofbytesread: *mut u32, babort: bool, bprocesssecurity: bool, lpcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn BackupRead(hfile : super::super::Foundation:: HANDLE, lpbuffer : *mut u8, nnumberofbytestoread : u32, lpnumberofbytesread : *mut u32, babort : super::super::Foundation:: BOOL, bprocesssecurity : super::super::Foundation:: BOOL, lpcontext : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - BackupRead(core::mem::transmute(hfile), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofbytesread), babort.param().abi(), bprocesssecurity.param().abi(), core::mem::transmute(lpcontext)).ok() + BackupRead(core::mem::transmute(hfile), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofbytesread), babort.into(), bprocesssecurity.into(), core::mem::transmute(lpcontext)).ok() } #[inline] pub unsafe fn BackupSeek(hfile: super::super::Foundation::HANDLE, dwlowbytestoseek: u32, dwhighbytestoseek: u32, lpdwlowbyteseeked: *mut u32, lpdwhighbyteseeked: *mut u32, lpcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -61,13 +57,9 @@ pub unsafe fn BackupSeek(hfile: super::super::Foundation::HANDLE, dwlowbytestose BackupSeek(core::mem::transmute(hfile), core::mem::transmute(dwlowbytestoseek), core::mem::transmute(dwhighbytestoseek), core::mem::transmute(lpdwlowbyteseeked), core::mem::transmute(lpdwhighbyteseeked), core::mem::transmute(lpcontext)).ok() } #[inline] -pub unsafe fn BackupWrite(hfile: super::super::Foundation::HANDLE, lpbuffer: &[u8], lpnumberofbyteswritten: *mut u32, babort: P4, bprocesssecurity: P5, lpcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P4: windows_core::Param, - P5: windows_core::Param, -{ +pub unsafe fn BackupWrite(hfile: super::super::Foundation::HANDLE, lpbuffer: &[u8], lpnumberofbyteswritten: *mut u32, babort: bool, bprocesssecurity: bool, lpcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn BackupWrite(hfile : super::super::Foundation:: HANDLE, lpbuffer : *const u8, nnumberofbytestowrite : u32, lpnumberofbyteswritten : *mut u32, babort : super::super::Foundation:: BOOL, bprocesssecurity : super::super::Foundation:: BOOL, lpcontext : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - BackupWrite(core::mem::transmute(hfile), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofbyteswritten), babort.param().abi(), bprocesssecurity.param().abi(), core::mem::transmute(lpcontext)).ok() + BackupWrite(core::mem::transmute(hfile), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofbyteswritten), babort.into(), bprocesssecurity.into(), core::mem::transmute(lpcontext)).ok() } #[inline] pub unsafe fn BuildIoRingCancelRequest(ioring: HIORING, file: IORING_HANDLE_REF, optocancel: usize, userdata: usize) -> windows_core::Result<()> { @@ -165,14 +157,13 @@ where CopyFile2(pwszexistingfilename.param().abi(), pwsznewfilename.param().abi(), core::mem::transmute(pextendedparameters.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn CopyFileA(lpexistingfilename: P0, lpnewfilename: P1, bfailifexists: P2) -> windows_core::Result<()> +pub unsafe fn CopyFileA(lpexistingfilename: P0, lpnewfilename: P1, bfailifexists: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CopyFileA(lpexistingfilename : windows_core::PCSTR, lpnewfilename : windows_core::PCSTR, bfailifexists : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - CopyFileA(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), bfailifexists.param().abi()).ok() + CopyFileA(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), bfailifexists.into()).ok() } #[inline] pub unsafe fn CopyFileExA(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: Option, lpdata: Option<*const core::ffi::c_void>, pbcancel: Option<*mut super::super::Foundation::BOOL>, dwcopyflags: COPYFILE_FLAGS) -> windows_core::Result<()> @@ -193,14 +184,13 @@ where CopyFileExW(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), core::mem::transmute(lpprogressroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbcancel.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcopyflags)).ok() } #[inline] -pub unsafe fn CopyFileFromAppW(lpexistingfilename: P0, lpnewfilename: P1, bfailifexists: P2) -> super::super::Foundation::BOOL +pub unsafe fn CopyFileFromAppW(lpexistingfilename: P0, lpnewfilename: P1, bfailifexists: bool) -> super::super::Foundation::BOOL where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("api-ms-win-core-file-fromapp-l1-1-0.dll" "system" fn CopyFileFromAppW(lpexistingfilename : windows_core::PCWSTR, lpnewfilename : windows_core::PCWSTR, bfailifexists : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - CopyFileFromAppW(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), bfailifexists.param().abi()) + CopyFileFromAppW(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), bfailifexists.into()) } #[inline] pub unsafe fn CopyFileTransactedA(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: Option, lpdata: Option<*const core::ffi::c_void>, pbcancel: Option<*const super::super::Foundation::BOOL>, dwcopyflags: u32, htransaction: super::super::Foundation::HANDLE) -> windows_core::Result<()> @@ -221,14 +211,13 @@ where CopyFileTransactedW(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), core::mem::transmute(lpprogressroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pbcancel.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwcopyflags), core::mem::transmute(htransaction)).ok() } #[inline] -pub unsafe fn CopyFileW(lpexistingfilename: P0, lpnewfilename: P1, bfailifexists: P2) -> windows_core::Result<()> +pub unsafe fn CopyFileW(lpexistingfilename: P0, lpnewfilename: P1, bfailifexists: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CopyFileW(lpexistingfilename : windows_core::PCWSTR, lpnewfilename : windows_core::PCWSTR, bfailifexists : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - CopyFileW(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), bfailifexists.param().abi()).ok() + CopyFileW(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), bfailifexists.into()).ok() } #[inline] pub unsafe fn CopyLZFile(hfsource: i32, hfdest: i32) -> i32 { @@ -677,21 +666,17 @@ where EncryptFileW(lpfilename.param().abi()).ok() } #[inline] -pub unsafe fn EncryptionDisable(dirpath: P0, disable: P1) -> windows_core::Result<()> +pub unsafe fn EncryptionDisable(dirpath: P0, disable: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn EncryptionDisable(dirpath : windows_core::PCWSTR, disable : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - EncryptionDisable(dirpath.param().abi(), disable.param().abi()).ok() + EncryptionDisable(dirpath.param().abi(), disable.into()).ok() } #[inline] -pub unsafe fn EraseTape(hdevice: super::super::Foundation::HANDLE, dwerasetype: ERASE_TAPE_TYPE, bimmediate: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn EraseTape(hdevice: super::super::Foundation::HANDLE, dwerasetype: ERASE_TAPE_TYPE, bimmediate: bool) -> u32 { windows_targets::link!("kernel32.dll" "system" fn EraseTape(hdevice : super::super::Foundation:: HANDLE, dwerasetype : ERASE_TAPE_TYPE, bimmediate : super::super::Foundation:: BOOL) -> u32); - EraseTape(core::mem::transmute(hdevice), core::mem::transmute(dwerasetype), bimmediate.param().abi()) + EraseTape(core::mem::transmute(hdevice), core::mem::transmute(dwerasetype), bimmediate.into()) } #[inline] pub unsafe fn FileEncryptionStatusA(lpfilename: P0, lpstatus: *mut u32) -> windows_core::Result<()> @@ -725,23 +710,21 @@ pub unsafe fn FindCloseChangeNotification(hchangehandle: super::super::Foundatio FindCloseChangeNotification(core::mem::transmute(hchangehandle)).ok() } #[inline] -pub unsafe fn FindFirstChangeNotificationA(lppathname: P0, bwatchsubtree: P1, dwnotifyfilter: FILE_NOTIFY_CHANGE) -> windows_core::Result +pub unsafe fn FindFirstChangeNotificationA(lppathname: P0, bwatchsubtree: bool, dwnotifyfilter: FILE_NOTIFY_CHANGE) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn FindFirstChangeNotificationA(lppathname : windows_core::PCSTR, bwatchsubtree : super::super::Foundation:: BOOL, dwnotifyfilter : FILE_NOTIFY_CHANGE) -> super::super::Foundation:: HANDLE); - let result__ = FindFirstChangeNotificationA(lppathname.param().abi(), bwatchsubtree.param().abi(), core::mem::transmute(dwnotifyfilter)); + let result__ = FindFirstChangeNotificationA(lppathname.param().abi(), bwatchsubtree.into(), core::mem::transmute(dwnotifyfilter)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn FindFirstChangeNotificationW(lppathname: P0, bwatchsubtree: P1, dwnotifyfilter: FILE_NOTIFY_CHANGE) -> windows_core::Result +pub unsafe fn FindFirstChangeNotificationW(lppathname: P0, bwatchsubtree: bool, dwnotifyfilter: FILE_NOTIFY_CHANGE) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn FindFirstChangeNotificationW(lppathname : windows_core::PCWSTR, bwatchsubtree : super::super::Foundation:: BOOL, dwnotifyfilter : FILE_NOTIFY_CHANGE) -> super::super::Foundation:: HANDLE); - let result__ = FindFirstChangeNotificationW(lppathname.param().abi(), bwatchsubtree.param().abi(), core::mem::transmute(dwnotifyfilter)); + let result__ = FindFirstChangeNotificationW(lppathname.param().abi(), bwatchsubtree.into(), core::mem::transmute(dwnotifyfilter)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -2080,12 +2063,9 @@ pub unsafe fn PrepareLogArchive(hlog: super::super::Foundation::HANDLE, pszbasel .ok() } #[inline] -pub unsafe fn PrepareTape(hdevice: super::super::Foundation::HANDLE, dwoperation: PREPARE_TAPE_OPERATION, bimmediate: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn PrepareTape(hdevice: super::super::Foundation::HANDLE, dwoperation: PREPARE_TAPE_OPERATION, bimmediate: bool) -> u32 { windows_targets::link!("kernel32.dll" "system" fn PrepareTape(hdevice : super::super::Foundation:: HANDLE, dwoperation : PREPARE_TAPE_OPERATION, bimmediate : super::super::Foundation:: BOOL) -> u32); - PrepareTape(core::mem::transmute(hdevice), core::mem::transmute(dwoperation), bimmediate.param().abi()) + PrepareTape(core::mem::transmute(hdevice), core::mem::transmute(dwoperation), bimmediate.into()) } #[inline] pub unsafe fn QueryDosDeviceA(lpdevicename: P0, lptargetpath: Option<&mut [u8]>) -> u32 @@ -2140,21 +2120,15 @@ pub unsafe fn ReOpenFile(horiginalfile: super::super::Foundation::HANDLE, dwdesi } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ReadDirectoryChangesExW(hdirectory: super::super::Foundation::HANDLE, lpbuffer: *mut core::ffi::c_void, nbufferlength: u32, bwatchsubtree: P3, dwnotifyfilter: FILE_NOTIFY_CHANGE, lpbytesreturned: Option<*mut u32>, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: Option, readdirectorynotifyinformationclass: READ_DIRECTORY_NOTIFY_INFORMATION_CLASS) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn ReadDirectoryChangesExW(hdirectory: super::super::Foundation::HANDLE, lpbuffer: *mut core::ffi::c_void, nbufferlength: u32, bwatchsubtree: bool, dwnotifyfilter: FILE_NOTIFY_CHANGE, lpbytesreturned: Option<*mut u32>, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: Option, readdirectorynotifyinformationclass: READ_DIRECTORY_NOTIFY_INFORMATION_CLASS) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn ReadDirectoryChangesExW(hdirectory : super::super::Foundation:: HANDLE, lpbuffer : *mut core::ffi::c_void, nbufferlength : u32, bwatchsubtree : super::super::Foundation:: BOOL, dwnotifyfilter : FILE_NOTIFY_CHANGE, lpbytesreturned : *mut u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, lpcompletionroutine : super::super::System::IO:: LPOVERLAPPED_COMPLETION_ROUTINE, readdirectorynotifyinformationclass : READ_DIRECTORY_NOTIFY_INFORMATION_CLASS) -> super::super::Foundation:: BOOL); - ReadDirectoryChangesExW(core::mem::transmute(hdirectory), core::mem::transmute(lpbuffer), core::mem::transmute(nbufferlength), bwatchsubtree.param().abi(), core::mem::transmute(dwnotifyfilter), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcompletionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(readdirectorynotifyinformationclass)).ok() + ReadDirectoryChangesExW(core::mem::transmute(hdirectory), core::mem::transmute(lpbuffer), core::mem::transmute(nbufferlength), bwatchsubtree.into(), core::mem::transmute(dwnotifyfilter), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcompletionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(readdirectorynotifyinformationclass)).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn ReadDirectoryChangesW(hdirectory: super::super::Foundation::HANDLE, lpbuffer: *mut core::ffi::c_void, nbufferlength: u32, bwatchsubtree: P3, dwnotifyfilter: FILE_NOTIFY_CHANGE, lpbytesreturned: Option<*mut u32>, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: Option) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn ReadDirectoryChangesW(hdirectory: super::super::Foundation::HANDLE, lpbuffer: *mut core::ffi::c_void, nbufferlength: u32, bwatchsubtree: bool, dwnotifyfilter: FILE_NOTIFY_CHANGE, lpbytesreturned: Option<*mut u32>, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: Option) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn ReadDirectoryChangesW(hdirectory : super::super::Foundation:: HANDLE, lpbuffer : *mut core::ffi::c_void, nbufferlength : u32, bwatchsubtree : super::super::Foundation:: BOOL, dwnotifyfilter : FILE_NOTIFY_CHANGE, lpbytesreturned : *mut u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, lpcompletionroutine : super::super::System::IO:: LPOVERLAPPED_COMPLETION_ROUTINE) -> super::super::Foundation:: BOOL); - ReadDirectoryChangesW(core::mem::transmute(hdirectory), core::mem::transmute(lpbuffer), core::mem::transmute(nbufferlength), bwatchsubtree.param().abi(), core::mem::transmute(dwnotifyfilter), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcompletionroutine.unwrap_or(core::mem::zeroed()))).ok() + ReadDirectoryChangesW(core::mem::transmute(hdirectory), core::mem::transmute(lpbuffer), core::mem::transmute(nbufferlength), bwatchsubtree.into(), core::mem::transmute(dwnotifyfilter), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpcompletionroutine.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn ReadEncryptedFileRaw(pfexportcallback: PFE_EXPORT_FUNC, pvcallbackcontext: Option<*const core::ffi::c_void>, pvcontext: *const core::ffi::c_void) -> u32 { @@ -2235,12 +2209,9 @@ pub unsafe fn RecoverTransactionManager(transactionmanagerhandle: super::super:: RecoverTransactionManager(core::mem::transmute(transactionmanagerhandle)).ok() } #[inline] -pub unsafe fn RegisterForLogWriteNotification(hlog: super::super::Foundation::HANDLE, cbthreshold: u32, fenable: P2) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn RegisterForLogWriteNotification(hlog: super::super::Foundation::HANDLE, cbthreshold: u32, fenable: bool) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn RegisterForLogWriteNotification(hlog : super::super::Foundation:: HANDLE, cbthreshold : u32, fenable : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - RegisterForLogWriteNotification(core::mem::transmute(hlog), core::mem::transmute(cbthreshold), fenable.param().abi()).ok() + RegisterForLogWriteNotification(core::mem::transmute(hlog), core::mem::transmute(cbthreshold), fenable.into()).ok() } #[inline] pub unsafe fn RegisterManageableLogClient(hlog: super::super::Foundation::HANDLE, pcallbacks: *mut LOG_MANAGEMENT_CALLBACKS) -> windows_core::Result<()> { @@ -2288,21 +2259,17 @@ where RemoveDirectoryW(lppathname.param().abi()).ok() } #[inline] -pub unsafe fn RemoveLogContainer(hlog: super::super::Foundation::HANDLE, pwszcontainerpath: P1, fforce: P2, preserved: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> +pub unsafe fn RemoveLogContainer(hlog: super::super::Foundation::HANDLE, pwszcontainerpath: P1, fforce: bool, preserved: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("clfsw32.dll" "system" fn RemoveLogContainer(hlog : super::super::Foundation:: HANDLE, pwszcontainerpath : windows_core::PCWSTR, fforce : super::super::Foundation:: BOOL, preserved : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - RemoveLogContainer(core::mem::transmute(hlog), pwszcontainerpath.param().abi(), fforce.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))).ok() + RemoveLogContainer(core::mem::transmute(hlog), pwszcontainerpath.param().abi(), fforce.into(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn RemoveLogContainerSet(hlog: super::super::Foundation::HANDLE, rgwszcontainerpath: &[windows_core::PCWSTR], fforce: P3, preserved: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn RemoveLogContainerSet(hlog: super::super::Foundation::HANDLE, rgwszcontainerpath: &[windows_core::PCWSTR], fforce: bool, preserved: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("clfsw32.dll" "system" fn RemoveLogContainerSet(hlog : super::super::Foundation:: HANDLE, ccontainer : u16, rgwszcontainerpath : *const windows_core::PCWSTR, fforce : super::super::Foundation:: BOOL, preserved : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - RemoveLogContainerSet(core::mem::transmute(hlog), rgwszcontainerpath.len().try_into().unwrap(), core::mem::transmute(rgwszcontainerpath.as_ptr()), fforce.param().abi(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))).ok() + RemoveLogContainerSet(core::mem::transmute(hlog), rgwszcontainerpath.len().try_into().unwrap(), core::mem::transmute(rgwszcontainerpath.as_ptr()), fforce.into(), core::mem::transmute(preserved.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn RemoveLogPolicy(hlog: super::super::Foundation::HANDLE, epolicytype: CLFS_MGMT_POLICY_TYPE) -> windows_core::Result<()> { @@ -2494,12 +2461,9 @@ where SetFileAttributesW(lpfilename.param().abi(), core::mem::transmute(dwfileattributes)).ok() } #[inline] -pub unsafe fn SetFileBandwidthReservation(hfile: super::super::Foundation::HANDLE, nperiodmilliseconds: u32, nbytesperperiod: u32, bdiscardable: P3, lptransfersize: *mut u32, lpnumoutstandingrequests: *mut u32) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn SetFileBandwidthReservation(hfile: super::super::Foundation::HANDLE, nperiodmilliseconds: u32, nbytesperperiod: u32, bdiscardable: bool, lptransfersize: *mut u32, lpnumoutstandingrequests: *mut u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetFileBandwidthReservation(hfile : super::super::Foundation:: HANDLE, nperiodmilliseconds : u32, nbytesperperiod : u32, bdiscardable : super::super::Foundation:: BOOL, lptransfersize : *mut u32, lpnumoutstandingrequests : *mut u32) -> super::super::Foundation:: BOOL); - SetFileBandwidthReservation(core::mem::transmute(hfile), core::mem::transmute(nperiodmilliseconds), core::mem::transmute(nbytesperperiod), bdiscardable.param().abi(), core::mem::transmute(lptransfersize), core::mem::transmute(lpnumoutstandingrequests)).ok() + SetFileBandwidthReservation(core::mem::transmute(hfile), core::mem::transmute(nperiodmilliseconds), core::mem::transmute(nbytesperperiod), bdiscardable.into(), core::mem::transmute(lptransfersize), core::mem::transmute(lpnumoutstandingrequests)).ok() } #[inline] pub unsafe fn SetFileCompletionNotificationModes(filehandle: super::super::Foundation::HANDLE, flags: u8) -> windows_core::Result<()> { @@ -2588,12 +2552,9 @@ pub unsafe fn SetTapeParameters(hdevice: super::super::Foundation::HANDLE, dwope SetTapeParameters(core::mem::transmute(hdevice), core::mem::transmute(dwoperation), core::mem::transmute(lptapeinformation)) } #[inline] -pub unsafe fn SetTapePosition(hdevice: super::super::Foundation::HANDLE, dwpositionmethod: TAPE_POSITION_METHOD, dwpartition: u32, dwoffsetlow: u32, dwoffsethigh: u32, bimmediate: P5) -> u32 -where - P5: windows_core::Param, -{ +pub unsafe fn SetTapePosition(hdevice: super::super::Foundation::HANDLE, dwpositionmethod: TAPE_POSITION_METHOD, dwpartition: u32, dwoffsetlow: u32, dwoffsethigh: u32, bimmediate: bool) -> u32 { windows_targets::link!("kernel32.dll" "system" fn SetTapePosition(hdevice : super::super::Foundation:: HANDLE, dwpositionmethod : TAPE_POSITION_METHOD, dwpartition : u32, dwoffsetlow : u32, dwoffsethigh : u32, bimmediate : super::super::Foundation:: BOOL) -> u32); - SetTapePosition(core::mem::transmute(hdevice), core::mem::transmute(dwpositionmethod), core::mem::transmute(dwpartition), core::mem::transmute(dwoffsetlow), core::mem::transmute(dwoffsethigh), bimmediate.param().abi()) + SetTapePosition(core::mem::transmute(hdevice), core::mem::transmute(dwpositionmethod), core::mem::transmute(dwpartition), core::mem::transmute(dwoffsetlow), core::mem::transmute(dwoffsethigh), bimmediate.into()) } #[inline] pub unsafe fn SetTransactionInformation(transactionhandle: super::super::Foundation::HANDLE, isolationlevel: u32, isolationflags: u32, timeout: u32, description: P4) -> windows_core::Result<()> @@ -2912,12 +2873,9 @@ pub unsafe fn Wow64DisableWow64FsRedirection(oldvalue: *mut *mut core::ffi::c_vo Wow64DisableWow64FsRedirection(core::mem::transmute(oldvalue)).ok() } #[inline] -pub unsafe fn Wow64EnableWow64FsRedirection(wow64fsenableredirection: P0) -> super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, -{ +pub unsafe fn Wow64EnableWow64FsRedirection(wow64fsenableredirection: bool) -> super::super::Foundation::BOOLEAN { windows_targets::link!("kernel32.dll" "system" fn Wow64EnableWow64FsRedirection(wow64fsenableredirection : super::super::Foundation:: BOOLEAN) -> super::super::Foundation:: BOOLEAN); - Wow64EnableWow64FsRedirection(wow64fsenableredirection.param().abi()) + Wow64EnableWow64FsRedirection(wow64fsenableredirection.into()) } #[inline] pub unsafe fn Wow64RevertWow64FsRedirection(olvalue: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -2954,12 +2912,9 @@ pub unsafe fn WriteLogRestartArea(pvmarshal: *mut core::ffi::c_void, pvrestartbu WriteLogRestartArea(core::mem::transmute(pvmarshal), core::mem::transmute(pvrestartbuffer), core::mem::transmute(cbrestartbuffer), core::mem::transmute(plsnbase), core::mem::transmute(fflags), core::mem::transmute(pcbwritten), core::mem::transmute(plsnnext), core::mem::transmute(poverlapped)).ok() } #[inline] -pub unsafe fn WriteTapemark(hdevice: super::super::Foundation::HANDLE, dwtapemarktype: TAPEMARK_TYPE, dwtapemarkcount: u32, bimmediate: P3) -> u32 -where - P3: windows_core::Param, -{ +pub unsafe fn WriteTapemark(hdevice: super::super::Foundation::HANDLE, dwtapemarktype: TAPEMARK_TYPE, dwtapemarkcount: u32, bimmediate: bool) -> u32 { windows_targets::link!("kernel32.dll" "system" fn WriteTapemark(hdevice : super::super::Foundation:: HANDLE, dwtapemarktype : TAPEMARK_TYPE, dwtapemarkcount : u32, bimmediate : super::super::Foundation:: BOOL) -> u32); - WriteTapemark(core::mem::transmute(hdevice), core::mem::transmute(dwtapemarktype), core::mem::transmute(dwtapemarkcount), bimmediate.param().abi()) + WriteTapemark(core::mem::transmute(hdevice), core::mem::transmute(dwtapemarktype), core::mem::transmute(dwtapemarkcount), bimmediate.into()) } pub const ACCESS_ALL: SHARE_INFO_PERMISSIONS = SHARE_INFO_PERMISSIONS(32768u32); pub const ACCESS_ATRIB: SHARE_INFO_PERMISSIONS = SHARE_INFO_PERMISSIONS(32u32); @@ -5167,9 +5122,6 @@ pub const GetFileExMaxInfoLevel: GET_FILEEX_INFO_LEVELS = GET_FILEEX_INFO_LEVELS #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HIORING(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HIORING { - type TypeKind = windows_core::CopyType; -} impl HIORING { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -5202,12 +5154,11 @@ impl core::ops::Deref for IDiskQuotaControl { windows_core::imp::interface_hierarchy!(IDiskQuotaControl, windows_core::IUnknown, super::super::System::Com::IConnectionPointContainer); #[cfg(feature = "Win32_System_Com")] impl IDiskQuotaControl { - pub unsafe fn Initialize(&self, pszpath: P0, breadwrite: P1) -> windows_core::Result<()> + pub unsafe fn Initialize(&self, pszpath: P0, breadwrite: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pszpath.param().abi(), breadwrite.param().abi()).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pszpath.param().abi(), breadwrite.into()).ok() } pub unsafe fn SetQuotaState(&self, dwstate: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetQuotaState)(windows_core::Interface::as_raw(self), core::mem::transmute(dwstate)).ok() @@ -5584,17 +5535,11 @@ impl IDiskQuotaUser { pub unsafe fn GetQuotaInformation(&self, pbquotainfo: *mut core::ffi::c_void, cbquotainfo: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetQuotaInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(pbquotainfo), core::mem::transmute(cbquotainfo)).ok() } - pub unsafe fn SetQuotaThreshold(&self, llthreshold: i64, fwritethrough: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetQuotaThreshold)(windows_core::Interface::as_raw(self), core::mem::transmute(llthreshold), fwritethrough.param().abi()).ok() + pub unsafe fn SetQuotaThreshold(&self, llthreshold: i64, fwritethrough: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetQuotaThreshold)(windows_core::Interface::as_raw(self), core::mem::transmute(llthreshold), fwritethrough.into()).ok() } - pub unsafe fn SetQuotaLimit(&self, lllimit: i64, fwritethrough: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetQuotaLimit)(windows_core::Interface::as_raw(self), core::mem::transmute(lllimit), fwritethrough.param().abi()).ok() + pub unsafe fn SetQuotaLimit(&self, lllimit: i64, fwritethrough: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetQuotaLimit)(windows_core::Interface::as_raw(self), core::mem::transmute(lllimit), fwritethrough.into()).ok() } pub unsafe fn Invalidate(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Invalidate)(windows_core::Interface::as_raw(self)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Imapi/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Imapi/mod.rs index 526ec83349..166f727481 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Imapi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Imapi/mod.rs @@ -3933,11 +3933,8 @@ impl IDiscRecorder2Ex { pub unsafe fn GetTrackInformation(&self, address: u32, addresstype: IMAPI_READ_TRACK_ADDRESS_TYPE, trackinformation: *mut *mut u8, bytesize: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetTrackInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(address), core::mem::transmute(addresstype), core::mem::transmute(trackinformation), core::mem::transmute(bytesize)).ok() } - pub unsafe fn GetFeaturePage(&self, requestedfeature: IMAPI_FEATURE_PAGE_TYPE, currentfeatureonly: P1, featuredata: *mut *mut u8, bytesize: *mut u32) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetFeaturePage)(windows_core::Interface::as_raw(self), core::mem::transmute(requestedfeature), currentfeatureonly.param().abi(), core::mem::transmute(featuredata), core::mem::transmute(bytesize)).ok() + pub unsafe fn GetFeaturePage(&self, requestedfeature: IMAPI_FEATURE_PAGE_TYPE, currentfeatureonly: bool, featuredata: *mut *mut u8, bytesize: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetFeaturePage)(windows_core::Interface::as_raw(self), core::mem::transmute(requestedfeature), currentfeatureonly.into(), core::mem::transmute(featuredata), core::mem::transmute(bytesize)).ok() } pub unsafe fn GetModePage(&self, requestedmodepage: IMAPI_MODE_PAGE_TYPE, requesttype: IMAPI_MODE_PAGE_REQUEST_TYPE, modepagedata: *mut *mut u8, bytesize: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetModePage)(windows_core::Interface::as_raw(self), core::mem::transmute(requestedmodepage), core::mem::transmute(requesttype), core::mem::transmute(modepagedata), core::mem::transmute(bytesize)).ok() @@ -3945,17 +3942,11 @@ impl IDiscRecorder2Ex { pub unsafe fn SetModePage(&self, requesttype: IMAPI_MODE_PAGE_REQUEST_TYPE, data: &[u8]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetModePage)(windows_core::Interface::as_raw(self), core::mem::transmute(requesttype), core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap()).ok() } - pub unsafe fn GetSupportedFeaturePages(&self, currentfeatureonly: P0, featuredata: *mut *mut IMAPI_FEATURE_PAGE_TYPE, bytesize: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetSupportedFeaturePages)(windows_core::Interface::as_raw(self), currentfeatureonly.param().abi(), core::mem::transmute(featuredata), core::mem::transmute(bytesize)).ok() + pub unsafe fn GetSupportedFeaturePages(&self, currentfeatureonly: bool, featuredata: *mut *mut IMAPI_FEATURE_PAGE_TYPE, bytesize: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetSupportedFeaturePages)(windows_core::Interface::as_raw(self), currentfeatureonly.into(), core::mem::transmute(featuredata), core::mem::transmute(bytesize)).ok() } - pub unsafe fn GetSupportedProfiles(&self, currentonly: P0, profiletypes: *mut *mut IMAPI_PROFILE_TYPE, validprofiles: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetSupportedProfiles)(windows_core::Interface::as_raw(self), currentonly.param().abi(), core::mem::transmute(profiletypes), core::mem::transmute(validprofiles)).ok() + pub unsafe fn GetSupportedProfiles(&self, currentonly: bool, profiletypes: *mut *mut IMAPI_PROFILE_TYPE, validprofiles: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetSupportedProfiles)(windows_core::Interface::as_raw(self), currentonly.into(), core::mem::transmute(profiletypes), core::mem::transmute(validprofiles)).ok() } pub unsafe fn GetSupportedModePages(&self, requesttype: IMAPI_MODE_PAGE_REQUEST_TYPE, modepagetypes: *mut *mut IMAPI_MODE_PAGE_TYPE, validpages: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetSupportedModePages)(windows_core::Interface::as_raw(self), core::mem::transmute(requesttype), core::mem::transmute(modepagetypes), core::mem::transmute(validpages)).ok() @@ -8919,9 +8910,6 @@ impl windows_core::RuntimeName for IWriteSpeedDescriptor {} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct LPMSGSESS(pub isize); -impl windows_core::TypeKind for LPMSGSESS { - type TypeKind = windows_core::CopyType; -} pub const MEDIA_BLANK: MEDIA_FLAGS = MEDIA_FLAGS(1i32); pub const MEDIA_CDDA_CDROM: MEDIA_TYPES = MEDIA_TYPES(1i32); pub const MEDIA_CD_EXTRA: MEDIA_TYPES = MEDIA_TYPES(4i32); diff --git a/crates/libs/windows/src/Windows/Win32/Storage/InstallableFileSystems/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/InstallableFileSystems/mod.rs index 87c582befe..894a2c5ce5 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/InstallableFileSystems/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/InstallableFileSystems/mod.rs @@ -408,9 +408,6 @@ pub const FilterVolumeStandardInformation: FILTER_VOLUME_INFORMATION_CLASS = FIL #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HFILTER(pub isize); -impl windows_core::TypeKind for HFILTER { - type TypeKind = windows_core::CopyType; -} impl HFILTER { pub fn is_invalid(&self) -> bool { self.0 == -1 || self.0 == 0 @@ -428,9 +425,6 @@ impl windows_core::Free for HFILTER { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HFILTER_INSTANCE(pub isize); -impl windows_core::TypeKind for HFILTER_INSTANCE { - type TypeKind = windows_core::CopyType; -} impl HFILTER_INSTANCE { pub fn is_invalid(&self) -> bool { self.0 == -1 || self.0 == 0 diff --git a/crates/libs/windows/src/Windows/Win32/Storage/IscsiDisc/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/IscsiDisc/mod.rs index 788a2d3df5..83f2437490 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/IscsiDisc/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/IscsiDisc/mod.rs @@ -41,24 +41,22 @@ where AddIScsiSendTargetPortalW(initiatorinstance.param().abi(), core::mem::transmute(initiatorportnumber), core::mem::transmute(loginoptions), core::mem::transmute(securityflags), core::mem::transmute(portal)) } #[inline] -pub unsafe fn AddIScsiStaticTargetA(targetname: P0, targetalias: P1, targetflags: u32, persist: P3, mappings: *mut ISCSI_TARGET_MAPPINGA, loginoptions: *mut ISCSI_LOGIN_OPTIONS, portalgroup: *mut ISCSI_TARGET_PORTAL_GROUPA) -> u32 +pub unsafe fn AddIScsiStaticTargetA(targetname: P0, targetalias: P1, targetflags: u32, persist: bool, mappings: *mut ISCSI_TARGET_MAPPINGA, loginoptions: *mut ISCSI_LOGIN_OPTIONS, portalgroup: *mut ISCSI_TARGET_PORTAL_GROUPA) -> u32 where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn AddIScsiStaticTargetA(targetname : windows_core::PCSTR, targetalias : windows_core::PCSTR, targetflags : u32, persist : super::super::Foundation:: BOOLEAN, mappings : *mut ISCSI_TARGET_MAPPINGA, loginoptions : *mut ISCSI_LOGIN_OPTIONS, portalgroup : *mut ISCSI_TARGET_PORTAL_GROUPA) -> u32); - AddIScsiStaticTargetA(targetname.param().abi(), targetalias.param().abi(), core::mem::transmute(targetflags), persist.param().abi(), core::mem::transmute(mappings), core::mem::transmute(loginoptions), core::mem::transmute(portalgroup)) + AddIScsiStaticTargetA(targetname.param().abi(), targetalias.param().abi(), core::mem::transmute(targetflags), persist.into(), core::mem::transmute(mappings), core::mem::transmute(loginoptions), core::mem::transmute(portalgroup)) } #[inline] -pub unsafe fn AddIScsiStaticTargetW(targetname: P0, targetalias: P1, targetflags: u32, persist: P3, mappings: *mut ISCSI_TARGET_MAPPINGW, loginoptions: *mut ISCSI_LOGIN_OPTIONS, portalgroup: *mut ISCSI_TARGET_PORTAL_GROUPW) -> u32 +pub unsafe fn AddIScsiStaticTargetW(targetname: P0, targetalias: P1, targetflags: u32, persist: bool, mappings: *mut ISCSI_TARGET_MAPPINGW, loginoptions: *mut ISCSI_LOGIN_OPTIONS, portalgroup: *mut ISCSI_TARGET_PORTAL_GROUPW) -> u32 where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn AddIScsiStaticTargetW(targetname : windows_core::PCWSTR, targetalias : windows_core::PCWSTR, targetflags : u32, persist : super::super::Foundation:: BOOLEAN, mappings : *mut ISCSI_TARGET_MAPPINGW, loginoptions : *mut ISCSI_LOGIN_OPTIONS, portalgroup : *mut ISCSI_TARGET_PORTAL_GROUPW) -> u32); - AddIScsiStaticTargetW(targetname.param().abi(), targetalias.param().abi(), core::mem::transmute(targetflags), persist.param().abi(), core::mem::transmute(mappings), core::mem::transmute(loginoptions), core::mem::transmute(portalgroup)) + AddIScsiStaticTargetW(targetname.param().abi(), targetalias.param().abi(), core::mem::transmute(targetflags), persist.into(), core::mem::transmute(mappings), core::mem::transmute(loginoptions), core::mem::transmute(portalgroup)) } #[inline] pub unsafe fn AddPersistentIScsiDeviceA(devicepath: P0) -> u32 @@ -174,17 +172,15 @@ pub unsafe fn GetIScsiVersionInformation(versioninfo: *mut ISCSI_VERSION_INFO) - GetIScsiVersionInformation(core::mem::transmute(versioninfo)) } #[inline] -pub unsafe fn LoginIScsiTargetA(targetname: P0, isinformationalsession: P1, initiatorinstance: P2, initiatorportnumber: u32, targetportal: *mut ISCSI_TARGET_PORTALA, securityflags: u64, mappings: *mut ISCSI_TARGET_MAPPINGA, loginoptions: *mut ISCSI_LOGIN_OPTIONS, key: Option<&[u8]>, ispersistent: P10, uniquesessionid: *mut ISCSI_UNIQUE_SESSION_ID, uniqueconnectionid: *mut ISCSI_UNIQUE_SESSION_ID) -> u32 +pub unsafe fn LoginIScsiTargetA(targetname: P0, isinformationalsession: bool, initiatorinstance: P2, initiatorportnumber: u32, targetportal: *mut ISCSI_TARGET_PORTALA, securityflags: u64, mappings: *mut ISCSI_TARGET_MAPPINGA, loginoptions: *mut ISCSI_LOGIN_OPTIONS, key: Option<&[u8]>, ispersistent: bool, uniquesessionid: *mut ISCSI_UNIQUE_SESSION_ID, uniqueconnectionid: *mut ISCSI_UNIQUE_SESSION_ID) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, - P10: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn LoginIScsiTargetA(targetname : windows_core::PCSTR, isinformationalsession : super::super::Foundation:: BOOLEAN, initiatorinstance : windows_core::PCSTR, initiatorportnumber : u32, targetportal : *mut ISCSI_TARGET_PORTALA, securityflags : u64, mappings : *mut ISCSI_TARGET_MAPPINGA, loginoptions : *mut ISCSI_LOGIN_OPTIONS, keysize : u32, key : windows_core::PCSTR, ispersistent : super::super::Foundation:: BOOLEAN, uniquesessionid : *mut ISCSI_UNIQUE_SESSION_ID, uniqueconnectionid : *mut ISCSI_UNIQUE_SESSION_ID) -> u32); LoginIScsiTargetA( targetname.param().abi(), - isinformationalsession.param().abi(), + isinformationalsession.into(), initiatorinstance.param().abi(), core::mem::transmute(initiatorportnumber), core::mem::transmute(targetportal), @@ -193,23 +189,21 @@ where core::mem::transmute(loginoptions), key.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(key.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - ispersistent.param().abi(), + ispersistent.into(), core::mem::transmute(uniquesessionid), core::mem::transmute(uniqueconnectionid), ) } #[inline] -pub unsafe fn LoginIScsiTargetW(targetname: P0, isinformationalsession: P1, initiatorinstance: P2, initiatorportnumber: u32, targetportal: *mut ISCSI_TARGET_PORTALW, securityflags: u64, mappings: *mut ISCSI_TARGET_MAPPINGW, loginoptions: *mut ISCSI_LOGIN_OPTIONS, key: Option<&[u8]>, ispersistent: P10, uniquesessionid: *mut ISCSI_UNIQUE_SESSION_ID, uniqueconnectionid: *mut ISCSI_UNIQUE_SESSION_ID) -> u32 +pub unsafe fn LoginIScsiTargetW(targetname: P0, isinformationalsession: bool, initiatorinstance: P2, initiatorportnumber: u32, targetportal: *mut ISCSI_TARGET_PORTALW, securityflags: u64, mappings: *mut ISCSI_TARGET_MAPPINGW, loginoptions: *mut ISCSI_LOGIN_OPTIONS, key: Option<&[u8]>, ispersistent: bool, uniquesessionid: *mut ISCSI_UNIQUE_SESSION_ID, uniqueconnectionid: *mut ISCSI_UNIQUE_SESSION_ID) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, - P10: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn LoginIScsiTargetW(targetname : windows_core::PCWSTR, isinformationalsession : super::super::Foundation:: BOOLEAN, initiatorinstance : windows_core::PCWSTR, initiatorportnumber : u32, targetportal : *mut ISCSI_TARGET_PORTALW, securityflags : u64, mappings : *mut ISCSI_TARGET_MAPPINGW, loginoptions : *mut ISCSI_LOGIN_OPTIONS, keysize : u32, key : windows_core::PCSTR, ispersistent : super::super::Foundation:: BOOLEAN, uniquesessionid : *mut ISCSI_UNIQUE_SESSION_ID, uniqueconnectionid : *mut ISCSI_UNIQUE_SESSION_ID) -> u32); LoginIScsiTargetW( targetname.param().abi(), - isinformationalsession.param().abi(), + isinformationalsession.into(), initiatorinstance.param().abi(), core::mem::transmute(initiatorportnumber), core::mem::transmute(targetportal), @@ -218,7 +212,7 @@ where core::mem::transmute(loginoptions), key.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(key.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - ispersistent.param().abi(), + ispersistent.into(), core::mem::transmute(uniquesessionid), core::mem::transmute(uniqueconnectionid), ) @@ -442,20 +436,14 @@ where ReportIScsiTargetPortalsW(initiatorname.param().abi(), targetname.param().abi(), core::mem::transmute(targetportaltag), core::mem::transmute(elementcount), core::mem::transmute(portals)) } #[inline] -pub unsafe fn ReportIScsiTargetsA(forceupdate: P0, buffersize: *mut u32, buffer: Option) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ReportIScsiTargetsA(forceupdate: bool, buffersize: *mut u32, buffer: Option) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn ReportIScsiTargetsA(forceupdate : super::super::Foundation:: BOOLEAN, buffersize : *mut u32, buffer : windows_core::PSTR) -> u32); - ReportIScsiTargetsA(forceupdate.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) + ReportIScsiTargetsA(forceupdate.into(), core::mem::transmute(buffersize), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ReportIScsiTargetsW(forceupdate: P0, buffersize: *mut u32, buffer: Option) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn ReportIScsiTargetsW(forceupdate: bool, buffersize: *mut u32, buffer: Option) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn ReportIScsiTargetsW(forceupdate : super::super::Foundation:: BOOLEAN, buffersize : *mut u32, buffer : windows_core::PWSTR) -> u32); - ReportIScsiTargetsW(forceupdate.param().abi(), core::mem::transmute(buffersize), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) + ReportIScsiTargetsW(forceupdate.into(), core::mem::transmute(buffersize), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ReportPersistentIScsiDevicesA(buffersizeinchar: *mut u32, buffer: Option) -> u32 { @@ -493,30 +481,25 @@ pub unsafe fn SendScsiReportLuns(uniquesessionid: *mut ISCSI_UNIQUE_SESSION_ID, SendScsiReportLuns(core::mem::transmute(uniquesessionid), core::mem::transmute(scsistatus), core::mem::transmute(responsesize), core::mem::transmute(responsebuffer), core::mem::transmute(sensesize), core::mem::transmute(sensebuffer)) } #[inline] -pub unsafe fn SetIScsiGroupPresharedKey(keylength: u32, key: *mut u8, persist: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn SetIScsiGroupPresharedKey(keylength: u32, key: *mut u8, persist: bool) -> u32 { windows_targets::link!("iscsidsc.dll" "system" fn SetIScsiGroupPresharedKey(keylength : u32, key : *mut u8, persist : super::super::Foundation:: BOOLEAN) -> u32); - SetIScsiGroupPresharedKey(core::mem::transmute(keylength), core::mem::transmute(key), persist.param().abi()) + SetIScsiGroupPresharedKey(core::mem::transmute(keylength), core::mem::transmute(key), persist.into()) } #[inline] -pub unsafe fn SetIScsiIKEInfoA(initiatorname: P0, initiatorportnumber: u32, authinfo: *mut IKE_AUTHENTICATION_INFORMATION, persist: P3) -> u32 +pub unsafe fn SetIScsiIKEInfoA(initiatorname: P0, initiatorportnumber: u32, authinfo: *mut IKE_AUTHENTICATION_INFORMATION, persist: bool) -> u32 where P0: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn SetIScsiIKEInfoA(initiatorname : windows_core::PCSTR, initiatorportnumber : u32, authinfo : *mut IKE_AUTHENTICATION_INFORMATION, persist : super::super::Foundation:: BOOLEAN) -> u32); - SetIScsiIKEInfoA(initiatorname.param().abi(), core::mem::transmute(initiatorportnumber), core::mem::transmute(authinfo), persist.param().abi()) + SetIScsiIKEInfoA(initiatorname.param().abi(), core::mem::transmute(initiatorportnumber), core::mem::transmute(authinfo), persist.into()) } #[inline] -pub unsafe fn SetIScsiIKEInfoW(initiatorname: P0, initiatorportnumber: u32, authinfo: *mut IKE_AUTHENTICATION_INFORMATION, persist: P3) -> u32 +pub unsafe fn SetIScsiIKEInfoW(initiatorname: P0, initiatorportnumber: u32, authinfo: *mut IKE_AUTHENTICATION_INFORMATION, persist: bool) -> u32 where P0: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn SetIScsiIKEInfoW(initiatorname : windows_core::PCWSTR, initiatorportnumber : u32, authinfo : *mut IKE_AUTHENTICATION_INFORMATION, persist : super::super::Foundation:: BOOLEAN) -> u32); - SetIScsiIKEInfoW(initiatorname.param().abi(), core::mem::transmute(initiatorportnumber), core::mem::transmute(authinfo), persist.param().abi()) + SetIScsiIKEInfoW(initiatorname.param().abi(), core::mem::transmute(initiatorportnumber), core::mem::transmute(authinfo), persist.into()) } #[inline] pub unsafe fn SetIScsiInitiatorCHAPSharedSecret(sharedsecretlength: u32, sharedsecret: *mut u8) -> u32 { @@ -545,26 +528,24 @@ pub unsafe fn SetIScsiInitiatorRADIUSSharedSecret(sharedsecretlength: u32, share SetIScsiInitiatorRADIUSSharedSecret(core::mem::transmute(sharedsecretlength), core::mem::transmute(sharedsecret)) } #[inline] -pub unsafe fn SetIScsiTunnelModeOuterAddressA(initiatorname: P0, initiatorportnumber: u32, destinationaddress: P2, outermodeaddress: P3, persist: P4) -> u32 +pub unsafe fn SetIScsiTunnelModeOuterAddressA(initiatorname: P0, initiatorportnumber: u32, destinationaddress: P2, outermodeaddress: P3, persist: bool) -> u32 where P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn SetIScsiTunnelModeOuterAddressA(initiatorname : windows_core::PCSTR, initiatorportnumber : u32, destinationaddress : windows_core::PCSTR, outermodeaddress : windows_core::PCSTR, persist : super::super::Foundation:: BOOLEAN) -> u32); - SetIScsiTunnelModeOuterAddressA(initiatorname.param().abi(), core::mem::transmute(initiatorportnumber), destinationaddress.param().abi(), outermodeaddress.param().abi(), persist.param().abi()) + SetIScsiTunnelModeOuterAddressA(initiatorname.param().abi(), core::mem::transmute(initiatorportnumber), destinationaddress.param().abi(), outermodeaddress.param().abi(), persist.into()) } #[inline] -pub unsafe fn SetIScsiTunnelModeOuterAddressW(initiatorname: P0, initiatorportnumber: u32, destinationaddress: P2, outermodeaddress: P3, persist: P4) -> u32 +pub unsafe fn SetIScsiTunnelModeOuterAddressW(initiatorname: P0, initiatorportnumber: u32, destinationaddress: P2, outermodeaddress: P3, persist: bool) -> u32 where P0: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("iscsidsc.dll" "system" fn SetIScsiTunnelModeOuterAddressW(initiatorname : windows_core::PCWSTR, initiatorportnumber : u32, destinationaddress : windows_core::PCWSTR, outermodeaddress : windows_core::PCWSTR, persist : super::super::Foundation:: BOOLEAN) -> u32); - SetIScsiTunnelModeOuterAddressW(initiatorname.param().abi(), core::mem::transmute(initiatorportnumber), destinationaddress.param().abi(), outermodeaddress.param().abi(), persist.param().abi()) + SetIScsiTunnelModeOuterAddressW(initiatorname.param().abi(), core::mem::transmute(initiatorportnumber), destinationaddress.param().abi(), outermodeaddress.param().abi(), persist.into()) } #[inline] pub unsafe fn SetupPersistentIScsiDevices() -> u32 { @@ -2265,6 +2246,3 @@ pub const WmiScsiAddressGuid: windows_core::GUID = windows_core::GUID::from_u128 #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct _ADAPTER_OBJECT(pub isize); -impl windows_core::TypeKind for _ADAPTER_OBJECT { - type TypeKind = windows_core::CopyType; -} diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Jet/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Jet/mod.rs index ad1f92d385..ae6f643fef 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Jet/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Jet/mod.rs @@ -2281,9 +2281,6 @@ impl Default for JET_INDEX_RANGE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct JET_INSTANCE(pub usize); -impl windows_core::TypeKind for JET_INSTANCE { - type TypeKind = windows_core::CopyType; -} impl JET_INSTANCE { pub fn is_invalid(&self) -> bool { self.0 == 0 @@ -2438,9 +2435,6 @@ impl Default for JET_LOGTIME_1_0 { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct JET_LS(pub usize); -impl windows_core::TypeKind for JET_LS { - type TypeKind = windows_core::CopyType; -} impl JET_LS { pub fn is_invalid(&self) -> bool { self.0 == 0 @@ -2568,9 +2562,6 @@ impl Default for JET_OPERATIONCONTEXT { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct JET_OSSNAPID(pub usize); -impl windows_core::TypeKind for JET_OSSNAPID { - type TypeKind = windows_core::CopyType; -} impl JET_OSSNAPID { pub fn is_invalid(&self) -> bool { self.0 == 0 @@ -2817,9 +2808,6 @@ impl Default for JET_RSTMAP_W { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct JET_SESID(pub usize); -impl windows_core::TypeKind for JET_SESID { - type TypeKind = windows_core::CopyType; -} impl JET_SESID { pub fn is_invalid(&self) -> bool { self.0 == 0 diff --git a/crates/libs/windows/src/Windows/Win32/Storage/OfflineFiles/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/OfflineFiles/mod.rs index 60b3e33f54..6f2b122448 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/OfflineFiles/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/OfflineFiles/mod.rs @@ -1,10 +1,7 @@ #[inline] -pub unsafe fn OfflineFilesEnable(benable: P0, pbrebootrequired: *mut super::super::Foundation::BOOL) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn OfflineFilesEnable(benable: bool, pbrebootrequired: *mut super::super::Foundation::BOOL) -> u32 { windows_targets::link!("cscapi.dll" "system" fn OfflineFilesEnable(benable : super::super::Foundation:: BOOL, pbrebootrequired : *mut super::super::Foundation:: BOOL) -> u32); - OfflineFilesEnable(benable.param().abi(), core::mem::transmute(pbrebootrequired)) + OfflineFilesEnable(benable.into(), core::mem::transmute(pbrebootrequired)) } #[inline] pub unsafe fn OfflineFilesQueryStatus(pbactive: Option<*mut super::super::Foundation::BOOL>, pbenabled: Option<*mut super::super::Foundation::BOOL>) -> u32 { @@ -160,55 +157,46 @@ impl windows_core::RuntimeName for IEnumOfflineFilesSettings {} windows_core::imp::define_interface!(IOfflineFilesCache, IOfflineFilesCache_Vtbl, 0x855d6203_7914_48b9_8d40_4c56f5acffc5); windows_core::imp::interface_hierarchy!(IOfflineFilesCache, windows_core::IUnknown); impl IOfflineFilesCache { - pub unsafe fn Synchronize(&self, hwndparent: Option, rgpszpaths: &[windows_core::PCWSTR], basync: P3, dwsynccontrol: u32, pisyncconflicthandler: P5, piprogress: P6, psyncid: Option<*const windows_core::GUID>) -> windows_core::Result<()> + pub unsafe fn Synchronize(&self, hwndparent: Option, rgpszpaths: &[windows_core::PCWSTR], basync: bool, dwsynccontrol: u32, pisyncconflicthandler: P5, piprogress: P6, psyncid: Option<*const windows_core::GUID>) -> windows_core::Result<()> where - P3: windows_core::Param, P5: windows_core::Param, P6: windows_core::Param, { - (windows_core::Interface::vtable(self).Synchronize)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), basync.param().abi(), core::mem::transmute(dwsynccontrol), pisyncconflicthandler.param().abi(), piprogress.param().abi(), core::mem::transmute(psyncid.unwrap_or(core::mem::zeroed()))).ok() + (windows_core::Interface::vtable(self).Synchronize)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), basync.into(), core::mem::transmute(dwsynccontrol), pisyncconflicthandler.param().abi(), piprogress.param().abi(), core::mem::transmute(psyncid.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn DeleteItems(&self, rgpszpaths: &[windows_core::PCWSTR], dwflags: u32, basync: P3, piprogress: P4) -> windows_core::Result<()> + pub unsafe fn DeleteItems(&self, rgpszpaths: &[windows_core::PCWSTR], dwflags: u32, basync: bool, piprogress: P4) -> windows_core::Result<()> where - P3: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).DeleteItems)(windows_core::Interface::as_raw(self), core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), core::mem::transmute(dwflags), basync.param().abi(), piprogress.param().abi()).ok() + (windows_core::Interface::vtable(self).DeleteItems)(windows_core::Interface::as_raw(self), core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), core::mem::transmute(dwflags), basync.into(), piprogress.param().abi()).ok() } - pub unsafe fn DeleteItemsForUser(&self, pszuser: P0, rgpszpaths: &[windows_core::PCWSTR], dwflags: u32, basync: P4, piprogress: P5) -> windows_core::Result<()> + pub unsafe fn DeleteItemsForUser(&self, pszuser: P0, rgpszpaths: &[windows_core::PCWSTR], dwflags: u32, basync: bool, piprogress: P5) -> windows_core::Result<()> where P0: windows_core::Param, - P4: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).DeleteItemsForUser)(windows_core::Interface::as_raw(self), pszuser.param().abi(), core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), core::mem::transmute(dwflags), basync.param().abi(), piprogress.param().abi()).ok() + (windows_core::Interface::vtable(self).DeleteItemsForUser)(windows_core::Interface::as_raw(self), pszuser.param().abi(), core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), core::mem::transmute(dwflags), basync.into(), piprogress.param().abi()).ok() } - pub unsafe fn Pin(&self, hwndparent: Option, rgpszpaths: &[windows_core::PCWSTR], bdeep: P3, basync: P4, dwpincontrolflags: u32, piprogress: P6) -> windows_core::Result<()> + pub unsafe fn Pin(&self, hwndparent: Option, rgpszpaths: &[windows_core::PCWSTR], bdeep: bool, basync: bool, dwpincontrolflags: u32, piprogress: P6) -> windows_core::Result<()> where - P3: windows_core::Param, - P4: windows_core::Param, P6: windows_core::Param, { - (windows_core::Interface::vtable(self).Pin)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), bdeep.param().abi(), basync.param().abi(), core::mem::transmute(dwpincontrolflags), piprogress.param().abi()).ok() + (windows_core::Interface::vtable(self).Pin)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), bdeep.into(), basync.into(), core::mem::transmute(dwpincontrolflags), piprogress.param().abi()).ok() } - pub unsafe fn Unpin(&self, hwndparent: Option, rgpszpaths: &[windows_core::PCWSTR], bdeep: P3, basync: P4, dwpincontrolflags: u32, piprogress: P6) -> windows_core::Result<()> + pub unsafe fn Unpin(&self, hwndparent: Option, rgpszpaths: &[windows_core::PCWSTR], bdeep: bool, basync: bool, dwpincontrolflags: u32, piprogress: P6) -> windows_core::Result<()> where - P3: windows_core::Param, - P4: windows_core::Param, P6: windows_core::Param, { - (windows_core::Interface::vtable(self).Unpin)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), bdeep.param().abi(), basync.param().abi(), core::mem::transmute(dwpincontrolflags), piprogress.param().abi()).ok() + (windows_core::Interface::vtable(self).Unpin)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), bdeep.into(), basync.into(), core::mem::transmute(dwpincontrolflags), piprogress.param().abi()).ok() } pub unsafe fn GetEncryptionStatus(&self, pbencrypted: *mut super::super::Foundation::BOOL, pbpartial: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetEncryptionStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pbencrypted), core::mem::transmute(pbpartial)).ok() } - pub unsafe fn Encrypt(&self, hwndparent: Option, bencrypt: P1, dwencryptioncontrolflags: u32, basync: P3, piprogress: P4) -> windows_core::Result<()> + pub unsafe fn Encrypt(&self, hwndparent: Option, bencrypt: bool, dwencryptioncontrolflags: u32, basync: bool, piprogress: P4) -> windows_core::Result<()> where - P1: windows_core::Param, - P3: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).Encrypt)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), bencrypt.param().abi(), core::mem::transmute(dwencryptioncontrolflags), basync.param().abi(), piprogress.param().abi()).ok() + (windows_core::Interface::vtable(self).Encrypt)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), bencrypt.into(), core::mem::transmute(dwencryptioncontrolflags), basync.into(), piprogress.param().abi()).ok() } pub unsafe fn FindItem(&self, pszpath: P0, dwqueryflags: u32) -> windows_core::Result where @@ -228,13 +216,12 @@ impl IOfflineFilesCache { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).FindItemEx)(windows_core::Interface::as_raw(self), pszpath.param().abi(), pincludefilefilter.param().abi(), pincludedirfilter.param().abi(), pexcludefilefilter.param().abi(), pexcludedirfilter.param().abi(), core::mem::transmute(dwqueryflags), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn RenameItem(&self, pszpathoriginal: P0, pszpathnew: P1, breplaceifexists: P2) -> windows_core::Result<()> + pub unsafe fn RenameItem(&self, pszpathoriginal: P0, pszpathnew: P1, breplaceifexists: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).RenameItem)(windows_core::Interface::as_raw(self), pszpathoriginal.param().abi(), pszpathnew.param().abi(), breplaceifexists.param().abi()).ok() + (windows_core::Interface::vtable(self).RenameItem)(windows_core::Interface::as_raw(self), pszpathoriginal.param().abi(), pszpathnew.param().abi(), breplaceifexists.into()).ok() } pub unsafe fn GetLocation(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -446,13 +433,12 @@ impl core::ops::Deref for IOfflineFilesCache2 { } windows_core::imp::interface_hierarchy!(IOfflineFilesCache2, windows_core::IUnknown, IOfflineFilesCache); impl IOfflineFilesCache2 { - pub unsafe fn RenameItemEx(&self, pszpathoriginal: P0, pszpathnew: P1, breplaceifexists: P2) -> windows_core::Result<()> + pub unsafe fn RenameItemEx(&self, pszpathoriginal: P0, pszpathnew: P1, breplaceifexists: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).RenameItemEx)(windows_core::Interface::as_raw(self), pszpathoriginal.param().abi(), pszpathnew.param().abi(), breplaceifexists.param().abi()).ok() + (windows_core::Interface::vtable(self).RenameItemEx)(windows_core::Interface::as_raw(self), pszpathoriginal.param().abi(), pszpathnew.param().abi(), breplaceifexists.into()).ok() } } #[repr(C)] @@ -604,12 +590,9 @@ impl IOfflineFilesConnectionInfo { pub unsafe fn TransitionOnline(&self, hwndparent: Option, dwflags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).TransitionOnline)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags)).ok() } - pub unsafe fn TransitionOffline(&self, hwndparent: Option, dwflags: u32, bforceopenfilesclosed: P2) -> windows_core::Result - where - P2: windows_core::Param, - { + pub unsafe fn TransitionOffline(&self, hwndparent: Option, dwflags: u32, bforceopenfilesclosed: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).TransitionOffline)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), bforceopenfilesclosed.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).TransitionOffline)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwflags), bforceopenfilesclosed.into(), &mut result__).map(|| result__) } } #[repr(C)] @@ -818,20 +801,11 @@ impl IOfflineFilesEvents { pub unsafe fn CacheIsCorrupted(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CacheIsCorrupted)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn Enabled(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn Enabled(&self, benabled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), benabled.into()).ok() } - pub unsafe fn EncryptionChanged(&self, bwasencrypted: P0, bwaspartial: P1, bisencrypted: P2, bispartial: P3) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).EncryptionChanged)(windows_core::Interface::as_raw(self), bwasencrypted.param().abi(), bwaspartial.param().abi(), bisencrypted.param().abi(), bispartial.param().abi()).ok() + pub unsafe fn EncryptionChanged(&self, bwasencrypted: bool, bwaspartial: bool, bisencrypted: bool, bispartial: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EncryptionChanged)(windows_core::Interface::as_raw(self), bwasencrypted.into(), bwaspartial.into(), bisencrypted.into(), bispartial.into()).ok() } pub unsafe fn SyncBegin(&self, rsyncid: *const windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SyncBegin)(windows_core::Interface::as_raw(self), core::mem::transmute(rsyncid)).ok() @@ -905,13 +879,11 @@ impl IOfflineFilesEvents { { (windows_core::Interface::vtable(self).ItemNotPinned)(windows_core::Interface::as_raw(self), pszpath.param().abi(), core::mem::transmute(itemtype)).ok() } - pub unsafe fn ItemModified(&self, pszpath: P0, itemtype: OFFLINEFILES_ITEM_TYPE, bmodifieddata: P2, bmodifiedattributes: P3) -> windows_core::Result<()> + pub unsafe fn ItemModified(&self, pszpath: P0, itemtype: OFFLINEFILES_ITEM_TYPE, bmodifieddata: bool, bmodifiedattributes: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).ItemModified)(windows_core::Interface::as_raw(self), pszpath.param().abi(), core::mem::transmute(itemtype), bmodifieddata.param().abi(), bmodifiedattributes.param().abi()).ok() + (windows_core::Interface::vtable(self).ItemModified)(windows_core::Interface::as_raw(self), pszpath.param().abi(), core::mem::transmute(itemtype), bmodifieddata.into(), bmodifiedattributes.into()).ok() } pub unsafe fn ItemAddedToCache(&self, pszpath: P0, itemtype: OFFLINEFILES_ITEM_TYPE) -> windows_core::Result<()> where @@ -1257,14 +1229,12 @@ impl core::ops::Deref for IOfflineFilesEvents3 { } windows_core::imp::interface_hierarchy!(IOfflineFilesEvents3, windows_core::IUnknown, IOfflineFilesEvents, IOfflineFilesEvents2); impl IOfflineFilesEvents3 { - pub unsafe fn TransparentCacheItemNotify(&self, pszpath: P0, eventtype: OFFLINEFILES_EVENTS, itemtype: OFFLINEFILES_ITEM_TYPE, bmodifieddata: P3, bmodifiedattributes: P4, pzsoldpath: P5) -> windows_core::Result<()> + pub unsafe fn TransparentCacheItemNotify(&self, pszpath: P0, eventtype: OFFLINEFILES_EVENTS, itemtype: OFFLINEFILES_ITEM_TYPE, bmodifieddata: bool, bmodifiedattributes: bool, pzsoldpath: P5) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).TransparentCacheItemNotify)(windows_core::Interface::as_raw(self), pszpath.param().abi(), core::mem::transmute(eventtype), core::mem::transmute(itemtype), bmodifieddata.param().abi(), bmodifiedattributes.param().abi(), pzsoldpath.param().abi()).ok() + (windows_core::Interface::vtable(self).TransparentCacheItemNotify)(windows_core::Interface::as_raw(self), pszpath.param().abi(), core::mem::transmute(eventtype), core::mem::transmute(itemtype), bmodifieddata.into(), bmodifiedattributes.into(), pzsoldpath.param().abi()).ok() } pub unsafe fn PrefetchFileBegin(&self, pszpath: P0) -> windows_core::Result<()> where @@ -2311,11 +2281,8 @@ impl windows_core::RuntimeName for IOfflineFilesSimpleProgress {} windows_core::imp::define_interface!(IOfflineFilesSuspend, IOfflineFilesSuspend_Vtbl, 0x62c4560f_bc0b_48ca_ad9d_34cb528d99a9); windows_core::imp::interface_hierarchy!(IOfflineFilesSuspend, windows_core::IUnknown); impl IOfflineFilesSuspend { - pub unsafe fn SuspendRoot(&self, bsuspend: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SuspendRoot)(windows_core::Interface::as_raw(self), bsuspend.param().abi()).ok() + pub unsafe fn SuspendRoot(&self, bsuspend: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SuspendRoot)(windows_core::Interface::as_raw(self), bsuspend.into()).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Packaging/Appx/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Packaging/Appx/mod.rs index 2f60abe49a..95de760830 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Packaging/Appx/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Packaging/Appx/mod.rs @@ -2275,31 +2275,28 @@ windows_core::imp::define_interface!(IAppxBundleWriter4, IAppxBundleWriter4_Vtbl windows_core::imp::interface_hierarchy!(IAppxBundleWriter4, windows_core::IUnknown); impl IAppxBundleWriter4 { #[cfg(feature = "Win32_System_Com")] - pub unsafe fn AddPayloadPackage(&self, filename: P0, packagestream: P1, isdefaultapplicablepackage: P2) -> windows_core::Result<()> + pub unsafe fn AddPayloadPackage(&self, filename: P0, packagestream: P1, isdefaultapplicablepackage: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddPayloadPackage)(windows_core::Interface::as_raw(self), filename.param().abi(), packagestream.param().abi(), isdefaultapplicablepackage.param().abi()).ok() + (windows_core::Interface::vtable(self).AddPayloadPackage)(windows_core::Interface::as_raw(self), filename.param().abi(), packagestream.param().abi(), isdefaultapplicablepackage.into()).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn AddPackageReference(&self, filename: P0, inputstream: P1, isdefaultapplicablepackage: P2) -> windows_core::Result<()> + pub unsafe fn AddPackageReference(&self, filename: P0, inputstream: P1, isdefaultapplicablepackage: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddPackageReference)(windows_core::Interface::as_raw(self), filename.param().abi(), inputstream.param().abi(), isdefaultapplicablepackage.param().abi()).ok() + (windows_core::Interface::vtable(self).AddPackageReference)(windows_core::Interface::as_raw(self), filename.param().abi(), inputstream.param().abi(), isdefaultapplicablepackage.into()).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn AddExternalPackageReference(&self, filename: P0, inputstream: P1, isdefaultapplicablepackage: P2) -> windows_core::Result<()> + pub unsafe fn AddExternalPackageReference(&self, filename: P0, inputstream: P1, isdefaultapplicablepackage: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddExternalPackageReference)(windows_core::Interface::as_raw(self), filename.param().abi(), inputstream.param().abi(), isdefaultapplicablepackage.param().abi()).ok() + (windows_core::Interface::vtable(self).AddExternalPackageReference)(windows_core::Interface::as_raw(self), filename.param().abi(), inputstream.param().abi(), isdefaultapplicablepackage.into()).ok() } } #[repr(C)] @@ -2789,22 +2786,20 @@ windows_core::imp::define_interface!(IAppxEncryptedBundleWriter3, IAppxEncrypted windows_core::imp::interface_hierarchy!(IAppxEncryptedBundleWriter3, windows_core::IUnknown); impl IAppxEncryptedBundleWriter3 { #[cfg(feature = "Win32_System_Com")] - pub unsafe fn AddPayloadPackageEncrypted(&self, filename: P0, packagestream: P1, isdefaultapplicablepackage: P2) -> windows_core::Result<()> + pub unsafe fn AddPayloadPackageEncrypted(&self, filename: P0, packagestream: P1, isdefaultapplicablepackage: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddPayloadPackageEncrypted)(windows_core::Interface::as_raw(self), filename.param().abi(), packagestream.param().abi(), isdefaultapplicablepackage.param().abi()).ok() + (windows_core::Interface::vtable(self).AddPayloadPackageEncrypted)(windows_core::Interface::as_raw(self), filename.param().abi(), packagestream.param().abi(), isdefaultapplicablepackage.into()).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn AddExternalPackageReference(&self, filename: P0, inputstream: P1, isdefaultapplicablepackage: P2) -> windows_core::Result<()> + pub unsafe fn AddExternalPackageReference(&self, filename: P0, inputstream: P1, isdefaultapplicablepackage: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddExternalPackageReference)(windows_core::Interface::as_raw(self), filename.param().abi(), inputstream.param().abi(), isdefaultapplicablepackage.param().abi()).ok() + (windows_core::Interface::vtable(self).AddExternalPackageReference)(windows_core::Interface::as_raw(self), filename.param().abi(), inputstream.param().abi(), isdefaultapplicablepackage.into()).ok() } } #[repr(C)] @@ -6316,13 +6311,12 @@ impl IAppxPackageEditor { (windows_core::Interface::vtable(self).UpdateEncryptedPackage)(windows_core::Interface::as_raw(self), baselineencryptedpackagestream.param().abi(), deltapackagestream.param().abi(), core::mem::transmute(updateoption), core::mem::transmute(settings), core::mem::transmute(keyinfo)).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn UpdatePackageManifest(&self, packagestream: P0, updatedmanifeststream: P1, ispackageencrypted: P2, options: APPX_PACKAGE_EDITOR_UPDATE_PACKAGE_MANIFEST_OPTIONS) -> windows_core::Result<()> + pub unsafe fn UpdatePackageManifest(&self, packagestream: P0, updatedmanifeststream: P1, ispackageencrypted: bool, options: APPX_PACKAGE_EDITOR_UPDATE_PACKAGE_MANIFEST_OPTIONS) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).UpdatePackageManifest)(windows_core::Interface::as_raw(self), packagestream.param().abi(), updatedmanifeststream.param().abi(), ispackageencrypted.param().abi(), core::mem::transmute(options)).ok() + (windows_core::Interface::vtable(self).UpdatePackageManifest)(windows_core::Interface::as_raw(self), packagestream.param().abi(), updatedmanifeststream.param().abi(), ispackageencrypted.into(), core::mem::transmute(options)).ok() } } #[repr(C)] @@ -6783,9 +6777,6 @@ impl windows_core::RuntimeName for IAppxSourceContentGroupMapReader {} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct PACKAGEDEPENDENCY_CONTEXT(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for PACKAGEDEPENDENCY_CONTEXT { - type TypeKind = windows_core::CopyType; -} impl PACKAGEDEPENDENCY_CONTEXT { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -6951,9 +6942,6 @@ pub const PACKAGE_VERSION_MIN_LENGTH: u32 = 7u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct PACKAGE_VIRTUALIZATION_CONTEXT_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for PACKAGE_VIRTUALIZATION_CONTEXT_HANDLE { - type TypeKind = windows_core::CopyType; -} impl PACKAGE_VIRTUALIZATION_CONTEXT_HANDLE { pub fn is_invalid(&self) -> bool { self.0.is_null() diff --git a/crates/libs/windows/src/Windows/Win32/Storage/ProjectedFileSystem/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/ProjectedFileSystem/mod.rs index 4a848ee6db..b4d06a5638 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/ProjectedFileSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/ProjectedFileSystem/mod.rs @@ -227,9 +227,6 @@ pub const PRJ_COMPLETE_COMMAND_TYPE_NOTIFICATION: PRJ_COMPLETE_COMMAND_TYPE = PR #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct PRJ_DIR_ENTRY_BUFFER_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for PRJ_DIR_ENTRY_BUFFER_HANDLE { - type TypeKind = windows_core::CopyType; -} impl PRJ_DIR_ENTRY_BUFFER_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -342,9 +339,6 @@ pub type PRJ_GET_PLACEHOLDER_INFO_CB = Option bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/Storage/StructuredStorage/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/StructuredStorage/mod.rs index 9edc17dd09..ca305ce061 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/StructuredStorage/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/StructuredStorage/mod.rs @@ -1,9 +1,6 @@ #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct JET_API_PTR(pub usize); -impl windows_core::TypeKind for JET_API_PTR { - type TypeKind = windows_core::CopyType; -} impl JET_API_PTR { pub fn is_invalid(&self) -> bool { self.0 == 0 @@ -12,9 +9,6 @@ impl JET_API_PTR { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct JET_HANDLE(pub usize); -impl windows_core::TypeKind for JET_HANDLE { - type TypeKind = windows_core::CopyType; -} impl JET_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == 0 @@ -23,9 +17,6 @@ impl JET_HANDLE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct JET_TABLEID(pub usize); -impl windows_core::TypeKind for JET_TABLEID { - type TypeKind = windows_core::CopyType; -} impl JET_TABLEID { pub fn is_invalid(&self) -> bool { self.0 == 0 diff --git a/crates/libs/windows/src/Windows/Win32/Storage/VirtualDiskService/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/VirtualDiskService/mod.rs index 77284b208f..ab1ae3f5f7 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/VirtualDiskService/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/VirtualDiskService/mod.rs @@ -260,12 +260,8 @@ impl IVdsAdvancedDisk { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreatePartition)(windows_core::Interface::as_raw(self), core::mem::transmute(ulloffset), core::mem::transmute(ullsize), core::mem::transmute(para), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn DeletePartition(&self, ulloffset: u64, bforce: P1, bforceprotected: P2) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).DeletePartition)(windows_core::Interface::as_raw(self), core::mem::transmute(ulloffset), bforce.param().abi(), bforceprotected.param().abi()).ok() + pub unsafe fn DeletePartition(&self, ulloffset: u64, bforce: bool, bforceprotected: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DeletePartition)(windows_core::Interface::as_raw(self), core::mem::transmute(ulloffset), bforce.into(), bforceprotected.into()).ok() } pub unsafe fn ChangeAttributes(&self, ulloffset: u64, para: *const CHANGE_ATTRIBUTES_PARAMETERS) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ChangeAttributes)(windows_core::Interface::as_raw(self), core::mem::transmute(ulloffset), core::mem::transmute(para)).ok() @@ -279,24 +275,16 @@ impl IVdsAdvancedDisk { pub unsafe fn GetDriveLetter(&self, ulloffset: u64, pwcletter: windows_core::PWSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDriveLetter)(windows_core::Interface::as_raw(self), core::mem::transmute(ulloffset), core::mem::transmute(pwcletter)).ok() } - pub unsafe fn FormatPartition(&self, ulloffset: u64, r#type: VDS_FILE_SYSTEM_TYPE, pwszlabel: P2, dwunitallocationsize: u32, bforce: P4, bquickformat: P5, benablecompression: P6) -> windows_core::Result + pub unsafe fn FormatPartition(&self, ulloffset: u64, r#type: VDS_FILE_SYSTEM_TYPE, pwszlabel: P2, dwunitallocationsize: u32, bforce: bool, bquickformat: bool, benablecompression: bool) -> windows_core::Result where P2: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, - P6: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).FormatPartition)(windows_core::Interface::as_raw(self), core::mem::transmute(ulloffset), core::mem::transmute(r#type), pwszlabel.param().abi(), core::mem::transmute(dwunitallocationsize), bforce.param().abi(), bquickformat.param().abi(), benablecompression.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).FormatPartition)(windows_core::Interface::as_raw(self), core::mem::transmute(ulloffset), core::mem::transmute(r#type), pwszlabel.param().abi(), core::mem::transmute(dwunitallocationsize), bforce.into(), bquickformat.into(), benablecompression.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn Clean(&self, bforce: P0, bforceoem: P1, bfullclean: P2) -> windows_core::Result - where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, - { + pub unsafe fn Clean(&self, bforce: bool, bforceoem: bool, bfullclean: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Clean)(windows_core::Interface::as_raw(self), bforce.param().abi(), bforceoem.param().abi(), bfullclean.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).Clean)(windows_core::Interface::as_raw(self), bforce.into(), bforceoem.into(), bfullclean.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -407,11 +395,8 @@ impl windows_core::RuntimeName for IVdsAdvancedDisk {} windows_core::imp::define_interface!(IVdsAdvancedDisk2, IVdsAdvancedDisk2_Vtbl, 0x9723f420_9355_42de_ab66_e31bb15beeac); windows_core::imp::interface_hierarchy!(IVdsAdvancedDisk2, windows_core::IUnknown); impl IVdsAdvancedDisk2 { - pub unsafe fn ChangePartitionType(&self, ulloffset: u64, bforce: P1, para: *const CHANGE_PARTITION_TYPE_PARAMETERS) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).ChangePartitionType)(windows_core::Interface::as_raw(self), core::mem::transmute(ulloffset), bforce.param().abi(), core::mem::transmute(para)).ok() + pub unsafe fn ChangePartitionType(&self, ulloffset: u64, bforce: bool, para: *const CHANGE_PARTITION_TYPE_PARAMETERS) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ChangePartitionType)(windows_core::Interface::as_raw(self), core::mem::transmute(ulloffset), bforce.into(), core::mem::transmute(para)).ok() } } #[repr(C)] @@ -933,11 +918,8 @@ impl windows_core::RuntimeName for IVdsDisk {} windows_core::imp::define_interface!(IVdsDisk2, IVdsDisk2_Vtbl, 0x40f73c8b_687d_4a13_8d96_3d7f2e683936); windows_core::imp::interface_hierarchy!(IVdsDisk2, windows_core::IUnknown); impl IVdsDisk2 { - pub unsafe fn SetSANMode(&self, benable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSANMode)(windows_core::Interface::as_raw(self), benable.param().abi()).ok() + pub unsafe fn SetSANMode(&self, benable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSANMode)(windows_core::Interface::as_raw(self), benable.into()).ok() } } #[repr(C)] @@ -1052,16 +1034,13 @@ impl IVdsDiskPartitionMF { pub unsafe fn QueryPartitionFileSystemFormatSupport(&self, ulloffset: u64, ppfilesystemsupportprops: *mut *mut VDS_FILE_SYSTEM_FORMAT_SUPPORT_PROP, plnumberoffilesystems: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).QueryPartitionFileSystemFormatSupport)(windows_core::Interface::as_raw(self), core::mem::transmute(ulloffset), core::mem::transmute(ppfilesystemsupportprops), core::mem::transmute(plnumberoffilesystems)).ok() } - pub unsafe fn FormatPartitionEx(&self, ulloffset: u64, pwszfilesystemtypename: P1, usfilesystemrevision: u16, uldesiredunitallocationsize: u32, pwszlabel: P4, bforce: P5, bquickformat: P6, benablecompression: P7) -> windows_core::Result + pub unsafe fn FormatPartitionEx(&self, ulloffset: u64, pwszfilesystemtypename: P1, usfilesystemrevision: u16, uldesiredunitallocationsize: u32, pwszlabel: P4, bforce: bool, bquickformat: bool, benablecompression: bool) -> windows_core::Result where P1: windows_core::Param, P4: windows_core::Param, - P5: windows_core::Param, - P6: windows_core::Param, - P7: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).FormatPartitionEx)(windows_core::Interface::as_raw(self), core::mem::transmute(ulloffset), pwszfilesystemtypename.param().abi(), core::mem::transmute(usfilesystemrevision), core::mem::transmute(uldesiredunitallocationsize), pwszlabel.param().abi(), bforce.param().abi(), bquickformat.param().abi(), benablecompression.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).FormatPartitionEx)(windows_core::Interface::as_raw(self), core::mem::transmute(ulloffset), pwszfilesystemtypename.param().abi(), core::mem::transmute(usfilesystemrevision), core::mem::transmute(uldesiredunitallocationsize), pwszlabel.param().abi(), bforce.into(), bquickformat.into(), benablecompression.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -1596,13 +1575,9 @@ impl IVdsIscsiInitiatorAdapter { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).QueryInitiatorPortals)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn LoginToTarget(&self, logintype: VDS_ISCSI_LOGIN_TYPE, targetid: windows_core::GUID, targetportalid: windows_core::GUID, initiatorportalid: windows_core::GUID, ulloginflags: u32, bheaderdigest: P5, bdatadigest: P6, authtype: VDS_ISCSI_AUTH_TYPE) -> windows_core::Result - where - P5: windows_core::Param, - P6: windows_core::Param, - { + pub unsafe fn LoginToTarget(&self, logintype: VDS_ISCSI_LOGIN_TYPE, targetid: windows_core::GUID, targetportalid: windows_core::GUID, initiatorportalid: windows_core::GUID, ulloginflags: u32, bheaderdigest: bool, bdatadigest: bool, authtype: VDS_ISCSI_AUTH_TYPE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).LoginToTarget)(windows_core::Interface::as_raw(self), core::mem::transmute(logintype), core::mem::transmute(targetid), core::mem::transmute(targetportalid), core::mem::transmute(initiatorportalid), core::mem::transmute(ulloginflags), bheaderdigest.param().abi(), bdatadigest.param().abi(), core::mem::transmute(authtype), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).LoginToTarget)(windows_core::Interface::as_raw(self), core::mem::transmute(logintype), core::mem::transmute(targetid), core::mem::transmute(targetportalid), core::mem::transmute(initiatorportalid), core::mem::transmute(ulloginflags), bheaderdigest.into(), bdatadigest.into(), core::mem::transmute(authtype), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn LogoutFromTarget(&self, targetid: windows_core::GUID) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2996,18 +2971,11 @@ impl IVdsPack { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateVolume)(windows_core::Interface::as_raw(self), core::mem::transmute(r#type), core::mem::transmute(pinputdiskarray.as_ptr()), pinputdiskarray.len().try_into().unwrap(), core::mem::transmute(ulstripesize), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn AddDisk(&self, diskid: windows_core::GUID, partitionstyle: VDS_PARTITION_STYLE, bashotspare: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddDisk)(windows_core::Interface::as_raw(self), core::mem::transmute(diskid), core::mem::transmute(partitionstyle), bashotspare.param().abi()).ok() + pub unsafe fn AddDisk(&self, diskid: windows_core::GUID, partitionstyle: VDS_PARTITION_STYLE, bashotspare: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddDisk)(windows_core::Interface::as_raw(self), core::mem::transmute(diskid), core::mem::transmute(partitionstyle), bashotspare.into()).ok() } - pub unsafe fn MigrateDisks(&self, pdiskarray: *const windows_core::GUID, lnumberofdisks: i32, targetpack: windows_core::GUID, bforce: P3, bqueryonly: P4, presults: *mut windows_core::HRESULT, pbrebootneeded: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> - where - P3: windows_core::Param, - P4: windows_core::Param, - { - (windows_core::Interface::vtable(self).MigrateDisks)(windows_core::Interface::as_raw(self), core::mem::transmute(pdiskarray), core::mem::transmute(lnumberofdisks), core::mem::transmute(targetpack), bforce.param().abi(), bqueryonly.param().abi(), core::mem::transmute(presults), core::mem::transmute(pbrebootneeded)).ok() + pub unsafe fn MigrateDisks(&self, pdiskarray: *const windows_core::GUID, lnumberofdisks: i32, targetpack: windows_core::GUID, bforce: bool, bqueryonly: bool, presults: *mut windows_core::HRESULT, pbrebootneeded: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).MigrateDisks)(windows_core::Interface::as_raw(self), core::mem::transmute(pdiskarray), core::mem::transmute(lnumberofdisks), core::mem::transmute(targetpack), bforce.into(), bqueryonly.into(), core::mem::transmute(presults), core::mem::transmute(pbrebootneeded)).ok() } pub unsafe fn ReplaceDisk(&self, olddiskid: windows_core::GUID, newdiskid: windows_core::GUID) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3221,11 +3189,8 @@ impl IVdsProviderPrivate { { (windows_core::Interface::vtable(self).OnLoad)(windows_core::Interface::as_raw(self), pwszmachinename.param().abi(), pcallbackobject.param().abi()).ok() } - pub unsafe fn OnUnload(&self, bforceunload: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnUnload)(windows_core::Interface::as_raw(self), bforceunload.param().abi()).ok() + pub unsafe fn OnUnload(&self, bforceunload: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnUnload)(windows_core::Interface::as_raw(self), bforceunload.into()).ok() } } #[repr(C)] @@ -3882,11 +3847,8 @@ impl IVdsServiceUninstallDisk { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetDiskIdFromLunInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pluninfo), &mut result__).map(|| result__) } - pub unsafe fn UninstallDisks(&self, pdiskidarray: *const windows_core::GUID, ulcount: u32, bforce: P2, pbreboot: *mut u8, presults: *mut windows_core::HRESULT) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).UninstallDisks)(windows_core::Interface::as_raw(self), core::mem::transmute(pdiskidarray), core::mem::transmute(ulcount), bforce.param().abi(), core::mem::transmute(pbreboot), core::mem::transmute(presults)).ok() + pub unsafe fn UninstallDisks(&self, pdiskidarray: *const windows_core::GUID, ulcount: u32, bforce: bool, pbreboot: *mut u8, presults: *mut windows_core::HRESULT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).UninstallDisks)(windows_core::Interface::as_raw(self), core::mem::transmute(pdiskidarray), core::mem::transmute(ulcount), bforce.into(), core::mem::transmute(pbreboot), core::mem::transmute(presults)).ok() } } #[repr(C)] @@ -4807,17 +4769,11 @@ impl IVdsVolume { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).RemovePlex)(windows_core::Interface::as_raw(self), core::mem::transmute(plexid), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn Delete(&self, bforce: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Delete)(windows_core::Interface::as_raw(self), bforce.param().abi()).ok() + pub unsafe fn Delete(&self, bforce: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Delete)(windows_core::Interface::as_raw(self), bforce.into()).ok() } - pub unsafe fn SetFlags(&self, ulflags: u32, brevertonclose: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(ulflags), brevertonclose.param().abi()).ok() + pub unsafe fn SetFlags(&self, ulflags: u32, brevertonclose: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(ulflags), brevertonclose.into()).ok() } pub unsafe fn ClearFlags(&self, ulflags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ClearFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(ulflags)).ok() @@ -4993,15 +4949,12 @@ impl IVdsVolumeMF { pub unsafe fn GetFileSystemProperties(&self, pfilesystemprop: *mut VDS_FILE_SYSTEM_PROP) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetFileSystemProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pfilesystemprop)).ok() } - pub unsafe fn Format(&self, r#type: VDS_FILE_SYSTEM_TYPE, pwszlabel: P1, dwunitallocationsize: u32, bforce: P3, bquickformat: P4, benablecompression: P5) -> windows_core::Result + pub unsafe fn Format(&self, r#type: VDS_FILE_SYSTEM_TYPE, pwszlabel: P1, dwunitallocationsize: u32, bforce: bool, bquickformat: bool, benablecompression: bool) -> windows_core::Result where P1: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Format)(windows_core::Interface::as_raw(self), core::mem::transmute(r#type), pwszlabel.param().abi(), core::mem::transmute(dwunitallocationsize), bforce.param().abi(), bquickformat.param().abi(), benablecompression.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).Format)(windows_core::Interface::as_raw(self), core::mem::transmute(r#type), pwszlabel.param().abi(), core::mem::transmute(dwunitallocationsize), bforce.into(), bquickformat.into(), benablecompression.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn AddAccessPath(&self, pwszpath: P0) -> windows_core::Result<()> where @@ -5015,22 +4968,17 @@ impl IVdsVolumeMF { pub unsafe fn QueryReparsePoints(&self, ppreparsepointprops: *mut *mut VDS_REPARSE_POINT_PROP, plnumberofreparsepointprops: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).QueryReparsePoints)(windows_core::Interface::as_raw(self), core::mem::transmute(ppreparsepointprops), core::mem::transmute(plnumberofreparsepointprops)).ok() } - pub unsafe fn DeleteAccessPath(&self, pwszpath: P0, bforce: P1) -> windows_core::Result<()> + pub unsafe fn DeleteAccessPath(&self, pwszpath: P0, bforce: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).DeleteAccessPath)(windows_core::Interface::as_raw(self), pwszpath.param().abi(), bforce.param().abi()).ok() + (windows_core::Interface::vtable(self).DeleteAccessPath)(windows_core::Interface::as_raw(self), pwszpath.param().abi(), bforce.into()).ok() } pub unsafe fn Mount(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Mount)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn Dismount(&self, bforce: P0, bpermanent: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).Dismount)(windows_core::Interface::as_raw(self), bforce.param().abi(), bpermanent.param().abi()).ok() + pub unsafe fn Dismount(&self, bforce: bool, bpermanent: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Dismount)(windows_core::Interface::as_raw(self), bforce.into(), bpermanent.into()).ok() } pub unsafe fn SetFileSystemFlags(&self, ulflags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetFileSystemFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(ulflags)).ok() @@ -5142,16 +5090,13 @@ impl IVdsVolumeMF2 { pub unsafe fn QueryFileSystemFormatSupport(&self, ppfilesystemsupportprops: *mut *mut VDS_FILE_SYSTEM_FORMAT_SUPPORT_PROP, plnumberoffilesystems: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).QueryFileSystemFormatSupport)(windows_core::Interface::as_raw(self), core::mem::transmute(ppfilesystemsupportprops), core::mem::transmute(plnumberoffilesystems)).ok() } - pub unsafe fn FormatEx(&self, pwszfilesystemtypename: P0, usfilesystemrevision: u16, uldesiredunitallocationsize: u32, pwszlabel: P3, bforce: P4, bquickformat: P5, benablecompression: P6) -> windows_core::Result + pub unsafe fn FormatEx(&self, pwszfilesystemtypename: P0, usfilesystemrevision: u16, uldesiredunitallocationsize: u32, pwszlabel: P3, bforce: bool, bquickformat: bool, benablecompression: bool) -> windows_core::Result where P0: windows_core::Param, P3: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, - P6: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).FormatEx)(windows_core::Interface::as_raw(self), pwszfilesystemtypename.param().abi(), core::mem::transmute(usfilesystemrevision), core::mem::transmute(uldesiredunitallocationsize), pwszlabel.param().abi(), bforce.param().abi(), bquickformat.param().abi(), benablecompression.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).FormatEx)(windows_core::Interface::as_raw(self), pwszfilesystemtypename.param().abi(), core::mem::transmute(usfilesystemrevision), core::mem::transmute(uldesiredunitallocationsize), pwszlabel.param().abi(), bforce.into(), bquickformat.into(), benablecompression.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] 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 efcb9e8ba6..f0b5d16b67 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Vss/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Vss/mod.rs @@ -330,21 +330,19 @@ impl IVssComponent { pub unsafe fn GetFileRestoreStatus(&self, pstatus: *mut VSS_FILE_RESTORE_STATUS) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetFileRestoreStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(pstatus)).ok() } - pub unsafe fn AddDifferencedFilesByLastModifyTime(&self, wszpath: P0, wszfilespec: P1, brecursive: P2, ftlastmodifytime: super::super::Foundation::FILETIME) -> windows_core::Result<()> + pub unsafe fn AddDifferencedFilesByLastModifyTime(&self, wszpath: P0, wszfilespec: P1, brecursive: bool, ftlastmodifytime: super::super::Foundation::FILETIME) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddDifferencedFilesByLastModifyTime)(windows_core::Interface::as_raw(self), wszpath.param().abi(), wszfilespec.param().abi(), brecursive.param().abi(), core::mem::transmute(ftlastmodifytime)).ok() + (windows_core::Interface::vtable(self).AddDifferencedFilesByLastModifyTime)(windows_core::Interface::as_raw(self), wszpath.param().abi(), wszfilespec.param().abi(), brecursive.into(), core::mem::transmute(ftlastmodifytime)).ok() } - pub unsafe fn AddDifferencedFilesByLastModifyLSN(&self, wszpath: P0, wszfilespec: P1, brecursive: P2, bstrlsnstring: &windows_core::BSTR) -> windows_core::Result<()> + pub unsafe fn AddDifferencedFilesByLastModifyLSN(&self, wszpath: P0, wszfilespec: P1, brecursive: bool, bstrlsnstring: &windows_core::BSTR) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddDifferencedFilesByLastModifyLSN)(windows_core::Interface::as_raw(self), wszpath.param().abi(), wszfilespec.param().abi(), brecursive.param().abi(), core::mem::transmute_copy(bstrlsnstring)).ok() + (windows_core::Interface::vtable(self).AddDifferencedFilesByLastModifyLSN)(windows_core::Interface::as_raw(self), wszpath.param().abi(), wszfilespec.param().abi(), brecursive.into(), core::mem::transmute_copy(bstrlsnstring)).ok() } pub unsafe fn GetDifferencedFilesCount(&self, pcdifferencedfiles: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDifferencedFilesCount)(windows_core::Interface::as_raw(self), core::mem::transmute(pcdifferencedfiles)).ok() @@ -1288,11 +1286,8 @@ impl core::ops::Deref for IVssDifferentialSoftwareSnapshotMgmt2 { } windows_core::imp::interface_hierarchy!(IVssDifferentialSoftwareSnapshotMgmt2, windows_core::IUnknown, IVssDifferentialSoftwareSnapshotMgmt); impl IVssDifferentialSoftwareSnapshotMgmt2 { - pub unsafe fn ChangeDiffAreaMaximumSizeEx(&self, pwszvolumename: *const u16, pwszdiffareavolumename: *const u16, llmaximumdiffspace: i64, bvolatile: P3) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).ChangeDiffAreaMaximumSizeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszvolumename), core::mem::transmute(pwszdiffareavolumename), core::mem::transmute(llmaximumdiffspace), bvolatile.param().abi()).ok() + pub unsafe fn ChangeDiffAreaMaximumSizeEx(&self, pwszvolumename: *const u16, pwszdiffareavolumename: *const u16, llmaximumdiffspace: i64, bvolatile: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ChangeDiffAreaMaximumSizeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszvolumename), core::mem::transmute(pwszdiffareavolumename), core::mem::transmute(llmaximumdiffspace), bvolatile.into()).ok() } pub unsafe fn MigrateDiffAreas(&self, pwszvolumename: *const u16, pwszdiffareavolumename: *const u16, pwsznewdiffareavolumename: *const u16) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).MigrateDiffAreas)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszvolumename), core::mem::transmute(pwszdiffareavolumename), core::mem::transmute(pwsznewdiffareavolumename)).ok() @@ -1642,11 +1637,8 @@ impl IVssFileShareSnapshotProvider { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Query)(windows_core::Interface::as_raw(self), core::mem::transmute(queriedobjectid), core::mem::transmute(equeriedobjecttype), core::mem::transmute(ereturnedobjectstype), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn DeleteSnapshots(&self, sourceobjectid: windows_core::GUID, esourceobjecttype: VSS_OBJECT_TYPE, bforcedelete: P2, pldeletedsnapshots: *mut i32, pnondeletedsnapshotid: *mut windows_core::GUID) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).DeleteSnapshots)(windows_core::Interface::as_raw(self), core::mem::transmute(sourceobjectid), core::mem::transmute(esourceobjecttype), bforcedelete.param().abi(), core::mem::transmute(pldeletedsnapshots), core::mem::transmute(pnondeletedsnapshotid)).ok() + pub unsafe fn DeleteSnapshots(&self, sourceobjectid: windows_core::GUID, esourceobjecttype: VSS_OBJECT_TYPE, bforcedelete: bool, pldeletedsnapshots: *mut i32, pnondeletedsnapshotid: *mut windows_core::GUID) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DeleteSnapshots)(windows_core::Interface::as_raw(self), core::mem::transmute(sourceobjectid), core::mem::transmute(esourceobjecttype), bforcedelete.into(), core::mem::transmute(pldeletedsnapshots), core::mem::transmute(pnondeletedsnapshotid)).ok() } pub unsafe fn BeginPrepareSnapshot(&self, snapshotsetid: windows_core::GUID, snapshotid: windows_core::GUID, pwszsharepath: *const u16, lnewcontext: i32, providerid: windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).BeginPrepareSnapshot)(windows_core::Interface::as_raw(self), core::mem::transmute(snapshotsetid), core::mem::transmute(snapshotid), core::mem::transmute(pwszsharepath), core::mem::transmute(lnewcontext), core::mem::transmute(providerid)).ok() @@ -2058,11 +2050,8 @@ impl IVssProviderNotifications { { (windows_core::Interface::vtable(self).OnLoad)(windows_core::Interface::as_raw(self), pcallback.param().abi()).ok() } - pub unsafe fn OnUnload(&self, bforceunload: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnUnload)(windows_core::Interface::as_raw(self), bforceunload.param().abi()).ok() + pub unsafe fn OnUnload(&self, bforceunload: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnUnload)(windows_core::Interface::as_raw(self), bforceunload.into()).ok() } } #[repr(C)] @@ -2212,11 +2201,8 @@ impl IVssSoftwareSnapshotProvider { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Query)(windows_core::Interface::as_raw(self), core::mem::transmute(queriedobjectid), core::mem::transmute(equeriedobjecttype), core::mem::transmute(ereturnedobjectstype), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn DeleteSnapshots(&self, sourceobjectid: windows_core::GUID, esourceobjecttype: VSS_OBJECT_TYPE, bforcedelete: P2, pldeletedsnapshots: *mut i32, pnondeletedsnapshotid: *mut windows_core::GUID) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).DeleteSnapshots)(windows_core::Interface::as_raw(self), core::mem::transmute(sourceobjectid), core::mem::transmute(esourceobjecttype), bforcedelete.param().abi(), core::mem::transmute(pldeletedsnapshots), core::mem::transmute(pnondeletedsnapshotid)).ok() + pub unsafe fn DeleteSnapshots(&self, sourceobjectid: windows_core::GUID, esourceobjecttype: VSS_OBJECT_TYPE, bforcedelete: bool, pldeletedsnapshots: *mut i32, pnondeletedsnapshotid: *mut windows_core::GUID) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DeleteSnapshots)(windows_core::Interface::as_raw(self), core::mem::transmute(sourceobjectid), core::mem::transmute(esourceobjecttype), bforcedelete.into(), core::mem::transmute(pldeletedsnapshots), core::mem::transmute(pnondeletedsnapshotid)).ok() } pub unsafe fn BeginPrepareSnapshot(&self, snapshotsetid: windows_core::GUID, snapshotid: windows_core::GUID, pwszvolumename: *const u16, lnewcontext: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).BeginPrepareSnapshot)(windows_core::Interface::as_raw(self), core::mem::transmute(snapshotsetid), core::mem::transmute(snapshotid), core::mem::transmute(pwszvolumename), core::mem::transmute(lnewcontext)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Xps/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Xps/mod.rs index 535e4c3d01..bcb7e1069b 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Xps/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Xps/mod.rs @@ -371,11 +371,8 @@ impl IXpsOMCanvas { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetUseAliasedEdgeMode)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetUseAliasedEdgeMode(&self, usealiasededgemode: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseAliasedEdgeMode)(windows_core::Interface::as_raw(self), usealiasededgemode.param().abi()).ok() + pub unsafe fn SetUseAliasedEdgeMode(&self, usealiasededgemode: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUseAliasedEdgeMode)(windows_core::Interface::as_raw(self), usealiasededgemode.into()).ok() } pub unsafe fn GetAccessibilityShortDescription(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2447,21 +2444,15 @@ impl IXpsOMGeometryFigure { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetIsClosed)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIsClosed(&self, isclosed: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIsClosed)(windows_core::Interface::as_raw(self), isclosed.param().abi()).ok() + pub unsafe fn SetIsClosed(&self, isclosed: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIsClosed)(windows_core::Interface::as_raw(self), isclosed.into()).ok() } pub unsafe fn GetIsFilled(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetIsFilled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIsFilled(&self, isfilled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIsFilled)(windows_core::Interface::as_raw(self), isfilled.param().abi()).ok() + pub unsafe fn SetIsFilled(&self, isfilled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIsFilled)(windows_core::Interface::as_raw(self), isfilled.into()).ok() } pub unsafe fn GetSegmentCount(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3239,11 +3230,8 @@ impl IXpsOMGlyphsEditor { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetIsSideways)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIsSideways(&self, issideways: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIsSideways)(windows_core::Interface::as_raw(self), issideways.param().abi()).ok() + pub unsafe fn SetIsSideways(&self, issideways: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIsSideways)(windows_core::Interface::as_raw(self), issideways.into()).ok() } pub unsafe fn GetDeviceFontName(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4380,22 +4368,20 @@ impl IXpsOMObjectFactory { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreatePackage)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CreatePackageFromFile(&self, filename: P0, reuseobjects: P1) -> windows_core::Result + pub unsafe fn CreatePackageFromFile(&self, filename: P0, reuseobjects: bool) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreatePackageFromFile)(windows_core::Interface::as_raw(self), filename.param().abi(), reuseobjects.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreatePackageFromFile)(windows_core::Interface::as_raw(self), filename.param().abi(), reuseobjects.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn CreatePackageFromStream(&self, stream: P0, reuseobjects: P1) -> windows_core::Result + pub unsafe fn CreatePackageFromStream(&self, stream: P0, reuseobjects: bool) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreatePackageFromStream)(windows_core::Interface::as_raw(self), stream.param().abi(), reuseobjects.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreatePackageFromStream)(windows_core::Interface::as_raw(self), stream.param().abi(), reuseobjects.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] pub unsafe fn CreateStoryFragmentsResource(&self, acquiredstream: P0, parturi: P1) -> windows_core::Result @@ -4477,15 +4463,14 @@ impl IXpsOMObjectFactory { (windows_core::Interface::vtable(self).CreatePage)(windows_core::Interface::as_raw(self), core::mem::transmute(pagedimensions), language.param().abi(), parturi.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] - pub unsafe fn CreatePageFromStream(&self, pagemarkupstream: P0, parturi: P1, resources: P2, reuseobjects: P3) -> windows_core::Result + pub unsafe fn CreatePageFromStream(&self, pagemarkupstream: P0, parturi: P1, resources: P2, reuseobjects: bool) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreatePageFromStream)(windows_core::Interface::as_raw(self), pagemarkupstream.param().abi(), parturi.param().abi(), resources.param().abi(), reuseobjects.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreatePageFromStream)(windows_core::Interface::as_raw(self), pagemarkupstream.param().abi(), parturi.param().abi(), resources.param().abi(), reuseobjects.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateCanvas(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4560,14 +4545,13 @@ impl IXpsOMObjectFactory { (windows_core::Interface::vtable(self).CreatePrintTicketResource)(windows_core::Interface::as_raw(self), acquiredstream.param().abi(), parturi.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] - pub unsafe fn CreateFontResource(&self, acquiredstream: P0, fontembedding: XPS_FONT_EMBEDDING, parturi: P2, isobfsourcestream: P3) -> windows_core::Result + pub unsafe fn CreateFontResource(&self, acquiredstream: P0, fontembedding: XPS_FONT_EMBEDDING, parturi: P2, isobfsourcestream: bool) -> windows_core::Result where P0: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateFontResource)(windows_core::Interface::as_raw(self), acquiredstream.param().abi(), core::mem::transmute(fontembedding), parturi.param().abi(), isobfsourcestream.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateFontResource)(windows_core::Interface::as_raw(self), acquiredstream.param().abi(), core::mem::transmute(fontembedding), parturi.param().abi(), isobfsourcestream.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateGradientStop(&self, color: *const XPS_COLOR, colorprofile: P1, offset: f32) -> windows_core::Result where @@ -4609,10 +4593,9 @@ impl IXpsOMObjectFactory { (windows_core::Interface::vtable(self).CreatePartUriCollection)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_Security", feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] - pub unsafe fn CreatePackageWriterOnFile(&self, filename: P0, securityattributes: *const super::super::Security::SECURITY_ATTRIBUTES, flagsandattributes: u32, optimizemarkupsize: P3, interleaving: XPS_INTERLEAVING, documentsequencepartname: P5, coreproperties: P6, packagethumbnail: P7, documentsequenceprintticket: P8, discardcontrolpartname: P9) -> windows_core::Result + pub unsafe fn CreatePackageWriterOnFile(&self, filename: P0, securityattributes: *const super::super::Security::SECURITY_ATTRIBUTES, flagsandattributes: u32, optimizemarkupsize: bool, interleaving: XPS_INTERLEAVING, documentsequencepartname: P5, coreproperties: P6, packagethumbnail: P7, documentsequenceprintticket: P8, discardcontrolpartname: P9) -> windows_core::Result where P0: windows_core::Param, - P3: windows_core::Param, P5: windows_core::Param, P6: windows_core::Param, P7: windows_core::Param, @@ -4620,13 +4603,12 @@ impl IXpsOMObjectFactory { P9: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreatePackageWriterOnFile)(windows_core::Interface::as_raw(self), filename.param().abi(), core::mem::transmute(securityattributes), core::mem::transmute(flagsandattributes), optimizemarkupsize.param().abi(), core::mem::transmute(interleaving), documentsequencepartname.param().abi(), coreproperties.param().abi(), packagethumbnail.param().abi(), documentsequenceprintticket.param().abi(), discardcontrolpartname.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreatePackageWriterOnFile)(windows_core::Interface::as_raw(self), filename.param().abi(), core::mem::transmute(securityattributes), core::mem::transmute(flagsandattributes), optimizemarkupsize.into(), core::mem::transmute(interleaving), documentsequencepartname.param().abi(), coreproperties.param().abi(), packagethumbnail.param().abi(), documentsequenceprintticket.param().abi(), discardcontrolpartname.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] - pub unsafe fn CreatePackageWriterOnStream(&self, outputstream: P0, optimizemarkupsize: P1, interleaving: XPS_INTERLEAVING, documentsequencepartname: P3, coreproperties: P4, packagethumbnail: P5, documentsequenceprintticket: P6, discardcontrolpartname: P7) -> windows_core::Result + pub unsafe fn CreatePackageWriterOnStream(&self, outputstream: P0, optimizemarkupsize: bool, interleaving: XPS_INTERLEAVING, documentsequencepartname: P3, coreproperties: P4, packagethumbnail: P5, documentsequenceprintticket: P6, discardcontrolpartname: P7) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, P5: windows_core::Param, @@ -4634,7 +4616,7 @@ impl IXpsOMObjectFactory { P7: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreatePackageWriterOnStream)(windows_core::Interface::as_raw(self), outputstream.param().abi(), optimizemarkupsize.param().abi(), core::mem::transmute(interleaving), documentsequencepartname.param().abi(), coreproperties.param().abi(), packagethumbnail.param().abi(), documentsequenceprintticket.param().abi(), discardcontrolpartname.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreatePackageWriterOnStream)(windows_core::Interface::as_raw(self), outputstream.param().abi(), optimizemarkupsize.into(), core::mem::transmute(interleaving), documentsequencepartname.param().abi(), coreproperties.param().abi(), packagethumbnail.param().abi(), documentsequenceprintticket.param().abi(), discardcontrolpartname.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] pub unsafe fn CreatePartUri(&self, uri: P0) -> windows_core::Result @@ -5260,10 +5242,9 @@ impl IXpsOMObjectFactory1 { (windows_core::Interface::vtable(self).ConvertJpegXRToHDPhoto)(windows_core::Interface::as_raw(self), imageresource.param().abi()).ok() } #[cfg(all(feature = "Win32_Security", feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] - pub unsafe fn CreatePackageWriterOnFile1(&self, filename: P0, securityattributes: *const super::super::Security::SECURITY_ATTRIBUTES, flagsandattributes: u32, optimizemarkupsize: P3, interleaving: XPS_INTERLEAVING, documentsequencepartname: P5, coreproperties: P6, packagethumbnail: P7, documentsequenceprintticket: P8, discardcontrolpartname: P9, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::Result + pub unsafe fn CreatePackageWriterOnFile1(&self, filename: P0, securityattributes: *const super::super::Security::SECURITY_ATTRIBUTES, flagsandattributes: u32, optimizemarkupsize: bool, interleaving: XPS_INTERLEAVING, documentsequencepartname: P5, coreproperties: P6, packagethumbnail: P7, documentsequenceprintticket: P8, discardcontrolpartname: P9, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::Result where P0: windows_core::Param, - P3: windows_core::Param, P5: windows_core::Param, P6: windows_core::Param, P7: windows_core::Param, @@ -5271,13 +5252,12 @@ impl IXpsOMObjectFactory1 { P9: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreatePackageWriterOnFile1)(windows_core::Interface::as_raw(self), filename.param().abi(), core::mem::transmute(securityattributes), core::mem::transmute(flagsandattributes), optimizemarkupsize.param().abi(), core::mem::transmute(interleaving), documentsequencepartname.param().abi(), coreproperties.param().abi(), packagethumbnail.param().abi(), documentsequenceprintticket.param().abi(), discardcontrolpartname.param().abi(), core::mem::transmute(documenttype), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreatePackageWriterOnFile1)(windows_core::Interface::as_raw(self), filename.param().abi(), core::mem::transmute(securityattributes), core::mem::transmute(flagsandattributes), optimizemarkupsize.into(), core::mem::transmute(interleaving), documentsequencepartname.param().abi(), coreproperties.param().abi(), packagethumbnail.param().abi(), documentsequenceprintticket.param().abi(), discardcontrolpartname.param().abi(), core::mem::transmute(documenttype), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] - pub unsafe fn CreatePackageWriterOnStream1(&self, outputstream: P0, optimizemarkupsize: P1, interleaving: XPS_INTERLEAVING, documentsequencepartname: P3, coreproperties: P4, packagethumbnail: P5, documentsequenceprintticket: P6, discardcontrolpartname: P7, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::Result + pub unsafe fn CreatePackageWriterOnStream1(&self, outputstream: P0, optimizemarkupsize: bool, interleaving: XPS_INTERLEAVING, documentsequencepartname: P3, coreproperties: P4, packagethumbnail: P5, documentsequenceprintticket: P6, discardcontrolpartname: P7, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, P5: windows_core::Param, @@ -5285,28 +5265,26 @@ impl IXpsOMObjectFactory1 { P7: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreatePackageWriterOnStream1)(windows_core::Interface::as_raw(self), outputstream.param().abi(), optimizemarkupsize.param().abi(), core::mem::transmute(interleaving), documentsequencepartname.param().abi(), coreproperties.param().abi(), packagethumbnail.param().abi(), documentsequenceprintticket.param().abi(), discardcontrolpartname.param().abi(), core::mem::transmute(documenttype), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreatePackageWriterOnStream1)(windows_core::Interface::as_raw(self), outputstream.param().abi(), optimizemarkupsize.into(), core::mem::transmute(interleaving), documentsequencepartname.param().abi(), coreproperties.param().abi(), packagethumbnail.param().abi(), documentsequenceprintticket.param().abi(), discardcontrolpartname.param().abi(), core::mem::transmute(documenttype), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreatePackage1(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreatePackage1)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn CreatePackageFromStream1(&self, stream: P0, reuseobjects: P1) -> windows_core::Result + pub unsafe fn CreatePackageFromStream1(&self, stream: P0, reuseobjects: bool) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreatePackageFromStream1)(windows_core::Interface::as_raw(self), stream.param().abi(), reuseobjects.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreatePackageFromStream1)(windows_core::Interface::as_raw(self), stream.param().abi(), reuseobjects.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CreatePackageFromFile1(&self, filename: P0, reuseobjects: P1) -> windows_core::Result + pub unsafe fn CreatePackageFromFile1(&self, filename: P0, reuseobjects: bool) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreatePackageFromFile1)(windows_core::Interface::as_raw(self), filename.param().abi(), reuseobjects.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreatePackageFromFile1)(windows_core::Interface::as_raw(self), filename.param().abi(), reuseobjects.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] pub unsafe fn CreatePage1(&self, pagedimensions: *const XPS_SIZE, language: P1, parturi: P2) -> windows_core::Result @@ -5318,15 +5296,14 @@ impl IXpsOMObjectFactory1 { (windows_core::Interface::vtable(self).CreatePage1)(windows_core::Interface::as_raw(self), core::mem::transmute(pagedimensions), language.param().abi(), parturi.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] - pub unsafe fn CreatePageFromStream1(&self, pagemarkupstream: P0, parturi: P1, resources: P2, reuseobjects: P3) -> windows_core::Result + pub unsafe fn CreatePageFromStream1(&self, pagemarkupstream: P0, parturi: P1, resources: P2, reuseobjects: bool) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreatePageFromStream1)(windows_core::Interface::as_raw(self), pagemarkupstream.param().abi(), parturi.param().abi(), resources.param().abi(), reuseobjects.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreatePageFromStream1)(windows_core::Interface::as_raw(self), pagemarkupstream.param().abi(), parturi.param().abi(), resources.param().abi(), reuseobjects.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] pub unsafe fn CreateRemoteDictionaryResourceFromStream1(&self, dictionarymarkupstream: P0, parturi: P1, resources: P2) -> windows_core::Result @@ -5583,20 +5560,18 @@ impl IXpsOMPackage { (windows_core::Interface::vtable(self).SetThumbnailResource)(windows_core::Interface::as_raw(self), imageresource.param().abi()).ok() } #[cfg(feature = "Win32_Security")] - pub unsafe fn WriteToFile(&self, filename: P0, securityattributes: *const super::super::Security::SECURITY_ATTRIBUTES, flagsandattributes: u32, optimizemarkupsize: P3) -> windows_core::Result<()> + pub unsafe fn WriteToFile(&self, filename: P0, securityattributes: *const super::super::Security::SECURITY_ATTRIBUTES, flagsandattributes: u32, optimizemarkupsize: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).WriteToFile)(windows_core::Interface::as_raw(self), filename.param().abi(), core::mem::transmute(securityattributes), core::mem::transmute(flagsandattributes), optimizemarkupsize.param().abi()).ok() + (windows_core::Interface::vtable(self).WriteToFile)(windows_core::Interface::as_raw(self), filename.param().abi(), core::mem::transmute(securityattributes), core::mem::transmute(flagsandattributes), optimizemarkupsize.into()).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn WriteToStream(&self, stream: P0, optimizemarkupsize: P1) -> windows_core::Result<()> + pub unsafe fn WriteToStream(&self, stream: P0, optimizemarkupsize: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).WriteToStream)(windows_core::Interface::as_raw(self), stream.param().abi(), optimizemarkupsize.param().abi()).ok() + (windows_core::Interface::vtable(self).WriteToStream)(windows_core::Interface::as_raw(self), stream.param().abi(), optimizemarkupsize.into()).ok() } } #[repr(C)] @@ -5739,20 +5714,18 @@ impl IXpsOMPackage1 { (windows_core::Interface::vtable(self).GetDocumentType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } #[cfg(feature = "Win32_Security")] - pub unsafe fn WriteToFile1(&self, filename: P0, securityattributes: *const super::super::Security::SECURITY_ATTRIBUTES, flagsandattributes: u32, optimizemarkupsize: P3, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::Result<()> + pub unsafe fn WriteToFile1(&self, filename: P0, securityattributes: *const super::super::Security::SECURITY_ATTRIBUTES, flagsandattributes: u32, optimizemarkupsize: bool, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).WriteToFile1)(windows_core::Interface::as_raw(self), filename.param().abi(), core::mem::transmute(securityattributes), core::mem::transmute(flagsandattributes), optimizemarkupsize.param().abi(), core::mem::transmute(documenttype)).ok() + (windows_core::Interface::vtable(self).WriteToFile1)(windows_core::Interface::as_raw(self), filename.param().abi(), core::mem::transmute(securityattributes), core::mem::transmute(flagsandattributes), optimizemarkupsize.into(), core::mem::transmute(documenttype)).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn WriteToStream1(&self, outputstream: P0, optimizemarkupsize: P1, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::Result<()> + pub unsafe fn WriteToStream1(&self, outputstream: P0, optimizemarkupsize: bool, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).WriteToStream1)(windows_core::Interface::as_raw(self), outputstream.param().abi(), optimizemarkupsize.param().abi(), core::mem::transmute(documenttype)).ok() + (windows_core::Interface::vtable(self).WriteToStream1)(windows_core::Interface::as_raw(self), outputstream.param().abi(), optimizemarkupsize.into(), core::mem::transmute(documenttype)).ok() } } #[repr(C)] @@ -6085,11 +6058,8 @@ impl IXpsOMPage { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetIsHyperlinkTarget)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIsHyperlinkTarget(&self, ishyperlinktarget: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIsHyperlinkTarget)(windows_core::Interface::as_raw(self), ishyperlinktarget.param().abi()).ok() + pub unsafe fn SetIsHyperlinkTarget(&self, ishyperlinktarget: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIsHyperlinkTarget)(windows_core::Interface::as_raw(self), ishyperlinktarget.into()).ok() } pub unsafe fn GetDictionary(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6116,12 +6086,11 @@ impl IXpsOMPage { (windows_core::Interface::vtable(self).SetDictionaryResource)(windows_core::Interface::as_raw(self), remotedictionaryresource.param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn Write(&self, stream: P0, optimizemarkupsize: P1) -> windows_core::Result<()> + pub unsafe fn Write(&self, stream: P0, optimizemarkupsize: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Write)(windows_core::Interface::as_raw(self), stream.param().abi(), optimizemarkupsize.param().abi()).ok() + (windows_core::Interface::vtable(self).Write)(windows_core::Interface::as_raw(self), stream.param().abi(), optimizemarkupsize.into()).ok() } pub unsafe fn GenerateUnusedLookupKey(&self, r#type: XPS_OBJECT_TYPE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6401,12 +6370,11 @@ impl IXpsOMPage1 { (windows_core::Interface::vtable(self).GetDocumentType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn Write1(&self, stream: P0, optimizemarkupsize: P1, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::Result<()> + pub unsafe fn Write1(&self, stream: P0, optimizemarkupsize: bool, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Write1)(windows_core::Interface::as_raw(self), stream.param().abi(), optimizemarkupsize.param().abi(), core::mem::transmute(documenttype)).ok() + (windows_core::Interface::vtable(self).Write1)(windows_core::Interface::as_raw(self), stream.param().abi(), optimizemarkupsize.into(), core::mem::transmute(documenttype)).ok() } } #[repr(C)] @@ -7163,11 +7131,8 @@ impl IXpsOMPath { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetSnapsToPixels)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetSnapsToPixels(&self, snapstopixels: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetSnapsToPixels)(windows_core::Interface::as_raw(self), snapstopixels.param().abi()).ok() + pub unsafe fn SetSnapsToPixels(&self, snapstopixels: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetSnapsToPixels)(windows_core::Interface::as_raw(self), snapstopixels.into()).ok() } pub unsafe fn GetStrokeBrush(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8911,11 +8876,8 @@ impl IXpsOMVisual { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetIsHyperlinkTarget)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIsHyperlinkTarget(&self, ishyperlink: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIsHyperlinkTarget)(windows_core::Interface::as_raw(self), ishyperlink.param().abi()).ok() + pub unsafe fn SetIsHyperlinkTarget(&self, ishyperlink: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIsHyperlinkTarget)(windows_core::Interface::as_raw(self), ishyperlink.into()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetHyperlinkNavigateUri(&self) -> windows_core::Result { diff --git a/crates/libs/windows/src/Windows/Win32/System/AddressBook/mod.rs b/crates/libs/windows/src/Windows/Win32/System/AddressBook/mod.rs index 2c3be0e38c..a091cd627f 100644 --- a/crates/libs/windows/src/Windows/Win32/System/AddressBook/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/AddressBook/mod.rs @@ -33,12 +33,9 @@ pub unsafe fn DeregisterIdleRoutine(ftg: *mut core::ffi::c_void) { DeregisterIdleRoutine(core::mem::transmute(ftg)) } #[inline] -pub unsafe fn EnableIdleRoutine(ftg: *mut core::ffi::c_void, fenable: P1) -where - P1: windows_core::Param, -{ +pub unsafe fn EnableIdleRoutine(ftg: *mut core::ffi::c_void, fenable: bool) { windows_targets::link!("mapi32.dll" "system" fn EnableIdleRoutine(ftg : *mut core::ffi::c_void, fenable : super::super::Foundation:: BOOL)); - EnableIdleRoutine(core::mem::transmute(ftg), fenable.param().abi()) + EnableIdleRoutine(core::mem::transmute(ftg), fenable.into()) } #[inline] pub unsafe fn FEqualNames(lpname1: *mut MAPINAMEID, lpname2: *mut MAPINAMEID) -> super::super::Foundation::BOOL { @@ -3184,9 +3181,6 @@ pub type LPOPENSTREAMONFILE = Option, cbsize: u32, lppbuffer: *mut *mut core::ffi::c_void) -> i32>; pub type LPWABALLOCATEMORE = Option, cbsize: u32, lpobject: *mut core::ffi::c_void, lppbuffer: *mut *mut core::ffi::c_void) -> i32>; pub type LPWABFREEBUFFER = Option, lpbuffer: *mut core::ffi::c_void) -> u32>; diff --git a/crates/libs/windows/src/Windows/Win32/System/Antimalware/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Antimalware/mod.rs index 19931c5b9a..253c1b0724 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Antimalware/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Antimalware/mod.rs @@ -206,9 +206,6 @@ pub const CAntimalware: windows_core::GUID = windows_core::GUID::from_u128(0xfdb #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HAMSICONTEXT(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HAMSICONTEXT { - type TypeKind = windows_core::CopyType; -} impl HAMSICONTEXT { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -222,9 +219,6 @@ impl Default for HAMSICONTEXT { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HAMSISESSION(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HAMSISESSION { - type TypeKind = windows_core::CopyType; -} impl HAMSISESSION { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/System/ApplicationInstallationAndServicing/mod.rs b/crates/libs/windows/src/Windows/Win32/System/ApplicationInstallationAndServicing/mod.rs index cb59424366..a1096244d1 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ApplicationInstallationAndServicing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ApplicationInstallationAndServicing/mod.rs @@ -426,23 +426,21 @@ where } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn MsiAdvertiseScriptA(szscriptfile: P0, dwflags: u32, phregdata: Option<*const super::Registry::HKEY>, fremoveitems: P3) -> u32 +pub unsafe fn MsiAdvertiseScriptA(szscriptfile: P0, dwflags: u32, phregdata: Option<*const super::Registry::HKEY>, fremoveitems: bool) -> u32 where P0: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiAdvertiseScriptA(szscriptfile : windows_core::PCSTR, dwflags : u32, phregdata : *const super::Registry:: HKEY, fremoveitems : super::super::Foundation:: BOOL) -> u32); - MsiAdvertiseScriptA(szscriptfile.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(phregdata.unwrap_or(core::mem::zeroed())), fremoveitems.param().abi()) + MsiAdvertiseScriptA(szscriptfile.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(phregdata.unwrap_or(core::mem::zeroed())), fremoveitems.into()) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn MsiAdvertiseScriptW(szscriptfile: P0, dwflags: u32, phregdata: Option<*const super::Registry::HKEY>, fremoveitems: P3) -> u32 +pub unsafe fn MsiAdvertiseScriptW(szscriptfile: P0, dwflags: u32, phregdata: Option<*const super::Registry::HKEY>, fremoveitems: bool) -> u32 where P0: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiAdvertiseScriptW(szscriptfile : windows_core::PCWSTR, dwflags : u32, phregdata : *const super::Registry:: HKEY, fremoveitems : super::super::Foundation:: BOOL) -> u32); - MsiAdvertiseScriptW(szscriptfile.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(phregdata.unwrap_or(core::mem::zeroed())), fremoveitems.param().abi()) + MsiAdvertiseScriptW(szscriptfile.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(phregdata.unwrap_or(core::mem::zeroed())), fremoveitems.into()) } #[inline] pub unsafe fn MsiApplyMultiplePatchesA(szpatchpackages: P0, szproductcode: P1, szpropertieslist: P2) -> u32 @@ -1744,27 +1742,23 @@ where } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn MsiProcessAdvertiseScriptA(szscriptfile: P0, sziconfolder: P1, hregdata: Option, fshortcuts: P3, fremoveitems: P4) -> u32 +pub unsafe fn MsiProcessAdvertiseScriptA(szscriptfile: P0, sziconfolder: P1, hregdata: Option, fshortcuts: bool, fremoveitems: bool) -> u32 where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiProcessAdvertiseScriptA(szscriptfile : windows_core::PCSTR, sziconfolder : windows_core::PCSTR, hregdata : super::Registry:: HKEY, fshortcuts : super::super::Foundation:: BOOL, fremoveitems : super::super::Foundation:: BOOL) -> u32); - MsiProcessAdvertiseScriptA(szscriptfile.param().abi(), sziconfolder.param().abi(), core::mem::transmute(hregdata.unwrap_or(core::mem::zeroed())), fshortcuts.param().abi(), fremoveitems.param().abi()) + MsiProcessAdvertiseScriptA(szscriptfile.param().abi(), sziconfolder.param().abi(), core::mem::transmute(hregdata.unwrap_or(core::mem::zeroed())), fshortcuts.into(), fremoveitems.into()) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn MsiProcessAdvertiseScriptW(szscriptfile: P0, sziconfolder: P1, hregdata: Option, fshortcuts: P3, fremoveitems: P4) -> u32 +pub unsafe fn MsiProcessAdvertiseScriptW(szscriptfile: P0, sziconfolder: P1, hregdata: Option, fshortcuts: bool, fremoveitems: bool) -> u32 where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiProcessAdvertiseScriptW(szscriptfile : windows_core::PCWSTR, sziconfolder : windows_core::PCWSTR, hregdata : super::Registry:: HKEY, fshortcuts : super::super::Foundation:: BOOL, fremoveitems : super::super::Foundation:: BOOL) -> u32); - MsiProcessAdvertiseScriptW(szscriptfile.param().abi(), sziconfolder.param().abi(), core::mem::transmute(hregdata.unwrap_or(core::mem::zeroed())), fshortcuts.param().abi(), fremoveitems.param().abi()) + MsiProcessAdvertiseScriptW(szscriptfile.param().abi(), sziconfolder.param().abi(), core::mem::transmute(hregdata.unwrap_or(core::mem::zeroed())), fshortcuts.into(), fremoveitems.into()) } #[inline] pub unsafe fn MsiProcessMessage(hinstall: MSIHANDLE, emessagetype: INSTALLMESSAGE, hrecord: MSIHANDLE) -> i32 { @@ -2142,12 +2136,9 @@ pub unsafe fn MsiSetInternalUI(dwuilevel: INSTALLUILEVEL, phwnd: Option<*mut sup MsiSetInternalUI(core::mem::transmute(dwuilevel), core::mem::transmute(phwnd.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn MsiSetMode(hinstall: MSIHANDLE, erunmode: MSIRUNMODE, fstate: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn MsiSetMode(hinstall: MSIHANDLE, erunmode: MSIRUNMODE, fstate: bool) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiSetMode(hinstall : MSIHANDLE, erunmode : MSIRUNMODE, fstate : super::super::Foundation:: BOOL) -> u32); - MsiSetMode(core::mem::transmute(hinstall), core::mem::transmute(erunmode), fstate.param().abi()) + MsiSetMode(core::mem::transmute(hinstall), core::mem::transmute(erunmode), fstate.into()) } #[inline] pub unsafe fn MsiSetPropertyA(hinstall: MSIHANDLE, szname: P1, szvalue: P2) -> u32 @@ -4691,26 +4682,17 @@ impl IPMApplicationInfo { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AppPlatMinorVersionLightUp)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn set_UpdateAvailable(&self, isupdateavailable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).set_UpdateAvailable)(windows_core::Interface::as_raw(self), isupdateavailable.param().abi()).ok() + pub unsafe fn set_UpdateAvailable(&self, isupdateavailable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).set_UpdateAvailable)(windows_core::Interface::as_raw(self), isupdateavailable.into()).ok() } - pub unsafe fn set_NotificationState(&self, isnotified: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).set_NotificationState)(windows_core::Interface::as_raw(self), isnotified.param().abi()).ok() + pub unsafe fn set_NotificationState(&self, isnotified: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).set_NotificationState)(windows_core::Interface::as_raw(self), isnotified.into()).ok() } pub unsafe fn set_IconPath(&self, appiconpath: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).set_IconPath)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(appiconpath)).ok() } - pub unsafe fn set_UninstallableState(&self, isuninstallable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).set_UninstallableState)(windows_core::Interface::as_raw(self), isuninstallable.param().abi()).ok() + pub unsafe fn set_UninstallableState(&self, isuninstallable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).set_UninstallableState)(windows_core::Interface::as_raw(self), isuninstallable.into()).ok() } pub unsafe fn IsPinableOnKidZone(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4732,17 +4714,11 @@ impl IPMApplicationInfo { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsOptoutBackupRestore)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn set_EnterpriseDisabled(&self, isdisabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).set_EnterpriseDisabled)(windows_core::Interface::as_raw(self), isdisabled.param().abi()).ok() + pub unsafe fn set_EnterpriseDisabled(&self, isdisabled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).set_EnterpriseDisabled)(windows_core::Interface::as_raw(self), isdisabled.into()).ok() } - pub unsafe fn set_EnterpriseUninstallable(&self, isuninstallable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).set_EnterpriseUninstallable)(windows_core::Interface::as_raw(self), isuninstallable.param().abi()).ok() + pub unsafe fn set_EnterpriseUninstallable(&self, isuninstallable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).set_EnterpriseUninstallable)(windows_core::Interface::as_raw(self), isuninstallable.into()).ok() } pub unsafe fn EnterpriseDisabled(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4791,11 +4767,8 @@ impl IPMApplicationInfo { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsFullyPreInstall)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn set_IsMdilMaintenanceNeeded(&self, fismdilmaintenanceneeded: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).set_IsMdilMaintenanceNeeded)(windows_core::Interface::as_raw(self), fismdilmaintenanceneeded.param().abi()).ok() + pub unsafe fn set_IsMdilMaintenanceNeeded(&self, fismdilmaintenanceneeded: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).set_IsMdilMaintenanceNeeded)(windows_core::Interface::as_raw(self), fismdilmaintenanceneeded.into()).ok() } pub unsafe fn set_Title(&self, apptitle: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).set_Title)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(apptitle)).ok() @@ -5493,17 +5466,11 @@ impl IPMBackgroundServiceAgentInfo { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsLaunchOnBoot)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn set_IsScheduled(&self, isscheduled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).set_IsScheduled)(windows_core::Interface::as_raw(self), isscheduled.param().abi()).ok() + pub unsafe fn set_IsScheduled(&self, isscheduled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).set_IsScheduled)(windows_core::Interface::as_raw(self), isscheduled.into()).ok() } - pub unsafe fn set_IsScheduleAllowed(&self, isscheduleallowed: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).set_IsScheduleAllowed)(windows_core::Interface::as_raw(self), isscheduleallowed.param().abi()).ok() + pub unsafe fn set_IsScheduleAllowed(&self, isscheduleallowed: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).set_IsScheduleAllowed)(windows_core::Interface::as_raw(self), isscheduleallowed.into()).ok() } } #[repr(C)] @@ -7040,11 +7007,8 @@ impl IPMLiveTileJobInfo { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).RunForever)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn set_RunForever(&self, frunforever: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).set_RunForever)(windows_core::Interface::as_raw(self), frunforever.param().abi()).ok() + pub unsafe fn set_RunForever(&self, frunforever: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).set_RunForever)(windows_core::Interface::as_raw(self), frunforever.into()).ok() } pub unsafe fn MaxRunCount(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -7783,17 +7747,11 @@ impl IPMTileInfo { pub unsafe fn set_HubPosition(&self, hubtype: PM_TILE_HUBTYPE, position: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).set_HubPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(hubtype), core::mem::transmute(position)).ok() } - pub unsafe fn set_NotifiedState(&self, notified: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).set_NotifiedState)(windows_core::Interface::as_raw(self), notified.param().abi()).ok() + pub unsafe fn set_NotifiedState(&self, notified: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).set_NotifiedState)(windows_core::Interface::as_raw(self), notified.into()).ok() } - pub unsafe fn set_HubPinnedState(&self, hubtype: PM_TILE_HUBTYPE, pinned: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).set_HubPinnedState)(windows_core::Interface::as_raw(self), core::mem::transmute(hubtype), pinned.param().abi()).ok() + pub unsafe fn set_HubPinnedState(&self, hubtype: PM_TILE_HUBTYPE, pinned: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).set_HubPinnedState)(windows_core::Interface::as_raw(self), core::mem::transmute(hubtype), pinned.into()).ok() } pub unsafe fn set_HubTileSize(&self, hubtype: PM_TILE_HUBTYPE, size: PM_TILE_SIZE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).set_HubTileSize)(windows_core::Interface::as_raw(self), core::mem::transmute(hubtype), core::mem::transmute(size)).ok() @@ -7812,17 +7770,11 @@ impl IPMTileInfo { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsAutoRestoreDisabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn set_IsRestoring(&self, restoring: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).set_IsRestoring)(windows_core::Interface::as_raw(self), restoring.param().abi()).ok() + pub unsafe fn set_IsRestoring(&self, restoring: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).set_IsRestoring)(windows_core::Interface::as_raw(self), restoring.into()).ok() } - pub unsafe fn set_IsAutoRestoreDisabled(&self, autorestoredisabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).set_IsAutoRestoreDisabled)(windows_core::Interface::as_raw(self), autorestoredisabled.param().abi()).ok() + pub unsafe fn set_IsAutoRestoreDisabled(&self, autorestoredisabled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).set_IsAutoRestoreDisabled)(windows_core::Interface::as_raw(self), autorestoredisabled.into()).ok() } } #[repr(C)] @@ -8653,9 +8605,6 @@ impl Default for MSIFILEHASHINFO { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct MSIHANDLE(pub u32); -impl windows_core::TypeKind for MSIHANDLE { - type TypeKind = windows_core::CopyType; -} impl MSIHANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 diff --git a/crates/libs/windows/src/Windows/Win32/System/ClrHosting/mod.rs b/crates/libs/windows/src/Windows/Win32/System/ClrHosting/mod.rs index 4a5b58e45e..5e61ca4ad2 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ClrHosting/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ClrHosting/mod.rs @@ -1753,11 +1753,8 @@ impl ICLRRuntimeHost { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetCLRControl)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn UnloadAppDomain(&self, dwappdomainid: u32, fwaituntildone: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).UnloadAppDomain)(windows_core::Interface::as_raw(self), core::mem::transmute(dwappdomainid), fwaituntildone.param().abi()).ok() + pub unsafe fn UnloadAppDomain(&self, dwappdomainid: u32, fwaituntildone: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).UnloadAppDomain)(windows_core::Interface::as_raw(self), core::mem::transmute(dwappdomainid), fwaituntildone.into()).ok() } pub unsafe fn ExecuteInAppDomain(&self, dwappdomainid: u32, pcallback: FExecuteInAppDomainCallback, cookie: *const core::ffi::c_void) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ExecuteInAppDomain)(windows_core::Interface::as_raw(self), core::mem::transmute(dwappdomainid), core::mem::transmute(pcallback), core::mem::transmute(cookie)).ok() @@ -2181,13 +2178,12 @@ impl ICLRStrongName { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).StrongNameSignatureVerification)(windows_core::Interface::as_raw(self), pwzfilepath.param().abi(), core::mem::transmute(dwinflags), &mut result__).map(|| result__) } - pub unsafe fn StrongNameSignatureVerificationEx(&self, pwzfilepath: P0, fforceverification: P1) -> windows_core::Result + pub unsafe fn StrongNameSignatureVerificationEx(&self, pwzfilepath: P0, fforceverification: bool) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).StrongNameSignatureVerificationEx)(windows_core::Interface::as_raw(self), pwzfilepath.param().abi(), fforceverification.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).StrongNameSignatureVerificationEx)(windows_core::Interface::as_raw(self), pwzfilepath.param().abi(), fforceverification.into(), &mut result__).map(|| result__) } pub unsafe fn StrongNameSignatureVerificationFromImage(&self, pbbase: *const u8, dwlength: u32, dwinflags: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2440,13 +2436,12 @@ impl ICLRStrongName2 { { (windows_core::Interface::vtable(self).StrongNameGetPublicKeyEx)(windows_core::Interface::as_raw(self), pwzkeycontainer.param().abi(), core::mem::transmute(pbkeyblob), core::mem::transmute(cbkeyblob), core::mem::transmute(ppbpublickeyblob), core::mem::transmute(pcbpublickeyblob), core::mem::transmute(uhashalgid), core::mem::transmute(ureserved)).ok() } - pub unsafe fn StrongNameSignatureVerificationEx2(&self, wszfilepath: P0, fforceverification: P1, pbecmapublickey: *const u8, cbecmapublickey: u32) -> windows_core::Result + pub unsafe fn StrongNameSignatureVerificationEx2(&self, wszfilepath: P0, fforceverification: bool, pbecmapublickey: *const u8, cbecmapublickey: u32) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).StrongNameSignatureVerificationEx2)(windows_core::Interface::as_raw(self), wszfilepath.param().abi(), fforceverification.param().abi(), core::mem::transmute(pbecmapublickey), core::mem::transmute(cbecmapublickey), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).StrongNameSignatureVerificationEx2)(windows_core::Interface::as_raw(self), wszfilepath.param().abi(), fforceverification.into(), core::mem::transmute(pbecmapublickey), core::mem::transmute(cbecmapublickey), &mut result__).map(|| result__) } } #[repr(C)] @@ -2641,11 +2636,8 @@ impl ICLRTask { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetMemStats)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn Reset(&self, ffull: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self), ffull.param().abi()).ok() + pub unsafe fn Reset(&self, ffull: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self), ffull.into()).ok() } pub unsafe fn ExitTask(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ExitTask)(windows_core::Interface::as_raw(self)).ok() @@ -3337,24 +3329,18 @@ windows_core::imp::define_interface!(ICorThreadpool, ICorThreadpool_Vtbl, 0x8468 windows_core::imp::interface_hierarchy!(ICorThreadpool, windows_core::IUnknown); impl ICorThreadpool { #[cfg(feature = "Win32_System_Threading")] - pub unsafe fn CorRegisterWaitForSingleObject(&self, phnewwaitobject: *const super::super::Foundation::HANDLE, hwaitobject: super::super::Foundation::HANDLE, callback: super::Threading::WAITORTIMERCALLBACK, context: *const core::ffi::c_void, timeout: u32, executeonlyonce: P5) -> windows_core::Result - where - P5: windows_core::Param, - { + pub unsafe fn CorRegisterWaitForSingleObject(&self, phnewwaitobject: *const super::super::Foundation::HANDLE, hwaitobject: super::super::Foundation::HANDLE, callback: super::Threading::WAITORTIMERCALLBACK, context: *const core::ffi::c_void, timeout: u32, executeonlyonce: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CorRegisterWaitForSingleObject)(windows_core::Interface::as_raw(self), core::mem::transmute(phnewwaitobject), core::mem::transmute(hwaitobject), core::mem::transmute(callback), core::mem::transmute(context), core::mem::transmute(timeout), executeonlyonce.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CorRegisterWaitForSingleObject)(windows_core::Interface::as_raw(self), core::mem::transmute(phnewwaitobject), core::mem::transmute(hwaitobject), core::mem::transmute(callback), core::mem::transmute(context), core::mem::transmute(timeout), executeonlyonce.into(), &mut result__).map(|| result__) } pub unsafe fn CorUnregisterWait(&self, hwaitobject: super::super::Foundation::HANDLE, completionevent: super::super::Foundation::HANDLE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CorUnregisterWait)(windows_core::Interface::as_raw(self), core::mem::transmute(hwaitobject), core::mem::transmute(completionevent), &mut result__).map(|| result__) } #[cfg(feature = "Win32_System_Threading")] - pub unsafe fn CorQueueUserWorkItem(&self, function: super::Threading::LPTHREAD_START_ROUTINE, context: *const core::ffi::c_void, executeonlyonce: P2) -> windows_core::Result - where - P2: windows_core::Param, - { + pub unsafe fn CorQueueUserWorkItem(&self, function: super::Threading::LPTHREAD_START_ROUTINE, context: *const core::ffi::c_void, executeonlyonce: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CorQueueUserWorkItem)(windows_core::Interface::as_raw(self), core::mem::transmute(function), core::mem::transmute(context), executeonlyonce.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CorQueueUserWorkItem)(windows_core::Interface::as_raw(self), core::mem::transmute(function), core::mem::transmute(context), executeonlyonce.into(), &mut result__).map(|| result__) } #[cfg(feature = "Win32_System_Threading")] pub unsafe fn CorCreateTimer(&self, phnewtimer: *const super::super::Foundation::HANDLE, callback: super::Threading::WAITORTIMERCALLBACK, parameter: *const core::ffi::c_void, duetime: u32, period: u32) -> windows_core::Result { @@ -4623,12 +4609,9 @@ impl IHostSecurityManager { pub unsafe fn RevertToSelf(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RevertToSelf)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn OpenThreadToken(&self, dwdesiredaccess: u32, bopenasself: P1) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn OpenThreadToken(&self, dwdesiredaccess: u32, bopenasself: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).OpenThreadToken)(windows_core::Interface::as_raw(self), core::mem::transmute(dwdesiredaccess), bopenasself.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).OpenThreadToken)(windows_core::Interface::as_raw(self), core::mem::transmute(dwdesiredaccess), bopenasself.into(), &mut result__).map(|| result__) } pub unsafe fn SetThreadToken(&self, htoken: super::super::Foundation::HANDLE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetThreadToken)(windows_core::Interface::as_raw(self), core::mem::transmute(htoken)).ok() @@ -4784,12 +4767,9 @@ impl IHostSyncManager { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateAutoEvent)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CreateManualEvent(&self, binitialstate: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn CreateManualEvent(&self, binitialstate: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateManualEvent)(windows_core::Interface::as_raw(self), binitialstate.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateManualEvent)(windows_core::Interface::as_raw(self), binitialstate.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateMonitorEvent(&self, cookie: usize) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4799,12 +4779,9 @@ impl IHostSyncManager { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateRWLockWriterEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(cookie), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CreateRWLockReaderEvent(&self, binitialstate: P0, cookie: usize) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn CreateRWLockReaderEvent(&self, binitialstate: bool, cookie: usize) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateRWLockReaderEvent)(windows_core::Interface::as_raw(self), binitialstate.param().abi(), core::mem::transmute(cookie), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateRWLockReaderEvent)(windows_core::Interface::as_raw(self), binitialstate.into(), core::mem::transmute(cookie), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateSemaphoreA(&self, dwinitial: u32, dwmax: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Win32/System/Com/CallObj/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/CallObj/mod.rs index 30ddf7e1aa..5f15f38fa2 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/CallObj/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/CallObj/mod.rs @@ -397,12 +397,8 @@ impl windows_core::RuntimeName for ICallFrameEvents {} windows_core::imp::define_interface!(ICallFrameWalker, ICallFrameWalker_Vtbl, 0x08b23919_392d_11d2_b8a4_00c04fb9618a); windows_core::imp::interface_hierarchy!(ICallFrameWalker, windows_core::IUnknown); impl ICallFrameWalker { - pub unsafe fn OnWalkInterface(&self, iid: *const windows_core::GUID, ppvinterface: *const *const core::ffi::c_void, fin: P2, fout: P3) -> windows_core::Result<()> - where - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnWalkInterface)(windows_core::Interface::as_raw(self), core::mem::transmute(iid), core::mem::transmute(ppvinterface), fin.param().abi(), fout.param().abi()).ok() + pub unsafe fn OnWalkInterface(&self, iid: *const windows_core::GUID, ppvinterface: *const *const core::ffi::c_void, fin: bool, fout: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnWalkInterface)(windows_core::Interface::as_raw(self), core::mem::transmute(iid), core::mem::transmute(ppvinterface), fin.into(), fout.into()).ok() } } #[repr(C)] @@ -554,11 +550,8 @@ impl windows_core::RuntimeName for ICallInterceptor {} windows_core::imp::define_interface!(ICallUnmarshal, ICallUnmarshal_Vtbl, 0x5333b003_2e42_11d2_b89d_00c04fb9618a); windows_core::imp::interface_hierarchy!(ICallUnmarshal, windows_core::IUnknown); impl ICallUnmarshal { - pub unsafe fn Unmarshal(&self, imethod: u32, pbuffer: &[u8], fforcebuffercopy: P3, datarep: u32, pcontext: *const CALLFRAME_MARSHALCONTEXT, pcbunmarshalled: *mut u32, ppframe: *mut Option) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).Unmarshal)(windows_core::Interface::as_raw(self), core::mem::transmute(imethod), core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), fforcebuffercopy.param().abi(), core::mem::transmute(datarep), core::mem::transmute(pcontext), core::mem::transmute(pcbunmarshalled), core::mem::transmute(ppframe)).ok() + pub unsafe fn Unmarshal(&self, imethod: u32, pbuffer: &[u8], fforcebuffercopy: bool, datarep: u32, pcontext: *const CALLFRAME_MARSHALCONTEXT, pcbunmarshalled: *mut u32, ppframe: *mut Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Unmarshal)(windows_core::Interface::as_raw(self), core::mem::transmute(imethod), core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), fforcebuffercopy.into(), core::mem::transmute(datarep), core::mem::transmute(pcontext), core::mem::transmute(pcbunmarshalled), core::mem::transmute(ppframe)).ok() } pub unsafe fn ReleaseMarshalData(&self, imethod: u32, pbuffer: &[u8], ibfirstrelease: u32, datarep: u32, pcontext: *const CALLFRAME_MARSHALCONTEXT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReleaseMarshalData)(windows_core::Interface::as_raw(self), core::mem::transmute(imethod), core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), core::mem::transmute(ibfirstrelease), core::mem::transmute(datarep), core::mem::transmute(pcontext)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/System/Com/ChannelCredentials/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/ChannelCredentials/mod.rs index 00cfb77e46..0b4f8c2c73 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/ChannelCredentials/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/ChannelCredentials/mod.rs @@ -7,11 +7,8 @@ impl core::ops::Deref for IChannelCredentials { } windows_core::imp::interface_hierarchy!(IChannelCredentials, windows_core::IUnknown, super::IDispatch); impl IChannelCredentials { - pub unsafe fn SetWindowsCredential(&self, domain: &windows_core::BSTR, username: &windows_core::BSTR, password: &windows_core::BSTR, impersonationlevel: i32, allowntlm: P4) -> windows_core::Result<()> - where - P4: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetWindowsCredential)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(domain), core::mem::transmute_copy(username), core::mem::transmute_copy(password), core::mem::transmute(impersonationlevel), allowntlm.param().abi()).ok() + pub unsafe fn SetWindowsCredential(&self, domain: &windows_core::BSTR, username: &windows_core::BSTR, password: &windows_core::BSTR, impersonationlevel: i32, allowntlm: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetWindowsCredential)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(domain), core::mem::transmute_copy(username), core::mem::transmute_copy(password), core::mem::transmute(impersonationlevel), allowntlm.into()).ok() } pub unsafe fn SetUserNameCredential(&self, username: &windows_core::BSTR, password: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetUserNameCredential)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(username), core::mem::transmute_copy(password)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/System/Com/Events/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/Events/mod.rs index ded241dff2..7845552d3a 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/Events/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/Events/mod.rs @@ -355,21 +355,15 @@ impl IEventClass2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AllowInprocActivation)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAllowInprocActivation(&self, fallowinprocactivation: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllowInprocActivation)(windows_core::Interface::as_raw(self), fallowinprocactivation.param().abi()).ok() + pub unsafe fn SetAllowInprocActivation(&self, fallowinprocactivation: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllowInprocActivation)(windows_core::Interface::as_raw(self), fallowinprocactivation.into()).ok() } pub unsafe fn FireInParallel(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).FireInParallel)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetFireInParallel(&self, ffireinparallel: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetFireInParallel)(windows_core::Interface::as_raw(self), ffireinparallel.param().abi()).ok() + pub unsafe fn SetFireInParallel(&self, ffireinparallel: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetFireInParallel)(windows_core::Interface::as_raw(self), ffireinparallel.into()).ok() } } #[repr(C)] @@ -491,11 +485,8 @@ impl IEventControl { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AllowInprocActivation)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAllowInprocActivation(&self, fallowinprocactivation: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllowInprocActivation)(windows_core::Interface::as_raw(self), fallowinprocactivation.param().abi()).ok() + pub unsafe fn SetAllowInprocActivation(&self, fallowinprocactivation: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllowInprocActivation)(windows_core::Interface::as_raw(self), fallowinprocactivation.into()).ok() } pub unsafe fn GetSubscriptions(&self, methodname: &windows_core::BSTR, optionalcriteria: &windows_core::BSTR, optionalerrorindex: *const i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1181,11 +1172,8 @@ impl IEventSubscription { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).PerUser)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetPerUser(&self, fperuser: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPerUser)(windows_core::Interface::as_raw(self), fperuser.param().abi()).ok() + pub unsafe fn SetPerUser(&self, fperuser: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPerUser)(windows_core::Interface::as_raw(self), fperuser.into()).ok() } pub unsafe fn OwnerSID(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1198,11 +1186,8 @@ impl IEventSubscription { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, fenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), fenabled.param().abi()).ok() + pub unsafe fn SetEnabled(&self, fenabled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), fenabled.into()).ok() } pub unsafe fn Description(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1812,21 +1797,15 @@ impl IMultiInterfaceEventControl { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AllowInprocActivation)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAllowInprocActivation(&self, fallowinprocactivation: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllowInprocActivation)(windows_core::Interface::as_raw(self), fallowinprocactivation.param().abi()).ok() + pub unsafe fn SetAllowInprocActivation(&self, fallowinprocactivation: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllowInprocActivation)(windows_core::Interface::as_raw(self), fallowinprocactivation.into()).ok() } pub unsafe fn FireInParallel(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).FireInParallel)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetFireInParallel(&self, ffireinparallel: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetFireInParallel)(windows_core::Interface::as_raw(self), ffireinparallel.param().abi()).ok() + pub unsafe fn SetFireInParallel(&self, ffireinparallel: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetFireInParallel)(windows_core::Interface::as_raw(self), ffireinparallel.into()).ok() } } #[repr(C)] 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 b3a379129d..715d2b165c 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 @@ -33,22 +33,16 @@ where CoGetInterfaceAndReleaseStream(pstm.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn CreateILockBytesOnHGlobal(hglobal: Option, fdeleteonrelease: P1) -> windows_core::Result -where - P1: windows_core::Param, -{ +pub unsafe fn CreateILockBytesOnHGlobal(hglobal: Option, fdeleteonrelease: bool) -> windows_core::Result { windows_targets::link!("ole32.dll" "system" fn CreateILockBytesOnHGlobal(hglobal : super::super::super::Foundation:: HGLOBAL, fdeleteonrelease : super::super::super::Foundation:: BOOL, pplkbyt : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - CreateILockBytesOnHGlobal(core::mem::transmute(hglobal.unwrap_or(core::mem::zeroed())), fdeleteonrelease.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + CreateILockBytesOnHGlobal(core::mem::transmute(hglobal.unwrap_or(core::mem::zeroed())), fdeleteonrelease.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn CreateStreamOnHGlobal(hglobal: super::super::super::Foundation::HGLOBAL, fdeleteonrelease: P1) -> windows_core::Result -where - P1: windows_core::Param, -{ +pub unsafe fn CreateStreamOnHGlobal(hglobal: super::super::super::Foundation::HGLOBAL, fdeleteonrelease: bool) -> windows_core::Result { windows_targets::link!("ole32.dll" "system" fn CreateStreamOnHGlobal(hglobal : super::super::super::Foundation:: HGLOBAL, fdeleteonrelease : super::super::super::Foundation:: BOOL, ppstm : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - CreateStreamOnHGlobal(core::mem::transmute(hglobal), fdeleteonrelease.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + CreateStreamOnHGlobal(core::mem::transmute(hglobal), fdeleteonrelease.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn FmtIdToPropStgName(pfmtid: *const windows_core::GUID, oszname: windows_core::PWSTR) -> windows_core::Result<()> { @@ -389,12 +383,9 @@ pub unsafe fn PropVariantToBooleanVectorAlloc(propvar: *const PROPVARIANT, pprgf } #[cfg(feature = "Win32_System_Variant")] #[inline] -pub unsafe fn PropVariantToBooleanWithDefault(propvarin: *const PROPVARIANT, fdefault: P1) -> super::super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn PropVariantToBooleanWithDefault(propvarin: *const PROPVARIANT, fdefault: bool) -> super::super::super::Foundation::BOOL { windows_targets::link!("propsys.dll" "system" fn PropVariantToBooleanWithDefault(propvarin : *const PROPVARIANT, fdefault : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - PropVariantToBooleanWithDefault(core::mem::transmute(propvarin), fdefault.param().abi()) + PropVariantToBooleanWithDefault(core::mem::transmute(propvarin), fdefault.into()) } #[cfg(feature = "Win32_System_Variant")] #[inline] @@ -681,13 +672,12 @@ where ReadFmtUserTypeStg(pstg.param().abi(), core::mem::transmute(pcf), core::mem::transmute(lplpszusertype.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SetConvertStg(pstg: P0, fconvert: P1) -> windows_core::Result<()> +pub unsafe fn SetConvertStg(pstg: P0, fconvert: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn SetConvertStg(pstg : * mut core::ffi::c_void, fconvert : super::super::super::Foundation:: BOOL) -> windows_core::HRESULT); - SetConvertStg(pstg.param().abi(), fconvert.param().abi()).ok() + SetConvertStg(pstg.param().abi(), fconvert.into()).ok() } #[cfg(feature = "Win32_System_Variant")] #[inline] @@ -700,12 +690,9 @@ where } #[cfg(feature = "Win32_System_Variant")] #[inline] -pub unsafe fn StgConvertVariantToProperty(pvar: *const PROPVARIANT, codepage: u16, pprop: Option<*mut SERIALIZEDPROPERTYVALUE>, pcb: *mut u32, pid: u32, freserved: P5, pcindirect: Option<*mut u32>) -> *mut SERIALIZEDPROPERTYVALUE -where - P5: windows_core::Param, -{ +pub unsafe fn StgConvertVariantToProperty(pvar: *const PROPVARIANT, codepage: u16, pprop: Option<*mut SERIALIZEDPROPERTYVALUE>, pcb: *mut u32, pid: u32, freserved: Option, pcindirect: Option<*mut u32>) -> *mut SERIALIZEDPROPERTYVALUE { windows_targets::link!("ole32.dll" "system" fn StgConvertVariantToProperty(pvar : *const PROPVARIANT, codepage : u16, pprop : *mut SERIALIZEDPROPERTYVALUE, pcb : *mut u32, pid : u32, freserved : super::super::super::Foundation:: BOOLEAN, pcindirect : *mut u32) -> *mut SERIALIZEDPROPERTYVALUE); - StgConvertVariantToProperty(core::mem::transmute(pvar), core::mem::transmute(codepage), core::mem::transmute(pprop.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcb), core::mem::transmute(pid), freserved.param().abi(), core::mem::transmute(pcindirect.unwrap_or(core::mem::zeroed()))) + StgConvertVariantToProperty(core::mem::transmute(pvar), core::mem::transmute(codepage), core::mem::transmute(pprop.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcb), core::mem::transmute(pid), core::mem::transmute(freserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcindirect.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn StgCreateDocfile(pwcsname: P0, grfmode: super::STGM, reserved: Option) -> windows_core::Result @@ -1455,11 +1442,8 @@ impl IFillLockBytes { pub unsafe fn SetFillSize(&self, ulsize: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetFillSize)(windows_core::Interface::as_raw(self), core::mem::transmute(ulsize)).ok() } - pub unsafe fn Terminate(&self, bcanceled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Terminate)(windows_core::Interface::as_raw(self), bcanceled.param().abi()).ok() + pub unsafe fn Terminate(&self, bcanceled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Terminate)(windows_core::Interface::as_raw(self), bcanceled.into()).ok() } } #[repr(C)] @@ -1755,12 +1739,11 @@ impl IPersistStorage { { (windows_core::Interface::vtable(self).Load)(windows_core::Interface::as_raw(self), pstg.param().abi()).ok() } - pub unsafe fn Save(&self, pstgsave: P0, fsameasload: P1) -> windows_core::Result<()> + pub unsafe fn Save(&self, pstgsave: P0, fsameasload: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), pstgsave.param().abi(), fsameasload.param().abi()).ok() + (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), pstgsave.param().abi(), fsameasload.into()).ok() } pub unsafe fn SaveCompleted(&self, pstgnew: P0) -> windows_core::Result<()> where diff --git a/crates/libs/windows/src/Windows/Win32/System/Com/Urlmon/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/Urlmon/mod.rs index e7eafde3e2..cc0d7212a2 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/Urlmon/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/Urlmon/mod.rs @@ -147,12 +147,9 @@ where CoInternetQueryInfo(pwzurl.param().abi(), core::mem::transmute(queryoptions), core::mem::transmute(dwqueryflags), core::mem::transmute(pvbuffer), core::mem::transmute(cbbuffer), core::mem::transmute(pcbbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwreserved)).ok() } #[inline] -pub unsafe fn CoInternetSetFeatureEnabled(featureentry: INTERNETFEATURELIST, dwflags: u32, fenable: P2) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn CoInternetSetFeatureEnabled(featureentry: INTERNETFEATURELIST, dwflags: u32, fenable: bool) -> windows_core::Result<()> { windows_targets::link!("urlmon.dll" "system" fn CoInternetSetFeatureEnabled(featureentry : INTERNETFEATURELIST, dwflags : u32, fenable : super::super::super::Foundation:: BOOL) -> windows_core::HRESULT); - CoInternetSetFeatureEnabled(core::mem::transmute(featureentry), core::mem::transmute(dwflags), fenable.param().abi()).ok() + CoInternetSetFeatureEnabled(core::mem::transmute(featureentry), core::mem::transmute(dwflags), fenable.into()).ok() } #[inline] pub unsafe fn CompareSecurityIds(pbsecurityid1: &[u8], pbsecurityid2: &[u8], dwreserved: u32) -> windows_core::Result<()> { @@ -2322,11 +2319,8 @@ impl IInternetSecurityMgrSite { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetWindow)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn EnableModeless(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableModeless)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn EnableModeless(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableModeless)(windows_core::Interface::as_raw(self), fenable.into()).ok() } } #[repr(C)] @@ -2730,18 +2724,11 @@ impl IInternetZoneManagerEx2 { pub unsafe fn GetZoneAttributesEx(&self, dwzone: u32, pzoneattributes: *mut ZONEATTRIBUTES, dwflags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetZoneAttributesEx)(windows_core::Interface::as_raw(self), core::mem::transmute(dwzone), core::mem::transmute(pzoneattributes), core::mem::transmute(dwflags)).ok() } - pub unsafe fn GetZoneSecurityState(&self, dwzoneindex: u32, frespectpolicy: P1, pdwstate: *mut u32, pfpolicyencountered: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetZoneSecurityState)(windows_core::Interface::as_raw(self), core::mem::transmute(dwzoneindex), frespectpolicy.param().abi(), core::mem::transmute(pdwstate), core::mem::transmute(pfpolicyencountered)).ok() + pub unsafe fn GetZoneSecurityState(&self, dwzoneindex: u32, frespectpolicy: bool, pdwstate: *mut u32, pfpolicyencountered: *mut super::super::super::Foundation::BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetZoneSecurityState)(windows_core::Interface::as_raw(self), core::mem::transmute(dwzoneindex), frespectpolicy.into(), core::mem::transmute(pdwstate), core::mem::transmute(pfpolicyencountered)).ok() } - pub unsafe fn GetIESecurityState(&self, frespectpolicy: P0, pdwstate: *mut u32, pfpolicyencountered: *mut super::super::super::Foundation::BOOL, fnocache: P3) -> windows_core::Result<()> - where - P0: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetIESecurityState)(windows_core::Interface::as_raw(self), frespectpolicy.param().abi(), core::mem::transmute(pdwstate), core::mem::transmute(pfpolicyencountered), fnocache.param().abi()).ok() + pub unsafe fn GetIESecurityState(&self, frespectpolicy: bool, pdwstate: *mut u32, pfpolicyencountered: *mut super::super::super::Foundation::BOOL, fnocache: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetIESecurityState)(windows_core::Interface::as_raw(self), frespectpolicy.into(), core::mem::transmute(pdwstate), core::mem::transmute(pfpolicyencountered), fnocache.into()).ok() } pub unsafe fn FixUnsecureSettings(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).FixUnsecureSettings)(windows_core::Interface::as_raw(self)).ok() @@ -2889,21 +2876,19 @@ impl IPersistMoniker { pub unsafe fn IsDirty(&self) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).IsDirty)(windows_core::Interface::as_raw(self)) } - pub unsafe fn Load(&self, ffullyavailable: P0, pimkname: P1, pibc: P2, grfmode: u32) -> windows_core::Result<()> + pub unsafe fn Load(&self, ffullyavailable: bool, pimkname: P1, pibc: P2, grfmode: u32) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).Load)(windows_core::Interface::as_raw(self), ffullyavailable.param().abi(), pimkname.param().abi(), pibc.param().abi(), core::mem::transmute(grfmode)).ok() + (windows_core::Interface::vtable(self).Load)(windows_core::Interface::as_raw(self), ffullyavailable.into(), pimkname.param().abi(), pibc.param().abi(), core::mem::transmute(grfmode)).ok() } - pub unsafe fn Save(&self, pimkname: P0, pbc: P1, fremember: P2) -> windows_core::Result<()> + pub unsafe fn Save(&self, pimkname: P0, pbc: P1, fremember: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), pimkname.param().abi(), pbc.param().abi(), fremember.param().abi()).ok() + (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), pimkname.param().abi(), pbc.param().abi(), fremember.into()).ok() } pub unsafe fn SaveCompleted(&self, pimkname: P0, pibc: P1) -> windows_core::Result<()> where diff --git a/crates/libs/windows/src/Windows/Win32/System/Com/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/mod.rs index a95afd1fc5..74c6d567b7 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/mod.rs @@ -346,23 +346,20 @@ pub unsafe fn CoIsOle1Class(rclsid: *const windows_core::GUID) -> super::super:: CoIsOle1Class(core::mem::transmute(rclsid)) } #[inline] -pub unsafe fn CoLoadLibrary(lpszlibname: P0, bautofree: P1) -> super::super::Foundation::HINSTANCE +pub unsafe fn CoLoadLibrary(lpszlibname: P0, bautofree: bool) -> super::super::Foundation::HINSTANCE where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn CoLoadLibrary(lpszlibname : windows_core::PCWSTR, bautofree : super::super::Foundation:: BOOL) -> super::super::Foundation:: HINSTANCE); - CoLoadLibrary(lpszlibname.param().abi(), bautofree.param().abi()) + CoLoadLibrary(lpszlibname.param().abi(), bautofree.into()) } #[inline] -pub unsafe fn CoLockObjectExternal(punk: P0, flock: P1, flastunlockreleases: P2) -> windows_core::Result<()> +pub unsafe fn CoLockObjectExternal(punk: P0, flock: bool, flastunlockreleases: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn CoLockObjectExternal(punk : * mut core::ffi::c_void, flock : super::super::Foundation:: BOOL, flastunlockreleases : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - CoLockObjectExternal(punk.param().abi(), flock.param().abi(), flastunlockreleases.param().abi()).ok() + CoLockObjectExternal(punk.param().abi(), flock.into(), flastunlockreleases.into()).ok() } #[inline] pub unsafe fn CoQueryAuthenticationServices(pcauthsvc: *mut u32, asauthsvc: *mut *mut SOLE_AUTHENTICATION_SERVICE) -> windows_core::Result<()> { @@ -747,14 +744,13 @@ where MonikerCommonPrefixWith(pmkthis.param().abi(), pmkother.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] -pub unsafe fn MonikerRelativePathTo(pmksrc: P0, pmkdest: P1, ppmkrelpath: *mut Option, dwreserved: P3) -> windows_core::Result<()> +pub unsafe fn MonikerRelativePathTo(pmksrc: P0, pmkdest: P1, ppmkrelpath: *mut Option, dwreserved: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn MonikerRelativePathTo(pmksrc : * mut core::ffi::c_void, pmkdest : * mut core::ffi::c_void, ppmkrelpath : *mut * mut core::ffi::c_void, dwreserved : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - MonikerRelativePathTo(pmksrc.param().abi(), pmkdest.param().abi(), core::mem::transmute(ppmkrelpath), dwreserved.param().abi()).ok() + MonikerRelativePathTo(pmksrc.param().abi(), pmkdest.param().abi(), core::mem::transmute(ppmkrelpath), dwreserved.into()).ok() } #[inline] pub unsafe fn ProgIDFromCLSID(clsid: *const windows_core::GUID) -> windows_core::Result { @@ -1794,9 +1790,6 @@ pub const COWAIT_WAITALL: COWAIT_FLAGS = COWAIT_FLAGS(1i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct CO_DEVICE_CATALOG_COOKIE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for CO_DEVICE_CATALOG_COOKIE { - type TypeKind = windows_core::CopyType; -} impl CO_DEVICE_CATALOG_COOKIE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1841,9 +1834,6 @@ pub const CO_MARSHALING_SOURCE_IS_APP_CONTAINER: CO_MARSHALING_CONTEXT_ATTRIBUTE #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct CO_MTA_USAGE_COOKIE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for CO_MTA_USAGE_COOKIE { - type TypeKind = windows_core::CopyType; -} impl CO_MTA_USAGE_COOKIE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -3717,11 +3707,8 @@ impl IClassFactory { let mut result__ = core::ptr::null_mut(); (windows_core::Interface::vtable(self).CreateInstance)(windows_core::Interface::as_raw(self), punkouter.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn LockServer(&self, flock: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).LockServer)(windows_core::Interface::as_raw(self), flock.param().abi()).ok() + pub unsafe fn LockServer(&self, flock: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).LockServer)(windows_core::Interface::as_raw(self), flock.into()).ok() } } #[repr(C)] @@ -4317,11 +4304,8 @@ impl IDataObject { (windows_core::Interface::vtable(self).GetCanonicalFormatEtc)(windows_core::Interface::as_raw(self), core::mem::transmute(pformatectin), core::mem::transmute(pformatetcout)) } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))] - pub unsafe fn SetData(&self, pformatetc: *const FORMATETC, pmedium: *const STGMEDIUM, frelease: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetData)(windows_core::Interface::as_raw(self), core::mem::transmute(pformatetc), core::mem::transmute(pmedium), frelease.param().abi()).ok() + pub unsafe fn SetData(&self, pformatetc: *const FORMATETC, pmedium: *const STGMEDIUM, frelease: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetData)(windows_core::Interface::as_raw(self), core::mem::transmute(pformatetc), core::mem::transmute(pmedium), frelease.into()).ok() } pub unsafe fn EnumFormatEtc(&self, dwdirection: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5387,11 +5371,8 @@ impl IExternalConnection { pub unsafe fn AddConnection(&self, extconn: u32, reserved: u32) -> u32 { (windows_core::Interface::vtable(self).AddConnection)(windows_core::Interface::as_raw(self), core::mem::transmute(extconn), core::mem::transmute(reserved)) } - pub unsafe fn ReleaseConnection(&self, extconn: u32, reserved: u32, flastreleasecloses: P2) -> u32 - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReleaseConnection)(windows_core::Interface::as_raw(self), core::mem::transmute(extconn), core::mem::transmute(reserved), flastreleasecloses.param().abi()) + pub unsafe fn ReleaseConnection(&self, extconn: u32, reserved: u32, flastreleasecloses: bool) -> u32 { + (windows_core::Interface::vtable(self).ReleaseConnection)(windows_core::Interface::as_raw(self), core::mem::transmute(extconn), core::mem::transmute(reserved), flastreleasecloses.into()) } } #[repr(C)] @@ -5860,53 +5841,29 @@ impl IMallocSpy { pub unsafe fn PostAlloc(&self, pactual: *const core::ffi::c_void) -> *mut core::ffi::c_void { (windows_core::Interface::vtable(self).PostAlloc)(windows_core::Interface::as_raw(self), core::mem::transmute(pactual)) } - pub unsafe fn PreFree(&self, prequest: *const core::ffi::c_void, fspyed: P1) -> *mut core::ffi::c_void - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).PreFree)(windows_core::Interface::as_raw(self), core::mem::transmute(prequest), fspyed.param().abi()) + pub unsafe fn PreFree(&self, prequest: *const core::ffi::c_void, fspyed: bool) -> *mut core::ffi::c_void { + (windows_core::Interface::vtable(self).PreFree)(windows_core::Interface::as_raw(self), core::mem::transmute(prequest), fspyed.into()) } - pub unsafe fn PostFree(&self, fspyed: P0) - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).PostFree)(windows_core::Interface::as_raw(self), fspyed.param().abi()) + pub unsafe fn PostFree(&self, fspyed: bool) { + (windows_core::Interface::vtable(self).PostFree)(windows_core::Interface::as_raw(self), fspyed.into()) } - pub unsafe fn PreRealloc(&self, prequest: *const core::ffi::c_void, cbrequest: usize, ppnewrequest: *mut *mut core::ffi::c_void, fspyed: P3) -> usize - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).PreRealloc)(windows_core::Interface::as_raw(self), core::mem::transmute(prequest), core::mem::transmute(cbrequest), core::mem::transmute(ppnewrequest), fspyed.param().abi()) + pub unsafe fn PreRealloc(&self, prequest: *const core::ffi::c_void, cbrequest: usize, ppnewrequest: *mut *mut core::ffi::c_void, fspyed: bool) -> usize { + (windows_core::Interface::vtable(self).PreRealloc)(windows_core::Interface::as_raw(self), core::mem::transmute(prequest), core::mem::transmute(cbrequest), core::mem::transmute(ppnewrequest), fspyed.into()) } - pub unsafe fn PostRealloc(&self, pactual: *const core::ffi::c_void, fspyed: P1) -> *mut core::ffi::c_void - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).PostRealloc)(windows_core::Interface::as_raw(self), core::mem::transmute(pactual), fspyed.param().abi()) + pub unsafe fn PostRealloc(&self, pactual: *const core::ffi::c_void, fspyed: bool) -> *mut core::ffi::c_void { + (windows_core::Interface::vtable(self).PostRealloc)(windows_core::Interface::as_raw(self), core::mem::transmute(pactual), fspyed.into()) } - pub unsafe fn PreGetSize(&self, prequest: *const core::ffi::c_void, fspyed: P1) -> *mut core::ffi::c_void - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).PreGetSize)(windows_core::Interface::as_raw(self), core::mem::transmute(prequest), fspyed.param().abi()) + pub unsafe fn PreGetSize(&self, prequest: *const core::ffi::c_void, fspyed: bool) -> *mut core::ffi::c_void { + (windows_core::Interface::vtable(self).PreGetSize)(windows_core::Interface::as_raw(self), core::mem::transmute(prequest), fspyed.into()) } - pub unsafe fn PostGetSize(&self, cbactual: usize, fspyed: P1) -> usize - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).PostGetSize)(windows_core::Interface::as_raw(self), core::mem::transmute(cbactual), fspyed.param().abi()) + pub unsafe fn PostGetSize(&self, cbactual: usize, fspyed: bool) -> usize { + (windows_core::Interface::vtable(self).PostGetSize)(windows_core::Interface::as_raw(self), core::mem::transmute(cbactual), fspyed.into()) } - pub unsafe fn PreDidAlloc(&self, prequest: *const core::ffi::c_void, fspyed: P1) -> *mut core::ffi::c_void - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).PreDidAlloc)(windows_core::Interface::as_raw(self), core::mem::transmute(prequest), fspyed.param().abi()) + pub unsafe fn PreDidAlloc(&self, prequest: *const core::ffi::c_void, fspyed: bool) -> *mut core::ffi::c_void { + (windows_core::Interface::vtable(self).PreDidAlloc)(windows_core::Interface::as_raw(self), core::mem::transmute(prequest), fspyed.into()) } - pub unsafe fn PostDidAlloc(&self, prequest: *const core::ffi::c_void, fspyed: P1, factual: i32) -> i32 - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).PostDidAlloc)(windows_core::Interface::as_raw(self), core::mem::transmute(prequest), fspyed.param().abi(), core::mem::transmute(factual)) + pub unsafe fn PostDidAlloc(&self, prequest: *const core::ffi::c_void, fspyed: bool, factual: i32) -> i32 { + (windows_core::Interface::vtable(self).PostDidAlloc)(windows_core::Interface::as_raw(self), core::mem::transmute(prequest), fspyed.into(), core::mem::transmute(factual)) } pub unsafe fn PreHeapMinimize(&self) { (windows_core::Interface::vtable(self).PreHeapMinimize)(windows_core::Interface::as_raw(self)) @@ -6049,20 +6006,16 @@ impl IMoniker { { (windows_core::Interface::vtable(self).Reduce)(windows_core::Interface::as_raw(self), pbc.param().abi(), core::mem::transmute(dwreducehowfar), core::mem::transmute(ppmktoleft), core::mem::transmute(ppmkreduced)).ok() } - pub unsafe fn ComposeWith(&self, pmkright: P0, fonlyifnotgeneric: P1) -> windows_core::Result + pub unsafe fn ComposeWith(&self, pmkright: P0, fonlyifnotgeneric: bool) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).ComposeWith)(windows_core::Interface::as_raw(self), pmkright.param().abi(), fonlyifnotgeneric.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).ComposeWith)(windows_core::Interface::as_raw(self), pmkright.param().abi(), fonlyifnotgeneric.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn Enum(&self, fforward: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn Enum(&self, fforward: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Enum)(windows_core::Interface::as_raw(self), fforward.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).Enum)(windows_core::Interface::as_raw(self), fforward.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn IsEqual(&self, pmkothermoniker: P0) -> windows_core::HRESULT where @@ -6526,12 +6479,11 @@ impl IPersistFile { { (windows_core::Interface::vtable(self).Load)(windows_core::Interface::as_raw(self), pszfilename.param().abi(), core::mem::transmute(dwmode)).ok() } - pub unsafe fn Save(&self, pszfilename: P0, fremember: P1) -> windows_core::Result<()> + pub unsafe fn Save(&self, pszfilename: P0, fremember: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), pszfilename.param().abi(), fremember.param().abi()).ok() + (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), pszfilename.param().abi(), fremember.into()).ok() } pub unsafe fn SaveCompleted(&self, pszfilename: P0) -> windows_core::Result<()> where @@ -6617,11 +6569,8 @@ impl IPersistMemory { pub unsafe fn Load(&self, pmem: &[u8]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Load)(windows_core::Interface::as_raw(self), core::mem::transmute(pmem.as_ptr()), pmem.len().try_into().unwrap()).ok() } - pub unsafe fn Save(&self, pmem: &mut [u8], fcleardirty: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), core::mem::transmute(pmem.as_ptr()), fcleardirty.param().abi(), pmem.len().try_into().unwrap()).ok() + pub unsafe fn Save(&self, pmem: &mut [u8], fcleardirty: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), core::mem::transmute(pmem.as_ptr()), fcleardirty.into(), pmem.len().try_into().unwrap()).ok() } pub unsafe fn GetSizeMax(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6707,12 +6656,11 @@ impl IPersistStream { { (windows_core::Interface::vtable(self).Load)(windows_core::Interface::as_raw(self), pstm.param().abi()).ok() } - pub unsafe fn Save(&self, pstm: P0, fcleardirty: P1) -> windows_core::Result<()> + pub unsafe fn Save(&self, pstm: P0, fcleardirty: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), pstm.param().abi(), fcleardirty.param().abi()).ok() + (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), pstm.param().abi(), fcleardirty.into()).ok() } pub unsafe fn GetSizeMax(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6788,12 +6736,11 @@ impl IPersistStreamInit { { (windows_core::Interface::vtable(self).Load)(windows_core::Interface::as_raw(self), pstm.param().abi()).ok() } - pub unsafe fn Save(&self, pstm: P0, fcleardirty: P1) -> windows_core::Result<()> + pub unsafe fn Save(&self, pstm: P0, fcleardirty: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), pstm.param().abi(), fcleardirty.param().abi()).ok() + (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), pstm.param().abi(), fcleardirty.into()).ok() } pub unsafe fn GetSizeMax(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -7044,12 +6991,8 @@ impl windows_core::RuntimeName for IProcessLock {} windows_core::imp::define_interface!(IProgressNotify, IProgressNotify_Vtbl, 0xa9d758a0_4617_11cf_95fc_00aa00680db4); windows_core::imp::interface_hierarchy!(IProgressNotify, windows_core::IUnknown); impl IProgressNotify { - pub unsafe fn OnProgress(&self, dwprogresscurrent: u32, dwprogressmaximum: u32, faccurate: P2, fowner: P3) -> windows_core::Result<()> - where - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnProgress)(windows_core::Interface::as_raw(self), core::mem::transmute(dwprogresscurrent), core::mem::transmute(dwprogressmaximum), faccurate.param().abi(), fowner.param().abi()).ok() + pub unsafe fn OnProgress(&self, dwprogresscurrent: u32, dwprogressmaximum: u32, faccurate: bool, fowner: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnProgress)(windows_core::Interface::as_raw(self), core::mem::transmute(dwprogresscurrent), core::mem::transmute(dwprogressmaximum), faccurate.into(), fowner.into()).ok() } } #[repr(C)] @@ -7637,18 +7580,11 @@ impl IRunnableObject { pub unsafe fn IsRunning(&self) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).IsRunning)(windows_core::Interface::as_raw(self)) } - pub unsafe fn LockRunning(&self, flock: P0, flastunlockcloses: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).LockRunning)(windows_core::Interface::as_raw(self), flock.param().abi(), flastunlockcloses.param().abi()).ok() + pub unsafe fn LockRunning(&self, flock: bool, flastunlockcloses: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).LockRunning)(windows_core::Interface::as_raw(self), flock.into(), flastunlockcloses.into()).ok() } - pub unsafe fn SetContainedObject(&self, fcontained: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetContainedObject)(windows_core::Interface::as_raw(self), fcontained.param().abi()).ok() + pub unsafe fn SetContainedObject(&self, fcontained: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetContainedObject)(windows_core::Interface::as_raw(self), fcontained.into()).ok() } } #[repr(C)] @@ -10151,11 +10087,8 @@ impl IUriBuilder { { (windows_core::Interface::vtable(self).SetPath)(windows_core::Interface::as_raw(self), pwznewvalue.param().abi()).ok() } - pub unsafe fn SetPort(&self, fhasport: P0, dwnewvalue: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPort)(windows_core::Interface::as_raw(self), fhasport.param().abi(), core::mem::transmute(dwnewvalue)).ok() + pub unsafe fn SetPort(&self, fhasport: bool, dwnewvalue: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPort)(windows_core::Interface::as_raw(self), fhasport.into(), core::mem::transmute(dwnewvalue)).ok() } pub unsafe fn SetQuery(&self, pwznewvalue: P0) -> windows_core::Result<()> where @@ -10552,9 +10485,6 @@ impl Default for MULTI_QI { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct MachineGlobalObjectTableRegistrationToken(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for MachineGlobalObjectTableRegistrationToken { - type TypeKind = windows_core::CopyType; -} impl MachineGlobalObjectTableRegistrationToken { pub fn is_invalid(&self) -> bool { self.0.is_null() diff --git a/crates/libs/windows/src/Windows/Win32/System/ComponentServices/mod.rs b/crates/libs/windows/src/Windows/Win32/System/ComponentServices/mod.rs index aa455c893f..5eb5703c3c 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ComponentServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ComponentServices/mod.rs @@ -2547,11 +2547,8 @@ impl IComApp2Events { pub unsafe fn OnAppForceShutdown2(&self, pinfo: *const COMSVCSEVENTINFO, guidapp: windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnAppForceShutdown2)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidapp)).ok() } - pub unsafe fn OnAppPaused2(&self, pinfo: *const COMSVCSEVENTINFO, guidapp: windows_core::GUID, bpaused: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnAppPaused2)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidapp), bpaused.param().abi()).ok() + pub unsafe fn OnAppPaused2(&self, pinfo: *const COMSVCSEVENTINFO, guidapp: windows_core::GUID, bpaused: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnAppPaused2)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidapp), bpaused.into()).ok() } pub unsafe fn OnAppRecycle2(&self, pinfo: *const COMSVCSEVENTINFO, guidapp: windows_core::GUID, guidprocess: windows_core::GUID, lreason: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnAppRecycle2)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidapp), core::mem::transmute(guidprocess), core::mem::transmute(lreason)).ok() @@ -2696,11 +2693,8 @@ impl IComCRMEvents { pub unsafe fn OnCRMAnalyze(&self, pinfo: *const COMSVCSEVENTINFO, guidclerkclsid: windows_core::GUID, dwcrmrecordtype: u32, dwrecordsize: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnCRMAnalyze)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidclerkclsid), core::mem::transmute(dwcrmrecordtype), core::mem::transmute(dwrecordsize)).ok() } - pub unsafe fn OnCRMWrite(&self, pinfo: *const COMSVCSEVENTINFO, guidclerkclsid: windows_core::GUID, fvariants: P2, dwrecordsize: u32) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnCRMWrite)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidclerkclsid), fvariants.param().abi(), core::mem::transmute(dwrecordsize)).ok() + pub unsafe fn OnCRMWrite(&self, pinfo: *const COMSVCSEVENTINFO, guidclerkclsid: windows_core::GUID, fvariants: bool, dwrecordsize: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnCRMWrite)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidclerkclsid), fvariants.into(), core::mem::transmute(dwrecordsize)).ok() } pub unsafe fn OnCRMForget(&self, pinfo: *const COMSVCSEVENTINFO, guidclerkclsid: windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnCRMForget)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidclerkclsid)).ok() @@ -2708,11 +2702,8 @@ impl IComCRMEvents { pub unsafe fn OnCRMForce(&self, pinfo: *const COMSVCSEVENTINFO, guidclerkclsid: windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnCRMForce)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidclerkclsid)).ok() } - pub unsafe fn OnCRMDeliver(&self, pinfo: *const COMSVCSEVENTINFO, guidclerkclsid: windows_core::GUID, fvariants: P2, dwrecordsize: u32) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnCRMDeliver)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidclerkclsid), fvariants.param().abi(), core::mem::transmute(dwrecordsize)).ok() + pub unsafe fn OnCRMDeliver(&self, pinfo: *const COMSVCSEVENTINFO, guidclerkclsid: windows_core::GUID, fvariants: bool, dwrecordsize: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnCRMDeliver)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidclerkclsid), fvariants.into(), core::mem::transmute(dwrecordsize)).ok() } } #[repr(C)] @@ -2986,17 +2977,11 @@ impl windows_core::RuntimeName for IComInstanceEvents {} windows_core::imp::define_interface!(IComLTxEvents, IComLTxEvents_Vtbl, 0x605cf82c_578e_4298_975d_82babcd9e053); windows_core::imp::interface_hierarchy!(IComLTxEvents, windows_core::IUnknown); impl IComLTxEvents { - pub unsafe fn OnLtxTransactionStart(&self, pinfo: *const COMSVCSEVENTINFO, guidltx: windows_core::GUID, tsid: windows_core::GUID, froot: P3, nisolationlevel: i32) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnLtxTransactionStart)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidltx), core::mem::transmute(tsid), froot.param().abi(), core::mem::transmute(nisolationlevel)).ok() + pub unsafe fn OnLtxTransactionStart(&self, pinfo: *const COMSVCSEVENTINFO, guidltx: windows_core::GUID, tsid: windows_core::GUID, froot: bool, nisolationlevel: i32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnLtxTransactionStart)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidltx), core::mem::transmute(tsid), froot.into(), core::mem::transmute(nisolationlevel)).ok() } - pub unsafe fn OnLtxTransactionPrepare(&self, pinfo: *const COMSVCSEVENTINFO, guidltx: windows_core::GUID, fvote: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnLtxTransactionPrepare)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidltx), fvote.param().abi()).ok() + pub unsafe fn OnLtxTransactionPrepare(&self, pinfo: *const COMSVCSEVENTINFO, guidltx: windows_core::GUID, fvote: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnLtxTransactionPrepare)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidltx), fvote.into()).ok() } pub unsafe fn OnLtxTransactionAbort(&self, pinfo: *const COMSVCSEVENTINFO, guidltx: windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnLtxTransactionAbort)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidltx)).ok() @@ -3667,19 +3652,17 @@ impl windows_core::RuntimeName for IComQCEvents {} windows_core::imp::define_interface!(IComResourceEvents, IComResourceEvents_Vtbl, 0x683130ab_2e50_11d2_98a5_00c04f8ee1c4); windows_core::imp::interface_hierarchy!(IComResourceEvents, windows_core::IUnknown); impl IComResourceEvents { - pub unsafe fn OnResourceCreate(&self, pinfo: *const COMSVCSEVENTINFO, objectid: u64, psztype: P2, resid: u64, enlisted: P4) -> windows_core::Result<()> + pub unsafe fn OnResourceCreate(&self, pinfo: *const COMSVCSEVENTINFO, objectid: u64, psztype: P2, resid: u64, enlisted: bool) -> windows_core::Result<()> where P2: windows_core::Param, - P4: windows_core::Param, { - (windows_core::Interface::vtable(self).OnResourceCreate)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(objectid), psztype.param().abi(), core::mem::transmute(resid), enlisted.param().abi()).ok() + (windows_core::Interface::vtable(self).OnResourceCreate)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(objectid), psztype.param().abi(), core::mem::transmute(resid), enlisted.into()).ok() } - pub unsafe fn OnResourceAllocate(&self, pinfo: *const COMSVCSEVENTINFO, objectid: u64, psztype: P2, resid: u64, enlisted: P4, numrated: u32, rating: u32) -> windows_core::Result<()> + pub unsafe fn OnResourceAllocate(&self, pinfo: *const COMSVCSEVENTINFO, objectid: u64, psztype: P2, resid: u64, enlisted: bool, numrated: u32, rating: u32) -> windows_core::Result<()> where P2: windows_core::Param, - P4: windows_core::Param, { - (windows_core::Interface::vtable(self).OnResourceAllocate)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(objectid), psztype.param().abi(), core::mem::transmute(resid), enlisted.param().abi(), core::mem::transmute(numrated), core::mem::transmute(rating)).ok() + (windows_core::Interface::vtable(self).OnResourceAllocate)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(objectid), psztype.param().abi(), core::mem::transmute(resid), enlisted.into(), core::mem::transmute(numrated), core::mem::transmute(rating)).ok() } pub unsafe fn OnResourceRecycle(&self, pinfo: *const COMSVCSEVENTINFO, objectid: u64, psztype: P2, resid: u64) -> windows_core::Result<()> where @@ -3693,12 +3676,11 @@ impl IComResourceEvents { { (windows_core::Interface::vtable(self).OnResourceDestroy)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(objectid), core::mem::transmute(hr), psztype.param().abi(), core::mem::transmute(resid)).ok() } - pub unsafe fn OnResourceTrack(&self, pinfo: *const COMSVCSEVENTINFO, objectid: u64, psztype: P2, resid: u64, enlisted: P4) -> windows_core::Result<()> + pub unsafe fn OnResourceTrack(&self, pinfo: *const COMSVCSEVENTINFO, objectid: u64, psztype: P2, resid: u64, enlisted: bool) -> windows_core::Result<()> where P2: windows_core::Param, - P4: windows_core::Param, { - (windows_core::Interface::vtable(self).OnResourceTrack)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(objectid), psztype.param().abi(), core::mem::transmute(resid), enlisted.param().abi()).ok() + (windows_core::Interface::vtable(self).OnResourceTrack)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(objectid), psztype.param().abi(), core::mem::transmute(resid), enlisted.into()).ok() } } #[repr(C)] @@ -3756,17 +3738,11 @@ impl windows_core::RuntimeName for IComResourceEvents {} windows_core::imp::define_interface!(IComSecurityEvents, IComSecurityEvents_Vtbl, 0x683130ac_2e50_11d2_98a5_00c04f8ee1c4); windows_core::imp::interface_hierarchy!(IComSecurityEvents, windows_core::IUnknown); impl IComSecurityEvents { - pub unsafe fn OnAuthenticate(&self, pinfo: *const COMSVCSEVENTINFO, guidactivity: *const windows_core::GUID, objectid: u64, guidiid: *const windows_core::GUID, imeth: u32, psidoriginaluser: &[u8], psidcurrentuser: &[u8], bcurrentuserinpersonatinginproc: P9) -> windows_core::Result<()> - where - P9: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnAuthenticate)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidactivity), core::mem::transmute(objectid), core::mem::transmute(guidiid), core::mem::transmute(imeth), psidoriginaluser.len().try_into().unwrap(), core::mem::transmute(psidoriginaluser.as_ptr()), psidcurrentuser.len().try_into().unwrap(), core::mem::transmute(psidcurrentuser.as_ptr()), bcurrentuserinpersonatinginproc.param().abi()).ok() + pub unsafe fn OnAuthenticate(&self, pinfo: *const COMSVCSEVENTINFO, guidactivity: *const windows_core::GUID, objectid: u64, guidiid: *const windows_core::GUID, imeth: u32, psidoriginaluser: &[u8], psidcurrentuser: &[u8], bcurrentuserinpersonatinginproc: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnAuthenticate)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidactivity), core::mem::transmute(objectid), core::mem::transmute(guidiid), core::mem::transmute(imeth), psidoriginaluser.len().try_into().unwrap(), core::mem::transmute(psidoriginaluser.as_ptr()), psidcurrentuser.len().try_into().unwrap(), core::mem::transmute(psidcurrentuser.as_ptr()), bcurrentuserinpersonatinginproc.into()).ok() } - pub unsafe fn OnAuthenticateFail(&self, pinfo: *const COMSVCSEVENTINFO, guidactivity: *const windows_core::GUID, objectid: u64, guidiid: *const windows_core::GUID, imeth: u32, psidoriginaluser: &[u8], psidcurrentuser: &[u8], bcurrentuserinpersonatinginproc: P9) -> windows_core::Result<()> - where - P9: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnAuthenticateFail)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidactivity), core::mem::transmute(objectid), core::mem::transmute(guidiid), core::mem::transmute(imeth), psidoriginaluser.len().try_into().unwrap(), core::mem::transmute(psidoriginaluser.as_ptr()), psidcurrentuser.len().try_into().unwrap(), core::mem::transmute(psidcurrentuser.as_ptr()), bcurrentuserinpersonatinginproc.param().abi()).ok() + pub unsafe fn OnAuthenticateFail(&self, pinfo: *const COMSVCSEVENTINFO, guidactivity: *const windows_core::GUID, objectid: u64, guidiid: *const windows_core::GUID, imeth: u32, psidoriginaluser: &[u8], psidcurrentuser: &[u8], bcurrentuserinpersonatinginproc: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnAuthenticateFail)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidactivity), core::mem::transmute(objectid), core::mem::transmute(guidiid), core::mem::transmute(imeth), psidoriginaluser.len().try_into().unwrap(), core::mem::transmute(psidoriginaluser.as_ptr()), psidcurrentuser.len().try_into().unwrap(), core::mem::transmute(psidcurrentuser.as_ptr()), bcurrentuserinpersonatinginproc.into()).ok() } } #[repr(C)] @@ -3993,21 +3969,15 @@ impl IComStaThreadPoolKnobs2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetCPUMetricEnabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetCPUMetricEnabled(&self, bmetricenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCPUMetricEnabled)(windows_core::Interface::as_raw(self), bmetricenabled.param().abi()).ok() + pub unsafe fn SetCPUMetricEnabled(&self, bmetricenabled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCPUMetricEnabled)(windows_core::Interface::as_raw(self), bmetricenabled.into()).ok() } pub unsafe fn GetCreateThreadsAggressively(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetCreateThreadsAggressively)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetCreateThreadsAggressively(&self, bmetricenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCreateThreadsAggressively)(windows_core::Interface::as_raw(self), bmetricenabled.param().abi()).ok() + pub unsafe fn SetCreateThreadsAggressively(&self, bmetricenabled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCreateThreadsAggressively)(windows_core::Interface::as_raw(self), bmetricenabled.into()).ok() } pub unsafe fn GetMaxCSR(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4471,17 +4441,11 @@ impl windows_core::RuntimeName for IComTrackingInfoProperties {} windows_core::imp::define_interface!(IComTransaction2Events, IComTransaction2Events_Vtbl, 0xa136f62a_2f94_4288_86e0_d8a1fa4c0299); windows_core::imp::interface_hierarchy!(IComTransaction2Events, windows_core::IUnknown); impl IComTransaction2Events { - pub unsafe fn OnTransactionStart2(&self, pinfo: *const COMSVCSEVENTINFO, guidtx: *const windows_core::GUID, tsid: *const windows_core::GUID, froot: P3, nisolationlevel: i32) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnTransactionStart2)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidtx), core::mem::transmute(tsid), froot.param().abi(), core::mem::transmute(nisolationlevel)).ok() + pub unsafe fn OnTransactionStart2(&self, pinfo: *const COMSVCSEVENTINFO, guidtx: *const windows_core::GUID, tsid: *const windows_core::GUID, froot: bool, nisolationlevel: i32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnTransactionStart2)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidtx), core::mem::transmute(tsid), froot.into(), core::mem::transmute(nisolationlevel)).ok() } - pub unsafe fn OnTransactionPrepare2(&self, pinfo: *const COMSVCSEVENTINFO, guidtx: *const windows_core::GUID, fvoteyes: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnTransactionPrepare2)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidtx), fvoteyes.param().abi()).ok() + pub unsafe fn OnTransactionPrepare2(&self, pinfo: *const COMSVCSEVENTINFO, guidtx: *const windows_core::GUID, fvoteyes: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnTransactionPrepare2)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidtx), fvoteyes.into()).ok() } pub unsafe fn OnTransactionAbort2(&self, pinfo: *const COMSVCSEVENTINFO, guidtx: *const windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnTransactionAbort2)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidtx)).ok() @@ -4538,17 +4502,11 @@ impl windows_core::RuntimeName for IComTransaction2Events {} windows_core::imp::define_interface!(IComTransactionEvents, IComTransactionEvents_Vtbl, 0x683130a8_2e50_11d2_98a5_00c04f8ee1c4); windows_core::imp::interface_hierarchy!(IComTransactionEvents, windows_core::IUnknown); impl IComTransactionEvents { - pub unsafe fn OnTransactionStart(&self, pinfo: *const COMSVCSEVENTINFO, guidtx: *const windows_core::GUID, tsid: *const windows_core::GUID, froot: P3) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnTransactionStart)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidtx), core::mem::transmute(tsid), froot.param().abi()).ok() + pub unsafe fn OnTransactionStart(&self, pinfo: *const COMSVCSEVENTINFO, guidtx: *const windows_core::GUID, tsid: *const windows_core::GUID, froot: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnTransactionStart)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidtx), core::mem::transmute(tsid), froot.into()).ok() } - pub unsafe fn OnTransactionPrepare(&self, pinfo: *const COMSVCSEVENTINFO, guidtx: *const windows_core::GUID, fvoteyes: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnTransactionPrepare)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidtx), fvoteyes.param().abi()).ok() + pub unsafe fn OnTransactionPrepare(&self, pinfo: *const COMSVCSEVENTINFO, guidtx: *const windows_core::GUID, fvoteyes: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnTransactionPrepare)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidtx), fvoteyes.into()).ok() } pub unsafe fn OnTransactionAbort(&self, pinfo: *const COMSVCSEVENTINFO, guidtx: *const windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnTransactionAbort)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo), core::mem::transmute(guidtx)).ok() @@ -4732,11 +4690,8 @@ impl IContextSecurityPerimeter { pub unsafe fn GetPerimeterFlag(&self, pflag: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetPerimeterFlag)(windows_core::Interface::as_raw(self), core::mem::transmute(pflag)).ok() } - pub unsafe fn SetPerimeterFlag(&self, fflag: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPerimeterFlag)(windows_core::Interface::as_raw(self), fflag.param().abi()).ok() + pub unsafe fn SetPerimeterFlag(&self, fflag: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPerimeterFlag)(windows_core::Interface::as_raw(self), fflag.into()).ok() } } #[repr(C)] @@ -4955,11 +4910,8 @@ impl ICrmCompensator { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EndPrepare)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn BeginCommit(&self, frecovery: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).BeginCommit)(windows_core::Interface::as_raw(self), frecovery.param().abi()).ok() + pub unsafe fn BeginCommit(&self, frecovery: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).BeginCommit)(windows_core::Interface::as_raw(self), frecovery.into()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn CommitRecord(&self, crmlogrec: CrmLogRecordRead) -> windows_core::Result { @@ -4969,11 +4921,8 @@ impl ICrmCompensator { pub unsafe fn EndCommit(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EndCommit)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn BeginAbort(&self, frecovery: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).BeginAbort)(windows_core::Interface::as_raw(self), frecovery.param().abi()).ok() + pub unsafe fn BeginAbort(&self, frecovery: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).BeginAbort)(windows_core::Interface::as_raw(self), frecovery.into()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn AbortRecord(&self, crmlogrec: CrmLogRecordRead) -> windows_core::Result { @@ -5847,11 +5796,8 @@ impl IDispenserDriver { pub unsafe fn CreateResource(&self, restypid: usize, presid: *mut usize, psecsfreebeforedestroy: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CreateResource)(windows_core::Interface::as_raw(self), core::mem::transmute(restypid), core::mem::transmute(presid), core::mem::transmute(psecsfreebeforedestroy)).ok() } - pub unsafe fn RateResource(&self, restypid: usize, resid: usize, frequirestransactionenlistment: P2, prating: *mut u32) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).RateResource)(windows_core::Interface::as_raw(self), core::mem::transmute(restypid), core::mem::transmute(resid), frequirestransactionenlistment.param().abi(), core::mem::transmute(prating)).ok() + pub unsafe fn RateResource(&self, restypid: usize, resid: usize, frequirestransactionenlistment: bool, prating: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RateResource)(windows_core::Interface::as_raw(self), core::mem::transmute(restypid), core::mem::transmute(resid), frequirestransactionenlistment.into(), core::mem::transmute(prating)).ok() } pub unsafe fn EnlistResource(&self, resid: usize, transid: usize) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EnlistResource)(windows_core::Interface::as_raw(self), core::mem::transmute(resid), core::mem::transmute(transid)).ok() @@ -6344,17 +6290,11 @@ impl IHolder { pub unsafe fn TrackResourceS(&self, __midl__iholder0004: *mut u16) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).TrackResourceS)(windows_core::Interface::as_raw(self), core::mem::transmute(__midl__iholder0004)).ok() } - pub unsafe fn UntrackResource(&self, __midl__iholder0005: usize, __midl__iholder0006: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).UntrackResource)(windows_core::Interface::as_raw(self), core::mem::transmute(__midl__iholder0005), __midl__iholder0006.param().abi()).ok() + pub unsafe fn UntrackResource(&self, __midl__iholder0005: usize, __midl__iholder0006: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).UntrackResource)(windows_core::Interface::as_raw(self), core::mem::transmute(__midl__iholder0005), __midl__iholder0006.into()).ok() } - pub unsafe fn UntrackResourceS(&self, __midl__iholder0007: *mut u16, __midl__iholder0008: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).UntrackResourceS)(windows_core::Interface::as_raw(self), core::mem::transmute(__midl__iholder0007), __midl__iholder0008.param().abi()).ok() + pub unsafe fn UntrackResourceS(&self, __midl__iholder0007: *mut u16, __midl__iholder0008: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).UntrackResourceS)(windows_core::Interface::as_raw(self), core::mem::transmute(__midl__iholder0007), __midl__iholder0008.into()).ok() } pub unsafe fn Close(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() @@ -6651,12 +6591,11 @@ impl windows_core::RuntimeName for IMTSLocator {} windows_core::imp::define_interface!(IManagedActivationEvents, IManagedActivationEvents_Vtbl, 0xa5f325af_572f_46da_b8ab_827c3d95d99e); windows_core::imp::interface_hierarchy!(IManagedActivationEvents, windows_core::IUnknown); impl IManagedActivationEvents { - pub unsafe fn CreateManagedStub(&self, pinfo: P0, fdist: P1) -> windows_core::Result<()> + pub unsafe fn CreateManagedStub(&self, pinfo: P0, fdist: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateManagedStub)(windows_core::Interface::as_raw(self), pinfo.param().abi(), fdist.param().abi()).ok() + (windows_core::Interface::vtable(self).CreateManagedStub)(windows_core::Interface::as_raw(self), pinfo.param().abi(), fdist.into()).ok() } pub unsafe fn DestroyManagedStub(&self, pinfo: P0) -> windows_core::Result<()> where @@ -6707,18 +6646,14 @@ impl IManagedObjectInfo { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetIObjectControl)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetInPool(&self, binpool: P0, ppooledobj: P1) -> windows_core::Result<()> + pub unsafe fn SetInPool(&self, binpool: bool, ppooledobj: P1) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetInPool)(windows_core::Interface::as_raw(self), binpool.param().abi(), ppooledobj.param().abi()).ok() + (windows_core::Interface::vtable(self).SetInPool)(windows_core::Interface::as_raw(self), binpool.into(), ppooledobj.param().abi()).ok() } - pub unsafe fn SetWrapperStrength(&self, bstrong: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetWrapperStrength)(windows_core::Interface::as_raw(self), bstrong.param().abi()).ok() + pub unsafe fn SetWrapperStrength(&self, bstrong: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetWrapperStrength)(windows_core::Interface::as_raw(self), bstrong.into()).ok() } } #[repr(C)] @@ -6809,11 +6744,8 @@ impl windows_core::RuntimeName for IManagedPoolAction {} windows_core::imp::define_interface!(IManagedPooledObj, IManagedPooledObj_Vtbl, 0xc5da4bea_1b42_4437_8926_b6a38860a770); windows_core::imp::interface_hierarchy!(IManagedPooledObj, windows_core::IUnknown); impl IManagedPooledObj { - pub unsafe fn SetHeld(&self, m_bheld: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHeld)(windows_core::Interface::as_raw(self), m_bheld.param().abi()).ok() + pub unsafe fn SetHeld(&self, m_bheld: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHeld)(windows_core::Interface::as_raw(self), m_bheld.into()).ok() } } #[repr(C)] @@ -8721,11 +8653,8 @@ impl IServicePoolConfig { pub unsafe fn CreationTimeout(&self, pdwcreationtimeout: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CreationTimeout)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwcreationtimeout)).ok() } - pub unsafe fn SetTransactionAffinity(&self, ftxaffinity: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetTransactionAffinity)(windows_core::Interface::as_raw(self), ftxaffinity.param().abi()).ok() + pub unsafe fn SetTransactionAffinity(&self, ftxaffinity: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetTransactionAffinity)(windows_core::Interface::as_raw(self), ftxaffinity.into()).ok() } pub unsafe fn TransactionAffinity(&self, pftxaffinity: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).TransactionAffinity)(windows_core::Interface::as_raw(self), core::mem::transmute(pftxaffinity)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/System/Console/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Console/mod.rs index 1b02b69b21..1da87ca4ab 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Console/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Console/mod.rs @@ -280,20 +280,14 @@ pub unsafe fn GetConsoleWindow() -> super::super::Foundation::HWND { GetConsoleWindow() } #[inline] -pub unsafe fn GetCurrentConsoleFont(hconsoleoutput: super::super::Foundation::HANDLE, bmaximumwindow: P1, lpconsolecurrentfont: *mut CONSOLE_FONT_INFO) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn GetCurrentConsoleFont(hconsoleoutput: super::super::Foundation::HANDLE, bmaximumwindow: bool, lpconsolecurrentfont: *mut CONSOLE_FONT_INFO) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetCurrentConsoleFont(hconsoleoutput : super::super::Foundation:: HANDLE, bmaximumwindow : super::super::Foundation:: BOOL, lpconsolecurrentfont : *mut CONSOLE_FONT_INFO) -> super::super::Foundation:: BOOL); - GetCurrentConsoleFont(core::mem::transmute(hconsoleoutput), bmaximumwindow.param().abi(), core::mem::transmute(lpconsolecurrentfont)).ok() + GetCurrentConsoleFont(core::mem::transmute(hconsoleoutput), bmaximumwindow.into(), core::mem::transmute(lpconsolecurrentfont)).ok() } #[inline] -pub unsafe fn GetCurrentConsoleFontEx(hconsoleoutput: super::super::Foundation::HANDLE, bmaximumwindow: P1, lpconsolecurrentfontex: *mut CONSOLE_FONT_INFOEX) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn GetCurrentConsoleFontEx(hconsoleoutput: super::super::Foundation::HANDLE, bmaximumwindow: bool, lpconsolecurrentfontex: *mut CONSOLE_FONT_INFOEX) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetCurrentConsoleFontEx(hconsoleoutput : super::super::Foundation:: HANDLE, bmaximumwindow : super::super::Foundation:: BOOL, lpconsolecurrentfontex : *mut CONSOLE_FONT_INFOEX) -> super::super::Foundation:: BOOL); - GetCurrentConsoleFontEx(core::mem::transmute(hconsoleoutput), bmaximumwindow.param().abi(), core::mem::transmute(lpconsolecurrentfontex)).ok() + GetCurrentConsoleFontEx(core::mem::transmute(hconsoleoutput), bmaximumwindow.into(), core::mem::transmute(lpconsolecurrentfontex)).ok() } #[inline] pub unsafe fn GetLargestConsoleWindowSize(hconsoleoutput: super::super::Foundation::HANDLE) -> COORD { @@ -397,12 +391,9 @@ pub unsafe fn SetConsoleCP(wcodepageid: u32) -> windows_core::Result<()> { SetConsoleCP(core::mem::transmute(wcodepageid)).ok() } #[inline] -pub unsafe fn SetConsoleCtrlHandler(handlerroutine: Option, add: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn SetConsoleCtrlHandler(handlerroutine: Option, add: bool) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetConsoleCtrlHandler(handlerroutine : PHANDLER_ROUTINE, add : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetConsoleCtrlHandler(core::mem::transmute(handlerroutine.unwrap_or(core::mem::zeroed())), add.param().abi()).ok() + SetConsoleCtrlHandler(core::mem::transmute(handlerroutine.unwrap_or(core::mem::zeroed())), add.into()).ok() } #[inline] pub unsafe fn SetConsoleCursorInfo(hconsoleoutput: super::super::Foundation::HANDLE, lpconsolecursorinfo: *const CONSOLE_CURSOR_INFO) -> windows_core::Result<()> { @@ -482,20 +473,14 @@ where SetConsoleTitleW(lpconsoletitle.param().abi()).ok() } #[inline] -pub unsafe fn SetConsoleWindowInfo(hconsoleoutput: super::super::Foundation::HANDLE, babsolute: P1, lpconsolewindow: *const SMALL_RECT) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn SetConsoleWindowInfo(hconsoleoutput: super::super::Foundation::HANDLE, babsolute: bool, lpconsolewindow: *const SMALL_RECT) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetConsoleWindowInfo(hconsoleoutput : super::super::Foundation:: HANDLE, babsolute : super::super::Foundation:: BOOL, lpconsolewindow : *const SMALL_RECT) -> super::super::Foundation:: BOOL); - SetConsoleWindowInfo(core::mem::transmute(hconsoleoutput), babsolute.param().abi(), core::mem::transmute(lpconsolewindow)).ok() + SetConsoleWindowInfo(core::mem::transmute(hconsoleoutput), babsolute.into(), core::mem::transmute(lpconsolewindow)).ok() } #[inline] -pub unsafe fn SetCurrentConsoleFontEx(hconsoleoutput: super::super::Foundation::HANDLE, bmaximumwindow: P1, lpconsolecurrentfontex: *const CONSOLE_FONT_INFOEX) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn SetCurrentConsoleFontEx(hconsoleoutput: super::super::Foundation::HANDLE, bmaximumwindow: bool, lpconsolecurrentfontex: *const CONSOLE_FONT_INFOEX) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetCurrentConsoleFontEx(hconsoleoutput : super::super::Foundation:: HANDLE, bmaximumwindow : super::super::Foundation:: BOOL, lpconsolecurrentfontex : *const CONSOLE_FONT_INFOEX) -> super::super::Foundation:: BOOL); - SetCurrentConsoleFontEx(core::mem::transmute(hconsoleoutput), bmaximumwindow.param().abi(), core::mem::transmute(lpconsolecurrentfontex)).ok() + SetCurrentConsoleFontEx(core::mem::transmute(hconsoleoutput), bmaximumwindow.into(), core::mem::transmute(lpconsolecurrentfontex)).ok() } #[inline] pub unsafe fn SetStdHandle(nstdhandle: STD_HANDLE, hhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -900,9 +885,6 @@ pub const HISTORY_NO_DUP_FLAG: u32 = 1u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HPCON(pub isize); -impl windows_core::TypeKind for HPCON { - type TypeKind = windows_core::CopyType; -} impl HPCON { pub fn is_invalid(&self) -> bool { self.0 == -1 || self.0 == 0 diff --git a/crates/libs/windows/src/Windows/Win32/System/Contacts/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Contacts/mod.rs index cb45e2f586..4d81949580 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Contacts/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Contacts/mod.rs @@ -1083,11 +1083,8 @@ impl IContactAggregationLink { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsLinkResolved)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIsLinkResolved(&self, islinkresolved: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIsLinkResolved)(windows_core::Interface::as_raw(self), islinkresolved.param().abi()).ok() + pub unsafe fn SetIsLinkResolved(&self, islinkresolved: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIsLinkResolved)(windows_core::Interface::as_raw(self), islinkresolved.into()).ok() } pub unsafe fn NetworkSourceIdString(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1766,11 +1763,8 @@ impl IContactAggregationServerPerson { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsTombstone)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIsTombstone(&self, istombstone: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIsTombstone)(windows_core::Interface::as_raw(self), istombstone.param().abi()).ok() + pub unsafe fn SetIsTombstone(&self, istombstone: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIsTombstone)(windows_core::Interface::as_raw(self), istombstone.into()).ok() } pub unsafe fn LinkedAggregateId(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2399,12 +2393,11 @@ impl IContactProperties { { (windows_core::Interface::vtable(self).SetLabels)(windows_core::Interface::as_raw(self), pszarrayelementname.param().abi(), core::mem::transmute(dwflags), ppszlabels.len().try_into().unwrap(), core::mem::transmute(ppszlabels.as_ptr())).ok() } - pub unsafe fn CreateArrayNode(&self, pszarrayname: P0, dwflags: u32, fappend: P2, psznewarrayelementname: &mut [u16], pdwcchnewarrayelementnamerequired: *mut u32) -> windows_core::Result<()> + pub unsafe fn CreateArrayNode(&self, pszarrayname: P0, dwflags: u32, fappend: bool, psznewarrayelementname: &mut [u16], pdwcchnewarrayelementnamerequired: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateArrayNode)(windows_core::Interface::as_raw(self), pszarrayname.param().abi(), core::mem::transmute(dwflags), fappend.param().abi(), core::mem::transmute(psznewarrayelementname.as_ptr()), psznewarrayelementname.len().try_into().unwrap(), core::mem::transmute(pdwcchnewarrayelementnamerequired)).ok() + (windows_core::Interface::vtable(self).CreateArrayNode)(windows_core::Interface::as_raw(self), pszarrayname.param().abi(), core::mem::transmute(dwflags), fappend.into(), core::mem::transmute(psznewarrayelementname.as_ptr()), psznewarrayelementname.len().try_into().unwrap(), core::mem::transmute(pdwcchnewarrayelementnamerequired)).ok() } pub unsafe fn DeleteProperty(&self, pszpropertyname: P0, dwflags: u32) -> windows_core::Result<()> where @@ -2424,12 +2417,11 @@ impl IContactProperties { { (windows_core::Interface::vtable(self).DeleteLabels)(windows_core::Interface::as_raw(self), pszarrayelementname.param().abi(), core::mem::transmute(dwflags)).ok() } - pub unsafe fn GetPropertyCollection(&self, pppropertycollection: *mut Option, dwflags: u32, pszmultivaluename: P2, ppszlabels: &[windows_core::PCWSTR], fanylabelmatches: P5) -> windows_core::Result<()> + pub unsafe fn GetPropertyCollection(&self, pppropertycollection: *mut Option, dwflags: u32, pszmultivaluename: P2, ppszlabels: &[windows_core::PCWSTR], fanylabelmatches: bool) -> windows_core::Result<()> where P2: windows_core::Param, - P5: windows_core::Param, { - (windows_core::Interface::vtable(self).GetPropertyCollection)(windows_core::Interface::as_raw(self), core::mem::transmute(pppropertycollection), core::mem::transmute(dwflags), pszmultivaluename.param().abi(), ppszlabels.len().try_into().unwrap(), core::mem::transmute(ppszlabels.as_ptr()), fanylabelmatches.param().abi()).ok() + (windows_core::Interface::vtable(self).GetPropertyCollection)(windows_core::Interface::as_raw(self), core::mem::transmute(pppropertycollection), core::mem::transmute(dwflags), pszmultivaluename.param().abi(), ppszlabels.len().try_into().unwrap(), core::mem::transmute(ppszlabels.as_ptr()), fanylabelmatches.into()).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/System/DataExchange/mod.rs b/crates/libs/windows/src/Windows/Win32/System/DataExchange/mod.rs index 00a96a15bf..6c66ee4067 100644 --- a/crates/libs/windows/src/Windows/Win32/System/DataExchange/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/DataExchange/mod.rs @@ -720,9 +720,6 @@ pub const EC_QUERYWAITING: DDE_ENABLE_CALLBACK_CMD = DDE_ENABLE_CALLBACK_CMD(2u3 #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HCONV(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HCONV { - type TypeKind = windows_core::CopyType; -} impl HCONV { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -745,9 +742,6 @@ impl Default for HCONV { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HCONVLIST(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HCONVLIST { - type TypeKind = windows_core::CopyType; -} impl HCONVLIST { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -771,9 +765,6 @@ pub const HDATA_APPOWNED: u32 = 1u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HDDEDATA(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HDDEDATA { - type TypeKind = windows_core::CopyType; -} impl HDDEDATA { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -796,9 +787,6 @@ impl Default for HDDEDATA { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HSZ(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HSZ { - type TypeKind = windows_core::CopyType; -} impl HSZ { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/System/DeploymentServices/mod.rs b/crates/libs/windows/src/Windows/Win32/System/DeploymentServices/mod.rs index 5a98f583b1..3444361c78 100644 --- a/crates/libs/windows/src/Windows/Win32/System/DeploymentServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/DeploymentServices/mod.rs @@ -29,12 +29,9 @@ pub unsafe fn PxeDhcpInitialize(precvpacket: *const core::ffi::c_void, urecvpack PxeDhcpInitialize(core::mem::transmute(precvpacket), core::mem::transmute(urecvpacketlen), core::mem::transmute(preplypacket), core::mem::transmute(umaxreplypacketlen), core::mem::transmute(pureplypacketlen)) } #[inline] -pub unsafe fn PxeDhcpIsValid(ppacket: *const core::ffi::c_void, upacketlen: u32, brequestpacket: P2, pbpxeoptionpresent: Option<*mut super::super::Foundation::BOOL>) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn PxeDhcpIsValid(ppacket: *const core::ffi::c_void, upacketlen: u32, brequestpacket: bool, pbpxeoptionpresent: Option<*mut super::super::Foundation::BOOL>) -> u32 { windows_targets::link!("wdspxe.dll" "system" fn PxeDhcpIsValid(ppacket : *const core::ffi::c_void, upacketlen : u32, brequestpacket : super::super::Foundation:: BOOL, pbpxeoptionpresent : *mut super::super::Foundation:: BOOL) -> u32); - PxeDhcpIsValid(core::mem::transmute(ppacket), core::mem::transmute(upacketlen), brequestpacket.param().abi(), core::mem::transmute(pbpxeoptionpresent.unwrap_or(core::mem::zeroed()))) + PxeDhcpIsValid(core::mem::transmute(ppacket), core::mem::transmute(upacketlen), brequestpacket.into(), core::mem::transmute(pbpxeoptionpresent.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn PxeDhcpv6AppendOption(preply: *mut core::ffi::c_void, cbreply: u32, pcbreplyused: *mut u32, woptiontype: u16, cboption: u16, poption: *const core::ffi::c_void) -> u32 { @@ -67,12 +64,9 @@ pub unsafe fn PxeDhcpv6Initialize(prequest: *const core::ffi::c_void, cbrequest: PxeDhcpv6Initialize(core::mem::transmute(prequest), core::mem::transmute(cbrequest), core::mem::transmute(preply), core::mem::transmute(cbreply), core::mem::transmute(pcbreplyused)) } #[inline] -pub unsafe fn PxeDhcpv6IsValid(ppacket: *const core::ffi::c_void, upacketlen: u32, brequestpacket: P2, pbpxeoptionpresent: Option<*mut super::super::Foundation::BOOL>) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn PxeDhcpv6IsValid(ppacket: *const core::ffi::c_void, upacketlen: u32, brequestpacket: bool, pbpxeoptionpresent: Option<*mut super::super::Foundation::BOOL>) -> u32 { windows_targets::link!("wdspxe.dll" "system" fn PxeDhcpv6IsValid(ppacket : *const core::ffi::c_void, upacketlen : u32, brequestpacket : super::super::Foundation:: BOOL, pbpxeoptionpresent : *mut super::super::Foundation:: BOOL) -> u32); - PxeDhcpv6IsValid(core::mem::transmute(ppacket), core::mem::transmute(upacketlen), brequestpacket.param().abi(), core::mem::transmute(pbpxeoptionpresent.unwrap_or(core::mem::zeroed()))) + PxeDhcpv6IsValid(core::mem::transmute(ppacket), core::mem::transmute(upacketlen), brequestpacket.into(), core::mem::transmute(pbpxeoptionpresent.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn PxeDhcpv6ParseRelayForw(prelayforwpacket: *const core::ffi::c_void, urelayforwpacketlen: u32, prelaymessages: &mut [PXE_DHCPV6_NESTED_RELAY_MESSAGE], pnrelaymessages: *mut u32, ppinnerpacket: *mut *mut u8, pcbinnerpacket: *mut u32) -> u32 { @@ -129,14 +123,13 @@ where } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PxeProviderRegister(pszprovidername: P0, pszmodulepath: P1, index: u32, biscritical: P3, phproviderkey: Option<*mut super::Registry::HKEY>) -> u32 +pub unsafe fn PxeProviderRegister(pszprovidername: P0, pszmodulepath: P1, index: u32, biscritical: bool, phproviderkey: Option<*mut super::Registry::HKEY>) -> u32 where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("wdspxe.dll" "system" fn PxeProviderRegister(pszprovidername : windows_core::PCWSTR, pszmodulepath : windows_core::PCWSTR, index : u32, biscritical : super::super::Foundation:: BOOL, phproviderkey : *mut super::Registry:: HKEY) -> u32); - PxeProviderRegister(pszprovidername.param().abi(), pszmodulepath.param().abi(), core::mem::transmute(index), biscritical.param().abi(), core::mem::transmute(phproviderkey.unwrap_or(core::mem::zeroed()))) + PxeProviderRegister(pszprovidername.param().abi(), pszmodulepath.param().abi(), core::mem::transmute(index), biscritical.into(), core::mem::transmute(phproviderkey.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn PxeProviderSetAttribute(hprovider: super::super::Foundation::HANDLE, attribute: u32, pparameterbuffer: *const core::ffi::c_void, uparamlen: u32) -> u32 { diff --git a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ClrProfiling/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ClrProfiling/mod.rs index 564c364e8f..9d02df6f96 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ClrProfiling/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ClrProfiling/mod.rs @@ -511,17 +511,11 @@ impl ICorProfilerCallback { pub unsafe fn FunctionUnloadStarted(&self, functionid: usize) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).FunctionUnloadStarted)(windows_core::Interface::as_raw(self), core::mem::transmute(functionid)).ok() } - pub unsafe fn JITCompilationStarted(&self, functionid: usize, fissafetoblock: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).JITCompilationStarted)(windows_core::Interface::as_raw(self), core::mem::transmute(functionid), fissafetoblock.param().abi()).ok() + pub unsafe fn JITCompilationStarted(&self, functionid: usize, fissafetoblock: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).JITCompilationStarted)(windows_core::Interface::as_raw(self), core::mem::transmute(functionid), fissafetoblock.into()).ok() } - pub unsafe fn JITCompilationFinished(&self, functionid: usize, hrstatus: windows_core::HRESULT, fissafetoblock: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).JITCompilationFinished)(windows_core::Interface::as_raw(self), core::mem::transmute(functionid), core::mem::transmute(hrstatus), fissafetoblock.param().abi()).ok() + pub unsafe fn JITCompilationFinished(&self, functionid: usize, hrstatus: windows_core::HRESULT, fissafetoblock: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).JITCompilationFinished)(windows_core::Interface::as_raw(self), core::mem::transmute(functionid), core::mem::transmute(hrstatus), fissafetoblock.into()).ok() } pub unsafe fn JITCachedFunctionSearchStarted(&self, functionid: usize) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -549,26 +543,17 @@ impl ICorProfilerCallback { pub unsafe fn RemotingClientInvocationStarted(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RemotingClientInvocationStarted)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn RemotingClientSendingMessage(&self, pcookie: *const windows_core::GUID, fisasync: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).RemotingClientSendingMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(pcookie), fisasync.param().abi()).ok() + pub unsafe fn RemotingClientSendingMessage(&self, pcookie: *const windows_core::GUID, fisasync: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RemotingClientSendingMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(pcookie), fisasync.into()).ok() } - pub unsafe fn RemotingClientReceivingReply(&self, pcookie: *const windows_core::GUID, fisasync: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).RemotingClientReceivingReply)(windows_core::Interface::as_raw(self), core::mem::transmute(pcookie), fisasync.param().abi()).ok() + pub unsafe fn RemotingClientReceivingReply(&self, pcookie: *const windows_core::GUID, fisasync: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RemotingClientReceivingReply)(windows_core::Interface::as_raw(self), core::mem::transmute(pcookie), fisasync.into()).ok() } pub unsafe fn RemotingClientInvocationFinished(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RemotingClientInvocationFinished)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn RemotingServerReceivingMessage(&self, pcookie: *const windows_core::GUID, fisasync: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).RemotingServerReceivingMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(pcookie), fisasync.param().abi()).ok() + pub unsafe fn RemotingServerReceivingMessage(&self, pcookie: *const windows_core::GUID, fisasync: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RemotingServerReceivingMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(pcookie), fisasync.into()).ok() } pub unsafe fn RemotingServerInvocationStarted(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RemotingServerInvocationStarted)(windows_core::Interface::as_raw(self)).ok() @@ -576,11 +561,8 @@ impl ICorProfilerCallback { pub unsafe fn RemotingServerInvocationReturned(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RemotingServerInvocationReturned)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn RemotingServerSendingReply(&self, pcookie: *const windows_core::GUID, fisasync: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).RemotingServerSendingReply)(windows_core::Interface::as_raw(self), core::mem::transmute(pcookie), fisasync.param().abi()).ok() + pub unsafe fn RemotingServerSendingReply(&self, pcookie: *const windows_core::GUID, fisasync: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RemotingServerSendingReply)(windows_core::Interface::as_raw(self), core::mem::transmute(pcookie), fisasync.into()).ok() } pub unsafe fn UnmanagedToManagedTransition(&self, functionid: usize, reason: COR_PRF_TRANSITION_REASON) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UnmanagedToManagedTransition)(windows_core::Interface::as_raw(self), core::mem::transmute(functionid), core::mem::transmute(reason)).ok() @@ -1478,11 +1460,8 @@ impl core::ops::Deref for ICorProfilerCallback4 { } windows_core::imp::interface_hierarchy!(ICorProfilerCallback4, windows_core::IUnknown, ICorProfilerCallback, ICorProfilerCallback2, ICorProfilerCallback3); impl ICorProfilerCallback4 { - pub unsafe fn ReJITCompilationStarted(&self, functionid: usize, rejitid: usize, fissafetoblock: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReJITCompilationStarted)(windows_core::Interface::as_raw(self), core::mem::transmute(functionid), core::mem::transmute(rejitid), fissafetoblock.param().abi()).ok() + pub unsafe fn ReJITCompilationStarted(&self, functionid: usize, rejitid: usize, fissafetoblock: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReJITCompilationStarted)(windows_core::Interface::as_raw(self), core::mem::transmute(functionid), core::mem::transmute(rejitid), fissafetoblock.into()).ok() } pub unsafe fn GetReJITParameters(&self, moduleid: usize, methodid: u32, pfunctioncontrol: P2) -> windows_core::Result<()> where @@ -1490,11 +1469,8 @@ impl ICorProfilerCallback4 { { (windows_core::Interface::vtable(self).GetReJITParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(moduleid), core::mem::transmute(methodid), pfunctioncontrol.param().abi()).ok() } - pub unsafe fn ReJITCompilationFinished(&self, functionid: usize, rejitid: usize, hrstatus: windows_core::HRESULT, fissafetoblock: P3) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReJITCompilationFinished)(windows_core::Interface::as_raw(self), core::mem::transmute(functionid), core::mem::transmute(rejitid), core::mem::transmute(hrstatus), fissafetoblock.param().abi()).ok() + pub unsafe fn ReJITCompilationFinished(&self, functionid: usize, rejitid: usize, hrstatus: windows_core::HRESULT, fissafetoblock: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ReJITCompilationFinished)(windows_core::Interface::as_raw(self), core::mem::transmute(functionid), core::mem::transmute(rejitid), core::mem::transmute(hrstatus), fissafetoblock.into()).ok() } pub unsafe fn ReJITError(&self, moduleid: usize, methodid: u32, functionid: usize, hrstatus: windows_core::HRESULT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReJITError)(windows_core::Interface::as_raw(self), core::mem::transmute(moduleid), core::mem::transmute(methodid), core::mem::transmute(functionid), core::mem::transmute(hrstatus)).ok() @@ -1683,17 +1659,11 @@ impl core::ops::Deref for ICorProfilerCallback8 { } windows_core::imp::interface_hierarchy!(ICorProfilerCallback8, windows_core::IUnknown, ICorProfilerCallback, ICorProfilerCallback2, ICorProfilerCallback3, ICorProfilerCallback4, ICorProfilerCallback5, ICorProfilerCallback6, ICorProfilerCallback7); impl ICorProfilerCallback8 { - pub unsafe fn DynamicMethodJITCompilationStarted(&self, functionid: usize, fissafetoblock: P1, pilheader: *const u8, cbilheader: u32) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).DynamicMethodJITCompilationStarted)(windows_core::Interface::as_raw(self), core::mem::transmute(functionid), fissafetoblock.param().abi(), core::mem::transmute(pilheader), core::mem::transmute(cbilheader)).ok() + pub unsafe fn DynamicMethodJITCompilationStarted(&self, functionid: usize, fissafetoblock: bool, pilheader: *const u8, cbilheader: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DynamicMethodJITCompilationStarted)(windows_core::Interface::as_raw(self), core::mem::transmute(functionid), fissafetoblock.into(), core::mem::transmute(pilheader), core::mem::transmute(cbilheader)).ok() } - pub unsafe fn DynamicMethodJITCompilationFinished(&self, functionid: usize, hrstatus: windows_core::HRESULT, fissafetoblock: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).DynamicMethodJITCompilationFinished)(windows_core::Interface::as_raw(self), core::mem::transmute(functionid), core::mem::transmute(hrstatus), fissafetoblock.param().abi()).ok() + pub unsafe fn DynamicMethodJITCompilationFinished(&self, functionid: usize, hrstatus: windows_core::HRESULT, fissafetoblock: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DynamicMethodJITCompilationFinished)(windows_core::Interface::as_raw(self), core::mem::transmute(functionid), core::mem::transmute(hrstatus), fissafetoblock.into()).ok() } } #[repr(C)] @@ -1990,11 +1960,8 @@ impl ICorProfilerInfo { pub unsafe fn ForceGC(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ForceGC)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetILInstrumentedCodeMap(&self, functionid: usize, fstartjit: P1, rgilmapentries: &[COR_IL_MAP]) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetILInstrumentedCodeMap)(windows_core::Interface::as_raw(self), core::mem::transmute(functionid), fstartjit.param().abi(), rgilmapentries.len().try_into().unwrap(), core::mem::transmute(rgilmapentries.as_ptr())).ok() + pub unsafe fn SetILInstrumentedCodeMap(&self, functionid: usize, fstartjit: bool, rgilmapentries: &[COR_IL_MAP]) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetILInstrumentedCodeMap)(windows_core::Interface::as_raw(self), core::mem::transmute(functionid), fstartjit.into(), rgilmapentries.len().try_into().unwrap(), core::mem::transmute(rgilmapentries.as_ptr())).ok() } pub unsafe fn GetInprocInspectionInterface(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2008,12 +1975,9 @@ impl ICorProfilerInfo { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetThreadContext)(windows_core::Interface::as_raw(self), core::mem::transmute(threadid), &mut result__).map(|| result__) } - pub unsafe fn BeginInprocDebugging(&self, fthisthreadonly: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn BeginInprocDebugging(&self, fthisthreadonly: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).BeginInprocDebugging)(windows_core::Interface::as_raw(self), fthisthreadonly.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).BeginInprocDebugging)(windows_core::Interface::as_raw(self), fthisthreadonly.into(), &mut result__).map(|| result__) } pub unsafe fn EndInprocDebugging(&self, dwprofilercontext: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EndInprocDebugging)(windows_core::Interface::as_raw(self), core::mem::transmute(dwprofilercontext)).ok() @@ -2522,12 +2486,9 @@ impl core::ops::Deref for ICorProfilerInfo12 { } windows_core::imp::interface_hierarchy!(ICorProfilerInfo12, windows_core::IUnknown, ICorProfilerInfo, ICorProfilerInfo2, ICorProfilerInfo3, ICorProfilerInfo4, ICorProfilerInfo5, ICorProfilerInfo6, ICorProfilerInfo7, ICorProfilerInfo8, ICorProfilerInfo9, ICorProfilerInfo10, ICorProfilerInfo11); impl ICorProfilerInfo12 { - pub unsafe fn EventPipeStartSession(&self, pproviderconfigs: &[COR_PRF_EVENTPIPE_PROVIDER_CONFIG], requestrundown: P2) -> windows_core::Result - where - P2: windows_core::Param, - { + pub unsafe fn EventPipeStartSession(&self, pproviderconfigs: &[COR_PRF_EVENTPIPE_PROVIDER_CONFIG], requestrundown: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).EventPipeStartSession)(windows_core::Interface::as_raw(self), pproviderconfigs.len().try_into().unwrap(), core::mem::transmute(pproviderconfigs.as_ptr()), requestrundown.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).EventPipeStartSession)(windows_core::Interface::as_raw(self), pproviderconfigs.len().try_into().unwrap(), core::mem::transmute(pproviderconfigs.as_ptr()), requestrundown.into(), &mut result__).map(|| result__) } pub unsafe fn EventPipeAddProviderToSession(&self, session: u64, providerconfig: COR_PRF_EVENTPIPE_PROVIDER_CONFIG) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EventPipeAddProviderToSession)(windows_core::Interface::as_raw(self), core::mem::transmute(session), core::mem::transmute(providerconfig)).ok() @@ -2545,13 +2506,12 @@ impl ICorProfilerInfo12 { pub unsafe fn EventPipeGetProviderInfo(&self, provider: usize, pcchname: *mut u32, providername: &mut [u16]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EventPipeGetProviderInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(provider), providername.len().try_into().unwrap(), core::mem::transmute(pcchname), core::mem::transmute(providername.as_ptr())).ok() } - pub unsafe fn EventPipeDefineEvent(&self, provider: usize, eventname: P1, eventid: u32, keywords: u64, eventversion: u32, level: u32, opcode: u8, needstack: P7, pparamdescs: &[COR_PRF_EVENTPIPE_PARAM_DESC]) -> windows_core::Result + pub unsafe fn EventPipeDefineEvent(&self, provider: usize, eventname: P1, eventid: u32, keywords: u64, eventversion: u32, level: u32, opcode: u8, needstack: bool, pparamdescs: &[COR_PRF_EVENTPIPE_PARAM_DESC]) -> windows_core::Result where P1: windows_core::Param, - P7: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).EventPipeDefineEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(provider), eventname.param().abi(), core::mem::transmute(eventid), core::mem::transmute(keywords), core::mem::transmute(eventversion), core::mem::transmute(level), core::mem::transmute(opcode), needstack.param().abi(), pparamdescs.len().try_into().unwrap(), core::mem::transmute(pparamdescs.as_ptr()), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).EventPipeDefineEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(provider), eventname.param().abi(), core::mem::transmute(eventid), core::mem::transmute(keywords), core::mem::transmute(eventversion), core::mem::transmute(level), core::mem::transmute(opcode), needstack.into(), pparamdescs.len().try_into().unwrap(), core::mem::transmute(pparamdescs.as_ptr()), &mut result__).map(|| result__) } pub unsafe fn EventPipeWriteEvent(&self, event: usize, data: &[COR_PRF_EVENT_DATA], pactivityid: *const windows_core::GUID, prelatedactivityid: *const windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EventPipeWriteEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(event), data.len().try_into().unwrap(), core::mem::transmute(data.as_ptr()), core::mem::transmute(pactivityid), core::mem::transmute(prelatedactivityid)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/ActiveScript/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/ActiveScript/mod.rs index 8f5f12159d..455dc1e4fb 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/ActiveScript/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/ActiveScript/mod.rs @@ -2571,11 +2571,8 @@ impl IActiveScriptSiteWindow { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetWindow)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn EnableModeless(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableModeless)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn EnableModeless(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableModeless)(windows_core::Interface::as_raw(self), fenable.into()).ok() } } #[repr(C)] @@ -4636,13 +4633,12 @@ impl IDebugDocumentHelper32 { pub unsafe fn AddDeferredText(&self, cchars: u32, dwtextstartcookie: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AddDeferredText)(windows_core::Interface::as_raw(self), core::mem::transmute(cchars), core::mem::transmute(dwtextstartcookie)).ok() } - pub unsafe fn DefineScriptBlock(&self, ulcharoffset: u32, cchars: u32, pas: P2, fscriptlet: P3) -> windows_core::Result + pub unsafe fn DefineScriptBlock(&self, ulcharoffset: u32, cchars: u32, pas: P2, fscriptlet: bool) -> windows_core::Result where P2: windows_core::Param, - P3: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).DefineScriptBlock)(windows_core::Interface::as_raw(self), core::mem::transmute(ulcharoffset), core::mem::transmute(cchars), pas.param().abi(), fscriptlet.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).DefineScriptBlock)(windows_core::Interface::as_raw(self), core::mem::transmute(ulcharoffset), core::mem::transmute(cchars), pas.param().abi(), fscriptlet.into(), &mut result__).map(|| result__) } pub unsafe fn SetDefaultTextAttr(&self, statextattr: u16) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetDefaultTextAttr)(windows_core::Interface::as_raw(self), core::mem::transmute(statextattr)).ok() @@ -4888,13 +4884,12 @@ impl IDebugDocumentHelper64 { pub unsafe fn AddDeferredText(&self, cchars: u32, dwtextstartcookie: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AddDeferredText)(windows_core::Interface::as_raw(self), core::mem::transmute(cchars), core::mem::transmute(dwtextstartcookie)).ok() } - pub unsafe fn DefineScriptBlock(&self, ulcharoffset: u32, cchars: u32, pas: P2, fscriptlet: P3) -> windows_core::Result + pub unsafe fn DefineScriptBlock(&self, ulcharoffset: u32, cchars: u32, pas: P2, fscriptlet: bool) -> windows_core::Result where P2: windows_core::Param, - P3: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).DefineScriptBlock)(windows_core::Interface::as_raw(self), core::mem::transmute(ulcharoffset), core::mem::transmute(cchars), pas.param().abi(), fscriptlet.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).DefineScriptBlock)(windows_core::Interface::as_raw(self), core::mem::transmute(ulcharoffset), core::mem::transmute(cchars), pas.param().abi(), fscriptlet.into(), &mut result__).map(|| result__) } pub unsafe fn SetDefaultTextAttr(&self, statextattr: u16) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetDefaultTextAttr)(windows_core::Interface::as_raw(self), core::mem::transmute(statextattr)).ok() @@ -5992,19 +5987,13 @@ impl IDebugStackFrame { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetCodeContext)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn GetDescriptionString(&self, flong: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetDescriptionString(&self, flong: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetDescriptionString)(windows_core::Interface::as_raw(self), flong.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + (windows_core::Interface::vtable(self).GetDescriptionString)(windows_core::Interface::as_raw(self), flong.into(), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn GetLanguageString(&self, flong: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetLanguageString(&self, flong: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetLanguageString)(windows_core::Interface::as_raw(self), flong.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + (windows_core::Interface::vtable(self).GetLanguageString)(windows_core::Interface::as_raw(self), flong.into(), &mut result__).map(|| core::mem::transmute(result__)) } pub unsafe fn GetThread(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -7259,12 +7248,9 @@ impl IJsDebugProcess { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateStackWalker)(windows_core::Interface::as_raw(self), core::mem::transmute(threadid), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn CreateBreakPoint(&self, documentid: u64, characteroffset: u32, charactercount: u32, isenabled: P3) -> windows_core::Result - where - P3: windows_core::Param, - { + pub unsafe fn CreateBreakPoint(&self, documentid: u64, characteroffset: u32, charactercount: u32, isenabled: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateBreakPoint)(windows_core::Interface::as_raw(self), core::mem::transmute(documentid), core::mem::transmute(characteroffset), core::mem::transmute(charactercount), isenabled.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateBreakPoint)(windows_core::Interface::as_raw(self), core::mem::transmute(documentid), core::mem::transmute(characteroffset), core::mem::transmute(charactercount), isenabled.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn PerformAsyncBreak(&self, threadid: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).PerformAsyncBreak)(windows_core::Interface::as_raw(self), core::mem::transmute(threadid)).ok() 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 4afab449b2..8c19d6740f 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 @@ -14614,12 +14614,11 @@ impl IDebugControl { pub unsafe fn GetLogFile(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLogFile)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(append)).ok() } - pub unsafe fn OpenLogFile(&self, file: P0, append: P1) -> windows_core::Result<()> + pub unsafe fn OpenLogFile(&self, file: P0, append: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).OpenLogFile)(windows_core::Interface::as_raw(self), file.param().abi(), append.param().abi()).ok() + (windows_core::Interface::vtable(self).OpenLogFile)(windows_core::Interface::as_raw(self), file.param().abi(), append.into()).ok() } pub unsafe fn CloseLogFile(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CloseLogFile)(windows_core::Interface::as_raw(self)).ok() @@ -15860,12 +15859,11 @@ impl IDebugControl2 { pub unsafe fn GetLogFile(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLogFile)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(append)).ok() } - pub unsafe fn OpenLogFile(&self, file: P0, append: P1) -> windows_core::Result<()> + pub unsafe fn OpenLogFile(&self, file: P0, append: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).OpenLogFile)(windows_core::Interface::as_raw(self), file.param().abi(), append.param().abi()).ok() + (windows_core::Interface::vtable(self).OpenLogFile)(windows_core::Interface::as_raw(self), file.param().abi(), append.into()).ok() } pub unsafe fn CloseLogFile(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CloseLogFile)(windows_core::Interface::as_raw(self)).ok() @@ -17232,12 +17230,11 @@ impl IDebugControl3 { pub unsafe fn GetLogFile(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLogFile)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(append)).ok() } - pub unsafe fn OpenLogFile(&self, file: P0, append: P1) -> windows_core::Result<()> + pub unsafe fn OpenLogFile(&self, file: P0, append: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).OpenLogFile)(windows_core::Interface::as_raw(self), file.param().abi(), append.param().abi()).ok() + (windows_core::Interface::vtable(self).OpenLogFile)(windows_core::Interface::as_raw(self), file.param().abi(), append.into()).ok() } pub unsafe fn CloseLogFile(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CloseLogFile)(windows_core::Interface::as_raw(self)).ok() @@ -18792,12 +18789,11 @@ impl IDebugControl4 { pub unsafe fn GetLogFile(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLogFile)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(append)).ok() } - pub unsafe fn OpenLogFile(&self, file: P0, append: P1) -> windows_core::Result<()> + pub unsafe fn OpenLogFile(&self, file: P0, append: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).OpenLogFile)(windows_core::Interface::as_raw(self), file.param().abi(), append.param().abi()).ok() + (windows_core::Interface::vtable(self).OpenLogFile)(windows_core::Interface::as_raw(self), file.param().abi(), append.into()).ok() } pub unsafe fn CloseLogFile(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CloseLogFile)(windows_core::Interface::as_raw(self)).ok() @@ -19302,12 +19298,11 @@ impl IDebugControl4 { pub unsafe fn GetLogFileWide(&self, buffer: Option<&mut [u16]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLogFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(append)).ok() } - pub unsafe fn OpenLogFileWide(&self, file: P0, append: P1) -> windows_core::Result<()> + pub unsafe fn OpenLogFileWide(&self, file: P0, append: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).OpenLogFileWide)(windows_core::Interface::as_raw(self), file.param().abi(), append.param().abi()).ok() + (windows_core::Interface::vtable(self).OpenLogFileWide)(windows_core::Interface::as_raw(self), file.param().abi(), append.into()).ok() } pub unsafe fn InputWide(&self, buffer: &mut [u16], inputsize: Option<*mut u32>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).InputWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(core::mem::zeroed()))).ok() @@ -21081,12 +21076,11 @@ impl IDebugControl5 { pub unsafe fn GetLogFile(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLogFile)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(append)).ok() } - pub unsafe fn OpenLogFile(&self, file: P0, append: P1) -> windows_core::Result<()> + pub unsafe fn OpenLogFile(&self, file: P0, append: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).OpenLogFile)(windows_core::Interface::as_raw(self), file.param().abi(), append.param().abi()).ok() + (windows_core::Interface::vtable(self).OpenLogFile)(windows_core::Interface::as_raw(self), file.param().abi(), append.into()).ok() } pub unsafe fn CloseLogFile(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CloseLogFile)(windows_core::Interface::as_raw(self)).ok() @@ -21591,12 +21585,11 @@ impl IDebugControl5 { pub unsafe fn GetLogFileWide(&self, buffer: Option<&mut [u16]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLogFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(append)).ok() } - pub unsafe fn OpenLogFileWide(&self, file: P0, append: P1) -> windows_core::Result<()> + pub unsafe fn OpenLogFileWide(&self, file: P0, append: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).OpenLogFileWide)(windows_core::Interface::as_raw(self), file.param().abi(), append.param().abi()).ok() + (windows_core::Interface::vtable(self).OpenLogFileWide)(windows_core::Interface::as_raw(self), file.param().abi(), append.into()).ok() } pub unsafe fn InputWide(&self, buffer: &mut [u16], inputsize: Option<*mut u32>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).InputWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(core::mem::zeroed()))).ok() @@ -23438,12 +23431,11 @@ impl IDebugControl6 { pub unsafe fn GetLogFile(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLogFile)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(append)).ok() } - pub unsafe fn OpenLogFile(&self, file: P0, append: P1) -> windows_core::Result<()> + pub unsafe fn OpenLogFile(&self, file: P0, append: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).OpenLogFile)(windows_core::Interface::as_raw(self), file.param().abi(), append.param().abi()).ok() + (windows_core::Interface::vtable(self).OpenLogFile)(windows_core::Interface::as_raw(self), file.param().abi(), append.into()).ok() } pub unsafe fn CloseLogFile(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CloseLogFile)(windows_core::Interface::as_raw(self)).ok() @@ -23948,12 +23940,11 @@ impl IDebugControl6 { pub unsafe fn GetLogFileWide(&self, buffer: Option<&mut [u16]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLogFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(append)).ok() } - pub unsafe fn OpenLogFileWide(&self, file: P0, append: P1) -> windows_core::Result<()> + pub unsafe fn OpenLogFileWide(&self, file: P0, append: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).OpenLogFileWide)(windows_core::Interface::as_raw(self), file.param().abi(), append.param().abi()).ok() + (windows_core::Interface::vtable(self).OpenLogFileWide)(windows_core::Interface::as_raw(self), file.param().abi(), append.into()).ok() } pub unsafe fn InputWide(&self, buffer: &mut [u16], inputsize: Option<*mut u32>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).InputWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(core::mem::zeroed()))).ok() @@ -25822,12 +25813,11 @@ impl IDebugControl7 { pub unsafe fn GetLogFile(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLogFile)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(append)).ok() } - pub unsafe fn OpenLogFile(&self, file: P0, append: P1) -> windows_core::Result<()> + pub unsafe fn OpenLogFile(&self, file: P0, append: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).OpenLogFile)(windows_core::Interface::as_raw(self), file.param().abi(), append.param().abi()).ok() + (windows_core::Interface::vtable(self).OpenLogFile)(windows_core::Interface::as_raw(self), file.param().abi(), append.into()).ok() } pub unsafe fn CloseLogFile(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CloseLogFile)(windows_core::Interface::as_raw(self)).ok() @@ -26332,12 +26322,11 @@ impl IDebugControl7 { pub unsafe fn GetLogFileWide(&self, buffer: Option<&mut [u16]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLogFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::mem::zeroed())), core::mem::transmute(append)).ok() } - pub unsafe fn OpenLogFileWide(&self, file: P0, append: P1) -> windows_core::Result<()> + pub unsafe fn OpenLogFileWide(&self, file: P0, append: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).OpenLogFileWide)(windows_core::Interface::as_raw(self), file.param().abi(), append.param().abi()).ok() + (windows_core::Interface::vtable(self).OpenLogFileWide)(windows_core::Interface::as_raw(self), file.param().abi(), append.into()).ok() } pub unsafe fn InputWide(&self, buffer: &mut [u16], inputsize: Option<*mut u32>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).InputWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(core::mem::zeroed()))).ok() @@ -34132,11 +34121,8 @@ impl IDebugSymbolGroup { pub unsafe fn GetSymbolParameters(&self, start: u32, params: &mut [DEBUG_SYMBOL_PARAMETERS]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetSymbolParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(start), params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } - pub unsafe fn ExpandSymbol(&self, index: u32, expand: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).ExpandSymbol)(windows_core::Interface::as_raw(self), core::mem::transmute(index), expand.param().abi()).ok() + pub unsafe fn ExpandSymbol(&self, index: u32, expand: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ExpandSymbol)(windows_core::Interface::as_raw(self), core::mem::transmute(index), expand.into()).ok() } pub unsafe fn OutputSymbols(&self, outputcontrol: u32, flags: u32, start: u32, count: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputSymbols)(windows_core::Interface::as_raw(self), core::mem::transmute(outputcontrol), core::mem::transmute(flags), core::mem::transmute(start), core::mem::transmute(count)).ok() @@ -34275,11 +34261,8 @@ impl IDebugSymbolGroup2 { pub unsafe fn GetSymbolParameters(&self, start: u32, params: &mut [DEBUG_SYMBOL_PARAMETERS]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetSymbolParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(start), params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } - pub unsafe fn ExpandSymbol(&self, index: u32, expand: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).ExpandSymbol)(windows_core::Interface::as_raw(self), core::mem::transmute(index), expand.param().abi()).ok() + pub unsafe fn ExpandSymbol(&self, index: u32, expand: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ExpandSymbol)(windows_core::Interface::as_raw(self), core::mem::transmute(index), expand.into()).ok() } pub unsafe fn OutputSymbols(&self, outputcontrol: u32, flags: u32, start: u32, count: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputSymbols)(windows_core::Interface::as_raw(self), core::mem::transmute(outputcontrol), core::mem::transmute(flags), core::mem::transmute(start), core::mem::transmute(count)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/mod.rs index 1179bbf93e..9be415e85f 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/mod.rs @@ -111,12 +111,9 @@ pub unsafe fn DebugBreakProcess(process: super::super::super::Foundation::HANDLE DebugBreakProcess(core::mem::transmute(process)).ok() } #[inline] -pub unsafe fn DebugSetProcessKillOnExit(killonexit: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn DebugSetProcessKillOnExit(killonexit: bool) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn DebugSetProcessKillOnExit(killonexit : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - DebugSetProcessKillOnExit(killonexit.param().abi()).ok() + DebugSetProcessKillOnExit(killonexit.into()).ok() } #[inline] pub unsafe fn DecodePointer(ptr: Option<*const core::ffi::c_void>) -> *mut core::ffi::c_void { @@ -382,20 +379,14 @@ pub unsafe fn ImageAddCertificate(filehandle: super::super::super::Foundation::H ImageAddCertificate(core::mem::transmute(filehandle), core::mem::transmute(certificate), core::mem::transmute(index)).ok() } #[inline] -pub unsafe fn ImageDirectoryEntryToData(base: *const core::ffi::c_void, mappedasimage: P1, directoryentry: IMAGE_DIRECTORY_ENTRY, size: *mut u32) -> *mut core::ffi::c_void -where - P1: windows_core::Param, -{ +pub unsafe fn ImageDirectoryEntryToData(base: *const core::ffi::c_void, mappedasimage: bool, directoryentry: IMAGE_DIRECTORY_ENTRY, size: *mut u32) -> *mut core::ffi::c_void { windows_targets::link!("dbghelp.dll" "system" fn ImageDirectoryEntryToData(base : *const core::ffi::c_void, mappedasimage : super::super::super::Foundation:: BOOLEAN, directoryentry : IMAGE_DIRECTORY_ENTRY, size : *mut u32) -> *mut core::ffi::c_void); - ImageDirectoryEntryToData(core::mem::transmute(base), mappedasimage.param().abi(), core::mem::transmute(directoryentry), core::mem::transmute(size)) + ImageDirectoryEntryToData(core::mem::transmute(base), mappedasimage.into(), core::mem::transmute(directoryentry), core::mem::transmute(size)) } #[inline] -pub unsafe fn ImageDirectoryEntryToDataEx(base: *const core::ffi::c_void, mappedasimage: P1, directoryentry: IMAGE_DIRECTORY_ENTRY, size: *mut u32, foundheader: Option<*mut *mut IMAGE_SECTION_HEADER>) -> *mut core::ffi::c_void -where - P1: windows_core::Param, -{ +pub unsafe fn ImageDirectoryEntryToDataEx(base: *const core::ffi::c_void, mappedasimage: bool, directoryentry: IMAGE_DIRECTORY_ENTRY, size: *mut u32, foundheader: Option<*mut *mut IMAGE_SECTION_HEADER>) -> *mut core::ffi::c_void { windows_targets::link!("dbghelp.dll" "system" fn ImageDirectoryEntryToDataEx(base : *const core::ffi::c_void, mappedasimage : super::super::super::Foundation:: BOOLEAN, directoryentry : IMAGE_DIRECTORY_ENTRY, size : *mut u32, foundheader : *mut *mut IMAGE_SECTION_HEADER) -> *mut core::ffi::c_void); - ImageDirectoryEntryToDataEx(core::mem::transmute(base), mappedasimage.param().abi(), core::mem::transmute(directoryentry), core::mem::transmute(size), core::mem::transmute(foundheader.unwrap_or(core::mem::zeroed()))) + ImageDirectoryEntryToDataEx(core::mem::transmute(base), mappedasimage.into(), core::mem::transmute(directoryentry), core::mem::transmute(size), core::mem::transmute(foundheader.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn ImageEnumerateCertificates(filehandle: super::super::super::Foundation::HANDLE, typefilter: u16, certificatecount: *mut u32, indices: Option<&mut [u32]>) -> windows_core::Result<()> { @@ -526,15 +517,13 @@ where } #[cfg(all(feature = "Win32_System_Kernel", feature = "Win32_System_SystemInformation"))] #[inline] -pub unsafe fn MapAndLoad(imagename: P0, dllpath: P1, loadedimage: *mut LOADED_IMAGE, dotdll: P3, readonly: P4) -> windows_core::Result<()> +pub unsafe fn MapAndLoad(imagename: P0, dllpath: P1, loadedimage: *mut LOADED_IMAGE, dotdll: bool, readonly: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("imagehlp.dll" "system" fn MapAndLoad(imagename : windows_core::PCSTR, dllpath : windows_core::PCSTR, loadedimage : *mut LOADED_IMAGE, dotdll : super::super::super::Foundation:: BOOL, readonly : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - MapAndLoad(imagename.param().abi(), dllpath.param().abi(), core::mem::transmute(loadedimage), dotdll.param().abi(), readonly.param().abi()).ok() + MapAndLoad(imagename.param().abi(), dllpath.param().abi(), core::mem::transmute(loadedimage), dotdll.into(), readonly.into()).ok() } #[inline] pub unsafe fn MapFileAndCheckSumA(filename: P0, headersum: *mut u32, checksum: *mut u32) -> u32 @@ -635,28 +624,22 @@ pub unsafe fn RangeMapWrite(rmaphandle: *const core::ffi::c_void, offset: u64, b RangeMapWrite(core::mem::transmute(rmaphandle), core::mem::transmute(offset), core::mem::transmute(buffer), core::mem::transmute(requestbytes), core::mem::transmute(flags), core::mem::transmute(donebytes.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn ReBaseImage(currentimagename: P0, symbolpath: P1, frebase: P2, frebasesysfileok: P3, fgoingdown: P4, checkimagesize: u32, oldimagesize: *mut u32, oldimagebase: *mut usize, newimagesize: *mut u32, newimagebase: *mut usize, timestamp: u32) -> windows_core::Result<()> +pub unsafe fn ReBaseImage(currentimagename: P0, symbolpath: P1, frebase: bool, frebasesysfileok: bool, fgoingdown: bool, checkimagesize: u32, oldimagesize: *mut u32, oldimagebase: *mut usize, newimagesize: *mut u32, newimagebase: *mut usize, timestamp: u32) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("imagehlp.dll" "system" fn ReBaseImage(currentimagename : windows_core::PCSTR, symbolpath : windows_core::PCSTR, frebase : super::super::super::Foundation:: BOOL, frebasesysfileok : super::super::super::Foundation:: BOOL, fgoingdown : super::super::super::Foundation:: BOOL, checkimagesize : u32, oldimagesize : *mut u32, oldimagebase : *mut usize, newimagesize : *mut u32, newimagebase : *mut usize, timestamp : u32) -> super::super::super::Foundation:: BOOL); - ReBaseImage(currentimagename.param().abi(), symbolpath.param().abi(), frebase.param().abi(), frebasesysfileok.param().abi(), fgoingdown.param().abi(), core::mem::transmute(checkimagesize), core::mem::transmute(oldimagesize), core::mem::transmute(oldimagebase), core::mem::transmute(newimagesize), core::mem::transmute(newimagebase), core::mem::transmute(timestamp)).ok() + ReBaseImage(currentimagename.param().abi(), symbolpath.param().abi(), frebase.into(), frebasesysfileok.into(), fgoingdown.into(), core::mem::transmute(checkimagesize), core::mem::transmute(oldimagesize), core::mem::transmute(oldimagebase), core::mem::transmute(newimagesize), core::mem::transmute(newimagebase), core::mem::transmute(timestamp)).ok() } #[inline] -pub unsafe fn ReBaseImage64(currentimagename: P0, symbolpath: P1, frebase: P2, frebasesysfileok: P3, fgoingdown: P4, checkimagesize: u32, oldimagesize: *mut u32, oldimagebase: *mut u64, newimagesize: *mut u32, newimagebase: *mut u64, timestamp: u32) -> windows_core::Result<()> +pub unsafe fn ReBaseImage64(currentimagename: P0, symbolpath: P1, frebase: bool, frebasesysfileok: bool, fgoingdown: bool, checkimagesize: u32, oldimagesize: *mut u32, oldimagebase: *mut u64, newimagesize: *mut u32, newimagebase: *mut u64, timestamp: u32) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("imagehlp.dll" "system" fn ReBaseImage64(currentimagename : windows_core::PCSTR, symbolpath : windows_core::PCSTR, frebase : super::super::super::Foundation:: BOOL, frebasesysfileok : super::super::super::Foundation:: BOOL, fgoingdown : super::super::super::Foundation:: BOOL, checkimagesize : u32, oldimagesize : *mut u32, oldimagebase : *mut u64, newimagesize : *mut u32, newimagebase : *mut u64, timestamp : u32) -> super::super::super::Foundation:: BOOL); - ReBaseImage64(currentimagename.param().abi(), symbolpath.param().abi(), frebase.param().abi(), frebasesysfileok.param().abi(), fgoingdown.param().abi(), core::mem::transmute(checkimagesize), core::mem::transmute(oldimagesize), core::mem::transmute(oldimagebase), core::mem::transmute(newimagesize), core::mem::transmute(newimagebase), core::mem::transmute(timestamp)).ok() + ReBaseImage64(currentimagename.param().abi(), symbolpath.param().abi(), frebase.into(), frebasesysfileok.into(), fgoingdown.into(), core::mem::transmute(checkimagesize), core::mem::transmute(oldimagesize), core::mem::transmute(oldimagebase), core::mem::transmute(newimagesize), core::mem::transmute(newimagebase), core::mem::transmute(timestamp)).ok() } #[inline] pub unsafe fn ReadProcessMemory(hprocess: super::super::super::Foundation::HANDLE, lpbaseaddress: *const core::ffi::c_void, lpbuffer: *mut core::ffi::c_void, nsize: usize, lpnumberofbytesread: Option<*mut usize>) -> windows_core::Result<()> { @@ -1709,22 +1692,20 @@ pub unsafe fn SymGetUnwindInfo(hprocess: super::super::super::Foundation::HANDLE SymGetUnwindInfo(core::mem::transmute(hprocess), core::mem::transmute(address), core::mem::transmute(buffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(size)) } #[inline] -pub unsafe fn SymInitialize(hprocess: super::super::super::Foundation::HANDLE, usersearchpath: P1, finvadeprocess: P2) -> windows_core::Result<()> +pub unsafe fn SymInitialize(hprocess: super::super::super::Foundation::HANDLE, usersearchpath: P1, finvadeprocess: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymInitialize(hprocess : super::super::super::Foundation:: HANDLE, usersearchpath : windows_core::PCSTR, finvadeprocess : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - SymInitialize(core::mem::transmute(hprocess), usersearchpath.param().abi(), finvadeprocess.param().abi()).ok() + SymInitialize(core::mem::transmute(hprocess), usersearchpath.param().abi(), finvadeprocess.into()).ok() } #[inline] -pub unsafe fn SymInitializeW(hprocess: super::super::super::Foundation::HANDLE, usersearchpath: P1, finvadeprocess: P2) -> windows_core::Result<()> +pub unsafe fn SymInitializeW(hprocess: super::super::super::Foundation::HANDLE, usersearchpath: P1, finvadeprocess: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymInitializeW(hprocess : super::super::super::Foundation:: HANDLE, usersearchpath : windows_core::PCWSTR, finvadeprocess : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - SymInitializeW(core::mem::transmute(hprocess), usersearchpath.param().abi(), finvadeprocess.param().abi()).ok() + SymInitializeW(core::mem::transmute(hprocess), usersearchpath.param().abi(), finvadeprocess.into()).ok() } #[cfg(target_arch = "x86")] #[inline] @@ -1782,34 +1763,31 @@ where SymMatchFileNameW(filename.param().abi(), r#match.param().abi(), core::mem::transmute(filenamestop.unwrap_or(core::mem::zeroed())), core::mem::transmute(matchstop.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SymMatchString(string: P0, expression: P1, fcase: P2) -> windows_core::Result<()> +pub unsafe fn SymMatchString(string: P0, expression: P1, fcase: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymMatchString(string : windows_core::PCSTR, expression : windows_core::PCSTR, fcase : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - SymMatchString(string.param().abi(), expression.param().abi(), fcase.param().abi()).ok() + SymMatchString(string.param().abi(), expression.param().abi(), fcase.into()).ok() } #[inline] -pub unsafe fn SymMatchStringA(string: P0, expression: P1, fcase: P2) -> super::super::super::Foundation::BOOL +pub unsafe fn SymMatchStringA(string: P0, expression: P1, fcase: bool) -> super::super::super::Foundation::BOOL where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymMatchStringA(string : windows_core::PCSTR, expression : windows_core::PCSTR, fcase : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - SymMatchStringA(string.param().abi(), expression.param().abi(), fcase.param().abi()) + SymMatchStringA(string.param().abi(), expression.param().abi(), fcase.into()) } #[inline] -pub unsafe fn SymMatchStringW(string: P0, expression: P1, fcase: P2) -> windows_core::Result<()> +pub unsafe fn SymMatchStringW(string: P0, expression: P1, fcase: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymMatchStringW(string : windows_core::PCWSTR, expression : windows_core::PCWSTR, fcase : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - SymMatchStringW(string.param().abi(), expression.param().abi(), fcase.param().abi()).ok() + SymMatchStringW(string.param().abi(), expression.param().abi(), fcase.into()).ok() } #[inline] pub unsafe fn SymNext(hprocess: super::super::super::Foundation::HANDLE, si: *mut SYMBOL_INFO) -> windows_core::Result<()> { @@ -1890,12 +1868,9 @@ pub unsafe fn SymSetContext(hprocess: super::super::super::Foundation::HANDLE, s SymSetContext(core::mem::transmute(hprocess), core::mem::transmute(stackframe), core::mem::transmute(context.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SymSetExtendedOption(option: IMAGEHLP_EXTENDED_OPTIONS, value: P1) -> super::super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn SymSetExtendedOption(option: IMAGEHLP_EXTENDED_OPTIONS, value: bool) -> super::super::super::Foundation::BOOL { windows_targets::link!("dbghelp.dll" "system" fn SymSetExtendedOption(option : IMAGEHLP_EXTENDED_OPTIONS, value : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - SymSetExtendedOption(core::mem::transmute(option), value.param().abi()) + SymSetExtendedOption(core::mem::transmute(option), value.into()) } #[inline] pub unsafe fn SymSetHomeDirectory(hprocess: Option, dir: P1) -> windows_core::PSTR diff --git a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Etw/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Etw/mod.rs index 8d779602ef..ab56146f14 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Etw/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Etw/mod.rs @@ -60,12 +60,9 @@ pub unsafe fn EnumerateTraceGuidsEx(tracequeryinfoclass: TRACE_QUERY_INFO_CLASS, } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn EventAccessControl(guid: *const windows_core::GUID, operation: u32, sid: super::super::super::Security::PSID, rights: u32, allowordeny: P4) -> u32 -where - P4: windows_core::Param, -{ +pub unsafe fn EventAccessControl(guid: *const windows_core::GUID, operation: u32, sid: super::super::super::Security::PSID, rights: u32, allowordeny: bool) -> u32 { windows_targets::link!("advapi32.dll" "system" fn EventAccessControl(guid : *const windows_core::GUID, operation : u32, sid : super::super::super::Security:: PSID, rights : u32, allowordeny : super::super::super::Foundation:: BOOLEAN) -> u32); - EventAccessControl(core::mem::transmute(guid), core::mem::transmute(operation), core::mem::transmute(sid), core::mem::transmute(rights), allowordeny.param().abi()) + EventAccessControl(core::mem::transmute(guid), core::mem::transmute(operation), core::mem::transmute(sid), core::mem::transmute(rights), allowordeny.into()) } #[cfg(feature = "Win32_Security")] #[inline] @@ -334,12 +331,9 @@ pub unsafe fn TdhCloseDecodingHandle(handle: TDH_HANDLE) -> u32 { TdhCloseDecodingHandle(core::mem::transmute(handle)) } #[inline] -pub unsafe fn TdhCreatePayloadFilter(providerguid: *const windows_core::GUID, eventdescriptor: *const EVENT_DESCRIPTOR, eventmatchany: P2, payloadpredicates: &[PAYLOAD_FILTER_PREDICATE], payloadfilter: *mut *mut core::ffi::c_void) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn TdhCreatePayloadFilter(providerguid: *const windows_core::GUID, eventdescriptor: *const EVENT_DESCRIPTOR, eventmatchany: bool, payloadpredicates: &[PAYLOAD_FILTER_PREDICATE], payloadfilter: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("tdh.dll" "system" fn TdhCreatePayloadFilter(providerguid : *const windows_core::GUID, eventdescriptor : *const EVENT_DESCRIPTOR, eventmatchany : super::super::super::Foundation:: BOOLEAN, payloadpredicatecount : u32, payloadpredicates : *const PAYLOAD_FILTER_PREDICATE, payloadfilter : *mut *mut core::ffi::c_void) -> u32); - TdhCreatePayloadFilter(core::mem::transmute(providerguid), core::mem::transmute(eventdescriptor), eventmatchany.param().abi(), payloadpredicates.len().try_into().unwrap(), core::mem::transmute(payloadpredicates.as_ptr()), core::mem::transmute(payloadfilter)) + TdhCreatePayloadFilter(core::mem::transmute(providerguid), core::mem::transmute(eventdescriptor), eventmatchany.into(), payloadpredicates.len().try_into().unwrap(), core::mem::transmute(payloadpredicates.as_ptr()), core::mem::transmute(payloadfilter)) } #[inline] pub unsafe fn TdhDeletePayloadFilter(payloadfilter: *mut *mut core::ffi::c_void) -> u32 { @@ -2333,11 +2327,8 @@ impl ITraceRelogger { pub unsafe fn SetOutputFilename(&self, logfilename: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetOutputFilename)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(logfilename)).ok() } - pub unsafe fn SetCompressionMode(&self, compressionmode: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCompressionMode)(windows_core::Interface::as_raw(self), compressionmode.param().abi()).ok() + pub unsafe fn SetCompressionMode(&self, compressionmode: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCompressionMode)(windows_core::Interface::as_raw(self), compressionmode.into()).ok() } pub unsafe fn Cancel(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Cancel)(windows_core::Interface::as_raw(self)).ok() @@ -2645,9 +2636,6 @@ pub const PropertyWBEMXmlFragment: PROPERTY_FLAGS = PROPERTY_FLAGS(8i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct REGHANDLE(pub i64); -impl windows_core::TypeKind for REGHANDLE { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct RELOGSTREAM_HANDLE { @@ -2797,9 +2785,6 @@ pub const TDH_CONTEXT_WPP_TMFSEARCHPATH: TDH_CONTEXT_TYPE = TDH_CONTEXT_TYPE(1i3 #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct TDH_HANDLE(pub isize); -impl windows_core::TypeKind for TDH_HANDLE { - type TypeKind = windows_core::CopyType; -} impl TDH_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 || self.0 == 0 diff --git a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ProcessSnapshotting/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ProcessSnapshotting/mod.rs index 26e1eaa07d..dac5d3bbd7 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ProcessSnapshotting/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ProcessSnapshotting/mod.rs @@ -51,9 +51,6 @@ pub unsafe fn PssWalkSnapshot(snapshothandle: HPSS, informationclass: PSS_WALK_I #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HPSS(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HPSS { - type TypeKind = windows_core::CopyType; -} impl HPSS { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -67,9 +64,6 @@ impl Default for HPSS { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HPSSWALK(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HPSSWALK { - type TypeKind = windows_core::CopyType; -} impl HPSSWALK { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/System/DistributedTransactionCoordinator/mod.rs b/crates/libs/windows/src/Windows/Win32/System/DistributedTransactionCoordinator/mod.rs index 5951ddca0c..2f09a7679f 100644 --- a/crates/libs/windows/src/Windows/Win32/System/DistributedTransactionCoordinator/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/DistributedTransactionCoordinator/mod.rs @@ -562,11 +562,8 @@ impl windows_core::RuntimeName for IDtcLuRecoveryInitiatedByLuWork {} windows_core::imp::define_interface!(IDtcLuRmEnlistment, IDtcLuRmEnlistment_Vtbl, 0x4131e769_1aea_11d0_944b_00a0c905416e); windows_core::imp::interface_hierarchy!(IDtcLuRmEnlistment, windows_core::IUnknown); impl IDtcLuRmEnlistment { - pub unsafe fn Unplug(&self, fconversationlost: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Unplug)(windows_core::Interface::as_raw(self), fconversationlost.param().abi()).ok() + pub unsafe fn Unplug(&self, fconversationlost: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Unplug)(windows_core::Interface::as_raw(self), fconversationlost.into()).ok() } pub unsafe fn BackedOut(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).BackedOut)(windows_core::Interface::as_raw(self)).ok() @@ -789,11 +786,8 @@ impl windows_core::RuntimeName for IDtcLuRmEnlistmentSink {} windows_core::imp::define_interface!(IDtcLuSubordinateDtc, IDtcLuSubordinateDtc_Vtbl, 0x4131e773_1aea_11d0_944b_00a0c905416e); windows_core::imp::interface_hierarchy!(IDtcLuSubordinateDtc, windows_core::IUnknown); impl IDtcLuSubordinateDtc { - pub unsafe fn Unplug(&self, fconversationlost: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Unplug)(windows_core::Interface::as_raw(self), fconversationlost.param().abi()).ok() + pub unsafe fn Unplug(&self, fconversationlost: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Unplug)(windows_core::Interface::as_raw(self), fconversationlost.into()).ok() } pub unsafe fn BackedOut(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).BackedOut)(windows_core::Interface::as_raw(self)).ok() @@ -1021,61 +1015,43 @@ impl IDtcNetworkAccessConfig { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetAnyNetworkAccess)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAnyNetworkAccess(&self, banynetworkaccess: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAnyNetworkAccess)(windows_core::Interface::as_raw(self), banynetworkaccess.param().abi()).ok() + pub unsafe fn SetAnyNetworkAccess(&self, banynetworkaccess: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAnyNetworkAccess)(windows_core::Interface::as_raw(self), banynetworkaccess.into()).ok() } pub unsafe fn GetNetworkAdministrationAccess(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNetworkAdministrationAccess)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetNetworkAdministrationAccess(&self, bnetworkadministrationaccess: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetNetworkAdministrationAccess)(windows_core::Interface::as_raw(self), bnetworkadministrationaccess.param().abi()).ok() + pub unsafe fn SetNetworkAdministrationAccess(&self, bnetworkadministrationaccess: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetNetworkAdministrationAccess)(windows_core::Interface::as_raw(self), bnetworkadministrationaccess.into()).ok() } pub unsafe fn GetNetworkTransactionAccess(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNetworkTransactionAccess)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetNetworkTransactionAccess(&self, bnetworktransactionaccess: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetNetworkTransactionAccess)(windows_core::Interface::as_raw(self), bnetworktransactionaccess.param().abi()).ok() + pub unsafe fn SetNetworkTransactionAccess(&self, bnetworktransactionaccess: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetNetworkTransactionAccess)(windows_core::Interface::as_raw(self), bnetworktransactionaccess.into()).ok() } pub unsafe fn GetNetworkClientAccess(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNetworkClientAccess)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetNetworkClientAccess(&self, bnetworkclientaccess: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetNetworkClientAccess)(windows_core::Interface::as_raw(self), bnetworkclientaccess.param().abi()).ok() + pub unsafe fn SetNetworkClientAccess(&self, bnetworkclientaccess: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetNetworkClientAccess)(windows_core::Interface::as_raw(self), bnetworkclientaccess.into()).ok() } pub unsafe fn GetNetworkTIPAccess(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNetworkTIPAccess)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetNetworkTIPAccess(&self, bnetworktipaccess: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetNetworkTIPAccess)(windows_core::Interface::as_raw(self), bnetworktipaccess.param().abi()).ok() + pub unsafe fn SetNetworkTIPAccess(&self, bnetworktipaccess: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetNetworkTIPAccess)(windows_core::Interface::as_raw(self), bnetworktipaccess.into()).ok() } pub unsafe fn GetXAAccess(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetXAAccess)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetXAAccess(&self, bxaaccess: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetXAAccess)(windows_core::Interface::as_raw(self), bxaaccess.param().abi()).ok() + pub unsafe fn SetXAAccess(&self, bxaaccess: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetXAAccess)(windows_core::Interface::as_raw(self), bxaaccess.into()).ok() } pub unsafe fn RestartDtcService(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RestartDtcService)(windows_core::Interface::as_raw(self)).ok() @@ -1242,17 +1218,11 @@ impl IDtcNetworkAccessConfig2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNetworkOutboundAccess)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetNetworkInboundAccess(&self, binbound: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetNetworkInboundAccess)(windows_core::Interface::as_raw(self), binbound.param().abi()).ok() + pub unsafe fn SetNetworkInboundAccess(&self, binbound: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetNetworkInboundAccess)(windows_core::Interface::as_raw(self), binbound.into()).ok() } - pub unsafe fn SetNetworkOutboundAccess(&self, boutbound: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetNetworkOutboundAccess)(windows_core::Interface::as_raw(self), boutbound.param().abi()).ok() + pub unsafe fn SetNetworkOutboundAccess(&self, boutbound: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetNetworkOutboundAccess)(windows_core::Interface::as_raw(self), boutbound.into()).ok() } pub unsafe fn GetAuthenticationLevel(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1352,11 +1322,8 @@ impl IDtcNetworkAccessConfig3 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetLUAccess)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetLUAccess(&self, bluaccess: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetLUAccess)(windows_core::Interface::as_raw(self), bluaccess.param().abi()).ok() + pub unsafe fn SetLUAccess(&self, bluaccess: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetLUAccess)(windows_core::Interface::as_raw(self), bluaccess.into()).ok() } } #[repr(C)] @@ -1399,11 +1366,8 @@ impl windows_core::RuntimeName for IDtcNetworkAccessConfig3 {} windows_core::imp::define_interface!(IDtcToXaHelper, IDtcToXaHelper_Vtbl, 0xa9861611_304a_11d1_9813_00a0c905416e); windows_core::imp::interface_hierarchy!(IDtcToXaHelper, windows_core::IUnknown); impl IDtcToXaHelper { - pub unsafe fn Close(&self, i_fdorecovery: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self), i_fdorecovery.param().abi()).ok() + pub unsafe fn Close(&self, i_fdorecovery: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self), i_fdorecovery.into()).ok() } pub unsafe fn TranslateTridToXid(&self, pitransaction: P0, pguidbqual: *const windows_core::GUID, pxid: *mut XID) -> windows_core::Result<()> where @@ -1496,11 +1460,8 @@ impl IDtcToXaHelperSinglePipe { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EnlistWithRM)(windows_core::Interface::as_raw(self), core::mem::transmute(dwrmcookie), i_pitransaction.param().abi(), i_pitransres.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn ReleaseRMCookie(&self, i_dwrmcookie: u32, i_fnormal: P1) - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).ReleaseRMCookie)(windows_core::Interface::as_raw(self), core::mem::transmute(i_dwrmcookie), i_fnormal.param().abi()) + pub unsafe fn ReleaseRMCookie(&self, i_dwrmcookie: u32, i_fnormal: bool) { + (windows_core::Interface::vtable(self).ReleaseRMCookie)(windows_core::Interface::as_raw(self), core::mem::transmute(i_dwrmcookie), i_fnormal.into()) } } #[repr(C)] @@ -1819,13 +1780,12 @@ impl IRMHelper { pub unsafe fn RMCount(&self, dwctotalnumberofrms: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RMCount)(windows_core::Interface::as_raw(self), core::mem::transmute(dwctotalnumberofrms)).ok() } - pub unsafe fn RMInfo(&self, pxa_switch: *mut xa_switch_t, fcdeclcallingconv: P1, pszopenstring: P2, pszclosestring: P3, guidrmrecovery: windows_core::GUID) -> windows_core::Result<()> + pub unsafe fn RMInfo(&self, pxa_switch: *mut xa_switch_t, fcdeclcallingconv: bool, pszopenstring: P2, pszclosestring: P3, guidrmrecovery: windows_core::GUID) -> windows_core::Result<()> where - P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).RMInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pxa_switch), fcdeclcallingconv.param().abi(), pszopenstring.param().abi(), pszclosestring.param().abi(), core::mem::transmute(guidrmrecovery)).ok() + (windows_core::Interface::vtable(self).RMInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pxa_switch), fcdeclcallingconv.into(), pszopenstring.param().abi(), pszclosestring.param().abi(), core::mem::transmute(guidrmrecovery)).ok() } } #[repr(C)] @@ -2362,18 +2322,11 @@ impl windows_core::RuntimeName for ITmNodeName {} windows_core::imp::define_interface!(ITransaction, ITransaction_Vtbl, 0x0fb15084_af41_11ce_bd2b_204c4f4f5020); windows_core::imp::interface_hierarchy!(ITransaction, windows_core::IUnknown); impl ITransaction { - pub unsafe fn Commit(&self, fretaining: P0, grftc: u32, grfrm: u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Commit)(windows_core::Interface::as_raw(self), fretaining.param().abi(), core::mem::transmute(grftc), core::mem::transmute(grfrm)).ok() + pub unsafe fn Commit(&self, fretaining: bool, grftc: u32, grfrm: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Commit)(windows_core::Interface::as_raw(self), fretaining.into(), core::mem::transmute(grftc), core::mem::transmute(grfrm)).ok() } - pub unsafe fn Abort(&self, pboidreason: *const BOID, fretaining: P1, fasync: P2) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).Abort)(windows_core::Interface::as_raw(self), core::mem::transmute(pboidreason), fretaining.param().abi(), fasync.param().abi()).ok() + pub unsafe fn Abort(&self, pboidreason: *const BOID, fretaining: bool, fasync: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Abort)(windows_core::Interface::as_raw(self), core::mem::transmute(pboidreason), fretaining.into(), fasync.into()).ok() } pub unsafe fn GetTransactionInfo(&self, pinfo: *mut XACTTRANSINFO) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetTransactionInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pinfo)).ok() @@ -2914,17 +2867,11 @@ impl windows_core::RuntimeName for ITransactionOptions {} windows_core::imp::define_interface!(ITransactionOutcomeEvents, ITransactionOutcomeEvents_Vtbl, 0x3a6ad9e2_23b9_11cf_ad60_00aa00a74ccd); windows_core::imp::interface_hierarchy!(ITransactionOutcomeEvents, windows_core::IUnknown); impl ITransactionOutcomeEvents { - pub unsafe fn Committed(&self, fretaining: P0, pnewuow: *const BOID, hr: windows_core::HRESULT) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Committed)(windows_core::Interface::as_raw(self), fretaining.param().abi(), core::mem::transmute(pnewuow), core::mem::transmute(hr)).ok() + pub unsafe fn Committed(&self, fretaining: bool, pnewuow: *const BOID, hr: windows_core::HRESULT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Committed)(windows_core::Interface::as_raw(self), fretaining.into(), core::mem::transmute(pnewuow), core::mem::transmute(hr)).ok() } - pub unsafe fn Aborted(&self, pboidreason: *const BOID, fretaining: P1, pnewuow: *const BOID, hr: windows_core::HRESULT) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).Aborted)(windows_core::Interface::as_raw(self), core::mem::transmute(pboidreason), fretaining.param().abi(), core::mem::transmute(pnewuow), core::mem::transmute(hr)).ok() + pub unsafe fn Aborted(&self, pboidreason: *const BOID, fretaining: bool, pnewuow: *const BOID, hr: windows_core::HRESULT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Aborted)(windows_core::Interface::as_raw(self), core::mem::transmute(pboidreason), fretaining.into(), core::mem::transmute(pnewuow), core::mem::transmute(hr)).ok() } pub unsafe fn HeuristicDecision(&self, dwdecision: u32, pboidreason: *const BOID, hr: windows_core::HRESULT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).HeuristicDecision)(windows_core::Interface::as_raw(self), core::mem::transmute(dwdecision), core::mem::transmute(pboidreason), core::mem::transmute(hr)).ok() @@ -3097,11 +3044,8 @@ impl windows_core::RuntimeName for ITransactionPhase0Factory {} windows_core::imp::define_interface!(ITransactionPhase0NotifyAsync, ITransactionPhase0NotifyAsync_Vtbl, 0xef081809_0c76_11d2_87a6_00c04f990f34); windows_core::imp::interface_hierarchy!(ITransactionPhase0NotifyAsync, windows_core::IUnknown); impl ITransactionPhase0NotifyAsync { - pub unsafe fn Phase0Request(&self, fabortinghint: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Phase0Request)(windows_core::Interface::as_raw(self), fabortinghint.param().abi()).ok() + pub unsafe fn Phase0Request(&self, fabortinghint: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Phase0Request)(windows_core::Interface::as_raw(self), fabortinghint.into()).ok() } pub unsafe fn EnlistCompleted(&self, status: windows_core::HRESULT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EnlistCompleted)(windows_core::Interface::as_raw(self), core::mem::transmute(status)).ok() @@ -3251,22 +3195,14 @@ impl windows_core::RuntimeName for ITransactionReceiverFactory {} windows_core::imp::define_interface!(ITransactionResource, ITransactionResource_Vtbl, 0xee5ff7b3_4572_11d0_9452_00a0c905416e); windows_core::imp::interface_hierarchy!(ITransactionResource, windows_core::IUnknown); impl ITransactionResource { - pub unsafe fn PrepareRequest(&self, fretaining: P0, grfrm: u32, fwantmoniker: P2, fsinglephase: P3) -> windows_core::Result<()> - where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).PrepareRequest)(windows_core::Interface::as_raw(self), fretaining.param().abi(), core::mem::transmute(grfrm), fwantmoniker.param().abi(), fsinglephase.param().abi()).ok() + pub unsafe fn PrepareRequest(&self, fretaining: bool, grfrm: u32, fwantmoniker: bool, fsinglephase: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PrepareRequest)(windows_core::Interface::as_raw(self), fretaining.into(), core::mem::transmute(grfrm), fwantmoniker.into(), fsinglephase.into()).ok() } pub unsafe fn CommitRequest(&self, grfrm: u32, pnewuow: *const BOID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CommitRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(grfrm), core::mem::transmute(pnewuow)).ok() } - pub unsafe fn AbortRequest(&self, pboidreason: *const BOID, fretaining: P1, pnewuow: *const BOID) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).AbortRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(pboidreason), fretaining.param().abi(), core::mem::transmute(pnewuow)).ok() + pub unsafe fn AbortRequest(&self, pboidreason: *const BOID, fretaining: bool, pnewuow: *const BOID) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AbortRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(pboidreason), fretaining.into(), core::mem::transmute(pnewuow)).ok() } pub unsafe fn TMDown(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).TMDown)(windows_core::Interface::as_raw(self)).ok() @@ -3320,22 +3256,14 @@ impl windows_core::RuntimeName for ITransactionResource {} windows_core::imp::define_interface!(ITransactionResourceAsync, ITransactionResourceAsync_Vtbl, 0x69e971f0_23ce_11cf_ad60_00aa00a74ccd); windows_core::imp::interface_hierarchy!(ITransactionResourceAsync, windows_core::IUnknown); impl ITransactionResourceAsync { - pub unsafe fn PrepareRequest(&self, fretaining: P0, grfrm: u32, fwantmoniker: P2, fsinglephase: P3) -> windows_core::Result<()> - where - P0: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).PrepareRequest)(windows_core::Interface::as_raw(self), fretaining.param().abi(), core::mem::transmute(grfrm), fwantmoniker.param().abi(), fsinglephase.param().abi()).ok() + pub unsafe fn PrepareRequest(&self, fretaining: bool, grfrm: u32, fwantmoniker: bool, fsinglephase: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PrepareRequest)(windows_core::Interface::as_raw(self), fretaining.into(), core::mem::transmute(grfrm), fwantmoniker.into(), fsinglephase.into()).ok() } pub unsafe fn CommitRequest(&self, grfrm: u32, pnewuow: *const BOID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CommitRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(grfrm), core::mem::transmute(pnewuow)).ok() } - pub unsafe fn AbortRequest(&self, pboidreason: *const BOID, fretaining: P1, pnewuow: *const BOID) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).AbortRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(pboidreason), fretaining.param().abi(), core::mem::transmute(pnewuow)).ok() + pub unsafe fn AbortRequest(&self, pboidreason: *const BOID, fretaining: bool, pnewuow: *const BOID) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AbortRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(pboidreason), fretaining.into(), core::mem::transmute(pnewuow)).ok() } pub unsafe fn TMDown(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).TMDown)(windows_core::Interface::as_raw(self)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/System/Environment/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Environment/mod.rs index 4a099c3898..72f4126a2a 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Environment/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Environment/mod.rs @@ -1,10 +1,7 @@ #[inline] -pub unsafe fn CallEnclave(lproutine: isize, lpparameter: *const core::ffi::c_void, fwaitforthread: P2, lpreturnvalue: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn CallEnclave(lproutine: isize, lpparameter: *const core::ffi::c_void, fwaitforthread: bool, lpreturnvalue: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("vertdll.dll" "system" fn CallEnclave(lproutine : isize, lpparameter : *const core::ffi::c_void, fwaitforthread : super::super::Foundation:: BOOL, lpreturnvalue : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - CallEnclave(core::mem::transmute(lproutine), core::mem::transmute(lpparameter), fwaitforthread.param().abi(), core::mem::transmute(lpreturnvalue)).ok() + CallEnclave(core::mem::transmute(lproutine), core::mem::transmute(lpparameter), fwaitforthread.into(), core::mem::transmute(lpreturnvalue)).ok() } #[inline] pub unsafe fn CreateEnclave(hprocess: super::super::Foundation::HANDLE, lpaddress: Option<*const core::ffi::c_void>, dwsize: usize, dwinitialcommitment: usize, flenclavetype: u32, lpenclaveinformation: *const core::ffi::c_void, dwinfolength: u32, lpenclaveerror: Option<*mut u32>) -> *mut core::ffi::c_void { @@ -12,12 +9,9 @@ pub unsafe fn CreateEnclave(hprocess: super::super::Foundation::HANDLE, lpaddres CreateEnclave(core::mem::transmute(hprocess), core::mem::transmute(lpaddress.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwsize), core::mem::transmute(dwinitialcommitment), core::mem::transmute(flenclavetype), core::mem::transmute(lpenclaveinformation), core::mem::transmute(dwinfolength), core::mem::transmute(lpenclaveerror.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn CreateEnvironmentBlock(lpenvironment: *mut *mut core::ffi::c_void, htoken: Option, binherit: P2) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn CreateEnvironmentBlock(lpenvironment: *mut *mut core::ffi::c_void, htoken: Option, binherit: bool) -> windows_core::Result<()> { windows_targets::link!("userenv.dll" "system" fn CreateEnvironmentBlock(lpenvironment : *mut *mut core::ffi::c_void, htoken : super::super::Foundation:: HANDLE, binherit : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - CreateEnvironmentBlock(core::mem::transmute(lpenvironment), core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), binherit.param().abi()).ok() + CreateEnvironmentBlock(core::mem::transmute(lpenvironment), core::mem::transmute(htoken.unwrap_or(core::mem::zeroed())), binherit.into()).ok() } #[inline] pub unsafe fn DeleteEnclave(lpaddress: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -238,12 +232,9 @@ where SetEnvironmentVariableW(lpname.param().abi(), lpvalue.param().abi()).ok() } #[inline] -pub unsafe fn TerminateEnclave(lpaddress: *const core::ffi::c_void, fwait: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn TerminateEnclave(lpaddress: *const core::ffi::c_void, fwait: bool) -> windows_core::Result<()> { windows_targets::link!("vertdll.dll" "system" fn TerminateEnclave(lpaddress : *const core::ffi::c_void, fwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - TerminateEnclave(core::mem::transmute(lpaddress), fwait.param().abi()).ok() + TerminateEnclave(core::mem::transmute(lpaddress), fwait.into()).ok() } pub const ENCLAVE_FLAG_DYNAMIC_DEBUG_ACTIVE: u32 = 4u32; pub const ENCLAVE_FLAG_DYNAMIC_DEBUG_ENABLED: u32 = 2u32; diff --git a/crates/libs/windows/src/Windows/Win32/System/ErrorReporting/mod.rs b/crates/libs/windows/src/Windows/Win32/System/ErrorReporting/mod.rs index 46de892ccc..791e987841 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ErrorReporting/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ErrorReporting/mod.rs @@ -21,13 +21,12 @@ pub unsafe fn ReportFault(pep: *const super::Diagnostics::Debug::EXCEPTION_POINT ReportFault(core::mem::transmute(pep), core::mem::transmute(dwopt)) } #[inline] -pub unsafe fn WerAddExcludedApplication(pwzexename: P0, ballusers: P1) -> windows_core::Result<()> +pub unsafe fn WerAddExcludedApplication(pwzexename: P0, ballusers: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("wer.dll" "system" fn WerAddExcludedApplication(pwzexename : windows_core::PCWSTR, ballusers : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - WerAddExcludedApplication(pwzexename.param().abi(), ballusers.param().abi()).ok() + WerAddExcludedApplication(pwzexename.param().abi(), ballusers.into()).ok() } #[inline] pub unsafe fn WerFreeString(pwszstr: P0) @@ -92,13 +91,12 @@ where WerRegisterRuntimeExceptionModule(pwszoutofprocesscallbackdll.param().abi(), core::mem::transmute(pcontext)).ok() } #[inline] -pub unsafe fn WerRemoveExcludedApplication(pwzexename: P0, ballusers: P1) -> windows_core::Result<()> +pub unsafe fn WerRemoveExcludedApplication(pwzexename: P0, ballusers: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("wer.dll" "system" fn WerRemoveExcludedApplication(pwzexename : windows_core::PCWSTR, ballusers : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - WerRemoveExcludedApplication(pwzexename.param().abi(), ballusers.param().abi()).ok() + WerRemoveExcludedApplication(pwzexename.param().abi(), ballusers.into()).ok() } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_Kernel"))] #[inline] @@ -289,9 +287,6 @@ pub const E_STORE_USER_QUEUE: REPORT_STORE_TYPES = REPORT_STORE_TYPES(1i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HREPORT(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HREPORT { - type TypeKind = windows_core::CopyType; -} impl HREPORT { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -314,9 +309,6 @@ impl Default for HREPORT { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HREPORTSTORE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HREPORTSTORE { - type TypeKind = windows_core::CopyType; -} impl HREPORTSTORE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/System/EventLog/mod.rs b/crates/libs/windows/src/Windows/Win32/System/EventLog/mod.rs index c17aba4405..74ca4b17fd 100644 --- a/crates/libs/windows/src/Windows/Win32/System/EventLog/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/EventLog/mod.rs @@ -473,9 +473,6 @@ pub struct EVT_FORMAT_MESSAGE_FLAGS(pub u32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct EVT_HANDLE(pub isize); -impl windows_core::TypeKind for EVT_HANDLE { - type TypeKind = windows_core::CopyType; -} impl EVT_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == 0 diff --git a/crates/libs/windows/src/Windows/Win32/System/GroupPolicy/mod.rs b/crates/libs/windows/src/Windows/Win32/System/GroupPolicy/mod.rs index d866111a32..ace7b30120 100644 --- a/crates/libs/windows/src/Windows/Win32/System/GroupPolicy/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/GroupPolicy/mod.rs @@ -12,14 +12,13 @@ where CommandLineFromMsiDescriptor(descriptor.param().abi(), core::mem::transmute(commandline), core::mem::transmute(commandlinelength)) } #[inline] -pub unsafe fn CreateGPOLink(lpgpo: P0, lpcontainer: P1, fhighpriority: P2) -> windows_core::Result<()> +pub unsafe fn CreateGPOLink(lpgpo: P0, lpcontainer: P1, fhighpriority: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("gpedit.dll" "system" fn CreateGPOLink(lpgpo : windows_core::PCWSTR, lpcontainer : windows_core::PCWSTR, fhighpriority : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - CreateGPOLink(lpgpo.param().abi(), lpcontainer.param().abi(), fhighpriority.param().abi()).ok() + CreateGPOLink(lpgpo.param().abi(), lpcontainer.param().abi(), fhighpriority.into()).ok() } #[inline] pub unsafe fn DeleteAllGPOLinks(lpcontainer: P0) -> windows_core::Result<()> @@ -39,12 +38,9 @@ where DeleteGPOLink(lpgpo.param().abi(), lpcontainer.param().abi()).ok() } #[inline] -pub unsafe fn EnterCriticalPolicySection(bmachine: P0) -> windows_core::Result -where - P0: windows_core::Param, -{ +pub unsafe fn EnterCriticalPolicySection(bmachine: bool) -> windows_core::Result { windows_targets::link!("userenv.dll" "system" fn EnterCriticalPolicySection(bmachine : super::super::Foundation:: BOOL) -> super::super::Foundation:: HANDLE); - let result__ = EnterCriticalPolicySection(bmachine.param().abi()); + let result__ = EnterCriticalPolicySection(bmachine.into()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -67,13 +63,12 @@ pub unsafe fn FreeGPOListW(pgpolist: *const GROUP_POLICY_OBJECTW) -> windows_cor FreeGPOListW(core::mem::transmute(pgpolist)).ok() } #[inline] -pub unsafe fn GenerateGPNotification(bmachine: P0, lpwszmgmtproduct: P1, dwmgmtproductoptions: u32) -> u32 +pub unsafe fn GenerateGPNotification(bmachine: bool, lpwszmgmtproduct: P1, dwmgmtproductoptions: u32) -> u32 where - P0: windows_core::Param, P1: windows_core::Param, { windows_targets::link!("userenv.dll" "system" fn GenerateGPNotification(bmachine : super::super::Foundation:: BOOL, lpwszmgmtproduct : windows_core::PCWSTR, dwmgmtproductoptions : u32) -> u32); - GenerateGPNotification(bmachine.param().abi(), lpwszmgmtproduct.param().abi(), core::mem::transmute(dwmgmtproductoptions)) + GenerateGPNotification(bmachine.into(), lpwszmgmtproduct.param().abi(), core::mem::transmute(dwmgmtproductoptions)) } #[cfg(feature = "Win32_Security")] #[inline] @@ -122,12 +117,9 @@ where GetLocalManagedApplicationData(productcode.param().abi(), core::mem::transmute(displayname), core::mem::transmute(supporturl)) } #[inline] -pub unsafe fn GetLocalManagedApplications(buserapps: P0, pdwapps: *mut u32, prglocalapps: *mut *mut LOCALMANAGEDAPPLICATION) -> u32 -where - P0: windows_core::Param, -{ +pub unsafe fn GetLocalManagedApplications(buserapps: bool, pdwapps: *mut u32, prglocalapps: *mut *mut LOCALMANAGEDAPPLICATION) -> u32 { windows_targets::link!("advapi32.dll" "system" fn GetLocalManagedApplications(buserapps : super::super::Foundation:: BOOL, pdwapps : *mut u32, prglocalapps : *mut *mut LOCALMANAGEDAPPLICATION) -> u32); - GetLocalManagedApplications(buserapps.param().abi(), core::mem::transmute(pdwapps), core::mem::transmute(prglocalapps)) + GetLocalManagedApplications(buserapps.into(), core::mem::transmute(pdwapps), core::mem::transmute(prglocalapps)) } #[cfg(feature = "Win32_UI_Shell")] #[inline] @@ -170,28 +162,19 @@ pub unsafe fn ProcessGroupPolicyCompletedEx(extensionid: *const windows_core::GU ProcessGroupPolicyCompletedEx(core::mem::transmute(extensionid), core::mem::transmute(pasynchandle), core::mem::transmute(dwstatus), core::mem::transmute(rsopstatus)) } #[inline] -pub unsafe fn RefreshPolicy(bmachine: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RefreshPolicy(bmachine: bool) -> windows_core::Result<()> { windows_targets::link!("userenv.dll" "system" fn RefreshPolicy(bmachine : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - RefreshPolicy(bmachine.param().abi()).ok() + RefreshPolicy(bmachine.into()).ok() } #[inline] -pub unsafe fn RefreshPolicyEx(bmachine: P0, dwoptions: u32) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn RefreshPolicyEx(bmachine: bool, dwoptions: u32) -> windows_core::Result<()> { windows_targets::link!("userenv.dll" "system" fn RefreshPolicyEx(bmachine : super::super::Foundation:: BOOL, dwoptions : u32) -> super::super::Foundation:: BOOL); - RefreshPolicyEx(bmachine.param().abi(), core::mem::transmute(dwoptions)).ok() + RefreshPolicyEx(bmachine.into(), core::mem::transmute(dwoptions)).ok() } #[inline] -pub unsafe fn RegisterGPNotification(hevent: super::super::Foundation::HANDLE, bmachine: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn RegisterGPNotification(hevent: super::super::Foundation::HANDLE, bmachine: bool) -> windows_core::Result<()> { windows_targets::link!("userenv.dll" "system" fn RegisterGPNotification(hevent : super::super::Foundation:: HANDLE, bmachine : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - RegisterGPNotification(core::mem::transmute(hevent), bmachine.param().abi()).ok() + RegisterGPNotification(core::mem::transmute(hevent), bmachine.into()).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -551,12 +534,8 @@ impl IGPEInformation { pub unsafe fn GetHint(&self, gphint: *mut GROUP_POLICY_HINT_TYPE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetHint)(windows_core::Interface::as_raw(self), core::mem::transmute(gphint)).ok() } - pub unsafe fn PolicyChanged(&self, bmachine: P0, badd: P1, pguidextension: *mut windows_core::GUID, pguidsnapin: *mut windows_core::GUID) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).PolicyChanged)(windows_core::Interface::as_raw(self), bmachine.param().abi(), badd.param().abi(), core::mem::transmute(pguidextension), core::mem::transmute(pguidsnapin)).ok() + pub unsafe fn PolicyChanged(&self, bmachine: bool, badd: bool, pguidextension: *mut windows_core::GUID, pguidsnapin: *mut windows_core::GUID) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).PolicyChanged)(windows_core::Interface::as_raw(self), bmachine.into(), badd.into(), core::mem::transmute(pguidextension), core::mem::transmute(pguidsnapin)).ok() } } #[repr(C)] @@ -7644,12 +7623,8 @@ impl IGroupPolicyObject { { (windows_core::Interface::vtable(self).OpenRemoteMachineGPO)(windows_core::Interface::as_raw(self), pszcomputername.param().abi(), core::mem::transmute(dwflags)).ok() } - pub unsafe fn Save(&self, bmachine: P0, badd: P1, pguidextension: *mut windows_core::GUID, pguid: *mut windows_core::GUID) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), bmachine.param().abi(), badd.param().abi(), core::mem::transmute(pguidextension), core::mem::transmute(pguid)).ok() + pub unsafe fn Save(&self, bmachine: bool, badd: bool, pguidextension: *mut windows_core::GUID, pguid: *mut windows_core::GUID) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), bmachine.into(), badd.into(), core::mem::transmute(pguidextension), core::mem::transmute(pguid)).ok() } pub unsafe fn Delete(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Delete)(windows_core::Interface::as_raw(self)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/System/HostCompute/mod.rs b/crates/libs/windows/src/Windows/Win32/System/HostCompute/mod.rs index f156d87b61..b594a3bf14 100644 --- a/crates/libs/windows/src/Windows/Win32/System/HostCompute/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/HostCompute/mod.rs @@ -1,9 +1,6 @@ #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HCS_CALLBACK(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HCS_CALLBACK { - type TypeKind = windows_core::CopyType; -} impl HCS_CALLBACK { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/System/HostComputeSystem/mod.rs b/crates/libs/windows/src/Windows/Win32/System/HostComputeSystem/mod.rs index 1a52f942fb..61d0b19b40 100644 --- a/crates/libs/windows/src/Windows/Win32/System/HostComputeSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/HostComputeSystem/mod.rs @@ -567,9 +567,6 @@ pub struct HCS_NOTIFICATION_FLAGS(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HCS_OPERATION(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HCS_OPERATION { - type TypeKind = windows_core::CopyType; -} impl HCS_OPERATION { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -632,9 +629,6 @@ pub struct HCS_OPERATION_TYPE(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HCS_PROCESS(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HCS_PROCESS { - type TypeKind = windows_core::CopyType; -} impl HCS_PROCESS { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -674,9 +668,6 @@ pub struct HCS_RESOURCE_TYPE(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HCS_SYSTEM(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HCS_SYSTEM { - type TypeKind = windows_core::CopyType; -} impl HCS_SYSTEM { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/System/Hypervisor/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Hypervisor/mod.rs index c41e932622..d9ea64d155 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Hypervisor/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Hypervisor/mod.rs @@ -36,12 +36,9 @@ pub unsafe fn ForceArchitecture(vmsavedstatedumphandle: *mut core::ffi::c_void, ForceArchitecture(core::mem::transmute(vmsavedstatedumphandle), core::mem::transmute(vpid), core::mem::transmute(architecture)).ok() } #[inline] -pub unsafe fn ForceNestedHostMode(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, hostmode: P2, oldmode: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn ForceNestedHostMode(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, hostmode: bool, oldmode: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn ForceNestedHostMode(vmsavedstatedumphandle : *mut core::ffi::c_void, vpid : u32, hostmode : super::super::Foundation:: BOOL, oldmode : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - ForceNestedHostMode(core::mem::transmute(vmsavedstatedumphandle), core::mem::transmute(vpid), hostmode.param().abi(), core::mem::transmute(oldmode.unwrap_or(core::mem::zeroed()))).ok() + ForceNestedHostMode(core::mem::transmute(vmsavedstatedumphandle), core::mem::transmute(vpid), hostmode.into(), core::mem::transmute(oldmode.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn ForcePagingMode(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, pagingmode: PAGING_MODE) -> windows_core::Result<()> { @@ -145,12 +142,9 @@ pub unsafe fn HdvCreateDeviceInstance(devicehosthandle: *const core::ffi::c_void HdvCreateDeviceInstance(core::mem::transmute(devicehosthandle), core::mem::transmute(devicetype), core::mem::transmute(deviceclassid), core::mem::transmute(deviceinstanceid), core::mem::transmute(deviceinterface), core::mem::transmute(devicecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(devicehandle)).ok() } #[inline] -pub unsafe fn HdvCreateGuestMemoryAperture(requestor: *const core::ffi::c_void, guestphysicaladdress: u64, bytecount: u32, writeprotected: P3, mappedaddress: *mut *mut core::ffi::c_void) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn HdvCreateGuestMemoryAperture(requestor: *const core::ffi::c_void, guestphysicaladdress: u64, bytecount: u32, writeprotected: bool, mappedaddress: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("vmdevicehost.dll" "system" fn HdvCreateGuestMemoryAperture(requestor : *const core::ffi::c_void, guestphysicaladdress : u64, bytecount : u32, writeprotected : super::super::Foundation:: BOOL, mappedaddress : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - HdvCreateGuestMemoryAperture(core::mem::transmute(requestor), core::mem::transmute(guestphysicaladdress), core::mem::transmute(bytecount), writeprotected.param().abi(), core::mem::transmute(mappedaddress)).ok() + HdvCreateGuestMemoryAperture(core::mem::transmute(requestor), core::mem::transmute(guestphysicaladdress), core::mem::transmute(bytecount), writeprotected.into(), core::mem::transmute(mappedaddress)).ok() } #[inline] pub unsafe fn HdvCreateSectionBackedMmioRange(requestor: *const core::ffi::c_void, barindex: HDV_PCI_BAR_SELECTOR, offsetinpages: u64, lengthinpages: u64, mappingflags: HDV_MMIO_MAPPING_FLAGS, sectionhandle: super::super::Foundation::HANDLE, sectionoffsetinpages: u64) -> windows_core::Result<()> { @@ -260,13 +254,12 @@ where LoadSavedStateModuleSymbolsEx(core::mem::transmute(vmsavedstatedumphandle), imagename.param().abi(), core::mem::transmute(imagetimestamp), modulename.param().abi(), core::mem::transmute(baseaddress), core::mem::transmute(sizeofbase)).ok() } #[inline] -pub unsafe fn LoadSavedStateSymbolProvider(vmsavedstatedumphandle: *mut core::ffi::c_void, usersymbols: P1, force: P2) -> windows_core::Result<()> +pub unsafe fn LoadSavedStateSymbolProvider(vmsavedstatedumphandle: *mut core::ffi::c_void, usersymbols: P1, force: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn LoadSavedStateSymbolProvider(vmsavedstatedumphandle : *mut core::ffi::c_void, usersymbols : windows_core::PCWSTR, force : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - LoadSavedStateSymbolProvider(core::mem::transmute(vmsavedstatedumphandle), usersymbols.param().abi(), force.param().abi()).ok() + LoadSavedStateSymbolProvider(core::mem::transmute(vmsavedstatedumphandle), usersymbols.param().abi(), force.into()).ok() } #[inline] pub unsafe fn LocateSavedStateFiles(vmname: P0, snapshotname: P1, binpath: *mut windows_core::PWSTR, vsvpath: *mut windows_core::PWSTR, vmrspath: *mut windows_core::PWSTR) -> windows_core::Result<()> @@ -1797,9 +1790,6 @@ pub struct WHV_PARTITION_COUNTER_SET(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct WHV_PARTITION_HANDLE(pub isize); -impl windows_core::TypeKind for WHV_PARTITION_HANDLE { - type TypeKind = windows_core::CopyType; -} impl WHV_PARTITION_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 || self.0 == 0 diff --git a/crates/libs/windows/src/Windows/Win32/System/IO/mod.rs b/crates/libs/windows/src/Windows/Win32/System/IO/mod.rs index 44d98d28a5..fc7e669e87 100644 --- a/crates/libs/windows/src/Windows/Win32/System/IO/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/IO/mod.rs @@ -30,20 +30,14 @@ pub unsafe fn DeviceIoControl(hdevice: super::super::Foundation::HANDLE, dwiocon DeviceIoControl(core::mem::transmute(hdevice), core::mem::transmute(dwiocontrolcode), core::mem::transmute(lpinbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(ninbuffersize), core::mem::transmute(lpoutbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(noutbuffersize), core::mem::transmute(lpbytesreturned.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoverlapped.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn GetOverlappedResult(hfile: super::super::Foundation::HANDLE, lpoverlapped: *const OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: P3) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn GetOverlappedResult(hfile: super::super::Foundation::HANDLE, lpoverlapped: *const OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: bool) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetOverlappedResult(hfile : super::super::Foundation:: HANDLE, lpoverlapped : *const OVERLAPPED, lpnumberofbytestransferred : *mut u32, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetOverlappedResult(core::mem::transmute(hfile), core::mem::transmute(lpoverlapped), core::mem::transmute(lpnumberofbytestransferred), bwait.param().abi()).ok() + GetOverlappedResult(core::mem::transmute(hfile), core::mem::transmute(lpoverlapped), core::mem::transmute(lpnumberofbytestransferred), bwait.into()).ok() } #[inline] -pub unsafe fn GetOverlappedResultEx(hfile: super::super::Foundation::HANDLE, lpoverlapped: *const OVERLAPPED, lpnumberofbytestransferred: *mut u32, dwmilliseconds: u32, balertable: P4) -> windows_core::Result<()> -where - P4: windows_core::Param, -{ +pub unsafe fn GetOverlappedResultEx(hfile: super::super::Foundation::HANDLE, lpoverlapped: *const OVERLAPPED, lpnumberofbytestransferred: *mut u32, dwmilliseconds: u32, balertable: bool) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetOverlappedResultEx(hfile : super::super::Foundation:: HANDLE, lpoverlapped : *const OVERLAPPED, lpnumberofbytestransferred : *mut u32, dwmilliseconds : u32, balertable : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetOverlappedResultEx(core::mem::transmute(hfile), core::mem::transmute(lpoverlapped), core::mem::transmute(lpnumberofbytestransferred), core::mem::transmute(dwmilliseconds), balertable.param().abi()).ok() + GetOverlappedResultEx(core::mem::transmute(hfile), core::mem::transmute(lpoverlapped), core::mem::transmute(lpnumberofbytestransferred), core::mem::transmute(dwmilliseconds), balertable.into()).ok() } #[inline] pub unsafe fn GetQueuedCompletionStatus(completionport: super::super::Foundation::HANDLE, lpnumberofbytestransferred: *mut u32, lpcompletionkey: *mut usize, lpoverlapped: *mut *mut OVERLAPPED, dwmilliseconds: u32) -> windows_core::Result<()> { @@ -51,12 +45,9 @@ pub unsafe fn GetQueuedCompletionStatus(completionport: super::super::Foundation GetQueuedCompletionStatus(core::mem::transmute(completionport), core::mem::transmute(lpnumberofbytestransferred), core::mem::transmute(lpcompletionkey), core::mem::transmute(lpoverlapped), core::mem::transmute(dwmilliseconds)).ok() } #[inline] -pub unsafe fn GetQueuedCompletionStatusEx(completionport: super::super::Foundation::HANDLE, lpcompletionportentries: &mut [OVERLAPPED_ENTRY], ulnumentriesremoved: *mut u32, dwmilliseconds: u32, falertable: P5) -> windows_core::Result<()> -where - P5: windows_core::Param, -{ +pub unsafe fn GetQueuedCompletionStatusEx(completionport: super::super::Foundation::HANDLE, lpcompletionportentries: &mut [OVERLAPPED_ENTRY], ulnumentriesremoved: *mut u32, dwmilliseconds: u32, falertable: bool) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetQueuedCompletionStatusEx(completionport : super::super::Foundation:: HANDLE, lpcompletionportentries : *mut OVERLAPPED_ENTRY, ulcount : u32, ulnumentriesremoved : *mut u32, dwmilliseconds : u32, falertable : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetQueuedCompletionStatusEx(core::mem::transmute(completionport), core::mem::transmute(lpcompletionportentries.as_ptr()), lpcompletionportentries.len().try_into().unwrap(), core::mem::transmute(ulnumentriesremoved), core::mem::transmute(dwmilliseconds), falertable.param().abi()).ok() + GetQueuedCompletionStatusEx(core::mem::transmute(completionport), core::mem::transmute(lpcompletionportentries.as_ptr()), lpcompletionportentries.len().try_into().unwrap(), core::mem::transmute(ulnumentriesremoved), core::mem::transmute(dwmilliseconds), falertable.into()).ok() } #[inline] pub unsafe fn PostQueuedCompletionStatus(completionport: super::super::Foundation::HANDLE, dwnumberofbytestransferred: u32, dwcompletionkey: usize, lpoverlapped: Option<*const OVERLAPPED>) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/System/Iis/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Iis/mod.rs index 7499feebb9..4480950f38 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Iis/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Iis/mod.rs @@ -549,9 +549,6 @@ pub const GUID_IIS_WWW_SERVER_V2_TRACE_PROVIDER: windows_core::GUID = windows_co #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HCONN(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HCONN { - type TypeKind = windows_core::CopyType; -} impl HCONN { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -1710,14 +1707,12 @@ impl IMSAdminBaseW { { (windows_core::Interface::vtable(self).EnumKeys)(windows_core::Interface::as_raw(self), core::mem::transmute(hmdhandle), pszmdpath.param().abi(), core::mem::transmute(pszmdname.as_ptr()), core::mem::transmute(dwmdenumobjectindex)).ok() } - pub unsafe fn CopyKey(&self, hmdsourcehandle: u32, pszmdsourcepath: P1, hmddesthandle: u32, pszmddestpath: P3, bmdoverwriteflag: P4, bmdcopyflag: P5) -> windows_core::Result<()> + pub unsafe fn CopyKey(&self, hmdsourcehandle: u32, pszmdsourcepath: P1, hmddesthandle: u32, pszmddestpath: P3, bmdoverwriteflag: bool, bmdcopyflag: bool) -> windows_core::Result<()> where P1: windows_core::Param, P3: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, { - (windows_core::Interface::vtable(self).CopyKey)(windows_core::Interface::as_raw(self), core::mem::transmute(hmdsourcehandle), pszmdsourcepath.param().abi(), core::mem::transmute(hmddesthandle), pszmddestpath.param().abi(), bmdoverwriteflag.param().abi(), bmdcopyflag.param().abi()).ok() + (windows_core::Interface::vtable(self).CopyKey)(windows_core::Interface::as_raw(self), core::mem::transmute(hmdsourcehandle), pszmdsourcepath.param().abi(), core::mem::transmute(hmddesthandle), pszmddestpath.param().abi(), bmdoverwriteflag.into(), bmdcopyflag.into()).ok() } pub unsafe fn RenameKey(&self, hmdhandle: u32, pszmdpath: P1, pszmdnewname: P2) -> windows_core::Result<()> where @@ -1762,13 +1757,12 @@ impl IMSAdminBaseW { { (windows_core::Interface::vtable(self).DeleteAllData)(windows_core::Interface::as_raw(self), core::mem::transmute(hmdhandle), pszmdpath.param().abi(), core::mem::transmute(dwmdusertype), core::mem::transmute(dwmddatatype)).ok() } - pub unsafe fn CopyData(&self, hmdsourcehandle: u32, pszmdsourcepath: P1, hmddesthandle: u32, pszmddestpath: P3, dwmdattributes: u32, dwmdusertype: u32, dwmddatatype: u32, bmdcopyflag: P7) -> windows_core::Result<()> + pub unsafe fn CopyData(&self, hmdsourcehandle: u32, pszmdsourcepath: P1, hmddesthandle: u32, pszmddestpath: P3, dwmdattributes: u32, dwmdusertype: u32, dwmddatatype: u32, bmdcopyflag: bool) -> windows_core::Result<()> where P1: windows_core::Param, P3: windows_core::Param, - P7: windows_core::Param, { - (windows_core::Interface::vtable(self).CopyData)(windows_core::Interface::as_raw(self), core::mem::transmute(hmdsourcehandle), pszmdsourcepath.param().abi(), core::mem::transmute(hmddesthandle), pszmddestpath.param().abi(), core::mem::transmute(dwmdattributes), core::mem::transmute(dwmdusertype), core::mem::transmute(dwmddatatype), bmdcopyflag.param().abi()).ok() + (windows_core::Interface::vtable(self).CopyData)(windows_core::Interface::as_raw(self), core::mem::transmute(hmdsourcehandle), pszmdsourcepath.param().abi(), core::mem::transmute(hmddesthandle), pszmddestpath.param().abi(), core::mem::transmute(dwmdattributes), core::mem::transmute(dwmdusertype), core::mem::transmute(dwmddatatype), bmdcopyflag.into()).ok() } pub unsafe fn GetDataPaths(&self, hmdhandle: u32, pszmdpath: P1, dwmdidentifier: u32, dwmddatatype: u32, pszbuffer: &mut [u16], pdwmdrequiredbuffersize: *mut u32) -> windows_core::Result<()> where @@ -1807,19 +1801,17 @@ impl IMSAdminBaseW { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetDataSetNumber)(windows_core::Interface::as_raw(self), core::mem::transmute(hmdhandle), pszmdpath.param().abi(), &mut result__).map(|| result__) } - pub unsafe fn SetLastChangeTime(&self, hmdhandle: u32, pszmdpath: P1, pftmdlastchangetime: *const super::super::Foundation::FILETIME, blocaltime: P3) -> windows_core::Result<()> + pub unsafe fn SetLastChangeTime(&self, hmdhandle: u32, pszmdpath: P1, pftmdlastchangetime: *const super::super::Foundation::FILETIME, blocaltime: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).SetLastChangeTime)(windows_core::Interface::as_raw(self), core::mem::transmute(hmdhandle), pszmdpath.param().abi(), core::mem::transmute(pftmdlastchangetime), blocaltime.param().abi()).ok() + (windows_core::Interface::vtable(self).SetLastChangeTime)(windows_core::Interface::as_raw(self), core::mem::transmute(hmdhandle), pszmdpath.param().abi(), core::mem::transmute(pftmdlastchangetime), blocaltime.into()).ok() } - pub unsafe fn GetLastChangeTime(&self, hmdhandle: u32, pszmdpath: P1, pftmdlastchangetime: *mut super::super::Foundation::FILETIME, blocaltime: P3) -> windows_core::Result<()> + pub unsafe fn GetLastChangeTime(&self, hmdhandle: u32, pszmdpath: P1, pftmdlastchangetime: *mut super::super::Foundation::FILETIME, blocaltime: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).GetLastChangeTime)(windows_core::Interface::as_raw(self), core::mem::transmute(hmdhandle), pszmdpath.param().abi(), core::mem::transmute(pftmdlastchangetime), blocaltime.param().abi()).ok() + (windows_core::Interface::vtable(self).GetLastChangeTime)(windows_core::Interface::as_raw(self), core::mem::transmute(hmdhandle), pszmdpath.param().abi(), core::mem::transmute(pftmdlastchangetime), blocaltime.into()).ok() } pub unsafe fn KeyExchangePhase1(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).KeyExchangePhase1)(windows_core::Interface::as_raw(self)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/System/JobObjects/mod.rs b/crates/libs/windows/src/Windows/Win32/System/JobObjects/mod.rs index d8d5c7714a..5a449792c0 100644 --- a/crates/libs/windows/src/Windows/Win32/System/JobObjects/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/JobObjects/mod.rs @@ -39,23 +39,21 @@ pub unsafe fn IsProcessInJob(processhandle: super::super::Foundation::HANDLE, jo IsProcessInJob(core::mem::transmute(processhandle), core::mem::transmute(jobhandle.unwrap_or(core::mem::zeroed())), core::mem::transmute(result)).ok() } #[inline] -pub unsafe fn OpenJobObjectA(dwdesiredaccess: u32, binherithandle: P1, lpname: P2) -> windows_core::Result +pub unsafe fn OpenJobObjectA(dwdesiredaccess: u32, binherithandle: bool, lpname: P2) -> windows_core::Result where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn OpenJobObjectA(dwdesiredaccess : u32, binherithandle : super::super::Foundation:: BOOL, lpname : windows_core::PCSTR) -> super::super::Foundation:: HANDLE); - let result__ = OpenJobObjectA(core::mem::transmute(dwdesiredaccess), binherithandle.param().abi(), lpname.param().abi()); + let result__ = OpenJobObjectA(core::mem::transmute(dwdesiredaccess), binherithandle.into(), lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn OpenJobObjectW(dwdesiredaccess: u32, binherithandle: P1, lpname: P2) -> windows_core::Result +pub unsafe fn OpenJobObjectW(dwdesiredaccess: u32, binherithandle: bool, lpname: P2) -> windows_core::Result where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn OpenJobObjectW(dwdesiredaccess : u32, binherithandle : super::super::Foundation:: BOOL, lpname : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - let result__ = OpenJobObjectW(core::mem::transmute(dwdesiredaccess), binherithandle.param().abi(), lpname.param().abi()); + let result__ = OpenJobObjectW(core::mem::transmute(dwdesiredaccess), binherithandle.into(), lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -87,12 +85,9 @@ pub unsafe fn TerminateJobObject(hjob: super::super::Foundation::HANDLE, uexitco TerminateJobObject(core::mem::transmute(hjob), core::mem::transmute(uexitcode)).ok() } #[inline] -pub unsafe fn UserHandleGrantAccess(huserhandle: super::super::Foundation::HANDLE, hjob: super::super::Foundation::HANDLE, bgrant: P2) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn UserHandleGrantAccess(huserhandle: super::super::Foundation::HANDLE, hjob: super::super::Foundation::HANDLE, bgrant: bool) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn UserHandleGrantAccess(huserhandle : super::super::Foundation:: HANDLE, hjob : super::super::Foundation:: HANDLE, bgrant : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - UserHandleGrantAccess(core::mem::transmute(huserhandle), core::mem::transmute(hjob), bgrant.param().abi()).ok() + UserHandleGrantAccess(core::mem::transmute(huserhandle), core::mem::transmute(hjob), bgrant.into()).ok() } #[repr(transparent)] #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] diff --git a/crates/libs/windows/src/Windows/Win32/System/LibraryLoader/mod.rs b/crates/libs/windows/src/Windows/Win32/System/LibraryLoader/mod.rs index 56bd4566a1..a4e5824b61 100644 --- a/crates/libs/windows/src/Windows/Win32/System/LibraryLoader/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/LibraryLoader/mod.rs @@ -7,23 +7,21 @@ where AddDllDirectory(newdirectory.param().abi()) } #[inline] -pub unsafe fn BeginUpdateResourceA(pfilename: P0, bdeleteexistingresources: P1) -> windows_core::Result +pub unsafe fn BeginUpdateResourceA(pfilename: P0, bdeleteexistingresources: bool) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn BeginUpdateResourceA(pfilename : windows_core::PCSTR, bdeleteexistingresources : super::super::Foundation:: BOOL) -> super::super::Foundation:: HANDLE); - let result__ = BeginUpdateResourceA(pfilename.param().abi(), bdeleteexistingresources.param().abi()); + let result__ = BeginUpdateResourceA(pfilename.param().abi(), bdeleteexistingresources.into()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn BeginUpdateResourceW(pfilename: P0, bdeleteexistingresources: P1) -> windows_core::Result +pub unsafe fn BeginUpdateResourceW(pfilename: P0, bdeleteexistingresources: bool) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn BeginUpdateResourceW(pfilename : windows_core::PCWSTR, bdeleteexistingresources : super::super::Foundation:: BOOL) -> super::super::Foundation:: HANDLE); - let result__ = BeginUpdateResourceW(pfilename.param().abi(), bdeleteexistingresources.param().abi()); + let result__ = BeginUpdateResourceW(pfilename.param().abi(), bdeleteexistingresources.into()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -32,20 +30,14 @@ pub unsafe fn DisableThreadLibraryCalls(hlibmodule: super::super::Foundation::HM DisableThreadLibraryCalls(core::mem::transmute(hlibmodule)).ok() } #[inline] -pub unsafe fn EndUpdateResourceA(hupdate: super::super::Foundation::HANDLE, fdiscard: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn EndUpdateResourceA(hupdate: super::super::Foundation::HANDLE, fdiscard: bool) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn EndUpdateResourceA(hupdate : super::super::Foundation:: HANDLE, fdiscard : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - EndUpdateResourceA(core::mem::transmute(hupdate), fdiscard.param().abi()).ok() + EndUpdateResourceA(core::mem::transmute(hupdate), fdiscard.into()).ok() } #[inline] -pub unsafe fn EndUpdateResourceW(hupdate: super::super::Foundation::HANDLE, fdiscard: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn EndUpdateResourceW(hupdate: super::super::Foundation::HANDLE, fdiscard: bool) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn EndUpdateResourceW(hupdate : super::super::Foundation:: HANDLE, fdiscard : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - EndUpdateResourceW(core::mem::transmute(hupdate), fdiscard.param().abi()).ok() + EndUpdateResourceW(core::mem::transmute(hupdate), fdiscard.into()).ok() } #[inline] pub unsafe fn EnumResourceLanguagesA(hmodule: Option, lptype: P1, lpname: P2, lpenumfunc: ENUMRESLANGPROCA, lparam: isize) -> windows_core::Result<()> diff --git a/crates/libs/windows/src/Windows/Win32/System/Memory/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Memory/mod.rs index d929272672..8cbbee7756 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Memory/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Memory/mod.rs @@ -386,41 +386,35 @@ pub unsafe fn OfferVirtualMemory(virtualaddress: &mut [u8], priority: OFFER_PRIO OfferVirtualMemory(core::mem::transmute(virtualaddress.as_ptr()), virtualaddress.len().try_into().unwrap(), core::mem::transmute(priority)) } #[inline] -pub unsafe fn OpenDedicatedMemoryPartition(partition: super::super::Foundation::HANDLE, dedicatedmemorytypeid: u64, desiredaccess: u32, inherithandle: P3) -> super::super::Foundation::HANDLE -where - P3: windows_core::Param, -{ +pub unsafe fn OpenDedicatedMemoryPartition(partition: super::super::Foundation::HANDLE, dedicatedmemorytypeid: u64, desiredaccess: u32, inherithandle: bool) -> super::super::Foundation::HANDLE { windows_targets::link!("api-ms-win-core-memory-l1-1-8.dll" "system" fn OpenDedicatedMemoryPartition(partition : super::super::Foundation:: HANDLE, dedicatedmemorytypeid : u64, desiredaccess : u32, inherithandle : super::super::Foundation:: BOOL) -> super::super::Foundation:: HANDLE); - OpenDedicatedMemoryPartition(core::mem::transmute(partition), core::mem::transmute(dedicatedmemorytypeid), core::mem::transmute(desiredaccess), inherithandle.param().abi()) + OpenDedicatedMemoryPartition(core::mem::transmute(partition), core::mem::transmute(dedicatedmemorytypeid), core::mem::transmute(desiredaccess), inherithandle.into()) } #[inline] -pub unsafe fn OpenFileMappingA(dwdesiredaccess: u32, binherithandle: P1, lpname: P2) -> windows_core::Result +pub unsafe fn OpenFileMappingA(dwdesiredaccess: u32, binherithandle: bool, lpname: P2) -> windows_core::Result where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn OpenFileMappingA(dwdesiredaccess : u32, binherithandle : super::super::Foundation:: BOOL, lpname : windows_core::PCSTR) -> super::super::Foundation:: HANDLE); - let result__ = OpenFileMappingA(core::mem::transmute(dwdesiredaccess), binherithandle.param().abi(), lpname.param().abi()); + let result__ = OpenFileMappingA(core::mem::transmute(dwdesiredaccess), binherithandle.into(), lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn OpenFileMappingFromApp(desiredaccess: u32, inherithandle: P1, name: P2) -> windows_core::Result +pub unsafe fn OpenFileMappingFromApp(desiredaccess: u32, inherithandle: bool, name: P2) -> windows_core::Result where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("api-ms-win-core-memory-l1-1-3.dll" "system" fn OpenFileMappingFromApp(desiredaccess : u32, inherithandle : super::super::Foundation:: BOOL, name : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - let result__ = OpenFileMappingFromApp(core::mem::transmute(desiredaccess), inherithandle.param().abi(), name.param().abi()); + let result__ = OpenFileMappingFromApp(core::mem::transmute(desiredaccess), inherithandle.into(), name.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn OpenFileMappingW(dwdesiredaccess: u32, binherithandle: P1, lpname: P2) -> windows_core::Result +pub unsafe fn OpenFileMappingW(dwdesiredaccess: u32, binherithandle: bool, lpname: P2) -> windows_core::Result where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn OpenFileMappingW(dwdesiredaccess : u32, binherithandle : super::super::Foundation:: BOOL, lpname : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - let result__ = OpenFileMappingW(core::mem::transmute(dwdesiredaccess), binherithandle.param().abi(), lpname.param().abi()); + let result__ = OpenFileMappingW(core::mem::transmute(dwdesiredaccess), binherithandle.into(), lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -606,9 +600,6 @@ pub unsafe fn VirtualUnlockEx(process: Option, #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct AtlThunkData_t(pub isize); -impl windows_core::TypeKind for AtlThunkData_t { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct CFG_CALL_TARGET_INFO { diff --git a/crates/libs/windows/src/Windows/Win32/System/Mmc/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Mmc/mod.rs index 784d3bb212..4f27c75722 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Mmc/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Mmc/mod.rs @@ -140,11 +140,8 @@ impl Column { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Hidden)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetHidden(&self, hidden: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetHidden)(windows_core::Interface::as_raw(self), hidden.param().abi()).ok() + pub unsafe fn SetHidden(&self, hidden: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetHidden)(windows_core::Interface::as_raw(self), hidden.into()).ok() } pub unsafe fn SetAsSortColumn(&self, sortorder: _ColumnSortOrder) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetAsSortColumn)(windows_core::Interface::as_raw(self), core::mem::transmute(sortorder)).ok() @@ -467,11 +464,8 @@ impl Document { pub unsafe fn SaveAs(&self, filename: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SaveAs)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(filename)).ok() } - pub unsafe fn Close(&self, savechanges: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self), savechanges.param().abi()).ok() + pub unsafe fn Close(&self, savechanges: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self), savechanges.into()).ok() } pub unsafe fn Views(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -765,17 +759,11 @@ impl Extension { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SnapinCLSID)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn EnableAllExtensions(&self, enable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableAllExtensions)(windows_core::Interface::as_raw(self), enable.param().abi()).ok() + pub unsafe fn EnableAllExtensions(&self, enable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableAllExtensions)(windows_core::Interface::as_raw(self), enable.into()).ok() } - pub unsafe fn Enable(&self, enable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), enable.param().abi()).ok() + pub unsafe fn Enable(&self, enable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), enable.into()).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -1789,11 +1777,8 @@ impl core::ops::Deref for IConsole2 { } windows_core::imp::interface_hierarchy!(IConsole2, windows_core::IUnknown, IConsole); impl IConsole2 { - pub unsafe fn Expand(&self, hitem: isize, bexpand: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).Expand)(windows_core::Interface::as_raw(self), core::mem::transmute(hitem), bexpand.param().abi()).ok() + pub unsafe fn Expand(&self, hitem: isize, bexpand: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Expand)(windows_core::Interface::as_raw(self), core::mem::transmute(hitem), bexpand.into()).ok() } pub unsafe fn IsTaskpadViewPreferred(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).IsTaskpadViewPreferred)(windows_core::Interface::as_raw(self)).ok() @@ -2100,11 +2085,8 @@ impl IConsoleVerb { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetVerbState)(windows_core::Interface::as_raw(self), core::mem::transmute(ecmdid), core::mem::transmute(nstate), &mut result__).map(|| result__) } - pub unsafe fn SetVerbState(&self, ecmdid: MMC_CONSOLE_VERB, nstate: MMC_BUTTON_STATE, bstate: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetVerbState)(windows_core::Interface::as_raw(self), core::mem::transmute(ecmdid), core::mem::transmute(nstate), bstate.param().abi()).ok() + pub unsafe fn SetVerbState(&self, ecmdid: MMC_CONSOLE_VERB, nstate: MMC_BUTTON_STATE, bstate: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetVerbState)(windows_core::Interface::as_raw(self), core::mem::transmute(ecmdid), core::mem::transmute(nstate), bstate.into()).ok() } pub unsafe fn SetDefaultVerb(&self, ecmdid: MMC_CONSOLE_VERB) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetDefaultVerb)(windows_core::Interface::as_raw(self), core::mem::transmute(ecmdid)).ok() @@ -3122,11 +3104,8 @@ impl IMenuButton { { (windows_core::Interface::vtable(self).SetButton)(windows_core::Interface::as_raw(self), core::mem::transmute(idcommand), lpbuttontext.param().abi(), lptooltiptext.param().abi()).ok() } - pub unsafe fn SetButtonState(&self, idcommand: i32, nstate: MMC_BUTTON_STATE, bstate: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetButtonState)(windows_core::Interface::as_raw(self), core::mem::transmute(idcommand), core::mem::transmute(nstate), bstate.param().abi()).ok() + pub unsafe fn SetButtonState(&self, idcommand: i32, nstate: MMC_BUTTON_STATE, bstate: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetButtonState)(windows_core::Interface::as_raw(self), core::mem::transmute(idcommand), core::mem::transmute(nstate), bstate.into()).ok() } } #[repr(C)] @@ -3347,13 +3326,11 @@ impl IPropertySheetProvider { { (windows_core::Interface::vtable(self).FindPropertySheet)(windows_core::Interface::as_raw(self), core::mem::transmute(hitem), lpcomponent.param().abi(), lpdataobject.param().abi()).ok() } - pub unsafe fn AddPrimaryPages(&self, lpunknown: P0, bcreatehandle: P1, hnotifywindow: super::super::Foundation::HWND, bscopepane: P3) -> windows_core::Result<()> + pub unsafe fn AddPrimaryPages(&self, lpunknown: P0, bcreatehandle: bool, hnotifywindow: super::super::Foundation::HWND, bscopepane: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).AddPrimaryPages)(windows_core::Interface::as_raw(self), lpunknown.param().abi(), bcreatehandle.param().abi(), core::mem::transmute(hnotifywindow), bscopepane.param().abi()).ok() + (windows_core::Interface::vtable(self).AddPrimaryPages)(windows_core::Interface::as_raw(self), lpunknown.param().abi(), bcreatehandle.into(), core::mem::transmute(hnotifywindow), bscopepane.into()).ok() } pub unsafe fn AddExtensionPages(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AddExtensionPages)(windows_core::Interface::as_raw(self)).ok() @@ -4268,11 +4245,8 @@ impl IToolbar { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetButtonState)(windows_core::Interface::as_raw(self), core::mem::transmute(idcommand), core::mem::transmute(nstate), &mut result__).map(|| result__) } - pub unsafe fn SetButtonState(&self, idcommand: i32, nstate: MMC_BUTTON_STATE, bstate: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetButtonState)(windows_core::Interface::as_raw(self), core::mem::transmute(idcommand), core::mem::transmute(nstate), bstate.param().abi()).ok() + pub unsafe fn SetButtonState(&self, idcommand: i32, nstate: MMC_BUTTON_STATE, bstate: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetButtonState)(windows_core::Interface::as_raw(self), core::mem::transmute(idcommand), core::mem::transmute(nstate), bstate.into()).ok() } } #[repr(C)] @@ -5701,11 +5675,8 @@ impl SnapIn { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Properties)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn EnableAllExtensions(&self, enable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableAllExtensions)(windows_core::Interface::as_raw(self), enable.param().abi()).ok() + pub unsafe fn EnableAllExtensions(&self, enable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableAllExtensions)(windows_core::Interface::as_raw(self), enable.into()).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -6075,11 +6046,8 @@ impl View { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ScopeTreeVisible)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetScopeTreeVisible(&self, visible: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetScopeTreeVisible)(windows_core::Interface::as_raw(self), visible.param().abi()).ok() + pub unsafe fn SetScopeTreeVisible(&self, visible: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetScopeTreeVisible)(windows_core::Interface::as_raw(self), visible.into()).ok() } pub unsafe fn Back(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Back)(windows_core::Interface::as_raw(self)).ok() @@ -6687,12 +6655,11 @@ impl _AppEvents { { (windows_core::Interface::vtable(self).OnQuit)(windows_core::Interface::as_raw(self), application.param().abi()).ok() } - pub unsafe fn OnDocumentOpen(&self, document: P0, new: P1) -> windows_core::Result<()> + pub unsafe fn OnDocumentOpen(&self, document: P0, new: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).OnDocumentOpen)(windows_core::Interface::as_raw(self), document.param().abi(), new.param().abi()).ok() + (windows_core::Interface::vtable(self).OnDocumentOpen)(windows_core::Interface::as_raw(self), document.param().abi(), new.into()).ok() } pub unsafe fn OnDocumentClose(&self, document: P0) -> windows_core::Result<()> where @@ -6905,11 +6872,8 @@ impl _Application { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).UserControl)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetUserControl(&self, usercontrol: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUserControl)(windows_core::Interface::as_raw(self), usercontrol.param().abi()).ok() + pub unsafe fn SetUserControl(&self, usercontrol: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUserControl)(windows_core::Interface::as_raw(self), usercontrol.into()).ok() } pub unsafe fn VersionMajor(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Win32/System/Ole/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Ole/mod.rs index 8fc7238022..728c6abc7c 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Ole/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Ole/mod.rs @@ -428,14 +428,13 @@ pub unsafe fn OleCreateMenuDescriptor(hmenucombined: super::super::UI::WindowsAn } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn OleCreatePictureIndirect(lppictdesc: *const PICTDESC, fown: P2) -> windows_core::Result +pub unsafe fn OleCreatePictureIndirect(lppictdesc: *const PICTDESC, fown: bool) -> windows_core::Result where - P2: windows_core::Param, T: windows_core::Interface, { windows_targets::link!("oleaut32.dll" "system" fn OleCreatePictureIndirect(lppictdesc : *const PICTDESC, riid : *const windows_core::GUID, fown : super::super::Foundation:: BOOL, lplpvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::ptr::null_mut(); - OleCreatePictureIndirect(core::mem::transmute(lppictdesc), &T::IID, fown.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + OleCreatePictureIndirect(core::mem::transmute(lppictdesc), &T::IID, fown.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn OleCreatePropertyFrame(hwndowner: super::super::Foundation::HWND, x: u32, y: u32, lpszcaption: P3, cobjects: u32, ppunk: *const Option, cpages: u32, ppageclsid: *const windows_core::GUID, lcid: u32, dwreserved: Option, pvreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -516,22 +515,20 @@ pub unsafe fn OleGetClipboardWithEnterpriseInfo(dataobject: *mut Option(rclsid: *const windows_core::GUID, lpszlabel: P1, fusetypeaslabel: P2) -> super::super::Foundation::HGLOBAL +pub unsafe fn OleGetIconOfClass(rclsid: *const windows_core::GUID, lpszlabel: P1, fusetypeaslabel: bool) -> super::super::Foundation::HGLOBAL where P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleGetIconOfClass(rclsid : *const windows_core::GUID, lpszlabel : windows_core::PCWSTR, fusetypeaslabel : super::super::Foundation:: BOOL) -> super::super::Foundation:: HGLOBAL); - OleGetIconOfClass(core::mem::transmute(rclsid), lpszlabel.param().abi(), fusetypeaslabel.param().abi()) + OleGetIconOfClass(core::mem::transmute(rclsid), lpszlabel.param().abi(), fusetypeaslabel.into()) } #[inline] -pub unsafe fn OleGetIconOfFile(lpszpath: P0, fusefileaslabel: P1) -> super::super::Foundation::HGLOBAL +pub unsafe fn OleGetIconOfFile(lpszpath: P0, fusefileaslabel: bool) -> super::super::Foundation::HGLOBAL where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleGetIconOfFile(lpszpath : windows_core::PCWSTR, fusefileaslabel : super::super::Foundation:: BOOL) -> super::super::Foundation:: HGLOBAL); - OleGetIconOfFile(lpszpath.param().abi(), fusefileaslabel.param().abi()) + OleGetIconOfFile(lpszpath.param().abi(), fusefileaslabel.into()) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -582,23 +579,21 @@ where } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn OleLoadPicture(lpstream: P0, lsize: i32, frunmode: P2, riid: *const windows_core::GUID, lplpvobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn OleLoadPicture(lpstream: P0, lsize: i32, frunmode: bool, riid: *const windows_core::GUID, lplpvobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("oleaut32.dll" "system" fn OleLoadPicture(lpstream : * mut core::ffi::c_void, lsize : i32, frunmode : super::super::Foundation:: BOOL, riid : *const windows_core::GUID, lplpvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - OleLoadPicture(lpstream.param().abi(), core::mem::transmute(lsize), frunmode.param().abi(), core::mem::transmute(riid), core::mem::transmute(lplpvobj)).ok() + OleLoadPicture(lpstream.param().abi(), core::mem::transmute(lsize), frunmode.into(), core::mem::transmute(riid), core::mem::transmute(lplpvobj)).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn OleLoadPictureEx(lpstream: P0, lsize: i32, frunmode: P2, riid: *const windows_core::GUID, xsizedesired: u32, ysizedesired: u32, dwflags: LOAD_PICTURE_FLAGS, lplpvobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn OleLoadPictureEx(lpstream: P0, lsize: i32, frunmode: bool, riid: *const windows_core::GUID, xsizedesired: u32, ysizedesired: u32, dwflags: LOAD_PICTURE_FLAGS, lplpvobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("oleaut32.dll" "system" fn OleLoadPictureEx(lpstream : * mut core::ffi::c_void, lsize : i32, frunmode : super::super::Foundation:: BOOL, riid : *const windows_core::GUID, xsizedesired : u32, ysizedesired : u32, dwflags : LOAD_PICTURE_FLAGS, lplpvobj : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - OleLoadPictureEx(lpstream.param().abi(), core::mem::transmute(lsize), frunmode.param().abi(), core::mem::transmute(riid), core::mem::transmute(xsizedesired), core::mem::transmute(ysizedesired), core::mem::transmute(dwflags), core::mem::transmute(lplpvobj)).ok() + OleLoadPictureEx(lpstream.param().abi(), core::mem::transmute(lsize), frunmode.into(), core::mem::transmute(riid), core::mem::transmute(xsizedesired), core::mem::transmute(ysizedesired), core::mem::transmute(dwflags), core::mem::transmute(lplpvobj)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Variant"))] #[inline] @@ -624,14 +619,12 @@ where OleLoadPicturePath(szurlorpath.param().abi(), punkcaller.param().abi(), core::mem::transmute(dwreserved.unwrap_or(core::mem::zeroed())), core::mem::transmute(clrreserved), core::mem::transmute(riid), core::mem::transmute(ppvret)).ok() } #[inline] -pub unsafe fn OleLockRunning(punknown: P0, flock: P1, flastunlockcloses: P2) -> windows_core::Result<()> +pub unsafe fn OleLockRunning(punknown: P0, flock: bool, flastunlockcloses: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleLockRunning(punknown : * mut core::ffi::c_void, flock : super::super::Foundation:: BOOL, flastunlockcloses : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - OleLockRunning(punknown.param().abi(), flock.param().abi(), flastunlockcloses.param().abi()).ok() + OleLockRunning(punknown.param().abi(), flock.into(), flastunlockcloses.into()).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -645,13 +638,12 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn OleNoteObjectVisible(punknown: P0, fvisible: P1) -> windows_core::Result<()> +pub unsafe fn OleNoteObjectVisible(punknown: P0, fvisible: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleNoteObjectVisible(punknown : * mut core::ffi::c_void, fvisible : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - OleNoteObjectVisible(punknown.param().abi(), fvisible.param().abi()).ok() + OleNoteObjectVisible(punknown.param().abi(), fvisible.into()).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -706,14 +698,13 @@ where } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] -pub unsafe fn OleSave(pps: P0, pstg: P1, fsameasload: P2) -> windows_core::Result<()> +pub unsafe fn OleSave(pps: P0, pstg: P1, fsameasload: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleSave(pps : * mut core::ffi::c_void, pstg : * mut core::ffi::c_void, fsameasload : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - OleSave(pps.param().abi(), pstg.param().abi(), fsameasload.param().abi()).ok() + OleSave(pps.param().abi(), pstg.param().abi(), fsameasload.into()).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -749,13 +740,12 @@ where OleSetClipboard(pdataobj.param().abi()).ok() } #[inline] -pub unsafe fn OleSetContainedObject(punknown: P0, fcontained: P1) -> windows_core::Result<()> +pub unsafe fn OleSetContainedObject(punknown: P0, fcontained: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleSetContainedObject(punknown : * mut core::ffi::c_void, fcontained : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - OleSetContainedObject(punknown.param().abi(), fcontained.param().abi()).ok() + OleSetContainedObject(punknown.param().abi(), fcontained.into()).ok() } #[inline] pub unsafe fn OleSetMenuDescriptor(holemenu: isize, hwndframe: super::super::Foundation::HWND, hwndactiveobject: super::super::Foundation::HWND, lpframe: P3, lpactiveobj: P4) -> windows_core::Result<()> @@ -784,25 +774,23 @@ pub unsafe fn OleTranslateColor(clr: u32, hpal: super::super::Graphics::Gdi::HPA } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn OleUIAddVerbMenuA(lpoleobj: P0, lpszshorttype: P1, hmenu: super::super::UI::WindowsAndMessaging::HMENU, upos: u32, uidverbmin: u32, uidverbmax: u32, baddconvert: P6, idconvert: u32, lphmenu: *mut super::super::UI::WindowsAndMessaging::HMENU) -> super::super::Foundation::BOOL +pub unsafe fn OleUIAddVerbMenuA(lpoleobj: P0, lpszshorttype: P1, hmenu: super::super::UI::WindowsAndMessaging::HMENU, upos: u32, uidverbmin: u32, uidverbmax: u32, baddconvert: bool, idconvert: u32, lphmenu: *mut super::super::UI::WindowsAndMessaging::HMENU) -> super::super::Foundation::BOOL where P0: windows_core::Param, P1: windows_core::Param, - P6: windows_core::Param, { windows_targets::link!("oledlg.dll" "system" fn OleUIAddVerbMenuA(lpoleobj : * mut core::ffi::c_void, lpszshorttype : windows_core::PCSTR, hmenu : super::super::UI::WindowsAndMessaging:: HMENU, upos : u32, uidverbmin : u32, uidverbmax : u32, baddconvert : super::super::Foundation:: BOOL, idconvert : u32, lphmenu : *mut super::super::UI::WindowsAndMessaging:: HMENU) -> super::super::Foundation:: BOOL); - OleUIAddVerbMenuA(lpoleobj.param().abi(), lpszshorttype.param().abi(), core::mem::transmute(hmenu), core::mem::transmute(upos), core::mem::transmute(uidverbmin), core::mem::transmute(uidverbmax), baddconvert.param().abi(), core::mem::transmute(idconvert), core::mem::transmute(lphmenu)) + OleUIAddVerbMenuA(lpoleobj.param().abi(), lpszshorttype.param().abi(), core::mem::transmute(hmenu), core::mem::transmute(upos), core::mem::transmute(uidverbmin), core::mem::transmute(uidverbmax), baddconvert.into(), core::mem::transmute(idconvert), core::mem::transmute(lphmenu)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn OleUIAddVerbMenuW(lpoleobj: P0, lpszshorttype: P1, hmenu: super::super::UI::WindowsAndMessaging::HMENU, upos: u32, uidverbmin: u32, uidverbmax: u32, baddconvert: P6, idconvert: u32, lphmenu: *mut super::super::UI::WindowsAndMessaging::HMENU) -> super::super::Foundation::BOOL +pub unsafe fn OleUIAddVerbMenuW(lpoleobj: P0, lpszshorttype: P1, hmenu: super::super::UI::WindowsAndMessaging::HMENU, upos: u32, uidverbmin: u32, uidverbmax: u32, baddconvert: bool, idconvert: u32, lphmenu: *mut super::super::UI::WindowsAndMessaging::HMENU) -> super::super::Foundation::BOOL where P0: windows_core::Param, P1: windows_core::Param, - P6: windows_core::Param, { windows_targets::link!("oledlg.dll" "system" fn OleUIAddVerbMenuW(lpoleobj : * mut core::ffi::c_void, lpszshorttype : windows_core::PCWSTR, hmenu : super::super::UI::WindowsAndMessaging:: HMENU, upos : u32, uidverbmin : u32, uidverbmax : u32, baddconvert : super::super::Foundation:: BOOL, idconvert : u32, lphmenu : *mut super::super::UI::WindowsAndMessaging:: HMENU) -> super::super::Foundation:: BOOL); - OleUIAddVerbMenuW(lpoleobj.param().abi(), lpszshorttype.param().abi(), core::mem::transmute(hmenu), core::mem::transmute(upos), core::mem::transmute(uidverbmin), core::mem::transmute(uidverbmax), baddconvert.param().abi(), core::mem::transmute(idconvert), core::mem::transmute(lphmenu)) + OleUIAddVerbMenuW(lpoleobj.param().abi(), lpszshorttype.param().abi(), core::mem::transmute(hmenu), core::mem::transmute(upos), core::mem::transmute(uidverbmin), core::mem::transmute(uidverbmax), baddconvert.into(), core::mem::transmute(idconvert), core::mem::transmute(lphmenu)) } #[cfg(feature = "Win32_Media")] #[inline] @@ -817,12 +805,9 @@ pub unsafe fn OleUIBusyW(param0: *const OLEUIBUSYW) -> u32 { OleUIBusyW(core::mem::transmute(param0)) } #[inline] -pub unsafe fn OleUICanConvertOrActivateAs(rclsid: *const windows_core::GUID, fislinkedobject: P1, wformat: u16) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn OleUICanConvertOrActivateAs(rclsid: *const windows_core::GUID, fislinkedobject: bool, wformat: u16) -> super::super::Foundation::BOOL { windows_targets::link!("oledlg.dll" "system" fn OleUICanConvertOrActivateAs(rclsid : *const windows_core::GUID, fislinkedobject : super::super::Foundation:: BOOL, wformat : u16) -> super::super::Foundation:: BOOL); - OleUICanConvertOrActivateAs(core::mem::transmute(rclsid), fislinkedobject.param().abi(), core::mem::transmute(wformat)) + OleUICanConvertOrActivateAs(core::mem::transmute(rclsid), fislinkedobject.into(), core::mem::transmute(wformat)) } #[inline] pub unsafe fn OleUIChangeIconA(param0: *const OLEUICHANGEICONA) -> u32 { @@ -5229,11 +5214,8 @@ windows_core::imp::define_interface!(IDropSource, IDropSource_Vtbl, 0x00000121_0 windows_core::imp::interface_hierarchy!(IDropSource, windows_core::IUnknown); impl IDropSource { #[cfg(feature = "Win32_System_SystemServices")] - pub unsafe fn QueryContinueDrag(&self, fescapepressed: P0, grfkeystate: super::SystemServices::MODIFIERKEYS_FLAGS) -> windows_core::HRESULT - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).QueryContinueDrag)(windows_core::Interface::as_raw(self), fescapepressed.param().abi(), core::mem::transmute(grfkeystate)) + pub unsafe fn QueryContinueDrag(&self, fescapepressed: bool, grfkeystate: super::SystemServices::MODIFIERKEYS_FLAGS) -> windows_core::HRESULT { + (windows_core::Interface::vtable(self).QueryContinueDrag)(windows_core::Interface::as_raw(self), fescapepressed.into(), core::mem::transmute(grfkeystate)) } pub unsafe fn GiveFeedback(&self, dweffect: DROPEFFECT) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).GiveFeedback)(windows_core::Interface::as_raw(self), core::mem::transmute(dweffect)) @@ -5759,41 +5741,29 @@ impl IFont { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Bold)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetBold(&self, bold: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBold)(windows_core::Interface::as_raw(self), bold.param().abi()).ok() + pub unsafe fn SetBold(&self, bold: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBold)(windows_core::Interface::as_raw(self), bold.into()).ok() } pub unsafe fn Italic(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Italic)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetItalic(&self, italic: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetItalic)(windows_core::Interface::as_raw(self), italic.param().abi()).ok() + pub unsafe fn SetItalic(&self, italic: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetItalic)(windows_core::Interface::as_raw(self), italic.into()).ok() } pub unsafe fn Underline(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Underline)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetUnderline(&self, underline: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUnderline)(windows_core::Interface::as_raw(self), underline.param().abi()).ok() + pub unsafe fn SetUnderline(&self, underline: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUnderline)(windows_core::Interface::as_raw(self), underline.into()).ok() } pub unsafe fn Strikethrough(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Strikethrough)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetStrikethrough(&self, strikethrough: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetStrikethrough)(windows_core::Interface::as_raw(self), strikethrough.param().abi()).ok() + pub unsafe fn SetStrikethrough(&self, strikethrough: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetStrikethrough)(windows_core::Interface::as_raw(self), strikethrough.into()).ok() } pub unsafe fn Weight(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6513,11 +6483,8 @@ impl IOleCache { (windows_core::Interface::vtable(self).InitCache)(windows_core::Interface::as_raw(self), pdataobject.param().abi()).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))] - pub unsafe fn SetData(&self, pformatetc: *const super::Com::FORMATETC, pmedium: *const super::Com::STGMEDIUM, frelease: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetData)(windows_core::Interface::as_raw(self), core::mem::transmute(pformatetc), core::mem::transmute(pmedium), frelease.param().abi()).ok() + pub unsafe fn SetData(&self, pformatetc: *const super::Com::FORMATETC, pmedium: *const super::Com::STGMEDIUM, frelease: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetData)(windows_core::Interface::as_raw(self), core::mem::transmute(pformatetc), core::mem::transmute(pmedium), frelease.into()).ok() } } #[repr(C)] @@ -6717,11 +6684,8 @@ impl IOleClientSite { pub unsafe fn ShowObject(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ShowObject)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn OnShowWindow(&self, fshow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnShowWindow)(windows_core::Interface::as_raw(self), fshow.param().abi()).ok() + pub unsafe fn OnShowWindow(&self, fshow: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnShowWindow)(windows_core::Interface::as_raw(self), fshow.into()).ok() } pub unsafe fn RequestNewObjectLayout(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RequestNewObjectLayout)(windows_core::Interface::as_raw(self)).ok() @@ -6862,11 +6826,8 @@ impl IOleContainer { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EnumObjects)(windows_core::Interface::as_raw(self), grfflags.0 as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn LockContainer(&self, flock: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).LockContainer)(windows_core::Interface::as_raw(self), flock.param().abi()).ok() + pub unsafe fn LockContainer(&self, flock: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).LockContainer)(windows_core::Interface::as_raw(self), flock.into()).ok() } } #[repr(C)] @@ -6926,11 +6887,8 @@ impl IOleControl { pub unsafe fn OnAmbientPropertyChange(&self, dispid: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnAmbientPropertyChange)(windows_core::Interface::as_raw(self), core::mem::transmute(dispid)).ok() } - pub unsafe fn FreezeEvents(&self, bfreeze: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).FreezeEvents)(windows_core::Interface::as_raw(self), bfreeze.param().abi()).ok() + pub unsafe fn FreezeEvents(&self, bfreeze: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).FreezeEvents)(windows_core::Interface::as_raw(self), bfreeze.into()).ok() } } #[repr(C)] @@ -6993,11 +6951,8 @@ impl IOleControlSite { pub unsafe fn OnControlInfoChanged(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnControlInfoChanged)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn LockInPlaceActive(&self, flock: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).LockInPlaceActive)(windows_core::Interface::as_raw(self), flock.param().abi()).ok() + pub unsafe fn LockInPlaceActive(&self, flock: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).LockInPlaceActive)(windows_core::Interface::as_raw(self), flock.into()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetExtendedControl(&self) -> windows_core::Result { @@ -7011,11 +6966,8 @@ impl IOleControlSite { pub unsafe fn TranslateAccelerator(&self, pmsg: *const super::super::UI::WindowsAndMessaging::MSG, grfmodifiers: KEYMODIFIERS) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).TranslateAccelerator)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg), core::mem::transmute(grfmodifiers)).ok() } - pub unsafe fn OnFocus(&self, fgotfocus: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnFocus)(windows_core::Interface::as_raw(self), fgotfocus.param().abi()).ok() + pub unsafe fn OnFocus(&self, fgotfocus: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnFocus)(windows_core::Interface::as_raw(self), fgotfocus.into()).ok() } pub unsafe fn ShowPropertyFrame(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ShowPropertyFrame)(windows_core::Interface::as_raw(self)).ok() @@ -7236,17 +7188,11 @@ impl IOleDocumentView { pub unsafe fn SetRectComplex(&self, prcview: *const super::super::Foundation::RECT, prchscroll: *const super::super::Foundation::RECT, prcvscroll: *const super::super::Foundation::RECT, prcsizebox: *const super::super::Foundation::RECT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetRectComplex)(windows_core::Interface::as_raw(self), core::mem::transmute(prcview), core::mem::transmute(prchscroll), core::mem::transmute(prcvscroll), core::mem::transmute(prcsizebox)).ok() } - pub unsafe fn Show(&self, fshow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), fshow.param().abi()).ok() + pub unsafe fn Show(&self, fshow: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), fshow.into()).ok() } - pub unsafe fn UIActivate(&self, fuiactivate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).UIActivate)(windows_core::Interface::as_raw(self), fuiactivate.param().abi()).ok() + pub unsafe fn UIActivate(&self, fuiactivate: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).UIActivate)(windows_core::Interface::as_raw(self), fuiactivate.into()).ok() } pub unsafe fn Open(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Open)(windows_core::Interface::as_raw(self)).ok() @@ -7430,30 +7376,20 @@ impl IOleInPlaceActiveObject { pub unsafe fn TranslateAccelerator(&self, lpmsg: Option<*const super::super::UI::WindowsAndMessaging::MSG>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).TranslateAccelerator)(windows_core::Interface::as_raw(self), core::mem::transmute(lpmsg.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn OnFrameWindowActivate(&self, factivate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnFrameWindowActivate)(windows_core::Interface::as_raw(self), factivate.param().abi()).ok() + pub unsafe fn OnFrameWindowActivate(&self, factivate: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnFrameWindowActivate)(windows_core::Interface::as_raw(self), factivate.into()).ok() } - pub unsafe fn OnDocWindowActivate(&self, factivate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnDocWindowActivate)(windows_core::Interface::as_raw(self), factivate.param().abi()).ok() + pub unsafe fn OnDocWindowActivate(&self, factivate: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnDocWindowActivate)(windows_core::Interface::as_raw(self), factivate.into()).ok() } - pub unsafe fn ResizeBorder(&self, prcborder: *const super::super::Foundation::RECT, puiwindow: P1, fframewindow: P2) -> windows_core::Result<()> + pub unsafe fn ResizeBorder(&self, prcborder: *const super::super::Foundation::RECT, puiwindow: P1, fframewindow: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).ResizeBorder)(windows_core::Interface::as_raw(self), core::mem::transmute(prcborder), puiwindow.param().abi(), fframewindow.param().abi()).ok() + (windows_core::Interface::vtable(self).ResizeBorder)(windows_core::Interface::as_raw(self), core::mem::transmute(prcborder), puiwindow.param().abi(), fframewindow.into()).ok() } - pub unsafe fn EnableModeless(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableModeless)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn EnableModeless(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableModeless)(windows_core::Interface::as_raw(self), fenable.into()).ok() } } #[repr(C)] @@ -7541,11 +7477,8 @@ impl IOleInPlaceFrame { { (windows_core::Interface::vtable(self).SetStatusText)(windows_core::Interface::as_raw(self), pszstatustext.param().abi()).ok() } - pub unsafe fn EnableModeless(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableModeless)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn EnableModeless(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableModeless)(windows_core::Interface::as_raw(self), fenable.into()).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn TranslateAccelerator(&self, lpmsg: *const super::super::UI::WindowsAndMessaging::MSG, wid: u16) -> windows_core::Result<()> { @@ -7779,11 +7712,8 @@ impl IOleInPlaceSite { pub unsafe fn Scroll(&self, scrollextant: super::super::Foundation::SIZE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Scroll)(windows_core::Interface::as_raw(self), core::mem::transmute(scrollextant)).ok() } - pub unsafe fn OnUIDeactivate(&self, fundoable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnUIDeactivate)(windows_core::Interface::as_raw(self), fundoable.param().abi()).ok() + pub unsafe fn OnUIDeactivate(&self, fundoable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnUIDeactivate)(windows_core::Interface::as_raw(self), fundoable.into()).ok() } pub unsafe fn OnInPlaceDeactivate(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnInPlaceDeactivate)(windows_core::Interface::as_raw(self)).ok() @@ -7903,11 +7833,8 @@ impl IOleInPlaceSiteEx { pub unsafe fn OnInPlaceActivateEx(&self, pfnoredraw: *mut super::super::Foundation::BOOL, dwflags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnInPlaceActivateEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pfnoredraw), core::mem::transmute(dwflags)).ok() } - pub unsafe fn OnInPlaceDeactivateEx(&self, fnoredraw: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnInPlaceDeactivateEx)(windows_core::Interface::as_raw(self), fnoredraw.param().abi()).ok() + pub unsafe fn OnInPlaceDeactivateEx(&self, fnoredraw: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnInPlaceDeactivateEx)(windows_core::Interface::as_raw(self), fnoredraw.into()).ok() } pub unsafe fn RequestUIActivate(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RequestUIActivate)(windows_core::Interface::as_raw(self)).ok() @@ -7969,20 +7896,14 @@ impl IOleInPlaceSiteWindowless { pub unsafe fn GetCapture(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetCapture)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetCapture(&self, fcapture: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCapture)(windows_core::Interface::as_raw(self), fcapture.param().abi()).ok() + pub unsafe fn SetCapture(&self, fcapture: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCapture)(windows_core::Interface::as_raw(self), fcapture.into()).ok() } pub unsafe fn GetFocus(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetFocus)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetFocus(&self, ffocus: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetFocus)(windows_core::Interface::as_raw(self), ffocus.param().abi()).ok() + pub unsafe fn SetFocus(&self, ffocus: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetFocus)(windows_core::Interface::as_raw(self), ffocus.into()).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetDC(&self, prect: *const super::super::Foundation::RECT, grfflags: u32) -> windows_core::Result { @@ -7993,18 +7914,12 @@ impl IOleInPlaceSiteWindowless { pub unsafe fn ReleaseDC(&self, hdc: super::super::Graphics::Gdi::HDC) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc)).ok() } - pub unsafe fn InvalidateRect(&self, prect: *const super::super::Foundation::RECT, ferase: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).InvalidateRect)(windows_core::Interface::as_raw(self), core::mem::transmute(prect), ferase.param().abi()).ok() + pub unsafe fn InvalidateRect(&self, prect: *const super::super::Foundation::RECT, ferase: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InvalidateRect)(windows_core::Interface::as_raw(self), core::mem::transmute(prect), ferase.into()).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn InvalidateRgn(&self, hrgn: super::super::Graphics::Gdi::HRGN, ferase: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).InvalidateRgn)(windows_core::Interface::as_raw(self), core::mem::transmute(hrgn), ferase.param().abi()).ok() + pub unsafe fn InvalidateRgn(&self, hrgn: super::super::Graphics::Gdi::HRGN, ferase: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InvalidateRgn)(windows_core::Interface::as_raw(self), core::mem::transmute(hrgn), ferase.into()).ok() } pub unsafe fn ScrollRect(&self, dx: i32, dy: i32, prectscroll: *const super::super::Foundation::RECT, prectclip: *const super::super::Foundation::RECT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ScrollRect)(windows_core::Interface::as_raw(self), core::mem::transmute(dx), core::mem::transmute(dy), core::mem::transmute(prectscroll), core::mem::transmute(prectclip)).ok() @@ -8529,12 +8444,11 @@ impl IOleObject { (windows_core::Interface::vtable(self).GetMoniker)(windows_core::Interface::as_raw(self), dwassign.0 as _, dwwhichmoniker.0 as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn InitFromData(&self, pdataobject: P0, fcreation: P1, dwreserved: u32) -> windows_core::Result<()> + pub unsafe fn InitFromData(&self, pdataobject: P0, fcreation: bool, dwreserved: u32) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).InitFromData)(windows_core::Interface::as_raw(self), pdataobject.param().abi(), fcreation.param().abi(), core::mem::transmute(dwreserved)).ok() + (windows_core::Interface::vtable(self).InitFromData)(windows_core::Interface::as_raw(self), pdataobject.param().abi(), fcreation.into(), core::mem::transmute(dwreserved)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetClipboardData(&self, dwreserved: u32) -> windows_core::Result { @@ -8876,12 +8790,11 @@ impl IOleParentUndoUnit { { (windows_core::Interface::vtable(self).Open)(windows_core::Interface::as_raw(self), ppuu.param().abi()).ok() } - pub unsafe fn Close(&self, ppuu: P0, fcommit: P1) -> windows_core::Result<()> + pub unsafe fn Close(&self, ppuu: P0, fcommit: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self), ppuu.param().abi(), fcommit.param().abi()).ok() + (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self), ppuu.param().abi(), fcommit.into()).ok() } pub unsafe fn Add(&self, puu: P0) -> windows_core::Result<()> where @@ -8971,12 +8884,11 @@ impl IOleUILinkContainerA { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetLinkUpdateOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlink), &mut result__).map(|| result__) } - pub unsafe fn SetLinkSource(&self, dwlink: u32, lpszdisplayname: P1, lenfilename: u32, pcheaten: *mut u32, fvalidatesource: P4) -> windows_core::Result<()> + pub unsafe fn SetLinkSource(&self, dwlink: u32, lpszdisplayname: P1, lenfilename: u32, pcheaten: *mut u32, fvalidatesource: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P4: windows_core::Param, { - (windows_core::Interface::vtable(self).SetLinkSource)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlink), lpszdisplayname.param().abi(), core::mem::transmute(lenfilename), core::mem::transmute(pcheaten), fvalidatesource.param().abi()).ok() + (windows_core::Interface::vtable(self).SetLinkSource)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlink), lpszdisplayname.param().abi(), core::mem::transmute(lenfilename), core::mem::transmute(pcheaten), fvalidatesource.into()).ok() } pub unsafe fn GetLinkSource(&self, dwlink: u32, lplpszdisplayname: Option<*mut windows_core::PSTR>, lplenfilename: *mut u32, lplpszfulllinktype: Option<*mut windows_core::PSTR>, lplpszshortlinktype: Option<*mut windows_core::PSTR>, lpfsourceavailable: *mut super::super::Foundation::BOOL, lpfisselected: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLinkSource)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlink), core::mem::transmute(lplpszdisplayname.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplenfilename), core::mem::transmute(lplpszfulllinktype.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplpszshortlinktype.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpfsourceavailable), core::mem::transmute(lpfisselected)).ok() @@ -8984,12 +8896,8 @@ impl IOleUILinkContainerA { pub unsafe fn OpenLinkSource(&self, dwlink: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OpenLinkSource)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlink)).ok() } - pub unsafe fn UpdateLink(&self, dwlink: u32, ferrormessage: P1, freserved: P2) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).UpdateLink)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlink), ferrormessage.param().abi(), freserved.param().abi()).ok() + pub unsafe fn UpdateLink(&self, dwlink: u32, ferrormessage: bool, freserved: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).UpdateLink)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlink), ferrormessage.into(), freserved.into()).ok() } pub unsafe fn CancelLink(&self, dwlink: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CancelLink)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlink)).ok() @@ -9087,12 +8995,11 @@ impl IOleUILinkContainerW { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetLinkUpdateOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlink), &mut result__).map(|| result__) } - pub unsafe fn SetLinkSource(&self, dwlink: u32, lpszdisplayname: P1, lenfilename: u32, pcheaten: *mut u32, fvalidatesource: P4) -> windows_core::Result<()> + pub unsafe fn SetLinkSource(&self, dwlink: u32, lpszdisplayname: P1, lenfilename: u32, pcheaten: *mut u32, fvalidatesource: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P4: windows_core::Param, { - (windows_core::Interface::vtable(self).SetLinkSource)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlink), lpszdisplayname.param().abi(), core::mem::transmute(lenfilename), core::mem::transmute(pcheaten), fvalidatesource.param().abi()).ok() + (windows_core::Interface::vtable(self).SetLinkSource)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlink), lpszdisplayname.param().abi(), core::mem::transmute(lenfilename), core::mem::transmute(pcheaten), fvalidatesource.into()).ok() } pub unsafe fn GetLinkSource(&self, dwlink: u32, lplpszdisplayname: Option<*mut windows_core::PWSTR>, lplenfilename: *mut u32, lplpszfulllinktype: Option<*mut windows_core::PWSTR>, lplpszshortlinktype: Option<*mut windows_core::PWSTR>, lpfsourceavailable: *mut super::super::Foundation::BOOL, lpfisselected: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLinkSource)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlink), core::mem::transmute(lplpszdisplayname.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplenfilename), core::mem::transmute(lplpszfulllinktype.unwrap_or(core::mem::zeroed())), core::mem::transmute(lplpszshortlinktype.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpfsourceavailable), core::mem::transmute(lpfisselected)).ok() @@ -9100,12 +9007,8 @@ impl IOleUILinkContainerW { pub unsafe fn OpenLinkSource(&self, dwlink: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OpenLinkSource)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlink)).ok() } - pub unsafe fn UpdateLink(&self, dwlink: u32, ferrormessage: P1, freserved: P2) -> windows_core::Result<()> - where - P1: windows_core::Param, - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).UpdateLink)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlink), ferrormessage.param().abi(), freserved.param().abi()).ok() + pub unsafe fn UpdateLink(&self, dwlink: u32, ferrormessage: bool, freserved: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).UpdateLink)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlink), ferrormessage.into(), freserved.into()).ok() } pub unsafe fn CancelLink(&self, dwlink: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CancelLink)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlink)).ok() @@ -9287,11 +9190,8 @@ impl IOleUIObjInfoA { pub unsafe fn GetViewInfo(&self, dwobject: u32, phmetapict: Option<*const super::super::Foundation::HGLOBAL>, pdvaspect: Option<*const u32>, pncurrentscale: Option<*const i32>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetViewInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(dwobject), core::mem::transmute(phmetapict.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdvaspect.unwrap_or(core::mem::zeroed())), core::mem::transmute(pncurrentscale.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn SetViewInfo(&self, dwobject: u32, hmetapict: super::super::Foundation::HGLOBAL, dvaspect: u32, ncurrentscale: i32, brelativetoorig: P4) -> windows_core::Result<()> - where - P4: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetViewInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(dwobject), core::mem::transmute(hmetapict), core::mem::transmute(dvaspect), core::mem::transmute(ncurrentscale), brelativetoorig.param().abi()).ok() + pub unsafe fn SetViewInfo(&self, dwobject: u32, hmetapict: super::super::Foundation::HGLOBAL, dvaspect: u32, ncurrentscale: i32, brelativetoorig: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetViewInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(dwobject), core::mem::transmute(hmetapict), core::mem::transmute(dvaspect), core::mem::transmute(ncurrentscale), brelativetoorig.into()).ok() } } #[repr(C)] @@ -9361,11 +9261,8 @@ impl IOleUIObjInfoW { pub unsafe fn GetViewInfo(&self, dwobject: u32, phmetapict: Option<*const super::super::Foundation::HGLOBAL>, pdvaspect: Option<*const u32>, pncurrentscale: Option<*const i32>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetViewInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(dwobject), core::mem::transmute(phmetapict.unwrap_or(core::mem::zeroed())), core::mem::transmute(pdvaspect.unwrap_or(core::mem::zeroed())), core::mem::transmute(pncurrentscale.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn SetViewInfo(&self, dwobject: u32, hmetapict: super::super::Foundation::HGLOBAL, dvaspect: u32, ncurrentscale: i32, brelativetoorig: P4) -> windows_core::Result<()> - where - P4: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetViewInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(dwobject), core::mem::transmute(hmetapict), core::mem::transmute(dvaspect), core::mem::transmute(ncurrentscale), brelativetoorig.param().abi()).ok() + pub unsafe fn SetViewInfo(&self, dwobject: u32, hmetapict: super::super::Foundation::HGLOBAL, dvaspect: u32, ncurrentscale: i32, brelativetoorig: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetViewInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(dwobject), core::mem::transmute(hmetapict), core::mem::transmute(dvaspect), core::mem::transmute(ncurrentscale), brelativetoorig.into()).ok() } } #[repr(C)] @@ -9429,12 +9326,11 @@ impl IOleUndoManager { { (windows_core::Interface::vtable(self).Open)(windows_core::Interface::as_raw(self), ppuu.param().abi()).ok() } - pub unsafe fn Close(&self, ppuu: P0, fcommit: P1) -> windows_core::HRESULT + pub unsafe fn Close(&self, ppuu: P0, fcommit: bool) -> windows_core::HRESULT where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self), ppuu.param().abi(), fcommit.param().abi()) + (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self), ppuu.param().abi(), fcommit.into()) } pub unsafe fn Add(&self, puu: P0) -> windows_core::Result<()> where @@ -9480,11 +9376,8 @@ impl IOleUndoManager { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetLastRedoDescription)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn Enable(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn Enable(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), fenable.into()).ok() } } #[repr(C)] @@ -9696,11 +9589,8 @@ impl IOleWindow { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetWindow)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn ContextSensitiveHelp(&self, fentermode: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ContextSensitiveHelp)(windows_core::Interface::as_raw(self), fentermode.param().abi()).ok() + pub unsafe fn ContextSensitiveHelp(&self, fentermode: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ContextSensitiveHelp)(windows_core::Interface::as_raw(self), fentermode.into()).ok() } } #[repr(C)] @@ -9893,13 +9783,11 @@ impl IPersistPropertyBag { (windows_core::Interface::vtable(self).Load)(windows_core::Interface::as_raw(self), ppropbag.param().abi(), perrorlog.param().abi()).ok() } #[cfg(feature = "Win32_System_Com_StructuredStorage")] - pub unsafe fn Save(&self, ppropbag: P0, fcleardirty: P1, fsaveallproperties: P2) -> windows_core::Result<()> + pub unsafe fn Save(&self, ppropbag: P0, fcleardirty: bool, fsaveallproperties: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), ppropbag.param().abi(), fcleardirty.param().abi(), fsaveallproperties.param().abi()).ok() + (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), ppropbag.param().abi(), fcleardirty.into(), fsaveallproperties.into()).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -9975,13 +9863,11 @@ impl IPersistPropertyBag2 { (windows_core::Interface::vtable(self).Load)(windows_core::Interface::as_raw(self), ppropbag.param().abi(), perrlog.param().abi()).ok() } #[cfg(feature = "Win32_System_Com_StructuredStorage")] - pub unsafe fn Save(&self, ppropbag: P0, fcleardirty: P1, fsaveallproperties: P2) -> windows_core::Result<()> + pub unsafe fn Save(&self, ppropbag: P0, fcleardirty: bool, fsaveallproperties: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), ppropbag.param().abi(), fcleardirty.param().abi(), fsaveallproperties.param().abi()).ok() + (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), ppropbag.param().abi(), fcleardirty.into(), fsaveallproperties.into()).ok() } pub unsafe fn IsDirty(&self) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).IsDirty)(windows_core::Interface::as_raw(self)) @@ -10085,23 +9971,19 @@ impl IPicture { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).KeepOriginalFormat)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetKeepOriginalFormat(&self, keep: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetKeepOriginalFormat)(windows_core::Interface::as_raw(self), keep.param().abi()).ok() + pub unsafe fn SetKeepOriginalFormat(&self, keep: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetKeepOriginalFormat)(windows_core::Interface::as_raw(self), keep.into()).ok() } pub unsafe fn PictureChanged(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).PictureChanged)(windows_core::Interface::as_raw(self)).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn SaveAsFile(&self, pstream: P0, fsavememcopy: P1) -> windows_core::Result + pub unsafe fn SaveAsFile(&self, pstream: P0, fsavememcopy: bool) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).SaveAsFile)(windows_core::Interface::as_raw(self), pstream.param().abi(), fsavememcopy.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).SaveAsFile)(windows_core::Interface::as_raw(self), pstream.param().abi(), fsavememcopy.into(), &mut result__).map(|| result__) } pub unsafe fn Attributes(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10335,23 +10217,19 @@ impl IPicture2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).KeepOriginalFormat)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetKeepOriginalFormat(&self, keep: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetKeepOriginalFormat)(windows_core::Interface::as_raw(self), keep.param().abi()).ok() + pub unsafe fn SetKeepOriginalFormat(&self, keep: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetKeepOriginalFormat)(windows_core::Interface::as_raw(self), keep.into()).ok() } pub unsafe fn PictureChanged(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).PictureChanged)(windows_core::Interface::as_raw(self)).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn SaveAsFile(&self, pstream: P0, fsavememcopy: P1) -> windows_core::Result + pub unsafe fn SaveAsFile(&self, pstream: P0, fsavememcopy: bool) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).SaveAsFile)(windows_core::Interface::as_raw(self), pstream.param().abi(), fsavememcopy.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).SaveAsFile)(windows_core::Interface::as_raw(self), pstream.param().abi(), fsavememcopy.into(), &mut result__).map(|| result__) } pub unsafe fn Attributes(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10581,11 +10459,8 @@ impl IPointerInactive { pub unsafe fn OnInactiveMouseMove(&self, prectbounds: *const super::super::Foundation::RECT, x: i32, y: i32, grfkeystate: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnInactiveMouseMove)(windows_core::Interface::as_raw(self), core::mem::transmute(prectbounds), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(grfkeystate)).ok() } - pub unsafe fn OnInactiveSetCursor(&self, prectbounds: *const super::super::Foundation::RECT, x: i32, y: i32, dwmousemsg: u32, fsetalways: P4) -> windows_core::Result<()> - where - P4: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnInactiveSetCursor)(windows_core::Interface::as_raw(self), core::mem::transmute(prectbounds), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(dwmousemsg), fsetalways.param().abi()).ok() + pub unsafe fn OnInactiveSetCursor(&self, prectbounds: *const super::super::Foundation::RECT, x: i32, y: i32, dwmousemsg: u32, fsetalways: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnInactiveSetCursor)(windows_core::Interface::as_raw(self), core::mem::transmute(prectbounds), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(dwmousemsg), fsetalways.into()).ok() } } #[repr(C)] @@ -10743,11 +10618,8 @@ impl IPropertyPage { { (windows_core::Interface::vtable(self).SetPageSite)(windows_core::Interface::as_raw(self), ppagesite.param().abi()).ok() } - pub unsafe fn Activate(&self, hwndparent: super::super::Foundation::HWND, prect: *const super::super::Foundation::RECT, bmodal: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(prect), bmodal.param().abi()).ok() + pub unsafe fn Activate(&self, hwndparent: super::super::Foundation::HWND, prect: *const super::super::Foundation::RECT, bmodal: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndparent), core::mem::transmute(prect), bmodal.into()).ok() } pub unsafe fn Deactivate(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Deactivate)(windows_core::Interface::as_raw(self)).ok() @@ -13633,9 +13505,6 @@ pub const OLEWHICHMK_OBJREL: OLEWHICHMK = OLEWHICHMK(2i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct OLE_HANDLE(pub u32); -impl windows_core::TypeKind for OLE_HANDLE { - type TypeKind = windows_core::CopyType; -} impl OLE_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == 0 diff --git a/crates/libs/windows/src/Windows/Win32/System/PasswordManagement/mod.rs b/crates/libs/windows/src/Windows/Win32/System/PasswordManagement/mod.rs index afd698a79f..3af15b71ff 100644 --- a/crates/libs/windows/src/Windows/Win32/System/PasswordManagement/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/PasswordManagement/mod.rs @@ -1,22 +1,20 @@ #[inline] -pub unsafe fn MSChapSrvChangePassword(servername: P0, username: P1, lmoldpresent: P2, lmoldowfpassword: *const LM_OWF_PASSWORD, lmnewowfpassword: *const LM_OWF_PASSWORD, ntoldowfpassword: *const LM_OWF_PASSWORD, ntnewowfpassword: *const LM_OWF_PASSWORD) -> u32 +pub unsafe fn MSChapSrvChangePassword(servername: P0, username: P1, lmoldpresent: bool, lmoldowfpassword: *const LM_OWF_PASSWORD, lmnewowfpassword: *const LM_OWF_PASSWORD, ntoldowfpassword: *const LM_OWF_PASSWORD, ntnewowfpassword: *const LM_OWF_PASSWORD) -> u32 where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn MSChapSrvChangePassword(servername : windows_core::PCWSTR, username : windows_core::PCWSTR, lmoldpresent : super::super::Foundation:: BOOLEAN, lmoldowfpassword : *const LM_OWF_PASSWORD, lmnewowfpassword : *const LM_OWF_PASSWORD, ntoldowfpassword : *const LM_OWF_PASSWORD, ntnewowfpassword : *const LM_OWF_PASSWORD) -> u32); - MSChapSrvChangePassword(servername.param().abi(), username.param().abi(), lmoldpresent.param().abi(), core::mem::transmute(lmoldowfpassword), core::mem::transmute(lmnewowfpassword), core::mem::transmute(ntoldowfpassword), core::mem::transmute(ntnewowfpassword)) + MSChapSrvChangePassword(servername.param().abi(), username.param().abi(), lmoldpresent.into(), core::mem::transmute(lmoldowfpassword), core::mem::transmute(lmnewowfpassword), core::mem::transmute(ntoldowfpassword), core::mem::transmute(ntnewowfpassword)) } #[inline] -pub unsafe fn MSChapSrvChangePassword2(servername: P0, username: P1, newpasswordencryptedwitholdnt: *const SAMPR_ENCRYPTED_USER_PASSWORD, oldntowfpasswordencryptedwithnewnt: *const ENCRYPTED_LM_OWF_PASSWORD, lmpresent: P4, newpasswordencryptedwitholdlm: *const SAMPR_ENCRYPTED_USER_PASSWORD, oldlmowfpasswordencryptedwithnewlmornt: *const ENCRYPTED_LM_OWF_PASSWORD) -> u32 +pub unsafe fn MSChapSrvChangePassword2(servername: P0, username: P1, newpasswordencryptedwitholdnt: *const SAMPR_ENCRYPTED_USER_PASSWORD, oldntowfpasswordencryptedwithnewnt: *const ENCRYPTED_LM_OWF_PASSWORD, lmpresent: bool, newpasswordencryptedwitholdlm: *const SAMPR_ENCRYPTED_USER_PASSWORD, oldlmowfpasswordencryptedwithnewlmornt: *const ENCRYPTED_LM_OWF_PASSWORD) -> u32 where P0: windows_core::Param, P1: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn MSChapSrvChangePassword2(servername : windows_core::PCWSTR, username : windows_core::PCWSTR, newpasswordencryptedwitholdnt : *const SAMPR_ENCRYPTED_USER_PASSWORD, oldntowfpasswordencryptedwithnewnt : *const ENCRYPTED_LM_OWF_PASSWORD, lmpresent : super::super::Foundation:: BOOLEAN, newpasswordencryptedwitholdlm : *const SAMPR_ENCRYPTED_USER_PASSWORD, oldlmowfpasswordencryptedwithnewlmornt : *const ENCRYPTED_LM_OWF_PASSWORD) -> u32); - MSChapSrvChangePassword2(servername.param().abi(), username.param().abi(), core::mem::transmute(newpasswordencryptedwitholdnt), core::mem::transmute(oldntowfpasswordencryptedwithnewnt), lmpresent.param().abi(), core::mem::transmute(newpasswordencryptedwitholdlm), core::mem::transmute(oldlmowfpasswordencryptedwithnewlmornt)) + MSChapSrvChangePassword2(servername.param().abi(), username.param().abi(), core::mem::transmute(newpasswordencryptedwitholdnt), core::mem::transmute(oldntowfpasswordencryptedwithnewnt), lmpresent.into(), core::mem::transmute(newpasswordencryptedwitholdlm), core::mem::transmute(oldlmowfpasswordencryptedwithnewlmornt)) } #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] diff --git a/crates/libs/windows/src/Windows/Win32/System/Performance/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Performance/mod.rs index ac1e014685..d31ab0d8df 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Performance/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Performance/mod.rs @@ -28,22 +28,20 @@ where InstallPerfDllW(szcomputername.param().abi(), lpinifile.param().abi(), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn LoadPerfCounterTextStringsA(lpcommandline: P0, bquietmodearg: P1) -> u32 +pub unsafe fn LoadPerfCounterTextStringsA(lpcommandline: P0, bquietmodearg: bool) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("loadperf.dll" "system" fn LoadPerfCounterTextStringsA(lpcommandline : windows_core::PCSTR, bquietmodearg : super::super::Foundation:: BOOL) -> u32); - LoadPerfCounterTextStringsA(lpcommandline.param().abi(), bquietmodearg.param().abi()) + LoadPerfCounterTextStringsA(lpcommandline.param().abi(), bquietmodearg.into()) } #[inline] -pub unsafe fn LoadPerfCounterTextStringsW(lpcommandline: P0, bquietmodearg: P1) -> u32 +pub unsafe fn LoadPerfCounterTextStringsW(lpcommandline: P0, bquietmodearg: bool) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("loadperf.dll" "system" fn LoadPerfCounterTextStringsW(lpcommandline : windows_core::PCWSTR, bquietmodearg : super::super::Foundation:: BOOL) -> u32); - LoadPerfCounterTextStringsW(lpcommandline.param().abi(), bquietmodearg.param().abi()) + LoadPerfCounterTextStringsW(lpcommandline.param().abi(), bquietmodearg.into()) } #[inline] pub unsafe fn PdhAddCounterA(hquery: PDH_HQUERY, szfullcounterpath: P1, dwuserdata: usize, phcounter: *mut PDH_HCOUNTER) -> u32 @@ -261,42 +259,38 @@ where PdhEnumObjectItemsW(szdatasource.param().abi(), szmachinename.param().abi(), szobjectname.param().abi(), core::mem::transmute(mszcounterlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchcounterlistlength), core::mem::transmute(mszinstancelist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchinstancelistlength), core::mem::transmute(dwdetaillevel), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn PdhEnumObjectsA(szdatasource: P0, szmachinename: P1, mszobjectlist: Option, pcchbuffersize: *mut u32, dwdetaillevel: PERF_DETAIL, brefresh: P5) -> u32 +pub unsafe fn PdhEnumObjectsA(szdatasource: P0, szmachinename: P1, mszobjectlist: Option, pcchbuffersize: *mut u32, dwdetaillevel: PERF_DETAIL, brefresh: bool) -> u32 where P0: windows_core::Param, P1: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhEnumObjectsA(szdatasource : windows_core::PCSTR, szmachinename : windows_core::PCSTR, mszobjectlist : windows_core::PSTR, pcchbuffersize : *mut u32, dwdetaillevel : PERF_DETAIL, brefresh : super::super::Foundation:: BOOL) -> u32); - PdhEnumObjectsA(szdatasource.param().abi(), szmachinename.param().abi(), core::mem::transmute(mszobjectlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize), core::mem::transmute(dwdetaillevel), brefresh.param().abi()) + PdhEnumObjectsA(szdatasource.param().abi(), szmachinename.param().abi(), core::mem::transmute(mszobjectlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize), core::mem::transmute(dwdetaillevel), brefresh.into()) } #[inline] -pub unsafe fn PdhEnumObjectsHA(hdatasource: Option, szmachinename: P1, mszobjectlist: Option, pcchbuffersize: *mut u32, dwdetaillevel: PERF_DETAIL, brefresh: P5) -> u32 +pub unsafe fn PdhEnumObjectsHA(hdatasource: Option, szmachinename: P1, mszobjectlist: Option, pcchbuffersize: *mut u32, dwdetaillevel: PERF_DETAIL, brefresh: bool) -> u32 where P1: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhEnumObjectsHA(hdatasource : PDH_HLOG, szmachinename : windows_core::PCSTR, mszobjectlist : windows_core::PSTR, pcchbuffersize : *mut u32, dwdetaillevel : PERF_DETAIL, brefresh : super::super::Foundation:: BOOL) -> u32); - PdhEnumObjectsHA(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), szmachinename.param().abi(), core::mem::transmute(mszobjectlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize), core::mem::transmute(dwdetaillevel), brefresh.param().abi()) + PdhEnumObjectsHA(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), szmachinename.param().abi(), core::mem::transmute(mszobjectlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize), core::mem::transmute(dwdetaillevel), brefresh.into()) } #[inline] -pub unsafe fn PdhEnumObjectsHW(hdatasource: Option, szmachinename: P1, mszobjectlist: Option, pcchbuffersize: *mut u32, dwdetaillevel: PERF_DETAIL, brefresh: P5) -> u32 +pub unsafe fn PdhEnumObjectsHW(hdatasource: Option, szmachinename: P1, mszobjectlist: Option, pcchbuffersize: *mut u32, dwdetaillevel: PERF_DETAIL, brefresh: bool) -> u32 where P1: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhEnumObjectsHW(hdatasource : PDH_HLOG, szmachinename : windows_core::PCWSTR, mszobjectlist : windows_core::PWSTR, pcchbuffersize : *mut u32, dwdetaillevel : PERF_DETAIL, brefresh : super::super::Foundation:: BOOL) -> u32); - PdhEnumObjectsHW(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), szmachinename.param().abi(), core::mem::transmute(mszobjectlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize), core::mem::transmute(dwdetaillevel), brefresh.param().abi()) + PdhEnumObjectsHW(core::mem::transmute(hdatasource.unwrap_or(core::mem::zeroed())), szmachinename.param().abi(), core::mem::transmute(mszobjectlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize), core::mem::transmute(dwdetaillevel), brefresh.into()) } #[inline] -pub unsafe fn PdhEnumObjectsW(szdatasource: P0, szmachinename: P1, mszobjectlist: Option, pcchbuffersize: *mut u32, dwdetaillevel: PERF_DETAIL, brefresh: P5) -> u32 +pub unsafe fn PdhEnumObjectsW(szdatasource: P0, szmachinename: P1, mszobjectlist: Option, pcchbuffersize: *mut u32, dwdetaillevel: PERF_DETAIL, brefresh: bool) -> u32 where P0: windows_core::Param, P1: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhEnumObjectsW(szdatasource : windows_core::PCWSTR, szmachinename : windows_core::PCWSTR, mszobjectlist : windows_core::PWSTR, pcchbuffersize : *mut u32, dwdetaillevel : PERF_DETAIL, brefresh : super::super::Foundation:: BOOL) -> u32); - PdhEnumObjectsW(szdatasource.param().abi(), szmachinename.param().abi(), core::mem::transmute(mszobjectlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize), core::mem::transmute(dwdetaillevel), brefresh.param().abi()) + PdhEnumObjectsW(szdatasource.param().abi(), szmachinename.param().abi(), core::mem::transmute(mszobjectlist.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchbuffersize), core::mem::transmute(dwdetaillevel), brefresh.into()) } #[inline] pub unsafe fn PdhExpandCounterPathA(szwildcardpath: P0, mszexpandedpathlist: Option, pcchpathlistlength: *mut u32) -> u32 @@ -354,20 +348,14 @@ pub unsafe fn PdhFormatFromRawValue(dwcountertype: u32, dwformat: PDH_FMT, ptime PdhFormatFromRawValue(core::mem::transmute(dwcountertype), core::mem::transmute(dwformat), core::mem::transmute(ptimebase.unwrap_or(core::mem::zeroed())), core::mem::transmute(prawvalue1), core::mem::transmute(prawvalue2), core::mem::transmute(pfmtvalue)) } #[inline] -pub unsafe fn PdhGetCounterInfoA(hcounter: PDH_HCOUNTER, bretrieveexplaintext: P1, pdwbuffersize: *mut u32, lpbuffer: Option<*mut PDH_COUNTER_INFO_A>) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn PdhGetCounterInfoA(hcounter: PDH_HCOUNTER, bretrieveexplaintext: bool, pdwbuffersize: *mut u32, lpbuffer: Option<*mut PDH_COUNTER_INFO_A>) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhGetCounterInfoA(hcounter : PDH_HCOUNTER, bretrieveexplaintext : super::super::Foundation:: BOOLEAN, pdwbuffersize : *mut u32, lpbuffer : *mut PDH_COUNTER_INFO_A) -> u32); - PdhGetCounterInfoA(core::mem::transmute(hcounter), bretrieveexplaintext.param().abi(), core::mem::transmute(pdwbuffersize), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed()))) + PdhGetCounterInfoA(core::mem::transmute(hcounter), bretrieveexplaintext.into(), core::mem::transmute(pdwbuffersize), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn PdhGetCounterInfoW(hcounter: PDH_HCOUNTER, bretrieveexplaintext: P1, pdwbuffersize: *mut u32, lpbuffer: Option<*mut PDH_COUNTER_INFO_W>) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn PdhGetCounterInfoW(hcounter: PDH_HCOUNTER, bretrieveexplaintext: bool, pdwbuffersize: *mut u32, lpbuffer: Option<*mut PDH_COUNTER_INFO_W>) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhGetCounterInfoW(hcounter : PDH_HCOUNTER, bretrieveexplaintext : super::super::Foundation:: BOOLEAN, pdwbuffersize : *mut u32, lpbuffer : *mut PDH_COUNTER_INFO_W) -> u32); - PdhGetCounterInfoW(core::mem::transmute(hcounter), bretrieveexplaintext.param().abi(), core::mem::transmute(pdwbuffersize), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed()))) + PdhGetCounterInfoW(core::mem::transmute(hcounter), bretrieveexplaintext.into(), core::mem::transmute(pdwbuffersize), core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn PdhGetCounterTimeBase(hcounter: PDH_HCOUNTER, ptimebase: *mut i64) -> u32 { @@ -912,22 +900,20 @@ where SetServiceAsTrustedW(szreserved.param().abi(), szservicename.param().abi()) } #[inline] -pub unsafe fn UnloadPerfCounterTextStringsA(lpcommandline: P0, bquietmodearg: P1) -> u32 +pub unsafe fn UnloadPerfCounterTextStringsA(lpcommandline: P0, bquietmodearg: bool) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("loadperf.dll" "system" fn UnloadPerfCounterTextStringsA(lpcommandline : windows_core::PCSTR, bquietmodearg : super::super::Foundation:: BOOL) -> u32); - UnloadPerfCounterTextStringsA(lpcommandline.param().abi(), bquietmodearg.param().abi()) + UnloadPerfCounterTextStringsA(lpcommandline.param().abi(), bquietmodearg.into()) } #[inline] -pub unsafe fn UnloadPerfCounterTextStringsW(lpcommandline: P0, bquietmodearg: P1) -> u32 +pub unsafe fn UnloadPerfCounterTextStringsW(lpcommandline: P0, bquietmodearg: bool) -> u32 where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("loadperf.dll" "system" fn UnloadPerfCounterTextStringsW(lpcommandline : windows_core::PCWSTR, bquietmodearg : super::super::Foundation:: BOOL) -> u32); - UnloadPerfCounterTextStringsW(lpcommandline.param().abi(), bquietmodearg.param().abi()) + UnloadPerfCounterTextStringsW(lpcommandline.param().abi(), bquietmodearg.into()) } #[inline] pub unsafe fn UpdatePerfNameFilesA(sznewctrfilepath: P0, sznewhlpfilepath: P1, szlanguageid: P2, dwflags: usize) -> u32 @@ -8520,9 +8506,6 @@ pub const PDH_FUNCTION_NOT_FOUND: u32 = 3221228478u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct PDH_HCOUNTER(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for PDH_HCOUNTER { - type TypeKind = windows_core::CopyType; -} impl PDH_HCOUNTER { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -8536,9 +8519,6 @@ impl Default for PDH_HCOUNTER { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct PDH_HLOG(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for PDH_HLOG { - type TypeKind = windows_core::CopyType; -} impl PDH_HLOG { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -8561,9 +8541,6 @@ impl Default for PDH_HLOG { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct PDH_HQUERY(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for PDH_HQUERY { - type TypeKind = windows_core::CopyType; -} impl PDH_HQUERY { pub fn is_invalid(&self) -> bool { self.0.is_null() diff --git a/crates/libs/windows/src/Windows/Win32/System/Power/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Power/mod.rs index 6945336464..9a3a0193d4 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Power/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Power/mod.rs @@ -175,21 +175,15 @@ pub unsafe fn PowerIsSettingRangeDefined(subkeyguid: Option<*const windows_core: } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerOpenSystemPowerKey(phsystempowerkey: *mut super::Registry::HKEY, access: u32, openexisting: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn PowerOpenSystemPowerKey(phsystempowerkey: *mut super::Registry::HKEY, access: u32, openexisting: bool) -> u32 { windows_targets::link!("powrprof.dll" "system" fn PowerOpenSystemPowerKey(phsystempowerkey : *mut super::Registry:: HKEY, access : u32, openexisting : super::super::Foundation:: BOOL) -> u32); - PowerOpenSystemPowerKey(core::mem::transmute(phsystempowerkey), core::mem::transmute(access), openexisting.param().abi()) + PowerOpenSystemPowerKey(core::mem::transmute(phsystempowerkey), core::mem::transmute(access), openexisting.into()) } #[cfg(feature = "Win32_System_Registry")] #[inline] -pub unsafe fn PowerOpenUserPowerKey(phuserpowerkey: *mut super::Registry::HKEY, access: u32, openexisting: P2) -> u32 -where - P2: windows_core::Param, -{ +pub unsafe fn PowerOpenUserPowerKey(phuserpowerkey: *mut super::Registry::HKEY, access: u32, openexisting: bool) -> u32 { windows_targets::link!("powrprof.dll" "system" fn PowerOpenUserPowerKey(phuserpowerkey : *mut super::Registry:: HKEY, access : u32, openexisting : super::super::Foundation:: BOOL) -> u32); - PowerOpenUserPowerKey(core::mem::transmute(phuserpowerkey), core::mem::transmute(access), openexisting.param().abi()) + PowerOpenUserPowerKey(core::mem::transmute(phuserpowerkey), core::mem::transmute(access), openexisting.into()) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -500,23 +494,14 @@ pub unsafe fn SetActivePwrScheme(uiid: u32, pglobalpowerpolicy: Option<*const GL SetActivePwrScheme(core::mem::transmute(uiid), core::mem::transmute(pglobalpowerpolicy.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppowerpolicy.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SetSuspendState(bhibernate: P0, bforce: P1, bwakeupeventsdisabled: P2) -> super::super::Foundation::BOOLEAN -where - P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, -{ +pub unsafe fn SetSuspendState(bhibernate: bool, bforce: bool, bwakeupeventsdisabled: bool) -> super::super::Foundation::BOOLEAN { windows_targets::link!("powrprof.dll" "system" fn SetSuspendState(bhibernate : super::super::Foundation:: BOOLEAN, bforce : super::super::Foundation:: BOOLEAN, bwakeupeventsdisabled : super::super::Foundation:: BOOLEAN) -> super::super::Foundation:: BOOLEAN); - SetSuspendState(bhibernate.param().abi(), bforce.param().abi(), bwakeupeventsdisabled.param().abi()) + SetSuspendState(bhibernate.into(), bforce.into(), bwakeupeventsdisabled.into()) } #[inline] -pub unsafe fn SetSystemPowerState(fsuspend: P0, fforce: P1) -> windows_core::Result<()> -where - P0: windows_core::Param, - P1: windows_core::Param, -{ +pub unsafe fn SetSystemPowerState(fsuspend: bool, fforce: bool) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetSystemPowerState(fsuspend : super::super::Foundation:: BOOL, fforce : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetSystemPowerState(fsuspend.param().abi(), fforce.param().abi()).ok() + SetSystemPowerState(fsuspend.into(), fforce.into()).ok() } #[inline] pub unsafe fn SetThreadExecutionState(esflags: EXECUTION_STATE) -> EXECUTION_STATE { @@ -1156,9 +1141,6 @@ pub const GroupPark: POWER_INFORMATION_LEVEL = POWER_INFORMATION_LEVEL(48i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HPOWERNOTIFY(pub isize); -impl windows_core::TypeKind for HPOWERNOTIFY { - type TypeKind = windows_core::CopyType; -} impl HPOWERNOTIFY { pub fn is_invalid(&self) -> bool { self.0 == -1 || self.0 == 0 diff --git a/crates/libs/windows/src/Windows/Win32/System/Recovery/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Recovery/mod.rs index 58b9d49bc1..3df1e28b58 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Recovery/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Recovery/mod.rs @@ -1,10 +1,7 @@ #[inline] -pub unsafe fn ApplicationRecoveryFinished(bsuccess: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn ApplicationRecoveryFinished(bsuccess: bool) { windows_targets::link!("kernel32.dll" "system" fn ApplicationRecoveryFinished(bsuccess : super::super::Foundation:: BOOL)); - ApplicationRecoveryFinished(bsuccess.param().abi()) + ApplicationRecoveryFinished(bsuccess.into()) } #[inline] pub unsafe fn ApplicationRecoveryInProgress() -> windows_core::Result { diff --git a/crates/libs/windows/src/Windows/Win32/System/Registry/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Registry/mod.rs index 385d52b961..64f118c449 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Registry/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Registry/mod.rs @@ -371,13 +371,9 @@ where RegLoadMUIStringW(core::mem::transmute(hkey), pszvalue.param().abi(), core::mem::transmute(pszoutbuf.unwrap_or(core::mem::zeroed())), core::mem::transmute(cboutbuf), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), pszdirectory.param().abi()) } #[inline] -pub unsafe fn RegNotifyChangeKeyValue(hkey: HKEY, bwatchsubtree: P1, dwnotifyfilter: REG_NOTIFY_FILTER, hevent: Option, fasynchronous: P4) -> super::super::Foundation::WIN32_ERROR -where - P1: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn RegNotifyChangeKeyValue(hkey: HKEY, bwatchsubtree: bool, dwnotifyfilter: REG_NOTIFY_FILTER, hevent: Option, fasynchronous: bool) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("advapi32.dll" "system" fn RegNotifyChangeKeyValue(hkey : HKEY, bwatchsubtree : super::super::Foundation:: BOOL, dwnotifyfilter : REG_NOTIFY_FILTER, hevent : super::super::Foundation:: HANDLE, fasynchronous : super::super::Foundation:: BOOL) -> super::super::Foundation:: WIN32_ERROR); - RegNotifyChangeKeyValue(core::mem::transmute(hkey), bwatchsubtree.param().abi(), core::mem::transmute(dwnotifyfilter), core::mem::transmute(hevent.unwrap_or(core::mem::zeroed())), fasynchronous.param().abi()) + RegNotifyChangeKeyValue(core::mem::transmute(hkey), bwatchsubtree.into(), core::mem::transmute(dwnotifyfilter), core::mem::transmute(hevent.unwrap_or(core::mem::zeroed())), fasynchronous.into()) } #[inline] pub unsafe fn RegOpenCurrentUser(samdesired: u32, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR { @@ -740,9 +736,6 @@ pub const EISA_NO_MAX_FUNCTION: u32 = 255u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HKEY(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HKEY { - type TypeKind = windows_core::CopyType; -} impl HKEY { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/System/RemoteDesktop/mod.rs b/crates/libs/windows/src/Windows/Win32/System/RemoteDesktop/mod.rs index d707e10e3d..215559ab0c 100644 --- a/crates/libs/windows/src/Windows/Win32/System/RemoteDesktop/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/RemoteDesktop/mod.rs @@ -9,22 +9,20 @@ pub unsafe fn WTSCloseServer(hserver: super::super::Foundation::HANDLE) { WTSCloseServer(core::mem::transmute(hserver)) } #[inline] -pub unsafe fn WTSConnectSessionA(logonid: u32, targetlogonid: u32, ppassword: P2, bwait: P3) -> windows_core::Result<()> +pub unsafe fn WTSConnectSessionA(logonid: u32, targetlogonid: u32, ppassword: P2, bwait: bool) -> windows_core::Result<()> where P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("wtsapi32.dll" "system" fn WTSConnectSessionA(logonid : u32, targetlogonid : u32, ppassword : windows_core::PCSTR, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WTSConnectSessionA(core::mem::transmute(logonid), core::mem::transmute(targetlogonid), ppassword.param().abi(), bwait.param().abi()).ok() + WTSConnectSessionA(core::mem::transmute(logonid), core::mem::transmute(targetlogonid), ppassword.param().abi(), bwait.into()).ok() } #[inline] -pub unsafe fn WTSConnectSessionW(logonid: u32, targetlogonid: u32, ppassword: P2, bwait: P3) -> windows_core::Result<()> +pub unsafe fn WTSConnectSessionW(logonid: u32, targetlogonid: u32, ppassword: P2, bwait: bool) -> windows_core::Result<()> where P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("wtsapi32.dll" "system" fn WTSConnectSessionW(logonid : u32, targetlogonid : u32, ppassword : windows_core::PCWSTR, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WTSConnectSessionW(core::mem::transmute(logonid), core::mem::transmute(targetlogonid), ppassword.param().abi(), bwait.param().abi()).ok() + WTSConnectSessionW(core::mem::transmute(logonid), core::mem::transmute(targetlogonid), ppassword.param().abi(), bwait.into()).ok() } #[inline] pub unsafe fn WTSCreateListenerA(hserver: Option, preserved: *const core::ffi::c_void, reserved: u32, plistenername: P3, pbuffer: *const WTSLISTENERCONFIGA, flag: u32) -> windows_core::Result<()> @@ -43,20 +41,14 @@ where WTSCreateListenerW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(preserved), core::mem::transmute(reserved), plistenername.param().abi(), core::mem::transmute(pbuffer), core::mem::transmute(flag)).ok() } #[inline] -pub unsafe fn WTSDisconnectSession(hserver: Option, sessionid: u32, bwait: P2) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn WTSDisconnectSession(hserver: Option, sessionid: u32, bwait: bool) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSDisconnectSession(hserver : super::super::Foundation:: HANDLE, sessionid : u32, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WTSDisconnectSession(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(sessionid), bwait.param().abi()).ok() + WTSDisconnectSession(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(sessionid), bwait.into()).ok() } #[inline] -pub unsafe fn WTSEnableChildSessions(benable: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn WTSEnableChildSessions(benable: bool) -> super::super::Foundation::BOOL { windows_targets::link!("wtsapi32.dll" "system" fn WTSEnableChildSessions(benable : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WTSEnableChildSessions(benable.param().abi()) + WTSEnableChildSessions(benable.into()) } #[inline] pub unsafe fn WTSEnumerateListenersA(hserver: Option, preserved: *const core::ffi::c_void, reserved: u32, plisteners: Option<*mut *mut i8>, pcount: *mut u32) -> windows_core::Result<()> { @@ -175,12 +167,9 @@ pub unsafe fn WTSIsChildSessionsEnabled(pbenabled: *mut super::super::Foundation WTSIsChildSessionsEnabled(core::mem::transmute(pbenabled)) } #[inline] -pub unsafe fn WTSLogoffSession(hserver: Option, sessionid: u32, bwait: P2) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn WTSLogoffSession(hserver: Option, sessionid: u32, bwait: bool) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSLogoffSession(hserver : super::super::Foundation:: HANDLE, sessionid : u32, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WTSLogoffSession(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(sessionid), bwait.param().abi()).ok() + WTSLogoffSession(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(sessionid), bwait.into()).ok() } #[inline] pub unsafe fn WTSOpenServerA(pservername: P0) -> super::super::Foundation::HANDLE @@ -275,23 +264,19 @@ pub unsafe fn WTSRegisterSessionNotificationEx(hserver: Option(hserver: Option, sessionid: u32, ptitle: &[u8], pmessage: &[u8], style: super::super::UI::WindowsAndMessaging::MESSAGEBOX_STYLE, timeout: u32, presponse: *mut super::super::UI::WindowsAndMessaging::MESSAGEBOX_RESULT, bwait: P9) -> windows_core::Result<()> -where - P9: windows_core::Param, -{ +pub unsafe fn WTSSendMessageA(hserver: Option, sessionid: u32, ptitle: &[u8], pmessage: &[u8], style: super::super::UI::WindowsAndMessaging::MESSAGEBOX_STYLE, timeout: u32, presponse: *mut super::super::UI::WindowsAndMessaging::MESSAGEBOX_RESULT, bwait: bool) -> windows_core::Result<()> { windows_targets::link!("wtsapi32.dll" "system" fn WTSSendMessageA(hserver : super::super::Foundation:: HANDLE, sessionid : u32, ptitle : windows_core::PCSTR, titlelength : u32, pmessage : windows_core::PCSTR, messagelength : u32, style : super::super::UI::WindowsAndMessaging:: MESSAGEBOX_STYLE, timeout : u32, presponse : *mut super::super::UI::WindowsAndMessaging:: MESSAGEBOX_RESULT, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WTSSendMessageA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(sessionid), core::mem::transmute(ptitle.as_ptr()), ptitle.len().try_into().unwrap(), core::mem::transmute(pmessage.as_ptr()), pmessage.len().try_into().unwrap(), core::mem::transmute(style), core::mem::transmute(timeout), core::mem::transmute(presponse), bwait.param().abi()).ok() + WTSSendMessageA(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(sessionid), core::mem::transmute(ptitle.as_ptr()), ptitle.len().try_into().unwrap(), core::mem::transmute(pmessage.as_ptr()), pmessage.len().try_into().unwrap(), core::mem::transmute(style), core::mem::transmute(timeout), core::mem::transmute(presponse), bwait.into()).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn WTSSendMessageW(hserver: Option, sessionid: u32, ptitle: P2, titlelength: u32, pmessage: P4, messagelength: u32, style: super::super::UI::WindowsAndMessaging::MESSAGEBOX_STYLE, timeout: u32, presponse: *mut super::super::UI::WindowsAndMessaging::MESSAGEBOX_RESULT, bwait: P9) -> windows_core::Result<()> +pub unsafe fn WTSSendMessageW(hserver: Option, sessionid: u32, ptitle: P2, titlelength: u32, pmessage: P4, messagelength: u32, style: super::super::UI::WindowsAndMessaging::MESSAGEBOX_STYLE, timeout: u32, presponse: *mut super::super::UI::WindowsAndMessaging::MESSAGEBOX_RESULT, bwait: bool) -> windows_core::Result<()> where P2: windows_core::Param, P4: windows_core::Param, - P9: windows_core::Param, { windows_targets::link!("wtsapi32.dll" "system" fn WTSSendMessageW(hserver : super::super::Foundation:: HANDLE, sessionid : u32, ptitle : windows_core::PCWSTR, titlelength : u32, pmessage : windows_core::PCWSTR, messagelength : u32, style : super::super::UI::WindowsAndMessaging:: MESSAGEBOX_STYLE, timeout : u32, presponse : *mut super::super::UI::WindowsAndMessaging:: MESSAGEBOX_RESULT, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WTSSendMessageW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(sessionid), ptitle.param().abi(), core::mem::transmute(titlelength), pmessage.param().abi(), core::mem::transmute(messagelength), core::mem::transmute(style), core::mem::transmute(timeout), core::mem::transmute(presponse), bwait.param().abi()).ok() + WTSSendMessageW(core::mem::transmute(hserver.unwrap_or(core::mem::zeroed())), core::mem::transmute(sessionid), ptitle.param().abi(), core::mem::transmute(titlelength), pmessage.param().abi(), core::mem::transmute(messagelength), core::mem::transmute(style), core::mem::transmute(timeout), core::mem::transmute(presponse), bwait.into()).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -3089,12 +3074,11 @@ impl core::ops::Deref for ITsSbLoadBalancingNotifySink { } windows_core::imp::interface_hierarchy!(ITsSbLoadBalancingNotifySink, windows_core::IUnknown, ITsSbBaseNotifySink); impl ITsSbLoadBalancingNotifySink { - pub unsafe fn OnGetMostSuitableTarget(&self, plbresult: P0, fisnewconnection: P1) -> windows_core::Result<()> + pub unsafe fn OnGetMostSuitableTarget(&self, plbresult: P0, fisnewconnection: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).OnGetMostSuitableTarget)(windows_core::Interface::as_raw(self), plbresult.param().abi(), fisnewconnection.param().abi()).ok() + (windows_core::Interface::vtable(self).OnGetMostSuitableTarget)(windows_core::Interface::as_raw(self), plbresult.param().abi(), fisnewconnection.into()).ok() } } #[repr(C)] @@ -3986,11 +3970,8 @@ impl ITsSbResourcePluginStore { { (windows_core::Interface::vtable(self).AddEnvironmentToStore)(windows_core::Interface::as_raw(self), penvironment.param().abi()).ok() } - pub unsafe fn RemoveEnvironmentFromStore(&self, environmentname: &windows_core::BSTR, bignoreowner: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).RemoveEnvironmentFromStore)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(environmentname), bignoreowner.param().abi()).ok() + pub unsafe fn RemoveEnvironmentFromStore(&self, environmentname: &windows_core::BSTR, bignoreowner: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RemoveEnvironmentFromStore)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(environmentname), bignoreowner.into()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn EnumerateFarms(&self, pdwcount: *mut u32, pval: *mut *mut super::Com::SAFEARRAY) -> windows_core::Result<()> { @@ -4003,19 +3984,17 @@ impl ITsSbResourcePluginStore { pub unsafe fn EnumerateEnvironments(&self, pdwcount: *mut u32, pval: *mut *mut Option) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EnumerateEnvironments)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwcount), core::mem::transmute(pval)).ok() } - pub unsafe fn SaveTarget(&self, ptarget: P0, bforcewrite: P1) -> windows_core::Result<()> + pub unsafe fn SaveTarget(&self, ptarget: P0, bforcewrite: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SaveTarget)(windows_core::Interface::as_raw(self), ptarget.param().abi(), bforcewrite.param().abi()).ok() + (windows_core::Interface::vtable(self).SaveTarget)(windows_core::Interface::as_raw(self), ptarget.param().abi(), bforcewrite.into()).ok() } - pub unsafe fn SaveEnvironment(&self, penvironment: P0, bforcewrite: P1) -> windows_core::Result<()> + pub unsafe fn SaveEnvironment(&self, penvironment: P0, bforcewrite: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SaveEnvironment)(windows_core::Interface::as_raw(self), penvironment.param().abi(), bforcewrite.param().abi()).ok() + (windows_core::Interface::vtable(self).SaveEnvironment)(windows_core::Interface::as_raw(self), penvironment.param().abi(), bforcewrite.into()).ok() } pub unsafe fn SaveSession(&self, psession: P0) -> windows_core::Result<()> where @@ -5414,12 +5393,11 @@ impl IWRdsGraphicsChannelEvents { { (windows_core::Interface::vtable(self).OnChannelOpened)(windows_core::Interface::as_raw(self), core::mem::transmute(openresult), popencontext.param().abi()).ok() } - pub unsafe fn OnDataSent(&self, pwritecontext: P0, bcancelled: P1, pbuffer: *const u8, cbbuffer: u32) -> windows_core::Result<()> + pub unsafe fn OnDataSent(&self, pwritecontext: P0, bcancelled: bool, pbuffer: *const u8, cbbuffer: u32) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).OnDataSent)(windows_core::Interface::as_raw(self), pwritecontext.param().abi(), bcancelled.param().abi(), core::mem::transmute(pbuffer), core::mem::transmute(cbbuffer)).ok() + (windows_core::Interface::vtable(self).OnDataSent)(windows_core::Interface::as_raw(self), pwritecontext.param().abi(), bcancelled.into(), core::mem::transmute(pbuffer), core::mem::transmute(cbbuffer)).ok() } pub unsafe fn OnMetricsUpdate(&self, bandwidth: u32, rtt: u32, lastsentbyteindex: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnMetricsUpdate)(windows_core::Interface::as_raw(self), core::mem::transmute(bandwidth), core::mem::transmute(rtt), core::mem::transmute(lastsentbyteindex)).ok() @@ -5558,11 +5536,8 @@ impl IWRdsProtocolConnection { { (windows_core::Interface::vtable(self).IsUserAllowedToLogon)(windows_core::Interface::as_raw(self), core::mem::transmute(sessionid), core::mem::transmute(usertoken), pdomainname.param().abi(), pusername.param().abi()).ok() } - pub unsafe fn SessionArbitrationEnumeration(&self, husertoken: super::super::Foundation::HANDLE_PTR, bsinglesessionperuserenabled: P1, psessionidarray: *mut u32, pdwsessionidentifiercount: *mut u32) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SessionArbitrationEnumeration)(windows_core::Interface::as_raw(self), core::mem::transmute(husertoken), bsinglesessionperuserenabled.param().abi(), core::mem::transmute(psessionidarray), core::mem::transmute(pdwsessionidentifiercount)).ok() + pub unsafe fn SessionArbitrationEnumeration(&self, husertoken: super::super::Foundation::HANDLE_PTR, bsinglesessionperuserenabled: bool, psessionidarray: *mut u32, pdwsessionidentifiercount: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SessionArbitrationEnumeration)(windows_core::Interface::as_raw(self), core::mem::transmute(husertoken), bsinglesessionperuserenabled.into(), core::mem::transmute(psessionidarray), core::mem::transmute(pdwsessionidentifiercount)).ok() } pub unsafe fn LogonNotify(&self, hclienttoken: super::super::Foundation::HANDLE_PTR, wszusername: P1, wszdomainname: P2, sessionid: *const WTS_SESSION_ID, pwrdsconnectionsettings: *mut WRDS_CONNECTION_SETTINGS) -> windows_core::Result<()> where @@ -5590,13 +5565,12 @@ impl IWRdsProtocolConnection { pub unsafe fn SetErrorInfo(&self, ulerror: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetErrorInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(ulerror)).ok() } - pub unsafe fn CreateVirtualChannel(&self, szendpointname: P0, bstatic: P1, requestedpriority: u32) -> windows_core::Result + pub unsafe fn CreateVirtualChannel(&self, szendpointname: P0, bstatic: bool, requestedpriority: u32) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateVirtualChannel)(windows_core::Interface::as_raw(self), szendpointname.param().abi(), bstatic.param().abi(), core::mem::transmute(requestedpriority), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CreateVirtualChannel)(windows_core::Interface::as_raw(self), szendpointname.param().abi(), bstatic.into(), core::mem::transmute(requestedpriority), &mut result__).map(|| result__) } pub unsafe fn QueryProperty(&self, querytype: windows_core::GUID, ppropertyentriesin: &[WTS_PROPERTY_VALUE], ppropertyentriesout: &mut [WTS_PROPERTY_VALUE]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).QueryProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(querytype), ppropertyentriesin.len().try_into().unwrap(), ppropertyentriesout.len().try_into().unwrap(), core::mem::transmute(ppropertyentriesin.as_ptr()), core::mem::transmute(ppropertyentriesout.as_ptr())).ok() @@ -6472,11 +6446,8 @@ impl IWRdsWddmIddProps { pub unsafe fn OnDriverUnload(&self, sessionid: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnDriverUnload)(windows_core::Interface::as_raw(self), core::mem::transmute(sessionid)).ok() } - pub unsafe fn EnableWddmIdd(&self, enabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableWddmIdd)(windows_core::Interface::as_raw(self), enabled.param().abi()).ok() + pub unsafe fn EnableWddmIdd(&self, enabled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableWddmIdd)(windows_core::Interface::as_raw(self), enabled.into()).ok() } } #[repr(C)] @@ -6916,11 +6887,8 @@ impl IWTSProtocolConnection { { (windows_core::Interface::vtable(self).IsUserAllowedToLogon)(windows_core::Interface::as_raw(self), core::mem::transmute(sessionid), core::mem::transmute(usertoken), pdomainname.param().abi(), pusername.param().abi()).ok() } - pub unsafe fn SessionArbitrationEnumeration(&self, husertoken: super::super::Foundation::HANDLE_PTR, bsinglesessionperuserenabled: P1, psessionidarray: *mut u32, pdwsessionidentifiercount: *mut u32) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SessionArbitrationEnumeration)(windows_core::Interface::as_raw(self), core::mem::transmute(husertoken), bsinglesessionperuserenabled.param().abi(), core::mem::transmute(psessionidarray), core::mem::transmute(pdwsessionidentifiercount)).ok() + pub unsafe fn SessionArbitrationEnumeration(&self, husertoken: super::super::Foundation::HANDLE_PTR, bsinglesessionperuserenabled: bool, psessionidarray: *mut u32, pdwsessionidentifiercount: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SessionArbitrationEnumeration)(windows_core::Interface::as_raw(self), core::mem::transmute(husertoken), bsinglesessionperuserenabled.into(), core::mem::transmute(psessionidarray), core::mem::transmute(pdwsessionidentifiercount)).ok() } pub unsafe fn LogonNotify(&self, hclienttoken: super::super::Foundation::HANDLE_PTR, wszusername: P1, wszdomainname: P2, sessionid: *const WTS_SESSION_ID) -> windows_core::Result<()> where @@ -6951,13 +6919,12 @@ impl IWTSProtocolConnection { pub unsafe fn SendBeep(&self, frequency: u32, duration: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SendBeep)(windows_core::Interface::as_raw(self), core::mem::transmute(frequency), core::mem::transmute(duration)).ok() } - pub unsafe fn CreateVirtualChannel(&self, szendpointname: P0, bstatic: P1, requestedpriority: u32) -> windows_core::Result + pub unsafe fn CreateVirtualChannel(&self, szendpointname: P0, bstatic: bool, requestedpriority: u32) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateVirtualChannel)(windows_core::Interface::as_raw(self), szendpointname.param().abi(), bstatic.param().abi(), core::mem::transmute(requestedpriority), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CreateVirtualChannel)(windows_core::Interface::as_raw(self), szendpointname.param().abi(), bstatic.into(), core::mem::transmute(requestedpriority), &mut result__).map(|| result__) } pub unsafe fn QueryProperty(&self, querytype: windows_core::GUID, ppropertyentriesin: &[WTS_PROPERTY_VALUE], ppropertyentriesout: &mut [WTS_PROPERTY_VALUE]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).QueryProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(querytype), ppropertyentriesin.len().try_into().unwrap(), ppropertyentriesout.len().try_into().unwrap(), core::mem::transmute(ppropertyentriesin.as_ptr()), core::mem::transmute(ppropertyentriesout.as_ptr())).ok() diff --git a/crates/libs/windows/src/Windows/Win32/System/RemoteManagement/mod.rs b/crates/libs/windows/src/Windows/Win32/System/RemoteManagement/mod.rs index ddb243156e..b6f10182a2 100644 --- a/crates/libs/windows/src/Windows/Win32/System/RemoteManagement/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/RemoteManagement/mod.rs @@ -118,13 +118,12 @@ where WSManPluginAuthzQueryQuotaComplete(core::mem::transmute(senderdetails), core::mem::transmute(flags), core::mem::transmute(quota.unwrap_or(core::mem::zeroed())), core::mem::transmute(errorcode), extendederrorinformation.param().abi()) } #[inline] -pub unsafe fn WSManPluginAuthzUserComplete(senderdetails: *const WSMAN_SENDER_DETAILS, flags: u32, userauthorizationcontext: Option<*const core::ffi::c_void>, impersonationtoken: Option, userisadministrator: P4, errorcode: u32, extendederrorinformation: P6) -> u32 +pub unsafe fn WSManPluginAuthzUserComplete(senderdetails: *const WSMAN_SENDER_DETAILS, flags: u32, userauthorizationcontext: Option<*const core::ffi::c_void>, impersonationtoken: Option, userisadministrator: bool, errorcode: u32, extendederrorinformation: P6) -> u32 where - P4: windows_core::Param, P6: windows_core::Param, { windows_targets::link!("wsmsvc.dll" "system" fn WSManPluginAuthzUserComplete(senderdetails : *const WSMAN_SENDER_DETAILS, flags : u32, userauthorizationcontext : *const core::ffi::c_void, impersonationtoken : super::super::Foundation:: HANDLE, userisadministrator : super::super::Foundation:: BOOL, errorcode : u32, extendederrorinformation : windows_core::PCWSTR) -> u32); - WSManPluginAuthzUserComplete(core::mem::transmute(senderdetails), core::mem::transmute(flags), core::mem::transmute(userauthorizationcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(impersonationtoken.unwrap_or(core::mem::zeroed())), userisadministrator.param().abi(), core::mem::transmute(errorcode), extendederrorinformation.param().abi()) + WSManPluginAuthzUserComplete(core::mem::transmute(senderdetails), core::mem::transmute(flags), core::mem::transmute(userauthorizationcontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(impersonationtoken.unwrap_or(core::mem::zeroed())), userisadministrator.into(), core::mem::transmute(errorcode), extendederrorinformation.param().abi()) } #[inline] pub unsafe fn WSManPluginFreeRequestDetails(requestdetails: *const WSMAN_PLUGIN_REQUEST) -> u32 { @@ -207,14 +206,13 @@ where result__ } #[inline] -pub unsafe fn WSManSendShellInput(shell: WSMAN_SHELL_HANDLE, command: Option, flags: u32, streamid: P3, streamdata: *const WSMAN_DATA, endofstream: P5, r#async: *const WSMAN_SHELL_ASYNC) -> WSMAN_OPERATION_HANDLE +pub unsafe fn WSManSendShellInput(shell: WSMAN_SHELL_HANDLE, command: Option, flags: u32, streamid: P3, streamdata: *const WSMAN_DATA, endofstream: bool, r#async: *const WSMAN_SHELL_ASYNC) -> WSMAN_OPERATION_HANDLE where P3: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("wsmsvc.dll" "system" fn WSManSendShellInput(shell : WSMAN_SHELL_HANDLE, command : WSMAN_COMMAND_HANDLE, flags : u32, streamid : windows_core::PCWSTR, streamdata : *const WSMAN_DATA, endofstream : super::super::Foundation:: BOOL, r#async : *const WSMAN_SHELL_ASYNC, sendoperation : *mut WSMAN_OPERATION_HANDLE)); let mut result__ = core::mem::zeroed(); - WSManSendShellInput(core::mem::transmute(shell), core::mem::transmute(command.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), streamid.param().abi(), core::mem::transmute(streamdata), endofstream.param().abi(), core::mem::transmute(r#async), &mut result__); + WSManSendShellInput(core::mem::transmute(shell), core::mem::transmute(command.unwrap_or(core::mem::zeroed())), core::mem::transmute(flags), streamid.param().abi(), core::mem::transmute(streamdata), endofstream.into(), core::mem::transmute(r#async), &mut result__); result__ } #[inline] @@ -1910,17 +1908,11 @@ impl IWSManResourceLocator { (windows_core::Interface::vtable(self).SetFragmentDialect)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(text)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn AddOption(&self, optionname: &windows_core::BSTR, optionvalue: &super::Variant::VARIANT, mustcomply: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).AddOption)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(optionname), core::mem::transmute_copy(optionvalue), mustcomply.param().abi()).ok() + pub unsafe fn AddOption(&self, optionname: &windows_core::BSTR, optionvalue: &super::Variant::VARIANT, mustcomply: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AddOption)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(optionname), core::mem::transmute_copy(optionvalue), mustcomply.into()).ok() } - pub unsafe fn SetMustUnderstandOptions(&self, mustunderstand: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMustUnderstandOptions)(windows_core::Interface::as_raw(self), mustunderstand.param().abi()).ok() + pub unsafe fn SetMustUnderstandOptions(&self, mustunderstand: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMustUnderstandOptions)(windows_core::Interface::as_raw(self), mustunderstand.into()).ok() } pub unsafe fn MustUnderstandOptions(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2343,9 +2335,6 @@ impl windows_core::RuntimeName for IWSManSession {} #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct WSMAN_API_HANDLE(pub isize); -impl windows_core::TypeKind for WSMAN_API_HANDLE { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy)] pub struct WSMAN_AUTHENTICATION_CREDENTIALS { @@ -2411,9 +2400,6 @@ impl Default for WSMAN_COMMAND_ARG_SET { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct WSMAN_COMMAND_HANDLE(pub isize); -impl windows_core::TypeKind for WSMAN_COMMAND_HANDLE { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy)] pub struct WSMAN_CONNECT_DATA { @@ -2585,9 +2571,6 @@ impl Default for WSMAN_KEY { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct WSMAN_OPERATION_HANDLE(pub isize); -impl windows_core::TypeKind for WSMAN_OPERATION_HANDLE { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct WSMAN_OPERATION_INFO { @@ -2797,9 +2780,6 @@ impl Default for WSMAN_SENDER_DETAILS { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct WSMAN_SESSION_HANDLE(pub isize); -impl windows_core::TypeKind for WSMAN_SESSION_HANDLE { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct WSMAN_SHELL_ASYNC { @@ -2825,9 +2805,6 @@ impl Default for WSMAN_SHELL_DISCONNECT_INFO { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct WSMAN_SHELL_HANDLE(pub isize); -impl windows_core::TypeKind for WSMAN_SHELL_HANDLE { - type TypeKind = windows_core::CopyType; -} pub const WSMAN_SHELL_NS: windows_core::PCWSTR = windows_core::w!("http://schemas.microsoft.com/wbem/wsman/1/windows/shell"); pub const WSMAN_SHELL_OPTION_NOPROFILE: windows_core::PCWSTR = windows_core::w!("WINRS_NOPROFILE"); #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/System/Rpc/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Rpc/mod.rs index f7961b9349..72a567fe40 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Rpc/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Rpc/mod.rs @@ -1555,12 +1555,9 @@ pub unsafe fn RpcAsyncAbortCall(pasync: *mut RPC_ASYNC_STATE, exceptioncode: u32 } #[cfg(feature = "Win32_System_IO")] #[inline] -pub unsafe fn RpcAsyncCancelCall(pasync: *mut RPC_ASYNC_STATE, fabort: P1) -> RPC_STATUS -where - P1: windows_core::Param, -{ +pub unsafe fn RpcAsyncCancelCall(pasync: *mut RPC_ASYNC_STATE, fabort: bool) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcAsyncCancelCall(pasync : *mut RPC_ASYNC_STATE, fabort : super::super::Foundation:: BOOL) -> RPC_STATUS); - RpcAsyncCancelCall(core::mem::transmute(pasync), fabort.param().abi()) + RpcAsyncCancelCall(core::mem::transmute(pasync), fabort.into()) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -1841,12 +1838,9 @@ pub unsafe fn RpcErrorEndEnumeration(enumhandle: *mut RPC_ERROR_ENUM_HANDLE) -> RpcErrorEndEnumeration(core::mem::transmute(enumhandle)) } #[inline] -pub unsafe fn RpcErrorGetNextRecord(enumhandle: *const RPC_ERROR_ENUM_HANDLE, copystrings: P1, errorinfo: *mut RPC_EXTENDED_ERROR_INFO) -> RPC_STATUS -where - P1: windows_core::Param, -{ +pub unsafe fn RpcErrorGetNextRecord(enumhandle: *const RPC_ERROR_ENUM_HANDLE, copystrings: bool, errorinfo: *mut RPC_EXTENDED_ERROR_INFO) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcErrorGetNextRecord(enumhandle : *const RPC_ERROR_ENUM_HANDLE, copystrings : super::super::Foundation:: BOOL, errorinfo : *mut RPC_EXTENDED_ERROR_INFO) -> RPC_STATUS); - RpcErrorGetNextRecord(core::mem::transmute(enumhandle), copystrings.param().abi(), core::mem::transmute(errorinfo)) + RpcErrorGetNextRecord(core::mem::transmute(enumhandle), copystrings.into(), core::mem::transmute(errorinfo)) } #[inline] pub unsafe fn RpcErrorGetNumberOfRecords(enumhandle: *const RPC_ERROR_ENUM_HANDLE, records: *mut i32) -> RPC_STATUS { @@ -1884,12 +1878,9 @@ pub unsafe fn RpcFreeAuthorizationContext(pauthzclientcontext: *mut *mut core::f RpcFreeAuthorizationContext(core::mem::transmute(pauthzclientcontext)) } #[inline] -pub unsafe fn RpcGetAuthorizationContextForClient(clientbinding: Option<*const core::ffi::c_void>, impersonateonreturn: P1, reserved1: Option<*const core::ffi::c_void>, pexpirationtime: Option<*const i64>, reserved2: super::super::Foundation::LUID, reserved3: u32, reserved4: Option<*const core::ffi::c_void>, pauthzclientcontext: *mut *mut core::ffi::c_void) -> RPC_STATUS -where - P1: windows_core::Param, -{ +pub unsafe fn RpcGetAuthorizationContextForClient(clientbinding: Option<*const core::ffi::c_void>, impersonateonreturn: bool, reserved1: Option<*const core::ffi::c_void>, pexpirationtime: Option<*const i64>, reserved2: super::super::Foundation::LUID, reserved3: u32, reserved4: Option<*const core::ffi::c_void>, pauthzclientcontext: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcGetAuthorizationContextForClient(clientbinding : *const core::ffi::c_void, impersonateonreturn : super::super::Foundation:: BOOL, reserved1 : *const core::ffi::c_void, pexpirationtime : *const i64, reserved2 : super::super::Foundation:: LUID, reserved3 : u32, reserved4 : *const core::ffi::c_void, pauthzclientcontext : *mut *mut core::ffi::c_void) -> RPC_STATUS); - RpcGetAuthorizationContextForClient(core::mem::transmute(clientbinding.unwrap_or(core::mem::zeroed())), impersonateonreturn.param().abi(), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(pexpirationtime.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2), core::mem::transmute(reserved3), core::mem::transmute(reserved4.unwrap_or(core::mem::zeroed())), core::mem::transmute(pauthzclientcontext)) + RpcGetAuthorizationContextForClient(core::mem::transmute(clientbinding.unwrap_or(core::mem::zeroed())), impersonateonreturn.into(), core::mem::transmute(reserved1.unwrap_or(core::mem::zeroed())), core::mem::transmute(pexpirationtime.unwrap_or(core::mem::zeroed())), core::mem::transmute(reserved2), core::mem::transmute(reserved3), core::mem::transmute(reserved4.unwrap_or(core::mem::zeroed())), core::mem::transmute(pauthzclientcontext)) } #[inline] pub unsafe fn RpcIfIdVectorFree(ifidvector: *mut *mut RPC_IF_ID_VECTOR) -> RPC_STATUS { @@ -4298,9 +4289,6 @@ impl Default for NDR64_VAR_ARRAY_HEADER_FORMAT { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct NDR_ALLOC_ALL_NODES_CONTEXT(pub isize); -impl windows_core::TypeKind for NDR_ALLOC_ALL_NODES_CONTEXT { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct NDR_CS_ROUTINES { @@ -4343,9 +4331,6 @@ pub type NDR_NOTIFY_ROUTINE = Option; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct NDR_POINTER_QUEUE_STATE(pub isize); -impl windows_core::TypeKind for NDR_POINTER_QUEUE_STATE { - type TypeKind = windows_core::CopyType; -} pub type NDR_RUNDOWN = Option; #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] @@ -4418,15 +4403,9 @@ pub type PFN_RPC_FREE = Option bool { self.0 == 0 @@ -6358,35 +6355,32 @@ windows_core::imp::define_interface!(IConditionFactory, IConditionFactory_Vtbl, windows_core::imp::interface_hierarchy!(IConditionFactory, windows_core::IUnknown); impl IConditionFactory { #[cfg(feature = "Win32_System_Com")] - pub unsafe fn MakeNot(&self, pcsub: P0, fsimplify: P1) -> windows_core::Result + pub unsafe fn MakeNot(&self, pcsub: P0, fsimplify: bool) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).MakeNot)(windows_core::Interface::as_raw(self), pcsub.param().abi(), fsimplify.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).MakeNot)(windows_core::Interface::as_raw(self), pcsub.param().abi(), fsimplify.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Search_Common"))] - pub unsafe fn MakeAndOr(&self, ct: Common::CONDITION_TYPE, peusubs: P1, fsimplify: P2) -> windows_core::Result + pub unsafe fn MakeAndOr(&self, ct: Common::CONDITION_TYPE, peusubs: P1, fsimplify: bool) -> windows_core::Result where P1: windows_core::Param, - P2: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).MakeAndOr)(windows_core::Interface::as_raw(self), core::mem::transmute(ct), peusubs.param().abi(), fsimplify.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).MakeAndOr)(windows_core::Interface::as_raw(self), core::mem::transmute(ct), peusubs.param().abi(), fsimplify.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Search_Common", feature = "Win32_System_Variant"))] - pub unsafe fn MakeLeaf(&self, pszpropertyname: P0, cop: Common::CONDITION_OPERATION, pszvaluetype: P2, ppropvar: *const super::Com::StructuredStorage::PROPVARIANT, ppropertynameterm: P4, poperationterm: P5, pvalueterm: P6, fexpand: P7) -> windows_core::Result + pub unsafe fn MakeLeaf(&self, pszpropertyname: P0, cop: Common::CONDITION_OPERATION, pszvaluetype: P2, ppropvar: *const super::Com::StructuredStorage::PROPVARIANT, ppropertynameterm: P4, poperationterm: P5, pvalueterm: P6, fexpand: bool) -> windows_core::Result where P0: windows_core::Param, P2: windows_core::Param, P4: windows_core::Param, P5: windows_core::Param, P6: windows_core::Param, - P7: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).MakeLeaf)(windows_core::Interface::as_raw(self), pszpropertyname.param().abi(), core::mem::transmute(cop), pszvaluetype.param().abi(), core::mem::transmute(ppropvar), ppropertynameterm.param().abi(), poperationterm.param().abi(), pvalueterm.param().abi(), fexpand.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).MakeLeaf)(windows_core::Interface::as_raw(self), pszpropertyname.param().abi(), core::mem::transmute(cop), pszvaluetype.param().abi(), core::mem::transmute(ppropvar), ppropertynameterm.param().abi(), poperationterm.param().abi(), pvalueterm.param().abi(), fexpand.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Resolve(&self, pc: P0, sqro: STRUCTURED_QUERY_RESOLVE_OPTION, pstreferencetime: Option<*const super::super::Foundation::SYSTEMTIME>) -> windows_core::Result @@ -6490,13 +6484,12 @@ impl core::ops::Deref for IConditionFactory2 { } windows_core::imp::interface_hierarchy!(IConditionFactory2, windows_core::IUnknown, IConditionFactory); impl IConditionFactory2 { - pub unsafe fn CreateTrueFalse(&self, fval: P0, cco: CONDITION_CREATION_OPTIONS) -> windows_core::Result + pub unsafe fn CreateTrueFalse(&self, fval: bool, cco: CONDITION_CREATION_OPTIONS) -> windows_core::Result where - P0: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).CreateTrueFalse)(windows_core::Interface::as_raw(self), fval.param().abi(), core::mem::transmute(cco), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateTrueFalse)(windows_core::Interface::as_raw(self), fval.into(), core::mem::transmute(cco), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn CreateNegation(&self, pcsub: P0, cco: CONDITION_CREATION_OPTIONS) -> windows_core::Result @@ -6543,13 +6536,12 @@ impl IConditionFactory2 { (windows_core::Interface::vtable(self).CreateIntegerLeaf)(windows_core::Interface::as_raw(self), core::mem::transmute(propkey), core::mem::transmute(cop), core::mem::transmute(lvalue), core::mem::transmute(cco), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Search_Common")] - pub unsafe fn CreateBooleanLeaf(&self, propkey: *const super::super::Foundation::PROPERTYKEY, cop: Common::CONDITION_OPERATION, fvalue: P2, cco: CONDITION_CREATION_OPTIONS) -> windows_core::Result + pub unsafe fn CreateBooleanLeaf(&self, propkey: *const super::super::Foundation::PROPERTYKEY, cop: Common::CONDITION_OPERATION, fvalue: bool, cco: CONDITION_CREATION_OPTIONS) -> windows_core::Result where - P2: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).CreateBooleanLeaf)(windows_core::Interface::as_raw(self), core::mem::transmute(propkey), core::mem::transmute(cop), fvalue.param().abi(), core::mem::transmute(cco), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateBooleanLeaf)(windows_core::Interface::as_raw(self), core::mem::transmute(propkey), core::mem::transmute(cop), fvalue.into(), core::mem::transmute(cco), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Search_Common", feature = "Win32_System_Variant"))] pub unsafe fn CreateLeaf(&self, propkey: *const super::super::Foundation::PROPERTYKEY, cop: Common::CONDITION_OPERATION, propvar: *const super::Com::StructuredStorage::PROPVARIANT, pszsemantictype: P3, pszlocalename: P4, ppropertynameterm: P5, poperationterm: P6, pvalueterm: P7, cco: CONDITION_CREATION_OPTIONS) -> windows_core::Result @@ -6699,7 +6691,7 @@ impl IConditionGenerator { (windows_core::Interface::vtable(self).RecognizeNamedEntities)(windows_core::Interface::as_raw(self), pszinputstring.param().abi(), core::mem::transmute(lciduserlocale), ptokencollection.param().abi(), pnamedentities.param().abi()).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Search_Common"))] - pub unsafe fn GenerateForLeaf(&self, pconditionfactory: P0, pszpropertyname: P1, cop: Common::CONDITION_OPERATION, pszvaluetype: P3, pszvalue: P4, pszvalue2: P5, ppropertynameterm: P6, poperationterm: P7, pvalueterm: P8, automaticwildcard: P9, pnostringquery: *mut super::super::Foundation::BOOL) -> windows_core::Result + pub unsafe fn GenerateForLeaf(&self, pconditionfactory: P0, pszpropertyname: P1, cop: Common::CONDITION_OPERATION, pszvaluetype: P3, pszvalue: P4, pszvalue2: P5, ppropertynameterm: P6, poperationterm: P7, pvalueterm: P8, automaticwildcard: bool, pnostringquery: *mut super::super::Foundation::BOOL) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, @@ -6709,18 +6701,16 @@ impl IConditionGenerator { P6: windows_core::Param, P7: windows_core::Param, P8: windows_core::Param, - P9: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GenerateForLeaf)(windows_core::Interface::as_raw(self), pconditionfactory.param().abi(), pszpropertyname.param().abi(), core::mem::transmute(cop), pszvaluetype.param().abi(), pszvalue.param().abi(), pszvalue2.param().abi(), ppropertynameterm.param().abi(), poperationterm.param().abi(), pvalueterm.param().abi(), automaticwildcard.param().abi(), core::mem::transmute(pnostringquery), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GenerateForLeaf)(windows_core::Interface::as_raw(self), pconditionfactory.param().abi(), pszpropertyname.param().abi(), core::mem::transmute(cop), pszvaluetype.param().abi(), pszvalue.param().abi(), pszvalue2.param().abi(), ppropertynameterm.param().abi(), poperationterm.param().abi(), pvalueterm.param().abi(), automaticwildcard.into(), core::mem::transmute(pnostringquery), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] - pub unsafe fn DefaultPhrase(&self, pszvaluetype: P0, ppropvar: *const super::Com::StructuredStorage::PROPVARIANT, fuseenglish: P2, ppszphrase: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> + pub unsafe fn DefaultPhrase(&self, pszvaluetype: P0, ppropvar: *const super::Com::StructuredStorage::PROPVARIANT, fuseenglish: bool, ppszphrase: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).DefaultPhrase)(windows_core::Interface::as_raw(self), pszvaluetype.param().abi(), core::mem::transmute(ppropvar), fuseenglish.param().abi(), core::mem::transmute(ppszphrase.unwrap_or(core::mem::zeroed()))).ok() + (windows_core::Interface::vtable(self).DefaultPhrase)(windows_core::Interface::as_raw(self), pszvaluetype.param().abi(), core::mem::transmute(ppropvar), fuseenglish.into(), core::mem::transmute(ppszphrase.unwrap_or(core::mem::zeroed()))).ok() } } #[repr(C)] @@ -8756,32 +8746,29 @@ windows_core::imp::define_interface!(ILoadFilter, ILoadFilter_Vtbl, 0xc7310722_a windows_core::imp::interface_hierarchy!(ILoadFilter, windows_core::IUnknown); impl ILoadFilter { #[cfg(feature = "Win32_Storage_IndexServer")] - pub unsafe fn LoadIFilter(&self, pwcspath: P0, pfilteredsources: *const FILTERED_DATA_SOURCES, punkouter: P2, fusedefault: P3, pfilterclsid: *mut windows_core::GUID, searchdecsize: *mut i32, pwcssearchdesc: *mut *mut u16, ppifilt: *mut Option) -> windows_core::Result<()> + pub unsafe fn LoadIFilter(&self, pwcspath: P0, pfilteredsources: *const FILTERED_DATA_SOURCES, punkouter: P2, fusedefault: bool, pfilterclsid: *mut windows_core::GUID, searchdecsize: *mut i32, pwcssearchdesc: *mut *mut u16, ppifilt: *mut Option) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).LoadIFilter)(windows_core::Interface::as_raw(self), pwcspath.param().abi(), core::mem::transmute(pfilteredsources), punkouter.param().abi(), fusedefault.param().abi(), core::mem::transmute(pfilterclsid), core::mem::transmute(searchdecsize), core::mem::transmute(pwcssearchdesc), core::mem::transmute(ppifilt)).ok() + (windows_core::Interface::vtable(self).LoadIFilter)(windows_core::Interface::as_raw(self), pwcspath.param().abi(), core::mem::transmute(pfilteredsources), punkouter.param().abi(), fusedefault.into(), core::mem::transmute(pfilterclsid), core::mem::transmute(searchdecsize), core::mem::transmute(pwcssearchdesc), core::mem::transmute(ppifilt)).ok() } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com_StructuredStorage"))] - pub unsafe fn LoadIFilterFromStorage(&self, pstg: P0, punkouter: P1, pwcsoverride: P2, fusedefault: P3, pfilterclsid: *mut windows_core::GUID, searchdecsize: *mut i32, pwcssearchdesc: *mut *mut u16, ppifilt: *mut Option) -> windows_core::Result<()> + pub unsafe fn LoadIFilterFromStorage(&self, pstg: P0, punkouter: P1, pwcsoverride: P2, fusedefault: bool, pfilterclsid: *mut windows_core::GUID, searchdecsize: *mut i32, pwcssearchdesc: *mut *mut u16, ppifilt: *mut Option) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).LoadIFilterFromStorage)(windows_core::Interface::as_raw(self), pstg.param().abi(), punkouter.param().abi(), pwcsoverride.param().abi(), fusedefault.param().abi(), core::mem::transmute(pfilterclsid), core::mem::transmute(searchdecsize), core::mem::transmute(pwcssearchdesc), core::mem::transmute(ppifilt)).ok() + (windows_core::Interface::vtable(self).LoadIFilterFromStorage)(windows_core::Interface::as_raw(self), pstg.param().abi(), punkouter.param().abi(), pwcsoverride.param().abi(), fusedefault.into(), core::mem::transmute(pfilterclsid), core::mem::transmute(searchdecsize), core::mem::transmute(pwcssearchdesc), core::mem::transmute(ppifilt)).ok() } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com"))] - pub unsafe fn LoadIFilterFromStream(&self, pstm: P0, pfilteredsources: *const FILTERED_DATA_SOURCES, punkouter: P2, fusedefault: P3, pfilterclsid: *mut windows_core::GUID, searchdecsize: *mut i32, pwcssearchdesc: *mut *mut u16, ppifilt: *mut Option) -> windows_core::Result<()> + pub unsafe fn LoadIFilterFromStream(&self, pstm: P0, pfilteredsources: *const FILTERED_DATA_SOURCES, punkouter: P2, fusedefault: bool, pfilterclsid: *mut windows_core::GUID, searchdecsize: *mut i32, pwcssearchdesc: *mut *mut u16, ppifilt: *mut Option) -> windows_core::Result<()> where P0: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).LoadIFilterFromStream)(windows_core::Interface::as_raw(self), pstm.param().abi(), core::mem::transmute(pfilteredsources), punkouter.param().abi(), fusedefault.param().abi(), core::mem::transmute(pfilterclsid), core::mem::transmute(searchdecsize), core::mem::transmute(pwcssearchdesc), core::mem::transmute(ppifilt)).ok() + (windows_core::Interface::vtable(self).LoadIFilterFromStream)(windows_core::Interface::as_raw(self), pstm.param().abi(), core::mem::transmute(pfilteredsources), punkouter.param().abi(), fusedefault.into(), core::mem::transmute(pfilterclsid), core::mem::transmute(searchdecsize), core::mem::transmute(pwcssearchdesc), core::mem::transmute(ppifilt)).ok() } } #[repr(C)] @@ -8844,11 +8831,8 @@ impl core::ops::Deref for ILoadFilterWithPrivateComActivation { windows_core::imp::interface_hierarchy!(ILoadFilterWithPrivateComActivation, windows_core::IUnknown, ILoadFilter); impl ILoadFilterWithPrivateComActivation { #[cfg(feature = "Win32_Storage_IndexServer")] - pub unsafe fn LoadIFilterWithPrivateComActivation(&self, filteredsources: *const FILTERED_DATA_SOURCES, usedefault: P1, filterclsid: *mut windows_core::GUID, isfilterprivatecomactivated: *mut super::super::Foundation::BOOL, filterobj: *mut Option) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).LoadIFilterWithPrivateComActivation)(windows_core::Interface::as_raw(self), core::mem::transmute(filteredsources), usedefault.param().abi(), core::mem::transmute(filterclsid), core::mem::transmute(isfilterprivatecomactivated), core::mem::transmute(filterobj)).ok() + pub unsafe fn LoadIFilterWithPrivateComActivation(&self, filteredsources: *const FILTERED_DATA_SOURCES, usedefault: bool, filterclsid: *mut windows_core::GUID, isfilterprivatecomactivated: *mut super::super::Foundation::BOOL, filterobj: *mut Option) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).LoadIFilterWithPrivateComActivation)(windows_core::Interface::as_raw(self), core::mem::transmute(filteredsources), usedefault.into(), core::mem::transmute(filterclsid), core::mem::transmute(isfilterprivatecomactivated), core::mem::transmute(filterobj)).ok() } } #[repr(C)] @@ -9598,13 +9582,12 @@ impl IQueryParser { (windows_core::Interface::vtable(self).GetSchemaProvider)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn RestateToString(&self, pcondition: P0, fuseenglish: P1) -> windows_core::Result + pub unsafe fn RestateToString(&self, pcondition: P0, fuseenglish: bool) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RestateToString)(windows_core::Interface::as_raw(self), pcondition.param().abi(), fuseenglish.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RestateToString)(windows_core::Interface::as_raw(self), pcondition.param().abi(), fuseenglish.into(), &mut result__).map(|| result__) } pub unsafe fn ParsePropertyValue(&self, pszpropertyname: P0, pszinputstring: P1) -> windows_core::Result where @@ -9615,12 +9598,11 @@ impl IQueryParser { (windows_core::Interface::vtable(self).ParsePropertyValue)(windows_core::Interface::as_raw(self), pszpropertyname.param().abi(), pszinputstring.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn RestatePropertyValueToString(&self, pcondition: P0, fuseenglish: P1, ppszpropertyname: *mut windows_core::PWSTR, ppszquerystring: *mut windows_core::PWSTR) -> windows_core::Result<()> + pub unsafe fn RestatePropertyValueToString(&self, pcondition: P0, fuseenglish: bool, ppszpropertyname: *mut windows_core::PWSTR, ppszquerystring: *mut windows_core::PWSTR) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).RestatePropertyValueToString)(windows_core::Interface::as_raw(self), pcondition.param().abi(), fuseenglish.param().abi(), core::mem::transmute(ppszpropertyname), core::mem::transmute(ppszquerystring)).ok() + (windows_core::Interface::vtable(self).RestatePropertyValueToString)(windows_core::Interface::as_raw(self), pcondition.param().abi(), fuseenglish.into(), core::mem::transmute(ppszpropertyname), core::mem::transmute(ppszquerystring)).ok() } } #[repr(C)] @@ -9758,13 +9740,11 @@ impl IQueryParserManager { let mut result__ = core::ptr::null_mut(); (windows_core::Interface::vtable(self).CreateLoadedParser)(windows_core::Interface::as_raw(self), pszcatalog.param().abi(), core::mem::transmute(langidforkeywords), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn InitializeOptions(&self, funderstandnqs: P0, fautowildcard: P1, pqueryparser: P2) -> windows_core::Result<()> + pub unsafe fn InitializeOptions(&self, funderstandnqs: bool, fautowildcard: bool, pqueryparser: P2) -> windows_core::Result<()> where - P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).InitializeOptions)(windows_core::Interface::as_raw(self), funderstandnqs.param().abi(), fautowildcard.param().abi(), pqueryparser.param().abi()).ok() + (windows_core::Interface::vtable(self).InitializeOptions)(windows_core::Interface::as_raw(self), funderstandnqs.into(), fautowildcard.into(), pqueryparser.param().abi()).ok() } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn SetOption(&self, option: QUERY_PARSER_MANAGER_OPTION, poptionvalue: *const super::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()> { @@ -10299,11 +10279,8 @@ impl windows_core::RuntimeName for IRowPosition {} windows_core::imp::define_interface!(IRowPositionChange, IRowPositionChange_Vtbl, 0x0997a571_126e_11d0_9f8a_00a0c9a0631e); windows_core::imp::interface_hierarchy!(IRowPositionChange, windows_core::IUnknown); impl IRowPositionChange { - pub unsafe fn OnRowPositionChange(&self, ereason: u32, ephase: u32, fcantdeny: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnRowPositionChange)(windows_core::Interface::as_raw(self), core::mem::transmute(ereason), core::mem::transmute(ephase), fcantdeny.param().abi()).ok() + pub unsafe fn OnRowPositionChange(&self, ereason: u32, ephase: u32, fcantdeny: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnRowPositionChange)(windows_core::Interface::as_raw(self), core::mem::transmute(ereason), core::mem::transmute(ephase), fcantdeny.into()).ok() } } #[repr(C)] @@ -10910,11 +10887,8 @@ impl IRowsetFastLoad { pub unsafe fn InsertRow(&self, haccessor: HACCESSOR, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).InsertRow)(windows_core::Interface::as_raw(self), core::mem::transmute(haccessor), core::mem::transmute(pdata)).ok() } - pub unsafe fn Commit(&self, fdone: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Commit)(windows_core::Interface::as_raw(self), fdone.param().abi()).ok() + pub unsafe fn Commit(&self, fdone: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Commit)(windows_core::Interface::as_raw(self), fdone.into()).ok() } } #[repr(C)] @@ -11308,26 +11282,23 @@ impl windows_core::RuntimeName for IRowsetNextRowset {} windows_core::imp::define_interface!(IRowsetNotify, IRowsetNotify_Vtbl, 0x0c733a83_2a1c_11ce_ade5_00aa0044773d); windows_core::imp::interface_hierarchy!(IRowsetNotify, windows_core::IUnknown); impl IRowsetNotify { - pub unsafe fn OnFieldChange(&self, prowset: P0, hrow: usize, rgcolumns: &[usize], ereason: u32, ephase: u32, fcantdeny: P6) -> windows_core::Result<()> + pub unsafe fn OnFieldChange(&self, prowset: P0, hrow: usize, rgcolumns: &[usize], ereason: u32, ephase: u32, fcantdeny: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P6: windows_core::Param, { - (windows_core::Interface::vtable(self).OnFieldChange)(windows_core::Interface::as_raw(self), prowset.param().abi(), core::mem::transmute(hrow), rgcolumns.len().try_into().unwrap(), core::mem::transmute(rgcolumns.as_ptr()), core::mem::transmute(ereason), core::mem::transmute(ephase), fcantdeny.param().abi()).ok() + (windows_core::Interface::vtable(self).OnFieldChange)(windows_core::Interface::as_raw(self), prowset.param().abi(), core::mem::transmute(hrow), rgcolumns.len().try_into().unwrap(), core::mem::transmute(rgcolumns.as_ptr()), core::mem::transmute(ereason), core::mem::transmute(ephase), fcantdeny.into()).ok() } - pub unsafe fn OnRowChange(&self, prowset: P0, rghrows: &[usize], ereason: u32, ephase: u32, fcantdeny: P5) -> windows_core::Result<()> + pub unsafe fn OnRowChange(&self, prowset: P0, rghrows: &[usize], ereason: u32, ephase: u32, fcantdeny: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P5: windows_core::Param, { - (windows_core::Interface::vtable(self).OnRowChange)(windows_core::Interface::as_raw(self), prowset.param().abi(), rghrows.len().try_into().unwrap(), core::mem::transmute(rghrows.as_ptr()), core::mem::transmute(ereason), core::mem::transmute(ephase), fcantdeny.param().abi()).ok() + (windows_core::Interface::vtable(self).OnRowChange)(windows_core::Interface::as_raw(self), prowset.param().abi(), rghrows.len().try_into().unwrap(), core::mem::transmute(rghrows.as_ptr()), core::mem::transmute(ereason), core::mem::transmute(ephase), fcantdeny.into()).ok() } - pub unsafe fn OnRowsetChange(&self, prowset: P0, ereason: u32, ephase: u32, fcantdeny: P3) -> windows_core::Result<()> + pub unsafe fn OnRowsetChange(&self, prowset: P0, ereason: u32, ephase: u32, fcantdeny: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).OnRowsetChange)(windows_core::Interface::as_raw(self), prowset.param().abi(), core::mem::transmute(ereason), core::mem::transmute(ephase), fcantdeny.param().abi()).ok() + (windows_core::Interface::vtable(self).OnRowsetChange)(windows_core::Interface::as_raw(self), prowset.param().abi(), core::mem::transmute(ereason), core::mem::transmute(ephase), fcantdeny.into()).ok() } } #[repr(C)] @@ -11463,11 +11434,8 @@ impl windows_core::RuntimeName for IRowsetQueryStatus {} windows_core::imp::define_interface!(IRowsetRefresh, IRowsetRefresh_Vtbl, 0x0c733aa9_2a1c_11ce_ade5_00aa0044773d); windows_core::imp::interface_hierarchy!(IRowsetRefresh, windows_core::IUnknown); impl IRowsetRefresh { - pub unsafe fn RefreshVisibleData(&self, hchapter: usize, crows: usize, rghrows: *const usize, foverwrite: P3, pcrowsrefreshed: *mut usize, prghrowsrefreshed: *mut *mut usize, prgrowstatus: *mut *mut u32) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).RefreshVisibleData)(windows_core::Interface::as_raw(self), core::mem::transmute(hchapter), core::mem::transmute(crows), core::mem::transmute(rghrows), foverwrite.param().abi(), core::mem::transmute(pcrowsrefreshed), core::mem::transmute(prghrowsrefreshed), core::mem::transmute(prgrowstatus)).ok() + pub unsafe fn RefreshVisibleData(&self, hchapter: usize, crows: usize, rghrows: *const usize, foverwrite: bool, pcrowsrefreshed: *mut usize, prghrowsrefreshed: *mut *mut usize, prgrowstatus: *mut *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RefreshVisibleData)(windows_core::Interface::as_raw(self), core::mem::transmute(hchapter), core::mem::transmute(crows), core::mem::transmute(rghrows), foverwrite.into(), core::mem::transmute(pcrowsrefreshed), core::mem::transmute(prghrowsrefreshed), core::mem::transmute(prgrowstatus)).ok() } pub unsafe fn GetLastVisibleData(&self, hrow: usize, haccessor: HACCESSOR, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLastVisibleData)(windows_core::Interface::as_raw(self), core::mem::transmute(hrow), core::mem::transmute(haccessor), core::mem::transmute(pdata)).ok() @@ -12482,12 +12450,11 @@ impl ISearchCatalogManager { pub unsafe fn UnregisterViewForNotification(&self, dwcookie: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UnregisterViewForNotification)(windows_core::Interface::as_raw(self), core::mem::transmute(dwcookie)).ok() } - pub unsafe fn SetExtensionClusion(&self, pszextension: P0, fexclude: P1) -> windows_core::Result<()> + pub unsafe fn SetExtensionClusion(&self, pszextension: P0, fexclude: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetExtensionClusion)(windows_core::Interface::as_raw(self), pszextension.param().abi(), fexclude.param().abi()).ok() + (windows_core::Interface::vtable(self).SetExtensionClusion)(windows_core::Interface::as_raw(self), pszextension.param().abi(), fexclude.into()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn EnumerateExcludedExtensions(&self) -> windows_core::Result { @@ -12498,11 +12465,8 @@ impl ISearchCatalogManager { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetQueryHelper)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetDiacriticSensitivity(&self, fdiacriticsensitive: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDiacriticSensitivity)(windows_core::Interface::as_raw(self), fdiacriticsensitive.param().abi()).ok() + pub unsafe fn SetDiacriticSensitivity(&self, fdiacriticsensitive: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDiacriticSensitivity)(windows_core::Interface::as_raw(self), fdiacriticsensitive.into()).ok() } pub unsafe fn DiacriticSensitivity(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -12845,12 +12809,11 @@ impl windows_core::RuntimeName for ISearchCatalogManager2 {} windows_core::imp::define_interface!(ISearchCrawlScopeManager, ISearchCrawlScopeManager_Vtbl, 0xab310581_ac80_11d1_8df3_00c04fb6ef55); windows_core::imp::interface_hierarchy!(ISearchCrawlScopeManager, windows_core::IUnknown); impl ISearchCrawlScopeManager { - pub unsafe fn AddDefaultScopeRule(&self, pszurl: P0, finclude: P1, ffollowflags: u32) -> windows_core::Result<()> + pub unsafe fn AddDefaultScopeRule(&self, pszurl: P0, finclude: bool, ffollowflags: u32) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).AddDefaultScopeRule)(windows_core::Interface::as_raw(self), pszurl.param().abi(), finclude.param().abi(), core::mem::transmute(ffollowflags)).ok() + (windows_core::Interface::vtable(self).AddDefaultScopeRule)(windows_core::Interface::as_raw(self), pszurl.param().abi(), finclude.into(), core::mem::transmute(ffollowflags)).ok() } pub unsafe fn AddRoot(&self, psearchroot: P0) -> windows_core::Result<()> where @@ -12868,22 +12831,17 @@ impl ISearchCrawlScopeManager { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EnumerateRoots)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn AddHierarchicalScope(&self, pszurl: P0, finclude: P1, fdefault: P2, foverridechildren: P3) -> windows_core::Result<()> + pub unsafe fn AddHierarchicalScope(&self, pszurl: P0, finclude: bool, fdefault: bool, foverridechildren: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).AddHierarchicalScope)(windows_core::Interface::as_raw(self), pszurl.param().abi(), finclude.param().abi(), fdefault.param().abi(), foverridechildren.param().abi()).ok() + (windows_core::Interface::vtable(self).AddHierarchicalScope)(windows_core::Interface::as_raw(self), pszurl.param().abi(), finclude.into(), fdefault.into(), foverridechildren.into()).ok() } - pub unsafe fn AddUserScopeRule(&self, pszurl: P0, finclude: P1, foverridechildren: P2, ffollowflags: u32) -> windows_core::Result<()> + pub unsafe fn AddUserScopeRule(&self, pszurl: P0, finclude: bool, foverridechildren: bool, ffollowflags: u32) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddUserScopeRule)(windows_core::Interface::as_raw(self), pszurl.param().abi(), finclude.param().abi(), foverridechildren.param().abi(), core::mem::transmute(ffollowflags)).ok() + (windows_core::Interface::vtable(self).AddUserScopeRule)(windows_core::Interface::as_raw(self), pszurl.param().abi(), finclude.into(), foverridechildren.into(), core::mem::transmute(ffollowflags)).ok() } pub unsafe fn RemoveScopeRule(&self, pszrule: P0) -> windows_core::Result<()> where @@ -13208,11 +13166,8 @@ impl windows_core::RuntimeName for ISearchItemsChangedSink {} windows_core::imp::define_interface!(ISearchLanguageSupport, ISearchLanguageSupport_Vtbl, 0x24c3cbaa_ebc1_491a_9ef1_9f6d8deb1b8f); windows_core::imp::interface_hierarchy!(ISearchLanguageSupport, windows_core::IUnknown); impl ISearchLanguageSupport { - pub unsafe fn SetDiacriticSensitivity(&self, fdiacriticsensitive: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDiacriticSensitivity)(windows_core::Interface::as_raw(self), fdiacriticsensitive.param().abi()).ok() + pub unsafe fn SetDiacriticSensitivity(&self, fdiacriticsensitive: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDiacriticSensitivity)(windows_core::Interface::as_raw(self), fdiacriticsensitive.into()).ok() } pub unsafe fn GetDiacriticSensitivity(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -13334,13 +13289,12 @@ impl ISearchManager { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).BypassList)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetProxy(&self, suseproxy: PROXY_ACCESS, flocalbypassproxy: P1, dwportnumber: u32, pszproxyname: P3, pszbypasslist: P4) -> windows_core::Result<()> + pub unsafe fn SetProxy(&self, suseproxy: PROXY_ACCESS, flocalbypassproxy: bool, dwportnumber: u32, pszproxyname: P3, pszbypasslist: P4) -> windows_core::Result<()> where - P1: windows_core::Param, P3: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).SetProxy)(windows_core::Interface::as_raw(self), core::mem::transmute(suseproxy), flocalbypassproxy.param().abi(), core::mem::transmute(dwportnumber), pszproxyname.param().abi(), pszbypasslist.param().abi()).ok() + (windows_core::Interface::vtable(self).SetProxy)(windows_core::Interface::as_raw(self), core::mem::transmute(suseproxy), flocalbypassproxy.into(), core::mem::transmute(dwportnumber), pszproxyname.param().abi(), pszbypasslist.param().abi()).ok() } pub unsafe fn GetCatalog(&self, pszcatalog: P0) -> windows_core::Result where @@ -14312,31 +14266,22 @@ impl ISearchRoot { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).RootURL)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetIsHierarchical(&self, fishierarchical: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIsHierarchical)(windows_core::Interface::as_raw(self), fishierarchical.param().abi()).ok() + pub unsafe fn SetIsHierarchical(&self, fishierarchical: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIsHierarchical)(windows_core::Interface::as_raw(self), fishierarchical.into()).ok() } pub unsafe fn IsHierarchical(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsHierarchical)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetProvidesNotifications(&self, fprovidesnotifications: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetProvidesNotifications)(windows_core::Interface::as_raw(self), fprovidesnotifications.param().abi()).ok() + pub unsafe fn SetProvidesNotifications(&self, fprovidesnotifications: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetProvidesNotifications)(windows_core::Interface::as_raw(self), fprovidesnotifications.into()).ok() } pub unsafe fn ProvidesNotifications(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ProvidesNotifications)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetUseNotificationsOnly(&self, fusenotificationsonly: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetUseNotificationsOnly)(windows_core::Interface::as_raw(self), fusenotificationsonly.param().abi()).ok() + pub unsafe fn SetUseNotificationsOnly(&self, fusenotificationsonly: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetUseNotificationsOnly)(windows_core::Interface::as_raw(self), fusenotificationsonly.into()).ok() } pub unsafe fn UseNotificationsOnly(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -14356,11 +14301,8 @@ impl ISearchRoot { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).HostDepth)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetFollowDirectories(&self, ffollowdirectories: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetFollowDirectories)(windows_core::Interface::as_raw(self), ffollowdirectories.param().abi()).ok() + pub unsafe fn SetFollowDirectories(&self, ffollowdirectories: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetFollowDirectories)(windows_core::Interface::as_raw(self), ffollowdirectories.into()).ok() } pub unsafe fn FollowDirectories(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -16854,11 +16796,8 @@ impl windows_core::RuntimeName for IViewSort {} windows_core::imp::define_interface!(IWordBreaker, IWordBreaker_Vtbl, 0xd53552c8_77e3_101a_b552_08002b33b0e6); windows_core::imp::interface_hierarchy!(IWordBreaker, windows_core::IUnknown); impl IWordBreaker { - pub unsafe fn Init(&self, fquery: P0, ulmaxtokensize: u32, pflicense: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Init)(windows_core::Interface::as_raw(self), fquery.param().abi(), core::mem::transmute(ulmaxtokensize), core::mem::transmute(pflicense)).ok() + pub unsafe fn Init(&self, fquery: bool, ulmaxtokensize: u32, pflicense: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Init)(windows_core::Interface::as_raw(self), fquery.into(), core::mem::transmute(ulmaxtokensize), core::mem::transmute(pflicense)).ok() } #[cfg(feature = "Win32_Storage_IndexServer")] pub unsafe fn BreakText(&self, ptextsource: *mut TEXT_SOURCE, pwordsink: P1, pphrasesink: P2) -> windows_core::Result<()> diff --git a/crates/libs/windows/src/Windows/Win32/System/ServerBackup/mod.rs b/crates/libs/windows/src/Windows/Win32/System/ServerBackup/mod.rs index 02bd49055e..e795f2bfd4 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ServerBackup/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ServerBackup/mod.rs @@ -85,23 +85,21 @@ impl windows_core::RuntimeName for IWsbApplicationBackupSupport {} windows_core::imp::define_interface!(IWsbApplicationRestoreSupport, IWsbApplicationRestoreSupport_Vtbl, 0x8d3bdb38_4ee8_4718_85f9_c7dbc4ab77aa); windows_core::imp::interface_hierarchy!(IWsbApplicationRestoreSupport, windows_core::IUnknown); impl IWsbApplicationRestoreSupport { - pub unsafe fn PreRestore(&self, wszwritermetadata: P0, wszcomponentname: P1, wszcomponentlogicalpath: P2, bnorollforward: P3) -> windows_core::Result<()> + pub unsafe fn PreRestore(&self, wszwritermetadata: P0, wszcomponentname: P1, wszcomponentlogicalpath: P2, bnorollforward: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).PreRestore)(windows_core::Interface::as_raw(self), wszwritermetadata.param().abi(), wszcomponentname.param().abi(), wszcomponentlogicalpath.param().abi(), bnorollforward.param().abi()).ok() + (windows_core::Interface::vtable(self).PreRestore)(windows_core::Interface::as_raw(self), wszwritermetadata.param().abi(), wszcomponentname.param().abi(), wszcomponentlogicalpath.param().abi(), bnorollforward.into()).ok() } - pub unsafe fn PostRestore(&self, wszwritermetadata: P0, wszcomponentname: P1, wszcomponentlogicalpath: P2, bnorollforward: P3) -> windows_core::Result<()> + pub unsafe fn PostRestore(&self, wszwritermetadata: P0, wszcomponentname: P1, wszcomponentlogicalpath: P2, bnorollforward: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).PostRestore)(windows_core::Interface::as_raw(self), wszwritermetadata.param().abi(), wszcomponentname.param().abi(), wszcomponentlogicalpath.param().abi(), bnorollforward.param().abi()).ok() + (windows_core::Interface::vtable(self).PostRestore)(windows_core::Interface::as_raw(self), wszwritermetadata.param().abi(), wszcomponentname.param().abi(), wszcomponentlogicalpath.param().abi(), bnorollforward.into()).ok() } pub unsafe fn OrderComponents(&self, ccomponents: u32, rgcomponentname: *const windows_core::PCWSTR, rgcomponentlogicalpaths: *const windows_core::PCWSTR, prgcomponentname: *mut *mut windows_core::PWSTR, prgcomponentlogicalpath: *mut *mut windows_core::PWSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OrderComponents)(windows_core::Interface::as_raw(self), core::mem::transmute(ccomponents), core::mem::transmute(rgcomponentname), core::mem::transmute(rgcomponentlogicalpaths), core::mem::transmute(prgcomponentname), core::mem::transmute(prgcomponentlogicalpath)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/System/Services/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Services/mod.rs index ab00ca638e..ddd5798551 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Services/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Services/mod.rs @@ -209,12 +209,9 @@ pub unsafe fn LockServiceDatabase(hscmanager: SC_HANDLE) -> *mut core::ffi::c_vo LockServiceDatabase(core::mem::transmute(hscmanager)) } #[inline] -pub unsafe fn NotifyBootConfigStatus(bootacceptable: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn NotifyBootConfigStatus(bootacceptable: bool) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn NotifyBootConfigStatus(bootacceptable : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - NotifyBootConfigStatus(bootacceptable.param().abi()).ok() + NotifyBootConfigStatus(bootacceptable.into()).ok() } #[inline] pub unsafe fn NotifyServiceStatusChangeA(hservice: SC_HANDLE, dwnotifymask: SERVICE_NOTIFY, pnotifybuffer: *const SERVICE_NOTIFY_2A) -> u32 { @@ -352,13 +349,9 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn SetServiceBits(hservicestatus: SERVICE_STATUS_HANDLE, dwservicebits: u32, bsetbitson: P2, bupdateimmediately: P3) -> windows_core::Result<()> -where - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn SetServiceBits(hservicestatus: SERVICE_STATUS_HANDLE, dwservicebits: u32, bsetbitson: bool, bupdateimmediately: bool) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn SetServiceBits(hservicestatus : SERVICE_STATUS_HANDLE, dwservicebits : u32, bsetbitson : super::super::Foundation:: BOOL, bupdateimmediately : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetServiceBits(core::mem::transmute(hservicestatus), core::mem::transmute(dwservicebits), bsetbitson.param().abi(), bupdateimmediately.param().abi()).ok() + SetServiceBits(core::mem::transmute(hservicestatus), core::mem::transmute(dwservicebits), bsetbitson.into(), bupdateimmediately.into()).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -519,9 +512,6 @@ pub type PSC_NOTIFICATION_CALLBACK = Option bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1081,9 +1068,6 @@ pub struct SERVICE_STATUS_CURRENT_STATE(pub u32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct SERVICE_STATUS_HANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for SERVICE_STATUS_HANDLE { - type TypeKind = windows_core::CopyType; -} impl SERVICE_STATUS_HANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/System/SettingsManagementInfrastructure/mod.rs b/crates/libs/windows/src/Windows/Win32/System/SettingsManagementInfrastructure/mod.rs index 34e74564e5..6d05a13aa2 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SettingsManagementInfrastructure/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SettingsManagementInfrastructure/mod.rs @@ -242,21 +242,19 @@ impl ISettingsEngine { (windows_core::Interface::vtable(self).UnloadStore)(windows_core::Interface::as_raw(self), core::mem::transmute(reserved)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn RegisterNamespace(&self, settingsid: P0, stream: P1, pushsettings: P2) -> windows_core::Result + pub unsafe fn RegisterNamespace(&self, settingsid: P0, stream: P1, pushsettings: bool) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RegisterNamespace)(windows_core::Interface::as_raw(self), settingsid.param().abi(), stream.param().abi(), pushsettings.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + (windows_core::Interface::vtable(self).RegisterNamespace)(windows_core::Interface::as_raw(self), settingsid.param().abi(), stream.param().abi(), pushsettings.into(), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn UnregisterNamespace(&self, settingsid: P0, removesettings: P1) -> windows_core::Result<()> + pub unsafe fn UnregisterNamespace(&self, settingsid: P0, removesettings: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).UnregisterNamespace)(windows_core::Interface::as_raw(self), settingsid.param().abi(), removesettings.param().abi()).ok() + (windows_core::Interface::vtable(self).UnregisterNamespace)(windows_core::Interface::as_raw(self), settingsid.param().abi(), removesettings.into()).ok() } pub unsafe fn CreateTargetInfo(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1000,12 +998,9 @@ impl ISettingsNamespace { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Settings)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn Save(&self, pushsettings: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn Save(&self, pushsettings: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), pushsettings.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).Save)(windows_core::Interface::as_raw(self), pushsettings.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetSettingByPath(&self, path: P0) -> windows_core::Result where @@ -1304,41 +1299,37 @@ impl ITargetInfo { { (windows_core::Interface::vtable(self).SetTargetProcessorArchitecture)(windows_core::Interface::as_raw(self), processorarchitecture.param().abi()).ok() } - pub unsafe fn GetProperty(&self, offline: P0, property: P1) -> windows_core::Result + pub unsafe fn GetProperty(&self, offline: bool, property: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), offline.param().abi(), property.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), offline.into(), property.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn SetProperty(&self, offline: P0, property: P1, value: P2) -> windows_core::Result<()> + pub unsafe fn SetProperty(&self, offline: bool, property: P1, value: P2) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), offline.param().abi(), property.param().abi(), value.param().abi()).ok() + (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), offline.into(), property.param().abi(), value.param().abi()).ok() } pub unsafe fn GetEnumerator(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetEnumerator)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn ExpandTarget(&self, offline: P0, location: P1) -> windows_core::Result + pub unsafe fn ExpandTarget(&self, offline: bool, location: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).ExpandTarget)(windows_core::Interface::as_raw(self), offline.param().abi(), location.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + (windows_core::Interface::vtable(self).ExpandTarget)(windows_core::Interface::as_raw(self), offline.into(), location.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } - pub unsafe fn ExpandTargetPath(&self, offline: P0, location: P1) -> windows_core::Result + pub unsafe fn ExpandTargetPath(&self, offline: bool, location: P1) -> windows_core::Result where - P0: windows_core::Param, P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).ExpandTargetPath)(windows_core::Interface::as_raw(self), offline.param().abi(), location.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + (windows_core::Interface::vtable(self).ExpandTargetPath)(windows_core::Interface::as_raw(self), offline.into(), location.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) } pub unsafe fn SetModulePath(&self, module: P0, path: P1) -> windows_core::Result<()> where diff --git a/crates/libs/windows/src/Windows/Win32/System/Shutdown/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Shutdown/mod.rs index 70abbfb025..cc1385f292 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Shutdown/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Shutdown/mod.rs @@ -15,12 +15,9 @@ where AbortSystemShutdownW(lpmachinename.param().abi()).ok() } #[inline] -pub unsafe fn CheckForHiberboot(phiberboot: *mut super::super::Foundation::BOOLEAN, bclearflag: P1) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn CheckForHiberboot(phiberboot: *mut super::super::Foundation::BOOLEAN, bclearflag: bool) -> u32 { windows_targets::link!("advapi32.dll" "system" fn CheckForHiberboot(phiberboot : *mut super::super::Foundation:: BOOLEAN, bclearflag : super::super::Foundation:: BOOLEAN) -> u32); - CheckForHiberboot(core::mem::transmute(phiberboot), bclearflag.param().abi()) + CheckForHiberboot(core::mem::transmute(phiberboot), bclearflag.into()) } #[inline] pub unsafe fn ExitWindowsEx(uflags: EXIT_WINDOWS_FLAGS, dwreason: SHUTDOWN_REASON) -> windows_core::Result<()> { @@ -46,48 +43,40 @@ where InitiateShutdownW(lpmachinename.param().abi(), lpmessage.param().abi(), core::mem::transmute(dwgraceperiod), core::mem::transmute(dwshutdownflags), core::mem::transmute(dwreason)) } #[inline] -pub unsafe fn InitiateSystemShutdownA(lpmachinename: P0, lpmessage: P1, dwtimeout: u32, bforceappsclosed: P3, brebootaftershutdown: P4) -> windows_core::Result<()> +pub unsafe fn InitiateSystemShutdownA(lpmachinename: P0, lpmessage: P1, dwtimeout: u32, bforceappsclosed: bool, brebootaftershutdown: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn InitiateSystemShutdownA(lpmachinename : windows_core::PCSTR, lpmessage : windows_core::PCSTR, dwtimeout : u32, bforceappsclosed : super::super::Foundation:: BOOL, brebootaftershutdown : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - InitiateSystemShutdownA(lpmachinename.param().abi(), lpmessage.param().abi(), core::mem::transmute(dwtimeout), bforceappsclosed.param().abi(), brebootaftershutdown.param().abi()).ok() + InitiateSystemShutdownA(lpmachinename.param().abi(), lpmessage.param().abi(), core::mem::transmute(dwtimeout), bforceappsclosed.into(), brebootaftershutdown.into()).ok() } #[inline] -pub unsafe fn InitiateSystemShutdownExA(lpmachinename: P0, lpmessage: P1, dwtimeout: u32, bforceappsclosed: P3, brebootaftershutdown: P4, dwreason: SHUTDOWN_REASON) -> windows_core::Result<()> +pub unsafe fn InitiateSystemShutdownExA(lpmachinename: P0, lpmessage: P1, dwtimeout: u32, bforceappsclosed: bool, brebootaftershutdown: bool, dwreason: SHUTDOWN_REASON) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn InitiateSystemShutdownExA(lpmachinename : windows_core::PCSTR, lpmessage : windows_core::PCSTR, dwtimeout : u32, bforceappsclosed : super::super::Foundation:: BOOL, brebootaftershutdown : super::super::Foundation:: BOOL, dwreason : SHUTDOWN_REASON) -> super::super::Foundation:: BOOL); - InitiateSystemShutdownExA(lpmachinename.param().abi(), lpmessage.param().abi(), core::mem::transmute(dwtimeout), bforceappsclosed.param().abi(), brebootaftershutdown.param().abi(), core::mem::transmute(dwreason)).ok() + InitiateSystemShutdownExA(lpmachinename.param().abi(), lpmessage.param().abi(), core::mem::transmute(dwtimeout), bforceappsclosed.into(), brebootaftershutdown.into(), core::mem::transmute(dwreason)).ok() } #[inline] -pub unsafe fn InitiateSystemShutdownExW(lpmachinename: P0, lpmessage: P1, dwtimeout: u32, bforceappsclosed: P3, brebootaftershutdown: P4, dwreason: SHUTDOWN_REASON) -> windows_core::Result<()> +pub unsafe fn InitiateSystemShutdownExW(lpmachinename: P0, lpmessage: P1, dwtimeout: u32, bforceappsclosed: bool, brebootaftershutdown: bool, dwreason: SHUTDOWN_REASON) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn InitiateSystemShutdownExW(lpmachinename : windows_core::PCWSTR, lpmessage : windows_core::PCWSTR, dwtimeout : u32, bforceappsclosed : super::super::Foundation:: BOOL, brebootaftershutdown : super::super::Foundation:: BOOL, dwreason : SHUTDOWN_REASON) -> super::super::Foundation:: BOOL); - InitiateSystemShutdownExW(lpmachinename.param().abi(), lpmessage.param().abi(), core::mem::transmute(dwtimeout), bforceappsclosed.param().abi(), brebootaftershutdown.param().abi(), core::mem::transmute(dwreason)).ok() + InitiateSystemShutdownExW(lpmachinename.param().abi(), lpmessage.param().abi(), core::mem::transmute(dwtimeout), bforceappsclosed.into(), brebootaftershutdown.into(), core::mem::transmute(dwreason)).ok() } #[inline] -pub unsafe fn InitiateSystemShutdownW(lpmachinename: P0, lpmessage: P1, dwtimeout: u32, bforceappsclosed: P3, brebootaftershutdown: P4) -> windows_core::Result<()> +pub unsafe fn InitiateSystemShutdownW(lpmachinename: P0, lpmessage: P1, dwtimeout: u32, bforceappsclosed: bool, brebootaftershutdown: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn InitiateSystemShutdownW(lpmachinename : windows_core::PCWSTR, lpmessage : windows_core::PCWSTR, dwtimeout : u32, bforceappsclosed : super::super::Foundation:: BOOL, brebootaftershutdown : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - InitiateSystemShutdownW(lpmachinename.param().abi(), lpmessage.param().abi(), core::mem::transmute(dwtimeout), bforceappsclosed.param().abi(), brebootaftershutdown.param().abi()).ok() + InitiateSystemShutdownW(lpmachinename.param().abi(), lpmessage.param().abi(), core::mem::transmute(dwtimeout), bforceappsclosed.into(), brebootaftershutdown.into()).ok() } #[inline] pub unsafe fn LockWorkStation() -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/System/StationsAndDesktops/mod.rs b/crates/libs/windows/src/Windows/Win32/System/StationsAndDesktops/mod.rs index b2e570bcbb..cd082f3acd 100644 --- a/crates/libs/windows/src/Windows/Win32/System/StationsAndDesktops/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/StationsAndDesktops/mod.rs @@ -141,52 +141,45 @@ pub unsafe fn GetUserObjectInformationW(hobj: super::super::Foundation::HANDLE, GetUserObjectInformationW(core::mem::transmute(hobj), core::mem::transmute(nindex), core::mem::transmute(pvinfo.unwrap_or(core::mem::zeroed())), core::mem::transmute(nlength), core::mem::transmute(lpnlengthneeded.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn OpenDesktopA(lpszdesktop: P0, dwflags: DESKTOP_CONTROL_FLAGS, finherit: P2, dwdesiredaccess: u32) -> windows_core::Result +pub unsafe fn OpenDesktopA(lpszdesktop: P0, dwflags: DESKTOP_CONTROL_FLAGS, finherit: bool, dwdesiredaccess: u32) -> windows_core::Result where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn OpenDesktopA(lpszdesktop : windows_core::PCSTR, dwflags : DESKTOP_CONTROL_FLAGS, finherit : super::super::Foundation:: BOOL, dwdesiredaccess : u32) -> HDESK); - let result__ = OpenDesktopA(lpszdesktop.param().abi(), core::mem::transmute(dwflags), finherit.param().abi(), core::mem::transmute(dwdesiredaccess)); + let result__ = OpenDesktopA(lpszdesktop.param().abi(), core::mem::transmute(dwflags), finherit.into(), core::mem::transmute(dwdesiredaccess)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn OpenDesktopW(lpszdesktop: P0, dwflags: DESKTOP_CONTROL_FLAGS, finherit: P2, dwdesiredaccess: u32) -> windows_core::Result +pub unsafe fn OpenDesktopW(lpszdesktop: P0, dwflags: DESKTOP_CONTROL_FLAGS, finherit: bool, dwdesiredaccess: u32) -> windows_core::Result where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn OpenDesktopW(lpszdesktop : windows_core::PCWSTR, dwflags : DESKTOP_CONTROL_FLAGS, finherit : super::super::Foundation:: BOOL, dwdesiredaccess : u32) -> HDESK); - let result__ = OpenDesktopW(lpszdesktop.param().abi(), core::mem::transmute(dwflags), finherit.param().abi(), core::mem::transmute(dwdesiredaccess)); + let result__ = OpenDesktopW(lpszdesktop.param().abi(), core::mem::transmute(dwflags), finherit.into(), core::mem::transmute(dwdesiredaccess)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn OpenInputDesktop(dwflags: DESKTOP_CONTROL_FLAGS, finherit: P1, dwdesiredaccess: DESKTOP_ACCESS_FLAGS) -> windows_core::Result -where - P1: windows_core::Param, -{ +pub unsafe fn OpenInputDesktop(dwflags: DESKTOP_CONTROL_FLAGS, finherit: bool, dwdesiredaccess: DESKTOP_ACCESS_FLAGS) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn OpenInputDesktop(dwflags : DESKTOP_CONTROL_FLAGS, finherit : super::super::Foundation:: BOOL, dwdesiredaccess : DESKTOP_ACCESS_FLAGS) -> HDESK); - let result__ = OpenInputDesktop(core::mem::transmute(dwflags), finherit.param().abi(), core::mem::transmute(dwdesiredaccess)); + let result__ = OpenInputDesktop(core::mem::transmute(dwflags), finherit.into(), core::mem::transmute(dwdesiredaccess)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn OpenWindowStationA(lpszwinsta: P0, finherit: P1, dwdesiredaccess: u32) -> windows_core::Result +pub unsafe fn OpenWindowStationA(lpszwinsta: P0, finherit: bool, dwdesiredaccess: u32) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn OpenWindowStationA(lpszwinsta : windows_core::PCSTR, finherit : super::super::Foundation:: BOOL, dwdesiredaccess : u32) -> HWINSTA); - let result__ = OpenWindowStationA(lpszwinsta.param().abi(), finherit.param().abi(), core::mem::transmute(dwdesiredaccess)); + let result__ = OpenWindowStationA(lpszwinsta.param().abi(), finherit.into(), core::mem::transmute(dwdesiredaccess)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn OpenWindowStationW(lpszwinsta: P0, finherit: P1, dwdesiredaccess: u32) -> windows_core::Result +pub unsafe fn OpenWindowStationW(lpszwinsta: P0, finherit: bool, dwdesiredaccess: u32) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn OpenWindowStationW(lpszwinsta : windows_core::PCWSTR, finherit : super::super::Foundation:: BOOL, dwdesiredaccess : u32) -> HWINSTA); - let result__ = OpenWindowStationW(lpszwinsta.param().abi(), finherit.param().abi(), core::mem::transmute(dwdesiredaccess)); + let result__ = OpenWindowStationW(lpszwinsta.param().abi(), finherit.into(), core::mem::transmute(dwdesiredaccess)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -339,9 +332,6 @@ pub const DF_ALLOWOTHERACCOUNTHOOK: DESKTOP_CONTROL_FLAGS = DESKTOP_CONTROL_FLAG #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HDESK(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HDESK { - type TypeKind = windows_core::CopyType; -} impl HDESK { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -364,9 +354,6 @@ impl Default for HDESK { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HWINSTA(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HWINSTA { - type TypeKind = windows_core::CopyType; -} impl HWINSTA { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/System/SubsystemForLinux/mod.rs b/crates/libs/windows/src/Windows/Win32/System/SubsystemForLinux/mod.rs index c247467e3c..cf77b3d5c4 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SubsystemForLinux/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SubsystemForLinux/mod.rs @@ -23,26 +23,24 @@ where WslIsDistributionRegistered(distributionname.param().abi()) } #[inline] -pub unsafe fn WslLaunch(distributionname: P0, command: P1, usecurrentworkingdirectory: P2, stdin: super::super::Foundation::HANDLE, stdout: super::super::Foundation::HANDLE, stderr: super::super::Foundation::HANDLE) -> windows_core::Result +pub unsafe fn WslLaunch(distributionname: P0, command: P1, usecurrentworkingdirectory: bool, stdin: super::super::Foundation::HANDLE, stdout: super::super::Foundation::HANDLE, stderr: super::super::Foundation::HANDLE) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("api-ms-win-wsl-api-l1-1-0.dll" "system" fn WslLaunch(distributionname : windows_core::PCWSTR, command : windows_core::PCWSTR, usecurrentworkingdirectory : super::super::Foundation:: BOOL, stdin : super::super::Foundation:: HANDLE, stdout : super::super::Foundation:: HANDLE, stderr : super::super::Foundation:: HANDLE, process : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WslLaunch(distributionname.param().abi(), command.param().abi(), usecurrentworkingdirectory.param().abi(), core::mem::transmute(stdin), core::mem::transmute(stdout), core::mem::transmute(stderr), &mut result__).map(|| core::mem::transmute(result__)) + WslLaunch(distributionname.param().abi(), command.param().abi(), usecurrentworkingdirectory.into(), core::mem::transmute(stdin), core::mem::transmute(stdout), core::mem::transmute(stderr), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn WslLaunchInteractive(distributionname: P0, command: P1, usecurrentworkingdirectory: P2) -> windows_core::Result +pub unsafe fn WslLaunchInteractive(distributionname: P0, command: P1, usecurrentworkingdirectory: bool) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("api-ms-win-wsl-api-l1-1-0.dll" "system" fn WslLaunchInteractive(distributionname : windows_core::PCWSTR, command : windows_core::PCWSTR, usecurrentworkingdirectory : super::super::Foundation:: BOOL, exitcode : *mut u32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WslLaunchInteractive(distributionname.param().abi(), command.param().abi(), usecurrentworkingdirectory.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + WslLaunchInteractive(distributionname.param().abi(), command.param().abi(), usecurrentworkingdirectory.into(), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] pub unsafe fn WslRegisterDistribution(distributionname: P0, targzfilename: P1) -> windows_core::Result<()> diff --git a/crates/libs/windows/src/Windows/Win32/System/SystemInformation/mod.rs b/crates/libs/windows/src/Windows/Win32/System/SystemInformation/mod.rs index 57883f9867..4632593030 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SystemInformation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SystemInformation/mod.rs @@ -317,20 +317,14 @@ pub unsafe fn SetSystemTime(lpsystemtime: *const super::super::Foundation::SYSTE SetSystemTime(core::mem::transmute(lpsystemtime)).ok() } #[inline] -pub unsafe fn SetSystemTimeAdjustment(dwtimeadjustment: u32, btimeadjustmentdisabled: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn SetSystemTimeAdjustment(dwtimeadjustment: u32, btimeadjustmentdisabled: bool) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetSystemTimeAdjustment(dwtimeadjustment : u32, btimeadjustmentdisabled : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetSystemTimeAdjustment(core::mem::transmute(dwtimeadjustment), btimeadjustmentdisabled.param().abi()).ok() + SetSystemTimeAdjustment(core::mem::transmute(dwtimeadjustment), btimeadjustmentdisabled.into()).ok() } #[inline] -pub unsafe fn SetSystemTimeAdjustmentPrecise(dwtimeadjustment: u64, btimeadjustmentdisabled: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn SetSystemTimeAdjustmentPrecise(dwtimeadjustment: u64, btimeadjustmentdisabled: bool) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-sysinfo-l1-2-4.dll" "system" fn SetSystemTimeAdjustmentPrecise(dwtimeadjustment : u64, btimeadjustmentdisabled : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetSystemTimeAdjustmentPrecise(core::mem::transmute(dwtimeadjustment), btimeadjustmentdisabled.param().abi()).ok() + SetSystemTimeAdjustmentPrecise(core::mem::transmute(dwtimeadjustment), btimeadjustmentdisabled.into()).ok() } #[inline] pub unsafe fn VerSetConditionMask(conditionmask: u64, typemask: VER_FLAGS, condition: u8) -> u64 { diff --git a/crates/libs/windows/src/Windows/Win32/System/TaskScheduler/mod.rs b/crates/libs/windows/src/Windows/Win32/System/TaskScheduler/mod.rs index 19bfd83c4e..9c8eb3e7dc 100644 --- a/crates/libs/windows/src/Windows/Win32/System/TaskScheduler/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/TaskScheduler/mod.rs @@ -1895,12 +1895,9 @@ windows_core::imp::define_interface!(IProvideTaskPage, IProvideTaskPage_Vtbl, 0x windows_core::imp::interface_hierarchy!(IProvideTaskPage, windows_core::IUnknown); impl IProvideTaskPage { #[cfg(feature = "Win32_UI_Controls")] - pub unsafe fn GetPage(&self, tptype: TASKPAGE, fpersistchanges: P1) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn GetPage(&self, tptype: TASKPAGE, fpersistchanges: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetPage)(windows_core::Interface::as_raw(self), core::mem::transmute(tptype), fpersistchanges.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetPage)(windows_core::Interface::as_raw(self), core::mem::transmute(tptype), fpersistchanges.into(), &mut result__).map(|| result__) } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/System/Threading/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Threading/mod.rs index 9a29bce470..e6552b2877 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Threading/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Threading/mod.rs @@ -21,12 +21,9 @@ pub unsafe fn AddSIDToBoundaryDescriptor(boundarydescriptor: *mut super::super:: AddSIDToBoundaryDescriptor(core::mem::transmute(boundarydescriptor), core::mem::transmute(requiredsid)).ok() } #[inline] -pub unsafe fn AttachThreadInput(idattach: u32, idattachto: u32, fattach: P2) -> super::super::Foundation::BOOL -where - P2: windows_core::Param, -{ +pub unsafe fn AttachThreadInput(idattach: u32, idattachto: u32, fattach: bool) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn AttachThreadInput(idattach : u32, idattachto : u32, fattach : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - AttachThreadInput(core::mem::transmute(idattach), core::mem::transmute(idattachto), fattach.param().abi()) + AttachThreadInput(core::mem::transmute(idattach), core::mem::transmute(idattachto), fattach.into()) } #[inline] pub unsafe fn AvQuerySystemResponsiveness(avrthandle: super::super::Foundation::HANDLE, systemresponsivenessvalue: *mut u32) -> windows_core::Result<()> { @@ -65,12 +62,9 @@ pub unsafe fn AvRtDeleteThreadOrderingGroup(context: super::super::Foundation::H AvRtDeleteThreadOrderingGroup(core::mem::transmute(context)).ok() } #[inline] -pub unsafe fn AvRtJoinThreadOrderingGroup(context: *mut super::super::Foundation::HANDLE, threadorderingguid: *const windows_core::GUID, before: P2) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn AvRtJoinThreadOrderingGroup(context: *mut super::super::Foundation::HANDLE, threadorderingguid: *const windows_core::GUID, before: bool) -> windows_core::Result<()> { windows_targets::link!("avrt.dll" "system" fn AvRtJoinThreadOrderingGroup(context : *mut super::super::Foundation:: HANDLE, threadorderingguid : *const windows_core::GUID, before : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - AvRtJoinThreadOrderingGroup(core::mem::transmute(context), core::mem::transmute(threadorderingguid), before.param().abi()).ok() + AvRtJoinThreadOrderingGroup(core::mem::transmute(context), core::mem::transmute(threadorderingguid), before.into()).ok() } #[inline] pub unsafe fn AvRtLeaveThreadOrderingGroup(context: super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -166,12 +160,9 @@ pub unsafe fn CloseThreadpoolCleanupGroup(ptpcg: PTP_CLEANUP_GROUP) { CloseThreadpoolCleanupGroup(core::mem::transmute(ptpcg)) } #[inline] -pub unsafe fn CloseThreadpoolCleanupGroupMembers(ptpcg: PTP_CLEANUP_GROUP, fcancelpendingcallbacks: P1, pvcleanupcontext: Option<*mut core::ffi::c_void>) -where - P1: windows_core::Param, -{ +pub unsafe fn CloseThreadpoolCleanupGroupMembers(ptpcg: PTP_CLEANUP_GROUP, fcancelpendingcallbacks: bool, pvcleanupcontext: Option<*mut core::ffi::c_void>) { windows_targets::link!("kernel32.dll" "system" fn CloseThreadpoolCleanupGroupMembers(ptpcg : PTP_CLEANUP_GROUP, fcancelpendingcallbacks : super::super::Foundation:: BOOL, pvcleanupcontext : *mut core::ffi::c_void)); - CloseThreadpoolCleanupGroupMembers(core::mem::transmute(ptpcg), fcancelpendingcallbacks.param().abi(), core::mem::transmute(pvcleanupcontext.unwrap_or(core::mem::zeroed()))) + CloseThreadpoolCleanupGroupMembers(core::mem::transmute(ptpcg), fcancelpendingcallbacks.into(), core::mem::transmute(pvcleanupcontext.unwrap_or(core::mem::zeroed()))) } #[inline] pub unsafe fn CloseThreadpoolIo(pio: PTP_IO) { @@ -227,14 +218,12 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateEventA(lpeventattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, bmanualreset: P1, binitialstate: P2, lpname: P3) -> windows_core::Result +pub unsafe fn CreateEventA(lpeventattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, bmanualreset: bool, binitialstate: bool, lpname: P3) -> windows_core::Result where - P1: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateEventA(lpeventattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, bmanualreset : super::super::Foundation:: BOOL, binitialstate : super::super::Foundation:: BOOL, lpname : windows_core::PCSTR) -> super::super::Foundation:: HANDLE); - let result__ = CreateEventA(core::mem::transmute(lpeventattributes.unwrap_or(core::mem::zeroed())), bmanualreset.param().abi(), binitialstate.param().abi(), lpname.param().abi()); + let result__ = CreateEventA(core::mem::transmute(lpeventattributes.unwrap_or(core::mem::zeroed())), bmanualreset.into(), binitialstate.into(), lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -259,14 +248,12 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateEventW(lpeventattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, bmanualreset: P1, binitialstate: P2, lpname: P3) -> windows_core::Result +pub unsafe fn CreateEventW(lpeventattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, bmanualreset: bool, binitialstate: bool, lpname: P3) -> windows_core::Result where - P1: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateEventW(lpeventattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, bmanualreset : super::super::Foundation:: BOOL, binitialstate : super::super::Foundation:: BOOL, lpname : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - let result__ = CreateEventW(core::mem::transmute(lpeventattributes.unwrap_or(core::mem::zeroed())), bmanualreset.param().abi(), binitialstate.param().abi(), lpname.param().abi()); + let result__ = CreateEventW(core::mem::transmute(lpeventattributes.unwrap_or(core::mem::zeroed())), bmanualreset.into(), binitialstate.into(), lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -281,13 +268,12 @@ pub unsafe fn CreateFiberEx(dwstackcommitsize: usize, dwstackreservesize: usize, } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateMutexA(lpmutexattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binitialowner: P1, lpname: P2) -> windows_core::Result +pub unsafe fn CreateMutexA(lpmutexattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binitialowner: bool, lpname: P2) -> windows_core::Result where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateMutexA(lpmutexattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, binitialowner : super::super::Foundation:: BOOL, lpname : windows_core::PCSTR) -> super::super::Foundation:: HANDLE); - let result__ = CreateMutexA(core::mem::transmute(lpmutexattributes.unwrap_or(core::mem::zeroed())), binitialowner.param().abi(), lpname.param().abi()); + let result__ = CreateMutexA(core::mem::transmute(lpmutexattributes.unwrap_or(core::mem::zeroed())), binitialowner.into(), lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -312,13 +298,12 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateMutexW(lpmutexattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binitialowner: P1, lpname: P2) -> windows_core::Result +pub unsafe fn CreateMutexW(lpmutexattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binitialowner: bool, lpname: P2) -> windows_core::Result where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateMutexW(lpmutexattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, binitialowner : super::super::Foundation:: BOOL, lpname : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - let result__ = CreateMutexW(core::mem::transmute(lpmutexattributes.unwrap_or(core::mem::zeroed())), binitialowner.param().abi(), lpname.param().abi()); + let result__ = CreateMutexW(core::mem::transmute(lpmutexattributes.unwrap_or(core::mem::zeroed())), binitialowner.into(), lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -342,10 +327,9 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateProcessA(lpapplicationname: P0, lpcommandline: Option, lpprocessattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: P4, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: Option<*const core::ffi::c_void>, lpcurrentdirectory: P7, lpstartupinfo: *const STARTUPINFOA, lpprocessinformation: *mut PROCESS_INFORMATION) -> windows_core::Result<()> +pub unsafe fn CreateProcessA(lpapplicationname: P0, lpcommandline: Option, lpprocessattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: bool, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: Option<*const core::ffi::c_void>, lpcurrentdirectory: P7, lpstartupinfo: *const STARTUPINFOA, lpprocessinformation: *mut PROCESS_INFORMATION) -> windows_core::Result<()> where P0: windows_core::Param, - P4: windows_core::Param, P7: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateProcessA(lpapplicationname : windows_core::PCSTR, lpcommandline : windows_core::PSTR, lpprocessattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, lpthreadattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, binherithandles : super::super::Foundation:: BOOL, dwcreationflags : PROCESS_CREATION_FLAGS, lpenvironment : *const core::ffi::c_void, lpcurrentdirectory : windows_core::PCSTR, lpstartupinfo : *const STARTUPINFOA, lpprocessinformation : *mut PROCESS_INFORMATION) -> super::super::Foundation:: BOOL); @@ -354,7 +338,7 @@ where core::mem::transmute(lpcommandline.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpprocessattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpthreadattributes.unwrap_or(core::mem::zeroed())), - binherithandles.param().abi(), + binherithandles.into(), core::mem::transmute(dwcreationflags), core::mem::transmute(lpenvironment.unwrap_or(core::mem::zeroed())), lpcurrentdirectory.param().abi(), @@ -365,10 +349,9 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateProcessAsUserA(htoken: Option, lpapplicationname: P1, lpcommandline: Option, lpprocessattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: P5, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: Option<*const core::ffi::c_void>, lpcurrentdirectory: P8, lpstartupinfo: *const STARTUPINFOA, lpprocessinformation: *mut PROCESS_INFORMATION) -> windows_core::Result<()> +pub unsafe fn CreateProcessAsUserA(htoken: Option, lpapplicationname: P1, lpcommandline: Option, lpprocessattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: bool, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: Option<*const core::ffi::c_void>, lpcurrentdirectory: P8, lpstartupinfo: *const STARTUPINFOA, lpprocessinformation: *mut PROCESS_INFORMATION) -> windows_core::Result<()> where P1: windows_core::Param, - P5: windows_core::Param, P8: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CreateProcessAsUserA(htoken : super::super::Foundation:: HANDLE, lpapplicationname : windows_core::PCSTR, lpcommandline : windows_core::PSTR, lpprocessattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, lpthreadattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, binherithandles : super::super::Foundation:: BOOL, dwcreationflags : PROCESS_CREATION_FLAGS, lpenvironment : *const core::ffi::c_void, lpcurrentdirectory : windows_core::PCSTR, lpstartupinfo : *const STARTUPINFOA, lpprocessinformation : *mut PROCESS_INFORMATION) -> super::super::Foundation:: BOOL); @@ -378,7 +361,7 @@ where core::mem::transmute(lpcommandline.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpprocessattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpthreadattributes.unwrap_or(core::mem::zeroed())), - binherithandles.param().abi(), + binherithandles.into(), core::mem::transmute(dwcreationflags), core::mem::transmute(lpenvironment.unwrap_or(core::mem::zeroed())), lpcurrentdirectory.param().abi(), @@ -389,10 +372,9 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateProcessAsUserW(htoken: Option, lpapplicationname: P1, lpcommandline: Option, lpprocessattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: P5, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: Option<*const core::ffi::c_void>, lpcurrentdirectory: P8, lpstartupinfo: *const STARTUPINFOW, lpprocessinformation: *mut PROCESS_INFORMATION) -> windows_core::Result<()> +pub unsafe fn CreateProcessAsUserW(htoken: Option, lpapplicationname: P1, lpcommandline: Option, lpprocessattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: bool, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: Option<*const core::ffi::c_void>, lpcurrentdirectory: P8, lpstartupinfo: *const STARTUPINFOW, lpprocessinformation: *mut PROCESS_INFORMATION) -> windows_core::Result<()> where P1: windows_core::Param, - P5: windows_core::Param, P8: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CreateProcessAsUserW(htoken : super::super::Foundation:: HANDLE, lpapplicationname : windows_core::PCWSTR, lpcommandline : windows_core::PWSTR, lpprocessattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, lpthreadattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, binherithandles : super::super::Foundation:: BOOL, dwcreationflags : PROCESS_CREATION_FLAGS, lpenvironment : *const core::ffi::c_void, lpcurrentdirectory : windows_core::PCWSTR, lpstartupinfo : *const STARTUPINFOW, lpprocessinformation : *mut PROCESS_INFORMATION) -> super::super::Foundation:: BOOL); @@ -402,7 +384,7 @@ where core::mem::transmute(lpcommandline.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpprocessattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpthreadattributes.unwrap_or(core::mem::zeroed())), - binherithandles.param().abi(), + binherithandles.into(), core::mem::transmute(dwcreationflags), core::mem::transmute(lpenvironment.unwrap_or(core::mem::zeroed())), lpcurrentdirectory.param().abi(), @@ -413,10 +395,9 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateProcessW(lpapplicationname: P0, lpcommandline: Option, lpprocessattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: P4, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: Option<*const core::ffi::c_void>, lpcurrentdirectory: P7, lpstartupinfo: *const STARTUPINFOW, lpprocessinformation: *mut PROCESS_INFORMATION) -> windows_core::Result<()> +pub unsafe fn CreateProcessW(lpapplicationname: P0, lpcommandline: Option, lpprocessattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: bool, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: Option<*const core::ffi::c_void>, lpcurrentdirectory: P7, lpstartupinfo: *const STARTUPINFOW, lpprocessinformation: *mut PROCESS_INFORMATION) -> windows_core::Result<()> where P0: windows_core::Param, - P4: windows_core::Param, P7: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateProcessW(lpapplicationname : windows_core::PCWSTR, lpcommandline : windows_core::PWSTR, lpprocessattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, lpthreadattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, binherithandles : super::super::Foundation:: BOOL, dwcreationflags : PROCESS_CREATION_FLAGS, lpenvironment : *const core::ffi::c_void, lpcurrentdirectory : windows_core::PCWSTR, lpstartupinfo : *const STARTUPINFOW, lpprocessinformation : *mut PROCESS_INFORMATION) -> super::super::Foundation:: BOOL); @@ -425,7 +406,7 @@ where core::mem::transmute(lpcommandline.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpprocessattributes.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpthreadattributes.unwrap_or(core::mem::zeroed())), - binherithandles.param().abi(), + binherithandles.into(), core::mem::transmute(dwcreationflags), core::mem::transmute(lpenvironment.unwrap_or(core::mem::zeroed())), lpcurrentdirectory.param().abi(), @@ -575,13 +556,12 @@ pub unsafe fn CreateUmsThreadContext(lpumsthread: *mut *mut core::ffi::c_void) - } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateWaitableTimerA(lptimerattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, bmanualreset: P1, lptimername: P2) -> super::super::Foundation::HANDLE +pub unsafe fn CreateWaitableTimerA(lptimerattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, bmanualreset: bool, lptimername: P2) -> super::super::Foundation::HANDLE where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateWaitableTimerA(lptimerattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, bmanualreset : super::super::Foundation:: BOOL, lptimername : windows_core::PCSTR) -> super::super::Foundation:: HANDLE); - CreateWaitableTimerA(core::mem::transmute(lptimerattributes.unwrap_or(core::mem::zeroed())), bmanualreset.param().abi(), lptimername.param().abi()) + CreateWaitableTimerA(core::mem::transmute(lptimerattributes.unwrap_or(core::mem::zeroed())), bmanualreset.into(), lptimername.param().abi()) } #[cfg(feature = "Win32_Security")] #[inline] @@ -604,13 +584,12 @@ where } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn CreateWaitableTimerW(lptimerattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, bmanualreset: P1, lptimername: P2) -> windows_core::Result +pub unsafe fn CreateWaitableTimerW(lptimerattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, bmanualreset: bool, lptimername: P2) -> windows_core::Result where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateWaitableTimerW(lptimerattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, bmanualreset : super::super::Foundation:: BOOL, lptimername : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - let result__ = CreateWaitableTimerW(core::mem::transmute(lptimerattributes.unwrap_or(core::mem::zeroed())), bmanualreset.param().abi(), lptimername.param().abi()); + let result__ = CreateWaitableTimerW(core::mem::transmute(lptimerattributes.unwrap_or(core::mem::zeroed())), bmanualreset.into(), lptimername.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1203,33 +1182,30 @@ pub unsafe fn LeaveCriticalSectionWhenCallbackReturns(pci: PTP_CALLBACK_INSTANCE LeaveCriticalSectionWhenCallbackReturns(core::mem::transmute(pci), core::mem::transmute(pcs)) } #[inline] -pub unsafe fn OpenEventA(dwdesiredaccess: SYNCHRONIZATION_ACCESS_RIGHTS, binherithandle: P1, lpname: P2) -> windows_core::Result +pub unsafe fn OpenEventA(dwdesiredaccess: SYNCHRONIZATION_ACCESS_RIGHTS, binherithandle: bool, lpname: P2) -> windows_core::Result where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn OpenEventA(dwdesiredaccess : SYNCHRONIZATION_ACCESS_RIGHTS, binherithandle : super::super::Foundation:: BOOL, lpname : windows_core::PCSTR) -> super::super::Foundation:: HANDLE); - let result__ = OpenEventA(core::mem::transmute(dwdesiredaccess), binherithandle.param().abi(), lpname.param().abi()); + let result__ = OpenEventA(core::mem::transmute(dwdesiredaccess), binherithandle.into(), lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn OpenEventW(dwdesiredaccess: SYNCHRONIZATION_ACCESS_RIGHTS, binherithandle: P1, lpname: P2) -> windows_core::Result +pub unsafe fn OpenEventW(dwdesiredaccess: SYNCHRONIZATION_ACCESS_RIGHTS, binherithandle: bool, lpname: P2) -> windows_core::Result where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn OpenEventW(dwdesiredaccess : SYNCHRONIZATION_ACCESS_RIGHTS, binherithandle : super::super::Foundation:: BOOL, lpname : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - let result__ = OpenEventW(core::mem::transmute(dwdesiredaccess), binherithandle.param().abi(), lpname.param().abi()); + let result__ = OpenEventW(core::mem::transmute(dwdesiredaccess), binherithandle.into(), lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn OpenMutexW(dwdesiredaccess: SYNCHRONIZATION_ACCESS_RIGHTS, binherithandle: P1, lpname: P2) -> windows_core::Result +pub unsafe fn OpenMutexW(dwdesiredaccess: SYNCHRONIZATION_ACCESS_RIGHTS, binherithandle: bool, lpname: P2) -> windows_core::Result where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn OpenMutexW(dwdesiredaccess : SYNCHRONIZATION_ACCESS_RIGHTS, binherithandle : super::super::Foundation:: BOOL, lpname : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - let result__ = OpenMutexW(core::mem::transmute(dwdesiredaccess), binherithandle.param().abi(), lpname.param().abi()); + let result__ = OpenMutexW(core::mem::transmute(dwdesiredaccess), binherithandle.into(), lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1249,12 +1225,9 @@ where OpenPrivateNamespaceW(core::mem::transmute(lpboundarydescriptor), lpaliasprefix.param().abi()) } #[inline] -pub unsafe fn OpenProcess(dwdesiredaccess: PROCESS_ACCESS_RIGHTS, binherithandle: P1, dwprocessid: u32) -> windows_core::Result -where - P1: windows_core::Param, -{ +pub unsafe fn OpenProcess(dwdesiredaccess: PROCESS_ACCESS_RIGHTS, binherithandle: bool, dwprocessid: u32) -> windows_core::Result { windows_targets::link!("kernel32.dll" "system" fn OpenProcess(dwdesiredaccess : PROCESS_ACCESS_RIGHTS, binherithandle : super::super::Foundation:: BOOL, dwprocessid : u32) -> super::super::Foundation:: HANDLE); - let result__ = OpenProcess(core::mem::transmute(dwdesiredaccess), binherithandle.param().abi(), core::mem::transmute(dwprocessid)); + let result__ = OpenProcess(core::mem::transmute(dwdesiredaccess), binherithandle.into(), core::mem::transmute(dwprocessid)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -1264,50 +1237,41 @@ pub unsafe fn OpenProcessToken(processhandle: super::super::Foundation::HANDLE, OpenProcessToken(core::mem::transmute(processhandle), core::mem::transmute(desiredaccess), core::mem::transmute(tokenhandle)).ok() } #[inline] -pub unsafe fn OpenSemaphoreW(dwdesiredaccess: SYNCHRONIZATION_ACCESS_RIGHTS, binherithandle: P1, lpname: P2) -> windows_core::Result +pub unsafe fn OpenSemaphoreW(dwdesiredaccess: SYNCHRONIZATION_ACCESS_RIGHTS, binherithandle: bool, lpname: P2) -> windows_core::Result where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn OpenSemaphoreW(dwdesiredaccess : SYNCHRONIZATION_ACCESS_RIGHTS, binherithandle : super::super::Foundation:: BOOL, lpname : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - let result__ = OpenSemaphoreW(core::mem::transmute(dwdesiredaccess), binherithandle.param().abi(), lpname.param().abi()); + let result__ = OpenSemaphoreW(core::mem::transmute(dwdesiredaccess), binherithandle.into(), lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn OpenThread(dwdesiredaccess: THREAD_ACCESS_RIGHTS, binherithandle: P1, dwthreadid: u32) -> windows_core::Result -where - P1: windows_core::Param, -{ +pub unsafe fn OpenThread(dwdesiredaccess: THREAD_ACCESS_RIGHTS, binherithandle: bool, dwthreadid: u32) -> windows_core::Result { windows_targets::link!("kernel32.dll" "system" fn OpenThread(dwdesiredaccess : THREAD_ACCESS_RIGHTS, binherithandle : super::super::Foundation:: BOOL, dwthreadid : u32) -> super::super::Foundation:: HANDLE); - let result__ = OpenThread(core::mem::transmute(dwdesiredaccess), binherithandle.param().abi(), core::mem::transmute(dwthreadid)); + let result__ = OpenThread(core::mem::transmute(dwdesiredaccess), binherithandle.into(), core::mem::transmute(dwthreadid)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] #[inline] -pub unsafe fn OpenThreadToken(threadhandle: super::super::Foundation::HANDLE, desiredaccess: super::super::Security::TOKEN_ACCESS_MASK, openasself: P2, tokenhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn OpenThreadToken(threadhandle: super::super::Foundation::HANDLE, desiredaccess: super::super::Security::TOKEN_ACCESS_MASK, openasself: bool, tokenhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { windows_targets::link!("advapi32.dll" "system" fn OpenThreadToken(threadhandle : super::super::Foundation:: HANDLE, desiredaccess : super::super::Security:: TOKEN_ACCESS_MASK, openasself : super::super::Foundation:: BOOL, tokenhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - OpenThreadToken(core::mem::transmute(threadhandle), core::mem::transmute(desiredaccess), openasself.param().abi(), core::mem::transmute(tokenhandle)).ok() + OpenThreadToken(core::mem::transmute(threadhandle), core::mem::transmute(desiredaccess), openasself.into(), core::mem::transmute(tokenhandle)).ok() } #[inline] -pub unsafe fn OpenWaitableTimerA(dwdesiredaccess: u32, binherithandle: P1, lptimername: P2) -> super::super::Foundation::HANDLE +pub unsafe fn OpenWaitableTimerA(dwdesiredaccess: u32, binherithandle: bool, lptimername: P2) -> super::super::Foundation::HANDLE where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn OpenWaitableTimerA(dwdesiredaccess : u32, binherithandle : super::super::Foundation:: BOOL, lptimername : windows_core::PCSTR) -> super::super::Foundation:: HANDLE); - OpenWaitableTimerA(core::mem::transmute(dwdesiredaccess), binherithandle.param().abi(), lptimername.param().abi()) + OpenWaitableTimerA(core::mem::transmute(dwdesiredaccess), binherithandle.into(), lptimername.param().abi()) } #[inline] -pub unsafe fn OpenWaitableTimerW(dwdesiredaccess: SYNCHRONIZATION_ACCESS_RIGHTS, binherithandle: P1, lptimername: P2) -> windows_core::Result +pub unsafe fn OpenWaitableTimerW(dwdesiredaccess: SYNCHRONIZATION_ACCESS_RIGHTS, binherithandle: bool, lptimername: P2) -> windows_core::Result where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn OpenWaitableTimerW(dwdesiredaccess : SYNCHRONIZATION_ACCESS_RIGHTS, binherithandle : super::super::Foundation:: BOOL, lptimername : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - let result__ = OpenWaitableTimerW(core::mem::transmute(dwdesiredaccess), binherithandle.param().abi(), lptimername.param().abi()); + let result__ = OpenWaitableTimerW(core::mem::transmute(dwdesiredaccess), binherithandle.into(), lptimername.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1587,12 +1551,9 @@ pub unsafe fn RtwqSetDeadline2(workqueueid: u32, deadlineinhns: i64, predeadline RtwqSetDeadline2(core::mem::transmute(workqueueid), core::mem::transmute(deadlineinhns), core::mem::transmute(predeadlineinhns), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn RtwqSetLongRunning(workqueueid: u32, enable: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn RtwqSetLongRunning(workqueueid: u32, enable: bool) -> windows_core::Result<()> { windows_targets::link!("rtworkq.dll" "system" fn RtwqSetLongRunning(workqueueid : u32, enable : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - RtwqSetLongRunning(core::mem::transmute(workqueueid), enable.param().abi()).ok() + RtwqSetLongRunning(core::mem::transmute(workqueueid), enable.into()).ok() } #[inline] pub unsafe fn RtwqShutdown() -> windows_core::Result<()> { @@ -1700,20 +1661,14 @@ pub unsafe fn SetProcessMitigationPolicy(mitigationpolicy: PROCESS_MITIGATION_PO SetProcessMitigationPolicy(core::mem::transmute(mitigationpolicy), core::mem::transmute(lpbuffer), core::mem::transmute(dwlength)).ok() } #[inline] -pub unsafe fn SetProcessPriorityBoost(hprocess: super::super::Foundation::HANDLE, bdisablepriorityboost: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn SetProcessPriorityBoost(hprocess: super::super::Foundation::HANDLE, bdisablepriorityboost: bool) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetProcessPriorityBoost(hprocess : super::super::Foundation:: HANDLE, bdisablepriorityboost : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetProcessPriorityBoost(core::mem::transmute(hprocess), bdisablepriorityboost.param().abi()).ok() + SetProcessPriorityBoost(core::mem::transmute(hprocess), bdisablepriorityboost.into()).ok() } #[inline] -pub unsafe fn SetProcessRestrictionExemption(fenableexemption: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn SetProcessRestrictionExemption(fenableexemption: bool) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetProcessRestrictionExemption(fenableexemption : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetProcessRestrictionExemption(fenableexemption.param().abi()).ok() + SetProcessRestrictionExemption(fenableexemption.into()).ok() } #[inline] pub unsafe fn SetProcessShutdownParameters(dwlevel: u32, dwflags: u32) -> windows_core::Result<()> { @@ -1771,12 +1726,9 @@ pub unsafe fn SetThreadPriority(hthread: super::super::Foundation::HANDLE, nprio SetThreadPriority(core::mem::transmute(hthread), core::mem::transmute(npriority)).ok() } #[inline] -pub unsafe fn SetThreadPriorityBoost(hthread: super::super::Foundation::HANDLE, bdisablepriorityboost: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn SetThreadPriorityBoost(hthread: super::super::Foundation::HANDLE, bdisablepriorityboost: bool) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetThreadPriorityBoost(hthread : super::super::Foundation:: HANDLE, bdisablepriorityboost : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetThreadPriorityBoost(core::mem::transmute(hthread), bdisablepriorityboost.param().abi()).ok() + SetThreadPriorityBoost(core::mem::transmute(hthread), bdisablepriorityboost.into()).ok() } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] @@ -1835,12 +1787,9 @@ pub unsafe fn SetThreadpoolWaitEx(pwa: PTP_WAIT, h: Option(timerqueue: Option, callback: WAITORTIMERCALLBACK, parameter: Option<*const core::ffi::c_void>, duetime: u32, period: u32, preferio: P5) -> super::super::Foundation::HANDLE -where - P5: windows_core::Param, -{ +pub unsafe fn SetTimerQueueTimer(timerqueue: Option, callback: WAITORTIMERCALLBACK, parameter: Option<*const core::ffi::c_void>, duetime: u32, period: u32, preferio: bool) -> super::super::Foundation::HANDLE { windows_targets::link!("kernel32.dll" "system" fn SetTimerQueueTimer(timerqueue : super::super::Foundation:: HANDLE, callback : WAITORTIMERCALLBACK, parameter : *const core::ffi::c_void, duetime : u32, period : u32, preferio : super::super::Foundation:: BOOL) -> super::super::Foundation:: HANDLE); - SetTimerQueueTimer(core::mem::transmute(timerqueue.unwrap_or(core::mem::zeroed())), core::mem::transmute(callback), core::mem::transmute(parameter.unwrap_or(core::mem::zeroed())), core::mem::transmute(duetime), core::mem::transmute(period), preferio.param().abi()) + SetTimerQueueTimer(core::mem::transmute(timerqueue.unwrap_or(core::mem::zeroed())), core::mem::transmute(callback), core::mem::transmute(parameter.unwrap_or(core::mem::zeroed())), core::mem::transmute(duetime), core::mem::transmute(period), preferio.into()) } #[inline] pub unsafe fn SetUmsThreadInformation(umsthread: *const core::ffi::c_void, umsthreadinfoclass: UMS_THREAD_INFO_CLASS, umsthreadinformation: *const core::ffi::c_void, umsthreadinformationlength: u32) -> windows_core::Result<()> { @@ -1848,12 +1797,9 @@ pub unsafe fn SetUmsThreadInformation(umsthread: *const core::ffi::c_void, umsth SetUmsThreadInformation(core::mem::transmute(umsthread), core::mem::transmute(umsthreadinfoclass), core::mem::transmute(umsthreadinformation), core::mem::transmute(umsthreadinformationlength)).ok() } #[inline] -pub unsafe fn SetWaitableTimer(htimer: super::super::Foundation::HANDLE, lpduetime: *const i64, lperiod: i32, pfncompletionroutine: Option, lpargtocompletionroutine: Option<*const core::ffi::c_void>, fresume: P5) -> windows_core::Result<()> -where - P5: windows_core::Param, -{ +pub unsafe fn SetWaitableTimer(htimer: super::super::Foundation::HANDLE, lpduetime: *const i64, lperiod: i32, pfncompletionroutine: Option, lpargtocompletionroutine: Option<*const core::ffi::c_void>, fresume: bool) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn SetWaitableTimer(htimer : super::super::Foundation:: HANDLE, lpduetime : *const i64, lperiod : i32, pfncompletionroutine : PTIMERAPCROUTINE, lpargtocompletionroutine : *const core::ffi::c_void, fresume : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetWaitableTimer(core::mem::transmute(htimer), core::mem::transmute(lpduetime), core::mem::transmute(lperiod), core::mem::transmute(pfncompletionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpargtocompletionroutine.unwrap_or(core::mem::zeroed())), fresume.param().abi()).ok() + SetWaitableTimer(core::mem::transmute(htimer), core::mem::transmute(lpduetime), core::mem::transmute(lperiod), core::mem::transmute(pfncompletionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpargtocompletionroutine.unwrap_or(core::mem::zeroed())), fresume.into()).ok() } #[inline] pub unsafe fn SetWaitableTimerEx(htimer: super::super::Foundation::HANDLE, lpduetime: *const i64, lperiod: i32, pfncompletionroutine: Option, lpargtocompletionroutine: Option<*const core::ffi::c_void>, wakecontext: Option<*const REASON_CONTEXT>, tolerabledelay: u32) -> windows_core::Result<()> { @@ -1861,12 +1807,9 @@ pub unsafe fn SetWaitableTimerEx(htimer: super::super::Foundation::HANDLE, lpdue SetWaitableTimerEx(core::mem::transmute(htimer), core::mem::transmute(lpduetime), core::mem::transmute(lperiod), core::mem::transmute(pfncompletionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpargtocompletionroutine.unwrap_or(core::mem::zeroed())), core::mem::transmute(wakecontext.unwrap_or(core::mem::zeroed())), core::mem::transmute(tolerabledelay)).ok() } #[inline] -pub unsafe fn SignalObjectAndWait(hobjecttosignal: super::super::Foundation::HANDLE, hobjecttowaiton: super::super::Foundation::HANDLE, dwmilliseconds: u32, balertable: P3) -> super::super::Foundation::WAIT_EVENT -where - P3: windows_core::Param, -{ +pub unsafe fn SignalObjectAndWait(hobjecttosignal: super::super::Foundation::HANDLE, hobjecttowaiton: super::super::Foundation::HANDLE, dwmilliseconds: u32, balertable: bool) -> super::super::Foundation::WAIT_EVENT { windows_targets::link!("kernel32.dll" "system" fn SignalObjectAndWait(hobjecttosignal : super::super::Foundation:: HANDLE, hobjecttowaiton : super::super::Foundation:: HANDLE, dwmilliseconds : u32, balertable : super::super::Foundation:: BOOL) -> super::super::Foundation:: WAIT_EVENT); - SignalObjectAndWait(core::mem::transmute(hobjecttosignal), core::mem::transmute(hobjecttowaiton), core::mem::transmute(dwmilliseconds), balertable.param().abi()) + SignalObjectAndWait(core::mem::transmute(hobjecttosignal), core::mem::transmute(hobjecttowaiton), core::mem::transmute(dwmilliseconds), balertable.into()) } #[inline] pub unsafe fn Sleep(dwmilliseconds: u32) { @@ -1885,12 +1828,9 @@ pub unsafe fn SleepConditionVariableSRW(conditionvariable: *mut CONDITION_VARIAB SleepConditionVariableSRW(core::mem::transmute(conditionvariable), core::mem::transmute(srwlock), core::mem::transmute(dwmilliseconds), core::mem::transmute(flags)).ok() } #[inline] -pub unsafe fn SleepEx(dwmilliseconds: u32, balertable: P1) -> u32 -where - P1: windows_core::Param, -{ +pub unsafe fn SleepEx(dwmilliseconds: u32, balertable: bool) -> u32 { windows_targets::link!("kernel32.dll" "system" fn SleepEx(dwmilliseconds : u32, balertable : super::super::Foundation:: BOOL) -> u32); - SleepEx(core::mem::transmute(dwmilliseconds), balertable.param().abi()) + SleepEx(core::mem::transmute(dwmilliseconds), balertable.into()) } #[inline] pub unsafe fn StartThreadpoolIo(pio: PTP_IO) { @@ -1994,21 +1934,14 @@ pub unsafe fn WaitForInputIdle(hprocess: super::super::Foundation::HANDLE, dwmil WaitForInputIdle(core::mem::transmute(hprocess), core::mem::transmute(dwmilliseconds)) } #[inline] -pub unsafe fn WaitForMultipleObjects(lphandles: &[super::super::Foundation::HANDLE], bwaitall: P2, dwmilliseconds: u32) -> super::super::Foundation::WAIT_EVENT -where - P2: windows_core::Param, -{ +pub unsafe fn WaitForMultipleObjects(lphandles: &[super::super::Foundation::HANDLE], bwaitall: bool, dwmilliseconds: u32) -> super::super::Foundation::WAIT_EVENT { windows_targets::link!("kernel32.dll" "system" fn WaitForMultipleObjects(ncount : u32, lphandles : *const super::super::Foundation:: HANDLE, bwaitall : super::super::Foundation:: BOOL, dwmilliseconds : u32) -> super::super::Foundation:: WAIT_EVENT); - WaitForMultipleObjects(lphandles.len().try_into().unwrap(), core::mem::transmute(lphandles.as_ptr()), bwaitall.param().abi(), core::mem::transmute(dwmilliseconds)) + WaitForMultipleObjects(lphandles.len().try_into().unwrap(), core::mem::transmute(lphandles.as_ptr()), bwaitall.into(), core::mem::transmute(dwmilliseconds)) } #[inline] -pub unsafe fn WaitForMultipleObjectsEx(lphandles: &[super::super::Foundation::HANDLE], bwaitall: P2, dwmilliseconds: u32, balertable: P4) -> super::super::Foundation::WAIT_EVENT -where - P2: windows_core::Param, - P4: windows_core::Param, -{ +pub unsafe fn WaitForMultipleObjectsEx(lphandles: &[super::super::Foundation::HANDLE], bwaitall: bool, dwmilliseconds: u32, balertable: bool) -> super::super::Foundation::WAIT_EVENT { windows_targets::link!("kernel32.dll" "system" fn WaitForMultipleObjectsEx(ncount : u32, lphandles : *const super::super::Foundation:: HANDLE, bwaitall : super::super::Foundation:: BOOL, dwmilliseconds : u32, balertable : super::super::Foundation:: BOOL) -> super::super::Foundation:: WAIT_EVENT); - WaitForMultipleObjectsEx(lphandles.len().try_into().unwrap(), core::mem::transmute(lphandles.as_ptr()), bwaitall.param().abi(), core::mem::transmute(dwmilliseconds), balertable.param().abi()) + WaitForMultipleObjectsEx(lphandles.len().try_into().unwrap(), core::mem::transmute(lphandles.as_ptr()), bwaitall.into(), core::mem::transmute(dwmilliseconds), balertable.into()) } #[inline] pub unsafe fn WaitForSingleObject(hhandle: super::super::Foundation::HANDLE, dwmilliseconds: u32) -> super::super::Foundation::WAIT_EVENT { @@ -2016,44 +1949,29 @@ pub unsafe fn WaitForSingleObject(hhandle: super::super::Foundation::HANDLE, dwm WaitForSingleObject(core::mem::transmute(hhandle), core::mem::transmute(dwmilliseconds)) } #[inline] -pub unsafe fn WaitForSingleObjectEx(hhandle: super::super::Foundation::HANDLE, dwmilliseconds: u32, balertable: P2) -> super::super::Foundation::WAIT_EVENT -where - P2: windows_core::Param, -{ +pub unsafe fn WaitForSingleObjectEx(hhandle: super::super::Foundation::HANDLE, dwmilliseconds: u32, balertable: bool) -> super::super::Foundation::WAIT_EVENT { windows_targets::link!("kernel32.dll" "system" fn WaitForSingleObjectEx(hhandle : super::super::Foundation:: HANDLE, dwmilliseconds : u32, balertable : super::super::Foundation:: BOOL) -> super::super::Foundation:: WAIT_EVENT); - WaitForSingleObjectEx(core::mem::transmute(hhandle), core::mem::transmute(dwmilliseconds), balertable.param().abi()) + WaitForSingleObjectEx(core::mem::transmute(hhandle), core::mem::transmute(dwmilliseconds), balertable.into()) } #[inline] -pub unsafe fn WaitForThreadpoolIoCallbacks(pio: PTP_IO, fcancelpendingcallbacks: P1) -where - P1: windows_core::Param, -{ +pub unsafe fn WaitForThreadpoolIoCallbacks(pio: PTP_IO, fcancelpendingcallbacks: bool) { windows_targets::link!("kernel32.dll" "system" fn WaitForThreadpoolIoCallbacks(pio : PTP_IO, fcancelpendingcallbacks : super::super::Foundation:: BOOL)); - WaitForThreadpoolIoCallbacks(core::mem::transmute(pio), fcancelpendingcallbacks.param().abi()) + WaitForThreadpoolIoCallbacks(core::mem::transmute(pio), fcancelpendingcallbacks.into()) } #[inline] -pub unsafe fn WaitForThreadpoolTimerCallbacks(pti: PTP_TIMER, fcancelpendingcallbacks: P1) -where - P1: windows_core::Param, -{ +pub unsafe fn WaitForThreadpoolTimerCallbacks(pti: PTP_TIMER, fcancelpendingcallbacks: bool) { windows_targets::link!("kernel32.dll" "system" fn WaitForThreadpoolTimerCallbacks(pti : PTP_TIMER, fcancelpendingcallbacks : super::super::Foundation:: BOOL)); - WaitForThreadpoolTimerCallbacks(core::mem::transmute(pti), fcancelpendingcallbacks.param().abi()) + WaitForThreadpoolTimerCallbacks(core::mem::transmute(pti), fcancelpendingcallbacks.into()) } #[inline] -pub unsafe fn WaitForThreadpoolWaitCallbacks(pwa: PTP_WAIT, fcancelpendingcallbacks: P1) -where - P1: windows_core::Param, -{ +pub unsafe fn WaitForThreadpoolWaitCallbacks(pwa: PTP_WAIT, fcancelpendingcallbacks: bool) { windows_targets::link!("kernel32.dll" "system" fn WaitForThreadpoolWaitCallbacks(pwa : PTP_WAIT, fcancelpendingcallbacks : super::super::Foundation:: BOOL)); - WaitForThreadpoolWaitCallbacks(core::mem::transmute(pwa), fcancelpendingcallbacks.param().abi()) + WaitForThreadpoolWaitCallbacks(core::mem::transmute(pwa), fcancelpendingcallbacks.into()) } #[inline] -pub unsafe fn WaitForThreadpoolWorkCallbacks(pwk: PTP_WORK, fcancelpendingcallbacks: P1) -where - P1: windows_core::Param, -{ +pub unsafe fn WaitForThreadpoolWorkCallbacks(pwk: PTP_WORK, fcancelpendingcallbacks: bool) { windows_targets::link!("kernel32.dll" "system" fn WaitForThreadpoolWorkCallbacks(pwk : PTP_WORK, fcancelpendingcallbacks : super::super::Foundation:: BOOL)); - WaitForThreadpoolWorkCallbacks(core::mem::transmute(pwk), fcancelpendingcallbacks.param().abi()) + WaitForThreadpoolWorkCallbacks(core::mem::transmute(pwk), fcancelpendingcallbacks.into()) } #[inline] pub unsafe fn WaitOnAddress(address: *const core::ffi::c_void, compareaddress: *const core::ffi::c_void, addresssize: usize, dwmilliseconds: Option) -> windows_core::Result<()> { @@ -2467,9 +2385,6 @@ pub type LPFIBER_START_ROUTINE = Option bool { self.0.is_null() @@ -3007,9 +2922,6 @@ pub type PTIMERAPCROUTINE = Option bool { self.0 == 0 @@ -3018,9 +2930,6 @@ impl PTP_CALLBACK_INSTANCE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PTP_CLEANUP_GROUP(pub isize); -impl windows_core::TypeKind for PTP_CLEANUP_GROUP { - type TypeKind = windows_core::CopyType; -} impl PTP_CLEANUP_GROUP { pub fn is_invalid(&self) -> bool { self.0 == 0 @@ -3039,9 +2948,6 @@ pub type PTP_CLEANUP_GROUP_CANCEL_CALLBACK = Option bool { self.0 == 0 @@ -3059,9 +2965,6 @@ impl windows_core::Free for PTP_IO { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PTP_POOL(pub isize); -impl windows_core::TypeKind for PTP_POOL { - type TypeKind = windows_core::CopyType; -} impl PTP_POOL { pub fn is_invalid(&self) -> bool { self.0 == 0 @@ -3080,9 +2983,6 @@ pub type PTP_SIMPLE_CALLBACK = Option bool { self.0 == 0 @@ -3101,9 +3001,6 @@ pub type PTP_TIMER_CALLBACK = Option bool { self.0 == 0 @@ -3123,9 +3020,6 @@ pub type PTP_WIN32_IO_CALLBACK = Option bool { self.0 == 0 diff --git a/crates/libs/windows/src/Windows/Win32/System/Variant/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Variant/mod.rs index 8a9ef03c90..7ebe3273e6 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Variant/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Variant/mod.rs @@ -311,12 +311,9 @@ pub unsafe fn VariantToBooleanArrayAlloc(var: *const VARIANT, pprgf: *mut *mut s } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] -pub unsafe fn VariantToBooleanWithDefault(varin: *const VARIANT, fdefault: P1) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn VariantToBooleanWithDefault(varin: *const VARIANT, fdefault: bool) -> super::super::Foundation::BOOL { windows_targets::link!("propsys.dll" "system" fn VariantToBooleanWithDefault(varin : *const VARIANT, fdefault : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - VariantToBooleanWithDefault(core::mem::transmute(varin), fdefault.param().abi()) + VariantToBooleanWithDefault(core::mem::transmute(varin), fdefault.into()) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Composition/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Composition/mod.rs index 148ba2fc29..7060196108 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Composition/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Composition/mod.rs @@ -248,12 +248,9 @@ windows_core::imp::define_interface!(ICompositorDesktopInterop, ICompositorDeskt windows_core::imp::interface_hierarchy!(ICompositorDesktopInterop, windows_core::IUnknown); impl ICompositorDesktopInterop { #[cfg(feature = "UI_Composition_Desktop")] - pub unsafe fn CreateDesktopWindowTarget(&self, hwndtarget: super::super::super::Foundation::HWND, istopmost: P1) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn CreateDesktopWindowTarget(&self, hwndtarget: super::super::super::Foundation::HWND, istopmost: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateDesktopWindowTarget)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndtarget), istopmost.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateDesktopWindowTarget)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndtarget), istopmost.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn EnsureOnThread(&self, threadid: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EnsureOnThread)(windows_core::Interface::as_raw(self), core::mem::transmute(threadid)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Imaging/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Imaging/mod.rs index f204f2e275..b1d517fe39 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Imaging/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Imaging/mod.rs @@ -35,24 +35,22 @@ windows_core::imp::define_interface!(ISoftwareBitmapNativeFactory, ISoftwareBitm windows_core::imp::interface_hierarchy!(ISoftwareBitmapNativeFactory, windows_core::IUnknown, windows_core::IInspectable); impl ISoftwareBitmapNativeFactory { #[cfg(feature = "Win32_Graphics_Imaging")] - pub unsafe fn CreateFromWICBitmap(&self, data: P0, forcereadonly: P1) -> windows_core::Result + pub unsafe fn CreateFromWICBitmap(&self, data: P0, forcereadonly: bool) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).CreateFromWICBitmap)(windows_core::Interface::as_raw(self), data.param().abi(), forcereadonly.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateFromWICBitmap)(windows_core::Interface::as_raw(self), data.param().abi(), forcereadonly.into(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_Media_MediaFoundation")] - pub unsafe fn CreateFromMF2DBuffer2(&self, data: P0, subtype: *const windows_core::GUID, width: u32, height: u32, forcereadonly: P4, mindisplayaperture: Option<*const super::super::super::super::Media::MediaFoundation::MFVideoArea>) -> windows_core::Result + pub unsafe fn CreateFromMF2DBuffer2(&self, data: P0, subtype: *const windows_core::GUID, width: u32, height: u32, forcereadonly: bool, mindisplayaperture: Option<*const super::super::super::super::Media::MediaFoundation::MFVideoArea>) -> windows_core::Result where P0: windows_core::Param, - P4: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).CreateFromMF2DBuffer2)(windows_core::Interface::as_raw(self), data.param().abi(), core::mem::transmute(subtype), core::mem::transmute(width), core::mem::transmute(height), forcereadonly.param().abi(), core::mem::transmute(mindisplayaperture.unwrap_or(core::mem::zeroed())), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateFromMF2DBuffer2)(windows_core::Interface::as_raw(self), data.param().abi(), core::mem::transmute(subtype), core::mem::transmute(width), core::mem::transmute(height), forcereadonly.into(), core::mem::transmute(mindisplayaperture.unwrap_or(core::mem::zeroed())), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Media/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Media/mod.rs index 57994ff9a6..d81a8737cc 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Media/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Media/mod.rs @@ -36,14 +36,13 @@ windows_core::imp::define_interface!(IAudioFrameNativeFactory, IAudioFrameNative windows_core::imp::interface_hierarchy!(IAudioFrameNativeFactory, windows_core::IUnknown, windows_core::IInspectable); impl IAudioFrameNativeFactory { #[cfg(feature = "Win32_Media_MediaFoundation")] - pub unsafe fn CreateFromMFSample(&self, data: P0, forcereadonly: P1) -> windows_core::Result + pub unsafe fn CreateFromMFSample(&self, data: P0, forcereadonly: bool) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).CreateFromMFSample)(windows_core::Interface::as_raw(self), data.param().abi(), forcereadonly.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateFromMFSample)(windows_core::Interface::as_raw(self), data.param().abi(), forcereadonly.into(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -129,15 +128,14 @@ windows_core::imp::define_interface!(IVideoFrameNativeFactory, IVideoFrameNative windows_core::imp::interface_hierarchy!(IVideoFrameNativeFactory, windows_core::IUnknown, windows_core::IInspectable); impl IVideoFrameNativeFactory { #[cfg(feature = "Win32_Media_MediaFoundation")] - pub unsafe fn CreateFromMFSample(&self, data: P0, subtype: *const windows_core::GUID, width: u32, height: u32, forcereadonly: P4, mindisplayaperture: Option<*const super::super::super::Media::MediaFoundation::MFVideoArea>, device: P6) -> windows_core::Result + pub unsafe fn CreateFromMFSample(&self, data: P0, subtype: *const windows_core::GUID, width: u32, height: u32, forcereadonly: bool, mindisplayaperture: Option<*const super::super::super::Media::MediaFoundation::MFVideoArea>, device: P6) -> windows_core::Result where P0: windows_core::Param, - P4: windows_core::Param, P6: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).CreateFromMFSample)(windows_core::Interface::as_raw(self), data.param().abi(), core::mem::transmute(subtype), core::mem::transmute(width), core::mem::transmute(height), forcereadonly.param().abi(), core::mem::transmute(mindisplayaperture.unwrap_or(core::mem::zeroed())), device.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateFromMFSample)(windows_core::Interface::as_raw(self), data.param().abi(), core::mem::transmute(subtype), core::mem::transmute(width), core::mem::transmute(height), forcereadonly.into(), core::mem::transmute(mindisplayaperture.unwrap_or(core::mem::zeroed())), device.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] 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 991586b709..8cef0c7b67 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 @@ -3942,9 +3942,6 @@ impl Default for OSINFO { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct ROPARAMIIDHANDLE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for ROPARAMIIDHANDLE { - type TypeKind = windows_core::CopyType; -} impl ROPARAMIIDHANDLE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/mod.rs index ec91f05005..62bdccfe93 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/mod.rs @@ -451,9 +451,6 @@ pub const AGILEREFERENCE_DELAYEDMARSHAL: AgileReferenceOptions = AgileReferenceO #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct APARTMENT_SHUTDOWN_REGISTRATION_COOKIE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for APARTMENT_SHUTDOWN_REGISTRATION_COOKIE { - type TypeKind = windows_core::CopyType; -} impl APARTMENT_SHUTDOWN_REGISTRATION_COOKIE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -531,9 +528,6 @@ pub const FullTrust: TrustLevel = TrustLevel(2i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HSTRING_BUFFER(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HSTRING_BUFFER { - type TypeKind = windows_core::CopyType; -} impl HSTRING_BUFFER { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2331,9 +2325,6 @@ pub struct RO_INIT_TYPE(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct RO_REGISTRATION_COOKIE(pub isize); -impl windows_core::TypeKind for RO_REGISTRATION_COOKIE { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct ServerInformation { diff --git a/crates/libs/windows/src/Windows/Win32/System/WindowsProgramming/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WindowsProgramming/mod.rs index 9df5373a61..e948b21351 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WindowsProgramming/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WindowsProgramming/mod.rs @@ -41,12 +41,9 @@ where AdvInstallFileW(core::mem::transmute(hwnd), lpszsourcedir.param().abi(), lpszsourcefile.param().abi(), lpszdestdir.param().abi(), lpszdestfile.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwreserved)).ok() } #[inline] -pub unsafe fn ApphelpCheckShellObject(objectclsid: *const windows_core::GUID, bshimifnecessary: P1, pullflags: *mut u64) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn ApphelpCheckShellObject(objectclsid: *const windows_core::GUID, bshimifnecessary: bool, pullflags: *mut u64) -> super::super::Foundation::BOOL { windows_targets::link!("apphelp.dll" "system" fn ApphelpCheckShellObject(objectclsid : *const windows_core::GUID, bshimifnecessary : super::super::Foundation:: BOOL, pullflags : *mut u64) -> super::super::Foundation:: BOOL); - ApphelpCheckShellObject(core::mem::transmute(objectclsid), bshimifnecessary.param().abi(), core::mem::transmute(pullflags)) + ApphelpCheckShellObject(core::mem::transmute(objectclsid), bshimifnecessary.into(), core::mem::transmute(pullflags)) } #[inline] pub unsafe fn CancelDeviceWakeupRequest(hdevice: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { @@ -527,40 +524,36 @@ pub unsafe fn GetUserNameW(lpbuffer: Option, pcbbuffer: *mu GetUserNameW(core::mem::transmute(lpbuffer.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbbuffer)).ok() } #[inline] -pub unsafe fn GetVersionFromFileA(lpszfilename: P0, pdwmsver: *mut u32, pdwlsver: *mut u32, bversion: P3) -> windows_core::Result<()> +pub unsafe fn GetVersionFromFileA(lpszfilename: P0, pdwmsver: *mut u32, pdwlsver: *mut u32, bversion: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn GetVersionFromFileA(lpszfilename : windows_core::PCSTR, pdwmsver : *mut u32, pdwlsver : *mut u32, bversion : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - GetVersionFromFileA(lpszfilename.param().abi(), core::mem::transmute(pdwmsver), core::mem::transmute(pdwlsver), bversion.param().abi()).ok() + GetVersionFromFileA(lpszfilename.param().abi(), core::mem::transmute(pdwmsver), core::mem::transmute(pdwlsver), bversion.into()).ok() } #[inline] -pub unsafe fn GetVersionFromFileExA(lpszfilename: P0, pdwmsver: *mut u32, pdwlsver: *mut u32, bversion: P3) -> windows_core::Result<()> +pub unsafe fn GetVersionFromFileExA(lpszfilename: P0, pdwmsver: *mut u32, pdwlsver: *mut u32, bversion: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn GetVersionFromFileExA(lpszfilename : windows_core::PCSTR, pdwmsver : *mut u32, pdwlsver : *mut u32, bversion : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - GetVersionFromFileExA(lpszfilename.param().abi(), core::mem::transmute(pdwmsver), core::mem::transmute(pdwlsver), bversion.param().abi()).ok() + GetVersionFromFileExA(lpszfilename.param().abi(), core::mem::transmute(pdwmsver), core::mem::transmute(pdwlsver), bversion.into()).ok() } #[inline] -pub unsafe fn GetVersionFromFileExW(lpszfilename: P0, pdwmsver: *mut u32, pdwlsver: *mut u32, bversion: P3) -> windows_core::Result<()> +pub unsafe fn GetVersionFromFileExW(lpszfilename: P0, pdwmsver: *mut u32, pdwlsver: *mut u32, bversion: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn GetVersionFromFileExW(lpszfilename : windows_core::PCWSTR, pdwmsver : *mut u32, pdwlsver : *mut u32, bversion : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - GetVersionFromFileExW(lpszfilename.param().abi(), core::mem::transmute(pdwmsver), core::mem::transmute(pdwlsver), bversion.param().abi()).ok() + GetVersionFromFileExW(lpszfilename.param().abi(), core::mem::transmute(pdwmsver), core::mem::transmute(pdwlsver), bversion.into()).ok() } #[inline] -pub unsafe fn GetVersionFromFileW(lpszfilename: P0, pdwmsver: *mut u32, pdwlsver: *mut u32, bversion: P3) -> windows_core::Result<()> +pub unsafe fn GetVersionFromFileW(lpszfilename: P0, pdwmsver: *mut u32, pdwlsver: *mut u32, bversion: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn GetVersionFromFileW(lpszfilename : windows_core::PCWSTR, pdwmsver : *mut u32, pdwlsver : *mut u32, bversion : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - GetVersionFromFileW(lpszfilename.param().abi(), core::mem::transmute(pdwmsver), core::mem::transmute(pdwlsver), bversion.param().abi()).ok() + GetVersionFromFileW(lpszfilename.param().abi(), core::mem::transmute(pdwmsver), core::mem::transmute(pdwlsver), bversion.into()).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -713,22 +706,20 @@ where OpenINFEngineW(pszinffilename.param().abi(), pszinstallsection.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(phinf), core::mem::transmute(pvreserved)).ok() } #[inline] -pub unsafe fn OpenMutexA(dwdesiredaccess: u32, binherithandle: P1, lpname: P2) -> super::super::Foundation::HANDLE +pub unsafe fn OpenMutexA(dwdesiredaccess: u32, binherithandle: bool, lpname: P2) -> super::super::Foundation::HANDLE where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn OpenMutexA(dwdesiredaccess : u32, binherithandle : super::super::Foundation:: BOOL, lpname : windows_core::PCSTR) -> super::super::Foundation:: HANDLE); - OpenMutexA(core::mem::transmute(dwdesiredaccess), binherithandle.param().abi(), lpname.param().abi()) + OpenMutexA(core::mem::transmute(dwdesiredaccess), binherithandle.into(), lpname.param().abi()) } #[inline] -pub unsafe fn OpenSemaphoreA(dwdesiredaccess: u32, binherithandle: P1, lpname: P2) -> super::super::Foundation::HANDLE +pub unsafe fn OpenSemaphoreA(dwdesiredaccess: u32, binherithandle: bool, lpname: P2) -> super::super::Foundation::HANDLE where - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn OpenSemaphoreA(dwdesiredaccess : u32, binherithandle : super::super::Foundation:: BOOL, lpname : windows_core::PCSTR) -> super::super::Foundation:: HANDLE); - OpenSemaphoreA(core::mem::transmute(dwdesiredaccess), binherithandle.param().abi(), lpname.param().abi()) + OpenSemaphoreA(core::mem::transmute(dwdesiredaccess), binherithandle.into(), lpname.param().abi()) } #[inline] pub unsafe fn QueryAuxiliaryCounterFrequency() -> windows_core::Result { @@ -914,12 +905,9 @@ pub unsafe fn RequestDeviceWakeup(hdevice: super::super::Foundation::HANDLE) -> } #[cfg(feature = "Win32_System_Kernel")] #[inline] -pub unsafe fn RtlAnsiStringToUnicodeString(destinationstring: *mut super::super::Foundation::UNICODE_STRING, sourcestring: *mut super::Kernel::STRING, allocatedestinationstring: P2) -> super::super::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn RtlAnsiStringToUnicodeString(destinationstring: *mut super::super::Foundation::UNICODE_STRING, sourcestring: *mut super::Kernel::STRING, allocatedestinationstring: bool) -> super::super::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlAnsiStringToUnicodeString(destinationstring : *mut super::super::Foundation:: UNICODE_STRING, sourcestring : *mut super::Kernel:: STRING, allocatedestinationstring : super::super::Foundation:: BOOLEAN) -> super::super::Foundation:: NTSTATUS); - RtlAnsiStringToUnicodeString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.param().abi()) + RtlAnsiStringToUnicodeString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.into()) } #[inline] pub unsafe fn RtlCharToInteger(string: *mut i8, base: u32, value: *mut u32) -> super::super::Foundation::NTSTATUS { @@ -1003,21 +991,15 @@ pub unsafe fn RtlTimeToSecondsSince1970(time: *mut i64, elapsedseconds: *mut u32 } #[cfg(feature = "Win32_System_Kernel")] #[inline] -pub unsafe fn RtlUnicodeStringToAnsiString(destinationstring: *mut super::Kernel::STRING, sourcestring: *mut super::super::Foundation::UNICODE_STRING, allocatedestinationstring: P2) -> super::super::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn RtlUnicodeStringToAnsiString(destinationstring: *mut super::Kernel::STRING, sourcestring: *mut super::super::Foundation::UNICODE_STRING, allocatedestinationstring: bool) -> super::super::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUnicodeStringToAnsiString(destinationstring : *mut super::Kernel:: STRING, sourcestring : *mut super::super::Foundation:: UNICODE_STRING, allocatedestinationstring : super::super::Foundation:: BOOLEAN) -> super::super::Foundation:: NTSTATUS); - RtlUnicodeStringToAnsiString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.param().abi()) + RtlUnicodeStringToAnsiString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.into()) } #[cfg(feature = "Win32_System_Kernel")] #[inline] -pub unsafe fn RtlUnicodeStringToOemString(destinationstring: *mut super::Kernel::STRING, sourcestring: *mut super::super::Foundation::UNICODE_STRING, allocatedestinationstring: P2) -> super::super::Foundation::NTSTATUS -where - P2: windows_core::Param, -{ +pub unsafe fn RtlUnicodeStringToOemString(destinationstring: *mut super::Kernel::STRING, sourcestring: *mut super::super::Foundation::UNICODE_STRING, allocatedestinationstring: bool) -> super::super::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUnicodeStringToOemString(destinationstring : *mut super::Kernel:: STRING, sourcestring : *mut super::super::Foundation:: UNICODE_STRING, allocatedestinationstring : super::super::Foundation:: BOOLEAN) -> super::super::Foundation:: NTSTATUS); - RtlUnicodeStringToOemString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.param().abi()) + RtlUnicodeStringToOemString(core::mem::transmute(destinationstring), core::mem::transmute(sourcestring), allocatedestinationstring.into()) } #[inline] pub unsafe fn RtlUnicodeToMultiByteSize(bytesinmultibytestring: *mut u32, unicodestring: P1, bytesinunicodestring: u32) -> super::super::Foundation::NTSTATUS @@ -1213,12 +1195,9 @@ where UserUnInstStubWrapperW(core::mem::transmute(hwnd), core::mem::transmute(hinstance), pszparms.param().abi(), core::mem::transmute(nshow)).ok() } #[inline] -pub unsafe fn WINNLSEnableIME(param0: super::super::Foundation::HWND, param1: P1) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn WINNLSEnableIME(param0: super::super::Foundation::HWND, param1: bool) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn WINNLSEnableIME(param0 : super::super::Foundation:: HWND, param1 : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WINNLSEnableIME(core::mem::transmute(param0), param1.param().abi()) + WINNLSEnableIME(core::mem::transmute(param0), param1.into()) } #[inline] pub unsafe fn WINNLSGetEnableStatus(param0: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { @@ -2102,9 +2081,6 @@ impl Default for FEATURE_ERROR { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct FEATURE_STATE_CHANGE_SUBSCRIPTION(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for FEATURE_STATE_CHANGE_SUBSCRIPTION { - type TypeKind = windows_core::CopyType; -} impl FEATURE_STATE_CHANGE_SUBSCRIPTION { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2196,9 +2172,6 @@ pub const HINSTANCE_ERROR: u32 = 32u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HWINWATCH(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HWINWATCH { - type TypeKind = windows_core::CopyType; -} impl HWINWATCH { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -2237,13 +2210,12 @@ impl Default for HW_PROFILE_INFOW { windows_core::imp::define_interface!(ICameraUIControl, ICameraUIControl_Vtbl, 0xb8733adf_3d68_4b8f_bb08_e28a0bed0376); windows_core::imp::interface_hierarchy!(ICameraUIControl, windows_core::IUnknown); impl ICameraUIControl { - pub unsafe fn Show(&self, pwindow: P0, mode: CameraUIControlMode, selectionmode: CameraUIControlLinearSelectionMode, capturemode: CameraUIControlCaptureMode, photoformat: CameraUIControlPhotoFormat, videoformat: CameraUIControlVideoFormat, bhasclosebutton: P6, peventcallback: P7) -> windows_core::Result<()> + pub unsafe fn Show(&self, pwindow: P0, mode: CameraUIControlMode, selectionmode: CameraUIControlLinearSelectionMode, capturemode: CameraUIControlCaptureMode, photoformat: CameraUIControlPhotoFormat, videoformat: CameraUIControlVideoFormat, bhasclosebutton: bool, peventcallback: P7) -> windows_core::Result<()> where P0: windows_core::Param, - P6: windows_core::Param, P7: windows_core::Param, { - (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), pwindow.param().abi(), core::mem::transmute(mode), core::mem::transmute(selectionmode), core::mem::transmute(capturemode), core::mem::transmute(photoformat), core::mem::transmute(videoformat), bhasclosebutton.param().abi(), peventcallback.param().abi()).ok() + (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), pwindow.param().abi(), core::mem::transmute(mode), core::mem::transmute(selectionmode), core::mem::transmute(capturemode), core::mem::transmute(photoformat), core::mem::transmute(videoformat), bhasclosebutton.into(), peventcallback.param().abi()).ok() } pub unsafe fn Close(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/System/WindowsSync/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WindowsSync/mod.rs index 13f93c3427..a717bf50cf 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WindowsSync/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WindowsSync/mod.rs @@ -2876,12 +2876,11 @@ impl ISyncChangeBatch { pub unsafe fn BeginUnorderedGroup(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).BeginUnorderedGroup)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn EndUnorderedGroup(&self, pmadewithknowledge: P0, fallchangesforknowledge: P1) -> windows_core::Result<()> + pub unsafe fn EndUnorderedGroup(&self, pmadewithknowledge: P0, fallchangesforknowledge: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).EndUnorderedGroup)(windows_core::Interface::as_raw(self), pmadewithknowledge.param().abi(), fallchangesforknowledge.param().abi()).ok() + (windows_core::Interface::vtable(self).EndUnorderedGroup)(windows_core::Interface::as_raw(self), pmadewithknowledge.param().abi(), fallchangesforknowledge.into()).ok() } pub unsafe fn AddLoggedConflict(&self, pbownerreplicaid: *const u8, pbitemid: *const u8, pchangeversion: *const SYNC_VERSION, pcreationversion: *const SYNC_VERSION, dwflags: u32, dwworkforchange: u32, pconflictknowledge: P6) -> windows_core::Result where @@ -4316,11 +4315,8 @@ impl ISyncKnowledge { pub unsafe fn GetOwnerReplicaId(&self, pbreplicaid: *mut u8, pcbidsize: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetOwnerReplicaId)(windows_core::Interface::as_raw(self), core::mem::transmute(pbreplicaid), core::mem::transmute(pcbidsize)).ok() } - pub unsafe fn Serialize(&self, fserializereplicakeymap: P0, pbknowledge: *mut u8, pcbknowledge: *mut u32) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), fserializereplicakeymap.param().abi(), core::mem::transmute(pbknowledge), core::mem::transmute(pcbknowledge)).ok() + pub unsafe fn Serialize(&self, fserializereplicakeymap: bool, pbknowledge: *mut u8, pcbknowledge: *mut u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Serialize)(windows_core::Interface::as_raw(self), fserializereplicakeymap.into(), core::mem::transmute(pbknowledge), core::mem::transmute(pcbknowledge)).ok() } pub unsafe fn SetLocalTickCount(&self, ulltickcount: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetLocalTickCount)(windows_core::Interface::as_raw(self), core::mem::transmute(ulltickcount)).ok() @@ -5580,11 +5576,8 @@ impl core::ops::Deref for ISyncSessionState2 { } windows_core::imp::interface_hierarchy!(ISyncSessionState2, windows_core::IUnknown, ISyncSessionState); impl ISyncSessionState2 { - pub unsafe fn SetProviderWithError(&self, fself: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetProviderWithError)(windows_core::Interface::as_raw(self), fself.param().abi()).ok() + pub unsafe fn SetProviderWithError(&self, fself: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetProviderWithError)(windows_core::Interface::as_raw(self), fself.into()).ok() } pub unsafe fn GetSessionErrorStatus(&self, phrsessionerror: *mut windows_core::HRESULT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetSessionErrorStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(phrsessionerror)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/System/Wmi/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Wmi/mod.rs index 9b70e263af..76804d712d 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Wmi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Wmi/mod.rs @@ -9154,9 +9154,6 @@ pub type MI_Module_Load = Option; pub const MI_OPERATIONFLAGS_BASIC_RTTI: u32 = 2u32; pub const MI_OPERATIONFLAGS_DEFAULT_RTTI: u32 = 0u32; diff --git a/crates/libs/windows/src/Windows/Win32/UI/Accessibility/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Accessibility/mod.rs index abdcddea75..74a54089d1 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Accessibility/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Accessibility/mod.rs @@ -182,12 +182,9 @@ pub unsafe fn RegisterPointerInputTarget(hwnd: super::super::Foundation::HWND, p } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn RegisterPointerInputTargetEx(hwnd: super::super::Foundation::HWND, pointertype: super::WindowsAndMessaging::POINTER_INPUT_TYPE, fobserve: P2) -> super::super::Foundation::BOOL -where - P2: windows_core::Param, -{ +pub unsafe fn RegisterPointerInputTargetEx(hwnd: super::super::Foundation::HWND, pointertype: super::WindowsAndMessaging::POINTER_INPUT_TYPE, fobserve: bool) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn RegisterPointerInputTargetEx(hwnd : super::super::Foundation:: HWND, pointertype : super::WindowsAndMessaging:: POINTER_INPUT_TYPE, fobserve : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - RegisterPointerInputTargetEx(core::mem::transmute(hwnd), core::mem::transmute(pointertype), fobserve.param().abi()) + RegisterPointerInputTargetEx(core::mem::transmute(hwnd), core::mem::transmute(pointertype), fobserve.into()) } #[inline] pub unsafe fn ScrollItemPattern_ScrollIntoView(hobj: HUIAPATTERNOBJECT) -> windows_core::Result<()> { @@ -293,21 +290,14 @@ pub unsafe fn TextRange_ExpandToEnclosingUnit(hobj: HUIATEXTRANGE, unit: TextUni } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] -pub unsafe fn TextRange_FindAttribute(hobj: HUIATEXTRANGE, attributeid: i32, val: &super::super::System::Variant::VARIANT, backward: P3, pretval: *mut HUIATEXTRANGE) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn TextRange_FindAttribute(hobj: HUIATEXTRANGE, attributeid: i32, val: &super::super::System::Variant::VARIANT, backward: bool, pretval: *mut HUIATEXTRANGE) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextRange_FindAttribute(hobj : HUIATEXTRANGE, attributeid : i32, val : super::super::System::Variant:: VARIANT, backward : super::super::Foundation:: BOOL, pretval : *mut HUIATEXTRANGE) -> windows_core::HRESULT); - TextRange_FindAttribute(core::mem::transmute(hobj), core::mem::transmute(attributeid), core::mem::transmute_copy(val), backward.param().abi(), core::mem::transmute(pretval)).ok() + TextRange_FindAttribute(core::mem::transmute(hobj), core::mem::transmute(attributeid), core::mem::transmute_copy(val), backward.into(), core::mem::transmute(pretval)).ok() } #[inline] -pub unsafe fn TextRange_FindText(hobj: HUIATEXTRANGE, text: &windows_core::BSTR, backward: P2, ignorecase: P3, pretval: *mut HUIATEXTRANGE) -> windows_core::Result<()> -where - P2: windows_core::Param, - P3: windows_core::Param, -{ +pub unsafe fn TextRange_FindText(hobj: HUIATEXTRANGE, text: &windows_core::BSTR, backward: bool, ignorecase: bool, pretval: *mut HUIATEXTRANGE) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextRange_FindText(hobj : HUIATEXTRANGE, text : * mut core::ffi::c_void, backward : super::super::Foundation:: BOOL, ignorecase : super::super::Foundation:: BOOL, pretval : *mut HUIATEXTRANGE) -> windows_core::HRESULT); - TextRange_FindText(core::mem::transmute(hobj), core::mem::transmute_copy(text), backward.param().abi(), ignorecase.param().abi(), core::mem::transmute(pretval)).ok() + TextRange_FindText(core::mem::transmute(hobj), core::mem::transmute_copy(text), backward.into(), ignorecase.into(), core::mem::transmute(pretval)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] @@ -358,12 +348,9 @@ pub unsafe fn TextRange_RemoveFromSelection(hobj: HUIATEXTRANGE) -> windows_core TextRange_RemoveFromSelection(core::mem::transmute(hobj)).ok() } #[inline] -pub unsafe fn TextRange_ScrollIntoView(hobj: HUIATEXTRANGE, aligntotop: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn TextRange_ScrollIntoView(hobj: HUIATEXTRANGE, aligntotop: bool) -> windows_core::Result<()> { windows_targets::link!("uiautomationcore.dll" "system" fn TextRange_ScrollIntoView(hobj : HUIATEXTRANGE, aligntotop : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - TextRange_ScrollIntoView(core::mem::transmute(hobj), aligntotop.param().abi()).ok() + TextRange_ScrollIntoView(core::mem::transmute(hobj), aligntotop.into()).ok() } #[inline] pub unsafe fn TextRange_Select(hobj: HUIATEXTRANGE) -> windows_core::Result<()> { @@ -1163,9 +1150,6 @@ impl core::ops::Not for HIGHCONTRASTW_FLAGS { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HUIAEVENT(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HUIAEVENT { - type TypeKind = windows_core::CopyType; -} impl HUIAEVENT { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1188,9 +1172,6 @@ impl Default for HUIAEVENT { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HUIANODE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HUIANODE { - type TypeKind = windows_core::CopyType; -} impl HUIANODE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1213,9 +1194,6 @@ impl Default for HUIANODE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HUIAPATTERNOBJECT(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HUIAPATTERNOBJECT { - type TypeKind = windows_core::CopyType; -} impl HUIAPATTERNOBJECT { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1238,9 +1216,6 @@ impl Default for HUIAPATTERNOBJECT { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HUIATEXTRANGE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HUIATEXTRANGE { - type TypeKind = windows_core::CopyType; -} impl HUIATEXTRANGE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1263,9 +1238,6 @@ impl Default for HUIATEXTRANGE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HWINEVENTHOOK(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HWINEVENTHOOK { - type TypeKind = windows_core::CopyType; -} impl HWINEVENTHOOK { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -5469,20 +5441,13 @@ impl ITextRangeProvider { (windows_core::Interface::vtable(self).ExpandToEnclosingUnit)(windows_core::Interface::as_raw(self), core::mem::transmute(unit)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn FindAttribute(&self, attributeid: UIA_TEXTATTRIBUTE_ID, val: &super::super::System::Variant::VARIANT, backward: P2) -> windows_core::Result - where - P2: windows_core::Param, - { + pub unsafe fn FindAttribute(&self, attributeid: UIA_TEXTATTRIBUTE_ID, val: &super::super::System::Variant::VARIANT, backward: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).FindAttribute)(windows_core::Interface::as_raw(self), core::mem::transmute(attributeid), core::mem::transmute_copy(val), backward.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).FindAttribute)(windows_core::Interface::as_raw(self), core::mem::transmute(attributeid), core::mem::transmute_copy(val), backward.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn FindText(&self, text: &windows_core::BSTR, backward: P1, ignorecase: P2) -> windows_core::Result - where - P1: windows_core::Param, - P2: windows_core::Param, - { + pub unsafe fn FindText(&self, text: &windows_core::BSTR, backward: bool, ignorecase: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).FindText)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(text), backward.param().abi(), ignorecase.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).FindText)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(text), backward.into(), ignorecase.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetAttributeValue(&self, attributeid: UIA_TEXTATTRIBUTE_ID) -> windows_core::Result { @@ -5525,11 +5490,8 @@ impl ITextRangeProvider { pub unsafe fn RemoveFromSelection(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RemoveFromSelection)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn ScrollIntoView(&self, aligntotop: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ScrollIntoView)(windows_core::Interface::as_raw(self), aligntotop.param().abi()).ok() + pub unsafe fn ScrollIntoView(&self, aligntotop: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ScrollIntoView)(windows_core::Interface::as_raw(self), aligntotop.into()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetChildren(&self) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY> { @@ -7102,11 +7064,8 @@ impl IUIAutomation2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).AutoSetFocus)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetAutoSetFocus(&self, autosetfocus: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAutoSetFocus)(windows_core::Interface::as_raw(self), autosetfocus.param().abi()).ok() + pub unsafe fn SetAutoSetFocus(&self, autosetfocus: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAutoSetFocus)(windows_core::Interface::as_raw(self), autosetfocus.into()).ok() } pub unsafe fn ConnectionTimeout(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8501,12 +8460,9 @@ impl IUIAutomationElement { (windows_core::Interface::vtable(self).GetCurrentPropertyValue)(windows_core::Interface::as_raw(self), core::mem::transmute(propertyid), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn GetCurrentPropertyValueEx(&self, propertyid: UIA_PROPERTY_ID, ignoredefaultvalue: P1) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn GetCurrentPropertyValueEx(&self, propertyid: UIA_PROPERTY_ID, ignoredefaultvalue: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetCurrentPropertyValueEx)(windows_core::Interface::as_raw(self), core::mem::transmute(propertyid), ignoredefaultvalue.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + (windows_core::Interface::vtable(self).GetCurrentPropertyValueEx)(windows_core::Interface::as_raw(self), core::mem::transmute(propertyid), ignoredefaultvalue.into(), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetCachedPropertyValue(&self, propertyid: UIA_PROPERTY_ID) -> windows_core::Result { @@ -8514,12 +8470,9 @@ impl IUIAutomationElement { (windows_core::Interface::vtable(self).GetCachedPropertyValue)(windows_core::Interface::as_raw(self), core::mem::transmute(propertyid), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn GetCachedPropertyValueEx(&self, propertyid: UIA_PROPERTY_ID, ignoredefaultvalue: P1) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn GetCachedPropertyValueEx(&self, propertyid: UIA_PROPERTY_ID, ignoredefaultvalue: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetCachedPropertyValueEx)(windows_core::Interface::as_raw(self), core::mem::transmute(propertyid), ignoredefaultvalue.param().abi(), &mut result__).map(|| core::mem::transmute(result__)) + (windows_core::Interface::vtable(self).GetCachedPropertyValueEx)(windows_core::Interface::as_raw(self), core::mem::transmute(propertyid), ignoredefaultvalue.into(), &mut result__).map(|| core::mem::transmute(result__)) } pub unsafe fn GetCurrentPatternAs(&self, patternid: UIA_PATTERN_ID) -> windows_core::Result where @@ -12200,11 +12153,8 @@ impl windows_core::RuntimeName for IUIAutomationPatternHandler {} windows_core::imp::define_interface!(IUIAutomationPatternInstance, IUIAutomationPatternInstance_Vtbl, 0xc03a7fe4_9431_409f_bed8_ae7c2299bc8d); windows_core::imp::interface_hierarchy!(IUIAutomationPatternInstance, windows_core::IUnknown); impl IUIAutomationPatternInstance { - pub unsafe fn GetProperty(&self, index: u32, cached: P1, r#type: UIAutomationType, pptr: *mut core::ffi::c_void) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(index), cached.param().abi(), core::mem::transmute(r#type), core::mem::transmute(pptr)).ok() + pub unsafe fn GetProperty(&self, index: u32, cached: bool, r#type: UIAutomationType, pptr: *mut core::ffi::c_void) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), core::mem::transmute(index), cached.into(), core::mem::transmute(r#type), core::mem::transmute(pptr)).ok() } pub unsafe fn CallMethod(&self, index: u32, pparams: *const UIAutomationParameter, cparams: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CallMethod)(windows_core::Interface::as_raw(self), core::mem::transmute(index), core::mem::transmute(pparams), core::mem::transmute(cparams)).ok() @@ -12458,23 +12408,14 @@ impl IUIAutomationProxyFactoryEntry { { (windows_core::Interface::vtable(self).SetImageName)(windows_core::Interface::as_raw(self), imagename.param().abi()).ok() } - pub unsafe fn SetAllowSubstringMatch(&self, allowsubstringmatch: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllowSubstringMatch)(windows_core::Interface::as_raw(self), allowsubstringmatch.param().abi()).ok() + pub unsafe fn SetAllowSubstringMatch(&self, allowsubstringmatch: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllowSubstringMatch)(windows_core::Interface::as_raw(self), allowsubstringmatch.into()).ok() } - pub unsafe fn SetCanCheckBaseClass(&self, cancheckbaseclass: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCanCheckBaseClass)(windows_core::Interface::as_raw(self), cancheckbaseclass.param().abi()).ok() + pub unsafe fn SetCanCheckBaseClass(&self, cancheckbaseclass: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCanCheckBaseClass)(windows_core::Interface::as_raw(self), cancheckbaseclass.into()).ok() } - pub unsafe fn SetNeedsAdviseEvents(&self, adviseevents: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetNeedsAdviseEvents)(windows_core::Interface::as_raw(self), adviseevents.param().abi()).ok() + pub unsafe fn SetNeedsAdviseEvents(&self, adviseevents: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetNeedsAdviseEvents)(windows_core::Interface::as_raw(self), adviseevents.into()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SetWinEventsForAutomationEvent(&self, eventid: UIA_EVENT_ID, propertyid: UIA_PROPERTY_ID, winevents: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()> { @@ -14884,20 +14825,13 @@ impl IUIAutomationTextRange { (windows_core::Interface::vtable(self).ExpandToEnclosingUnit)(windows_core::Interface::as_raw(self), core::mem::transmute(textunit)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn FindAttribute(&self, attr: UIA_TEXTATTRIBUTE_ID, val: &super::super::System::Variant::VARIANT, backward: P2) -> windows_core::Result - where - P2: windows_core::Param, - { + pub unsafe fn FindAttribute(&self, attr: UIA_TEXTATTRIBUTE_ID, val: &super::super::System::Variant::VARIANT, backward: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).FindAttribute)(windows_core::Interface::as_raw(self), core::mem::transmute(attr), core::mem::transmute_copy(val), backward.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).FindAttribute)(windows_core::Interface::as_raw(self), core::mem::transmute(attr), core::mem::transmute_copy(val), backward.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn FindText(&self, text: &windows_core::BSTR, backward: P1, ignorecase: P2) -> windows_core::Result - where - P1: windows_core::Param, - P2: windows_core::Param, - { + pub unsafe fn FindText(&self, text: &windows_core::BSTR, backward: bool, ignorecase: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).FindText)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(text), backward.param().abi(), ignorecase.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).FindText)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(text), backward.into(), ignorecase.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetAttributeValue(&self, attr: UIA_TEXTATTRIBUTE_ID) -> windows_core::Result { @@ -14940,11 +14874,8 @@ impl IUIAutomationTextRange { pub unsafe fn RemoveFromSelection(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RemoveFromSelection)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn ScrollIntoView(&self, aligntotop: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ScrollIntoView)(windows_core::Interface::as_raw(self), aligntotop.param().abi()).ok() + pub unsafe fn ScrollIntoView(&self, aligntotop: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ScrollIntoView)(windows_core::Interface::as_raw(self), aligntotop.into()).ok() } pub unsafe fn GetChildren(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Win32/UI/Animation/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Animation/mod.rs index b6718b9eab..6842947eba 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Animation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Animation/mod.rs @@ -609,12 +609,11 @@ impl IUIAnimationManager2 { pub unsafe fn Resume(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Resume)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetManagerEventHandler(&self, handler: P0, fregisterfornextanimationevent: P1) -> windows_core::Result<()> + pub unsafe fn SetManagerEventHandler(&self, handler: P0, fregisterfornextanimationevent: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetManagerEventHandler)(windows_core::Interface::as_raw(self), handler.param().abi(), fregisterfornextanimationevent.param().abi()).ok() + (windows_core::Interface::vtable(self).SetManagerEventHandler)(windows_core::Interface::as_raw(self), handler.param().abi(), fregisterfornextanimationevent.into()).ok() } pub unsafe fn SetCancelPriorityComparison(&self, comparison: P0) -> windows_core::Result<()> where @@ -1292,12 +1291,11 @@ impl IUIAnimationStoryboard2 { { (windows_core::Interface::vtable(self).AddTransitionBetweenKeyframes)(windows_core::Interface::as_raw(self), variable.param().abi(), transition.param().abi(), core::mem::transmute(startkeyframe), core::mem::transmute(endkeyframe)).ok() } - pub unsafe fn RepeatBetweenKeyframes(&self, startkeyframe: UI_ANIMATION_KEYFRAME, endkeyframe: UI_ANIMATION_KEYFRAME, crepetition: f64, repeatmode: UI_ANIMATION_REPEAT_MODE, piterationchangehandler: P4, id: usize, fregisterfornextanimationevent: P6) -> windows_core::Result<()> + pub unsafe fn RepeatBetweenKeyframes(&self, startkeyframe: UI_ANIMATION_KEYFRAME, endkeyframe: UI_ANIMATION_KEYFRAME, crepetition: f64, repeatmode: UI_ANIMATION_REPEAT_MODE, piterationchangehandler: P4, id: usize, fregisterfornextanimationevent: bool) -> windows_core::Result<()> where P4: windows_core::Param, - P6: windows_core::Param, { - (windows_core::Interface::vtable(self).RepeatBetweenKeyframes)(windows_core::Interface::as_raw(self), core::mem::transmute(startkeyframe), core::mem::transmute(endkeyframe), core::mem::transmute(crepetition), core::mem::transmute(repeatmode), piterationchangehandler.param().abi(), core::mem::transmute(id), fregisterfornextanimationevent.param().abi()).ok() + (windows_core::Interface::vtable(self).RepeatBetweenKeyframes)(windows_core::Interface::as_raw(self), core::mem::transmute(startkeyframe), core::mem::transmute(endkeyframe), core::mem::transmute(crepetition), core::mem::transmute(repeatmode), piterationchangehandler.param().abi(), core::mem::transmute(id), fregisterfornextanimationevent.into()).ok() } pub unsafe fn HoldVariable(&self, variable: P0) -> windows_core::Result<()> where @@ -1340,13 +1338,11 @@ impl IUIAnimationStoryboard2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetElapsedTime)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetStoryboardEventHandler(&self, handler: P0, fregisterstatuschangefornextanimationevent: P1, fregisterupdatefornextanimationevent: P2) -> windows_core::Result<()> + pub unsafe fn SetStoryboardEventHandler(&self, handler: P0, fregisterstatuschangefornextanimationevent: bool, fregisterupdatefornextanimationevent: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).SetStoryboardEventHandler)(windows_core::Interface::as_raw(self), handler.param().abi(), fregisterstatuschangefornextanimationevent.param().abi(), fregisterupdatefornextanimationevent.param().abi()).ok() + (windows_core::Interface::vtable(self).SetStoryboardEventHandler)(windows_core::Interface::as_raw(self), handler.param().abi(), fregisterstatuschangefornextanimationevent.into(), fregisterupdatefornextanimationevent.into()).ok() } } #[repr(C)] @@ -2979,19 +2975,17 @@ impl IUIAnimationVariable2 { pub unsafe fn GetTag(&self, object: Option<*mut Option>, id: Option<*mut u32>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), core::mem::transmute(object.unwrap_or(core::mem::zeroed())), core::mem::transmute(id.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn SetVariableChangeHandler(&self, handler: P0, fregisterfornextanimationevent: P1) -> windows_core::Result<()> + pub unsafe fn SetVariableChangeHandler(&self, handler: P0, fregisterfornextanimationevent: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetVariableChangeHandler)(windows_core::Interface::as_raw(self), handler.param().abi(), fregisterfornextanimationevent.param().abi()).ok() + (windows_core::Interface::vtable(self).SetVariableChangeHandler)(windows_core::Interface::as_raw(self), handler.param().abi(), fregisterfornextanimationevent.into()).ok() } - pub unsafe fn SetVariableIntegerChangeHandler(&self, handler: P0, fregisterfornextanimationevent: P1) -> windows_core::Result<()> + pub unsafe fn SetVariableIntegerChangeHandler(&self, handler: P0, fregisterfornextanimationevent: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetVariableIntegerChangeHandler)(windows_core::Interface::as_raw(self), handler.param().abi(), fregisterfornextanimationevent.param().abi()).ok() + (windows_core::Interface::vtable(self).SetVariableIntegerChangeHandler)(windows_core::Interface::as_raw(self), handler.param().abi(), fregisterfornextanimationevent.into()).ok() } pub unsafe fn SetVariableCurveChangeHandler(&self, handler: P0) -> windows_core::Result<()> where @@ -3471,9 +3465,6 @@ pub const UI_ANIMATION_IDLE_BEHAVIOR_DISABLE: UI_ANIMATION_IDLE_BEHAVIOR = UI_AN #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct UI_ANIMATION_KEYFRAME(pub isize); -impl windows_core::TypeKind for UI_ANIMATION_KEYFRAME { - type TypeKind = windows_core::CopyType; -} pub const UI_ANIMATION_MANAGER_BUSY: UI_ANIMATION_MANAGER_STATUS = UI_ANIMATION_MANAGER_STATUS(1i32); pub const UI_ANIMATION_MANAGER_IDLE: UI_ANIMATION_MANAGER_STATUS = UI_ANIMATION_MANAGER_STATUS(0i32); #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Win32/UI/ColorSystem/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/ColorSystem/mod.rs index d823ee897b..88933c2c4c 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/ColorSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/ColorSystem/mod.rs @@ -164,14 +164,12 @@ pub unsafe fn ColorMatchToTarget(hdc: super::super::Graphics::Gdi::HDC, hdctarge ColorMatchToTarget(core::mem::transmute(hdc), core::mem::transmute(hdctarget), core::mem::transmute(action)) } #[inline] -pub unsafe fn ColorProfileAddDisplayAssociation(scope: WCS_PROFILE_MANAGEMENT_SCOPE, profilename: P1, targetadapterid: super::super::Foundation::LUID, sourceid: u32, setasdefault: P4, associateasadvancedcolor: P5) -> windows_core::Result<()> +pub unsafe fn ColorProfileAddDisplayAssociation(scope: WCS_PROFILE_MANAGEMENT_SCOPE, profilename: P1, targetadapterid: super::super::Foundation::LUID, sourceid: u32, setasdefault: bool, associateasadvancedcolor: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("mscms.dll" "system" fn ColorProfileAddDisplayAssociation(scope : WCS_PROFILE_MANAGEMENT_SCOPE, profilename : windows_core::PCWSTR, targetadapterid : super::super::Foundation:: LUID, sourceid : u32, setasdefault : super::super::Foundation:: BOOL, associateasadvancedcolor : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - ColorProfileAddDisplayAssociation(core::mem::transmute(scope), profilename.param().abi(), core::mem::transmute(targetadapterid), core::mem::transmute(sourceid), setasdefault.param().abi(), associateasadvancedcolor.param().abi()).ok() + ColorProfileAddDisplayAssociation(core::mem::transmute(scope), profilename.param().abi(), core::mem::transmute(targetadapterid), core::mem::transmute(sourceid), setasdefault.into(), associateasadvancedcolor.into()).ok() } #[inline] pub unsafe fn ColorProfileGetDisplayDefault(scope: WCS_PROFILE_MANAGEMENT_SCOPE, targetadapterid: super::super::Foundation::LUID, sourceid: u32, profiletype: COLORPROFILETYPE, profilesubtype: COLORPROFILESUBTYPE) -> windows_core::Result { @@ -191,13 +189,12 @@ pub unsafe fn ColorProfileGetDisplayUserScope(targetadapterid: super::super::Fou ColorProfileGetDisplayUserScope(core::mem::transmute(targetadapterid), core::mem::transmute(sourceid), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn ColorProfileRemoveDisplayAssociation(scope: WCS_PROFILE_MANAGEMENT_SCOPE, profilename: P1, targetadapterid: super::super::Foundation::LUID, sourceid: u32, dissociateadvancedcolor: P4) -> windows_core::Result<()> +pub unsafe fn ColorProfileRemoveDisplayAssociation(scope: WCS_PROFILE_MANAGEMENT_SCOPE, profilename: P1, targetadapterid: super::super::Foundation::LUID, sourceid: u32, dissociateadvancedcolor: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("mscms.dll" "system" fn ColorProfileRemoveDisplayAssociation(scope : WCS_PROFILE_MANAGEMENT_SCOPE, profilename : windows_core::PCWSTR, targetadapterid : super::super::Foundation:: LUID, sourceid : u32, dissociateadvancedcolor : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - ColorProfileRemoveDisplayAssociation(core::mem::transmute(scope), profilename.param().abi(), core::mem::transmute(targetadapterid), core::mem::transmute(sourceid), dissociateadvancedcolor.param().abi()).ok() + ColorProfileRemoveDisplayAssociation(core::mem::transmute(scope), profilename.param().abi(), core::mem::transmute(targetadapterid), core::mem::transmute(sourceid), dissociateadvancedcolor.into()).ok() } #[inline] pub unsafe fn ColorProfileSetDisplayDefaultAssociation(scope: WCS_PROFILE_MANAGEMENT_SCOPE, profilename: P1, profiletype: COLORPROFILETYPE, profilesubtype: COLORPROFILESUBTYPE, targetadapterid: super::super::Foundation::LUID, sourceid: u32) -> windows_core::Result<()> @@ -599,24 +596,22 @@ pub unsafe fn TranslateColors(hcolortransform: isize, painputcolors: *const COLO TranslateColors(core::mem::transmute(hcolortransform), core::mem::transmute(painputcolors), core::mem::transmute(ncolors), core::mem::transmute(ctinput), core::mem::transmute(paoutputcolors), core::mem::transmute(ctoutput)) } #[inline] -pub unsafe fn UninstallColorProfileA(pmachinename: P0, pprofilename: P1, bdelete: P2) -> super::super::Foundation::BOOL +pub unsafe fn UninstallColorProfileA(pmachinename: P0, pprofilename: P1, bdelete: bool) -> super::super::Foundation::BOOL where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("mscms.dll" "system" fn UninstallColorProfileA(pmachinename : windows_core::PCSTR, pprofilename : windows_core::PCSTR, bdelete : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - UninstallColorProfileA(pmachinename.param().abi(), pprofilename.param().abi(), bdelete.param().abi()) + UninstallColorProfileA(pmachinename.param().abi(), pprofilename.param().abi(), bdelete.into()) } #[inline] -pub unsafe fn UninstallColorProfileW(pmachinename: P0, pprofilename: P1, bdelete: P2) -> super::super::Foundation::BOOL +pub unsafe fn UninstallColorProfileW(pmachinename: P0, pprofilename: P1, bdelete: bool) -> super::super::Foundation::BOOL where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("mscms.dll" "system" fn UninstallColorProfileW(pmachinename : windows_core::PCWSTR, pprofilename : windows_core::PCWSTR, bdelete : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - UninstallColorProfileW(pmachinename.param().abi(), pprofilename.param().abi(), bdelete.param().abi()) + UninstallColorProfileW(pmachinename.param().abi(), pprofilename.param().abi(), bdelete.into()) } #[inline] pub unsafe fn UnregisterCMMA(pmachinename: P0, cmmid: u32) -> super::super::Foundation::BOOL @@ -735,12 +730,9 @@ pub unsafe fn WcsOpenColorProfileW(pcdmpprofile: *const PROFILE, pcampprofile: O WcsOpenColorProfileW(core::mem::transmute(pcdmpprofile), core::mem::transmute(pcampprofile.unwrap_or(core::mem::zeroed())), core::mem::transmute(pgmmpprofile.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdesireaccess), core::mem::transmute(dwsharemode), core::mem::transmute(dwcreationmode), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn WcsSetCalibrationManagementState(bisenabled: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn WcsSetCalibrationManagementState(bisenabled: bool) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn WcsSetCalibrationManagementState(bisenabled : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WcsSetCalibrationManagementState(bisenabled.param().abi()) + WcsSetCalibrationManagementState(bisenabled.into()) } #[inline] pub unsafe fn WcsSetDefaultColorProfile(scope: WCS_PROFILE_MANAGEMENT_SCOPE, pdevicename: P1, cptcolorprofiletype: COLORPROFILETYPE, cpstcolorprofilesubtype: COLORPROFILESUBTYPE, dwprofileid: u32, pprofilename: P5) -> super::super::Foundation::BOOL @@ -757,13 +749,12 @@ pub unsafe fn WcsSetDefaultRenderingIntent(scope: WCS_PROFILE_MANAGEMENT_SCOPE, WcsSetDefaultRenderingIntent(core::mem::transmute(scope), core::mem::transmute(dwrenderingintent)) } #[inline] -pub unsafe fn WcsSetUsePerUserProfiles(pdevicename: P0, dwdeviceclass: u32, useperuserprofiles: P2) -> super::super::Foundation::BOOL +pub unsafe fn WcsSetUsePerUserProfiles(pdevicename: P0, dwdeviceclass: u32, useperuserprofiles: bool) -> super::super::Foundation::BOOL where P0: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("mscms.dll" "system" fn WcsSetUsePerUserProfiles(pdevicename : windows_core::PCWSTR, dwdeviceclass : u32, useperuserprofiles : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WcsSetUsePerUserProfiles(pdevicename.param().abi(), core::mem::transmute(dwdeviceclass), useperuserprofiles.param().abi()) + WcsSetUsePerUserProfiles(pdevicename.param().abi(), core::mem::transmute(dwdeviceclass), useperuserprofiles.into()) } #[inline] pub unsafe fn WcsTranslateColors(hcolortransform: isize, ncolors: u32, ninputchannels: u32, cdtinput: COLORDATATYPE, cbinput: u32, pinputdata: *const core::ffi::c_void, noutputchannels: u32, cdtoutput: COLORDATATYPE, cboutput: u32, poutputdata: *mut core::ffi::c_void) -> super::super::Foundation::BOOL { @@ -1196,9 +1187,6 @@ impl Default for GamutShellTriangle { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HCOLORSPACE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HCOLORSPACE { - type TypeKind = windows_core::CopyType; -} impl HCOLORSPACE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/UI/Controls/RichEdit/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Controls/RichEdit/mod.rs index 6b83c6b45a..7f2432c132 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Controls/RichEdit/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Controls/RichEdit/mod.rs @@ -1268,11 +1268,8 @@ impl IRichEditOle { { (windows_core::Interface::vtable(self).SetHostNames)(windows_core::Interface::as_raw(self), lpstrcontainerapp.param().abi(), lpstrcontainerobj.param().abi()).ok() } - pub unsafe fn SetLinkAvailable(&self, iob: i32, favailable: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetLinkAvailable)(windows_core::Interface::as_raw(self), core::mem::transmute(iob), favailable.param().abi()).ok() + pub unsafe fn SetLinkAvailable(&self, iob: i32, favailable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetLinkAvailable)(windows_core::Interface::as_raw(self), core::mem::transmute(iob), favailable.into()).ok() } pub unsafe fn SetDvaspect(&self, iob: i32, dvaspect: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetDvaspect)(windows_core::Interface::as_raw(self), core::mem::transmute(iob), core::mem::transmute(dvaspect)).ok() @@ -1290,11 +1287,8 @@ impl IRichEditOle { pub unsafe fn InPlaceDeactivate(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).InPlaceDeactivate)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn ContextSensitiveHelp(&self, fentermode: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ContextSensitiveHelp)(windows_core::Interface::as_raw(self), fentermode.param().abi()).ok() + pub unsafe fn ContextSensitiveHelp(&self, fentermode: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ContextSensitiveHelp)(windows_core::Interface::as_raw(self), fentermode.into()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetClipboardData(&self, lpchrg: *mut CHARRANGE, reco: u32, lplpdataobj: *mut Option) -> windows_core::Result<()> { @@ -1476,11 +1470,8 @@ impl IRichEditOleCallback { pub unsafe fn GetInPlaceContext(&self, lplpframe: *mut Option, lplpdoc: *mut Option, lpframeinfo: *mut super::super::super::System::Ole::OLEINPLACEFRAMEINFO) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetInPlaceContext)(windows_core::Interface::as_raw(self), core::mem::transmute(lplpframe), core::mem::transmute(lplpdoc), core::mem::transmute(lpframeinfo)).ok() } - pub unsafe fn ShowContainerUI(&self, fshow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ShowContainerUI)(windows_core::Interface::as_raw(self), fshow.param().abi()).ok() + pub unsafe fn ShowContainerUI(&self, fshow: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ShowContainerUI)(windows_core::Interface::as_raw(self), fshow.into()).ok() } #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub unsafe fn QueryInsertObject(&self, lpclsid: *mut windows_core::GUID, lpstg: P1, cp: i32) -> windows_core::Result<()> @@ -1497,29 +1488,22 @@ impl IRichEditOleCallback { (windows_core::Interface::vtable(self).DeleteObject)(windows_core::Interface::as_raw(self), lpoleobj.param().abi()).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_SystemServices"))] - pub unsafe fn QueryAcceptData(&self, lpdataobj: P0, lpcfformat: *mut u16, reco: super::super::super::System::SystemServices::RECO_FLAGS, freally: P3, hmetapict: super::super::super::Foundation::HGLOBAL) -> windows_core::Result<()> + pub unsafe fn QueryAcceptData(&self, lpdataobj: P0, lpcfformat: *mut u16, reco: super::super::super::System::SystemServices::RECO_FLAGS, freally: bool, hmetapict: super::super::super::Foundation::HGLOBAL) -> windows_core::Result<()> where P0: windows_core::Param, - P3: windows_core::Param, { - (windows_core::Interface::vtable(self).QueryAcceptData)(windows_core::Interface::as_raw(self), lpdataobj.param().abi(), core::mem::transmute(lpcfformat), core::mem::transmute(reco), freally.param().abi(), core::mem::transmute(hmetapict)).ok() + (windows_core::Interface::vtable(self).QueryAcceptData)(windows_core::Interface::as_raw(self), lpdataobj.param().abi(), core::mem::transmute(lpcfformat), core::mem::transmute(reco), freally.into(), core::mem::transmute(hmetapict)).ok() } - pub unsafe fn ContextSensitiveHelp(&self, fentermode: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ContextSensitiveHelp)(windows_core::Interface::as_raw(self), fentermode.param().abi()).ok() + pub unsafe fn ContextSensitiveHelp(&self, fentermode: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ContextSensitiveHelp)(windows_core::Interface::as_raw(self), fentermode.into()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetClipboardData(&self, lpchrg: *mut CHARRANGE, reco: u32, lplpdataobj: *mut Option) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetClipboardData)(windows_core::Interface::as_raw(self), core::mem::transmute(lpchrg), core::mem::transmute(reco), core::mem::transmute(lplpdataobj)).ok() } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_SystemServices"))] - pub unsafe fn GetDragDropEffect(&self, fdrag: P0, grfkeystate: super::super::super::System::SystemServices::MODIFIERKEYS_FLAGS, pdweffect: *mut super::super::super::System::Ole::DROPEFFECT) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).GetDragDropEffect)(windows_core::Interface::as_raw(self), fdrag.param().abi(), core::mem::transmute(grfkeystate), core::mem::transmute(pdweffect)).ok() + pub unsafe fn GetDragDropEffect(&self, fdrag: bool, grfkeystate: super::super::super::System::SystemServices::MODIFIERKEYS_FLAGS, pdweffect: *mut super::super::super::System::Ole::DROPEFFECT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetDragDropEffect)(windows_core::Interface::as_raw(self), fdrag.into(), core::mem::transmute(grfkeystate), core::mem::transmute(pdweffect)).ok() } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_UI_WindowsAndMessaging"))] pub unsafe fn GetContextMenu(&self, seltype: RICH_EDIT_GET_CONTEXT_MENU_SEL_TYPE, lpoleobj: P1, lpchrg: *mut CHARRANGE, lphmenu: *mut super::super::WindowsAndMessaging::HMENU) -> windows_core::Result<()> @@ -4492,49 +4476,31 @@ impl ITextHost { pub unsafe fn TxReleaseDC(&self, hdc: super::super::super::Graphics::Gdi::HDC) -> i32 { (windows_core::Interface::vtable(self).TxReleaseDC)(windows_core::Interface::as_raw(self), core::mem::transmute(hdc)) } - pub unsafe fn TxShowScrollBar(&self, fnbar: i32, fshow: P1) -> super::super::super::Foundation::BOOL - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).TxShowScrollBar)(windows_core::Interface::as_raw(self), core::mem::transmute(fnbar), fshow.param().abi()) + pub unsafe fn TxShowScrollBar(&self, fnbar: i32, fshow: bool) -> super::super::super::Foundation::BOOL { + (windows_core::Interface::vtable(self).TxShowScrollBar)(windows_core::Interface::as_raw(self), core::mem::transmute(fnbar), fshow.into()) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn TxEnableScrollBar(&self, fusbflags: super::super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, fuarrowflags: i32) -> super::super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).TxEnableScrollBar)(windows_core::Interface::as_raw(self), core::mem::transmute(fusbflags), core::mem::transmute(fuarrowflags)) } - pub unsafe fn TxSetScrollRange(&self, fnbar: i32, nminpos: i32, nmaxpos: i32, fredraw: P3) -> super::super::super::Foundation::BOOL - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).TxSetScrollRange)(windows_core::Interface::as_raw(self), core::mem::transmute(fnbar), core::mem::transmute(nminpos), core::mem::transmute(nmaxpos), fredraw.param().abi()) + pub unsafe fn TxSetScrollRange(&self, fnbar: i32, nminpos: i32, nmaxpos: i32, fredraw: bool) -> super::super::super::Foundation::BOOL { + (windows_core::Interface::vtable(self).TxSetScrollRange)(windows_core::Interface::as_raw(self), core::mem::transmute(fnbar), core::mem::transmute(nminpos), core::mem::transmute(nmaxpos), fredraw.into()) } - pub unsafe fn TxSetScrollPos(&self, fnbar: i32, npos: i32, fredraw: P2) -> super::super::super::Foundation::BOOL - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).TxSetScrollPos)(windows_core::Interface::as_raw(self), core::mem::transmute(fnbar), core::mem::transmute(npos), fredraw.param().abi()) + pub unsafe fn TxSetScrollPos(&self, fnbar: i32, npos: i32, fredraw: bool) -> super::super::super::Foundation::BOOL { + (windows_core::Interface::vtable(self).TxSetScrollPos)(windows_core::Interface::as_raw(self), core::mem::transmute(fnbar), core::mem::transmute(npos), fredraw.into()) } - pub unsafe fn TxInvalidateRect(&self, prc: *mut super::super::super::Foundation::RECT, fmode: P1) - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).TxInvalidateRect)(windows_core::Interface::as_raw(self), core::mem::transmute(prc), fmode.param().abi()) + pub unsafe fn TxInvalidateRect(&self, prc: *mut super::super::super::Foundation::RECT, fmode: bool) { + (windows_core::Interface::vtable(self).TxInvalidateRect)(windows_core::Interface::as_raw(self), core::mem::transmute(prc), fmode.into()) } - pub unsafe fn TxViewChange(&self, fupdate: P0) - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).TxViewChange)(windows_core::Interface::as_raw(self), fupdate.param().abi()) + pub unsafe fn TxViewChange(&self, fupdate: bool) { + (windows_core::Interface::vtable(self).TxViewChange)(windows_core::Interface::as_raw(self), fupdate.into()) } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn TxCreateCaret(&self, hbmp: super::super::super::Graphics::Gdi::HBITMAP, xwidth: i32, yheight: i32) -> super::super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).TxCreateCaret)(windows_core::Interface::as_raw(self), core::mem::transmute(hbmp), core::mem::transmute(xwidth), core::mem::transmute(yheight)) } - pub unsafe fn TxShowCaret(&self, fshow: P0) -> super::super::super::Foundation::BOOL - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).TxShowCaret)(windows_core::Interface::as_raw(self), fshow.param().abi()) + pub unsafe fn TxShowCaret(&self, fshow: bool) -> super::super::super::Foundation::BOOL { + (windows_core::Interface::vtable(self).TxShowCaret)(windows_core::Interface::as_raw(self), fshow.into()) } pub unsafe fn TxSetCaretPos(&self, x: i32, y: i32) -> super::super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).TxSetCaretPos)(windows_core::Interface::as_raw(self), core::mem::transmute(x), core::mem::transmute(y)) @@ -4549,21 +4515,15 @@ impl ITextHost { pub unsafe fn TxScrollWindowEx(&self, dx: i32, dy: i32, lprcscroll: *mut super::super::super::Foundation::RECT, lprcclip: *mut super::super::super::Foundation::RECT, hrgnupdate: super::super::super::Graphics::Gdi::HRGN, lprcupdate: *mut super::super::super::Foundation::RECT, fuscroll: super::super::WindowsAndMessaging::SCROLL_WINDOW_FLAGS) { (windows_core::Interface::vtable(self).TxScrollWindowEx)(windows_core::Interface::as_raw(self), core::mem::transmute(dx), core::mem::transmute(dy), core::mem::transmute(lprcscroll), core::mem::transmute(lprcclip), core::mem::transmute(hrgnupdate), core::mem::transmute(lprcupdate), core::mem::transmute(fuscroll)) } - pub unsafe fn TxSetCapture(&self, fcapture: P0) - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).TxSetCapture)(windows_core::Interface::as_raw(self), fcapture.param().abi()) + pub unsafe fn TxSetCapture(&self, fcapture: bool) { + (windows_core::Interface::vtable(self).TxSetCapture)(windows_core::Interface::as_raw(self), fcapture.into()) } pub unsafe fn TxSetFocus(&self) { (windows_core::Interface::vtable(self).TxSetFocus)(windows_core::Interface::as_raw(self)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn TxSetCursor(&self, hcur: super::super::WindowsAndMessaging::HCURSOR, ftext: P1) - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).TxSetCursor)(windows_core::Interface::as_raw(self), core::mem::transmute(hcur), ftext.param().abi()) + pub unsafe fn TxSetCursor(&self, hcur: super::super::WindowsAndMessaging::HCURSOR, ftext: bool) { + (windows_core::Interface::vtable(self).TxSetCursor)(windows_core::Interface::as_raw(self), core::mem::transmute(hcur), ftext.into()) } pub unsafe fn TxScreenToClient(&self, lppt: *mut super::super::super::Foundation::POINT) -> super::super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).TxScreenToClient)(windows_core::Interface::as_raw(self), core::mem::transmute(lppt)) @@ -4996,11 +4956,8 @@ impl ITextHost2 { (windows_core::Interface::vtable(self).TxGetEastAsianFlags)(windows_core::Interface::as_raw(self), core::mem::transmute(pflags)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn TxSetCursor2(&self, hcur: super::super::WindowsAndMessaging::HCURSOR, btext: P1) -> super::super::WindowsAndMessaging::HCURSOR - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).TxSetCursor2)(windows_core::Interface::as_raw(self), core::mem::transmute(hcur), btext.param().abi()) + pub unsafe fn TxSetCursor2(&self, hcur: super::super::WindowsAndMessaging::HCURSOR, btext: bool) -> super::super::WindowsAndMessaging::HCURSOR { + (windows_core::Interface::vtable(self).TxSetCursor2)(windows_core::Interface::as_raw(self), core::mem::transmute(hcur), btext.into()) } pub unsafe fn TxFreeTextServicesNotification(&self) { (windows_core::Interface::vtable(self).TxFreeTextServicesNotification)(windows_core::Interface::as_raw(self)) @@ -5012,11 +4969,8 @@ impl ITextHost2 { (windows_core::Interface::vtable(self).TxGetWindowStyles)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwstyle), core::mem::transmute(pdwexstyle)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn TxShowDropCaret(&self, fshow: P0, hdc: super::super::super::Graphics::Gdi::HDC, prc: *mut super::super::super::Foundation::RECT) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).TxShowDropCaret)(windows_core::Interface::as_raw(self), fshow.param().abi(), core::mem::transmute(hdc), core::mem::transmute(prc)).ok() + pub unsafe fn TxShowDropCaret(&self, fshow: bool, hdc: super::super::super::Graphics::Gdi::HDC, prc: *mut super::super::super::Foundation::RECT) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).TxShowDropCaret)(windows_core::Interface::as_raw(self), fshow.into(), core::mem::transmute(hdc), core::mem::transmute(prc)).ok() } pub unsafe fn TxDestroyCaret(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).TxDestroyCaret)(windows_core::Interface::as_raw(self)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/UI/Controls/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Controls/mod.rs index 5e61e7c391..136aca6b10 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Controls/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Controls/mod.rs @@ -426,36 +426,24 @@ pub unsafe fn EnableThemeDialogTexture(hwnd: super::super::Foundation::HWND, dwf EnableThemeDialogTexture(core::mem::transmute(hwnd), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn EnableTheming(fenable: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EnableTheming(fenable: bool) -> windows_core::Result<()> { windows_targets::link!("uxtheme.dll" "system" fn EnableTheming(fenable : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - EnableTheming(fenable.param().abi()).ok() + EnableTheming(fenable.into()).ok() } #[inline] -pub unsafe fn EndBufferedAnimation(hbpanimation: isize, fupdatetarget: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn EndBufferedAnimation(hbpanimation: isize, fupdatetarget: bool) -> windows_core::Result<()> { windows_targets::link!("uxtheme.dll" "system" fn EndBufferedAnimation(hbpanimation : isize, fupdatetarget : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - EndBufferedAnimation(core::mem::transmute(hbpanimation), fupdatetarget.param().abi()).ok() + EndBufferedAnimation(core::mem::transmute(hbpanimation), fupdatetarget.into()).ok() } #[inline] -pub unsafe fn EndBufferedPaint(hbufferedpaint: isize, fupdatetarget: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn EndBufferedPaint(hbufferedpaint: isize, fupdatetarget: bool) -> windows_core::Result<()> { windows_targets::link!("uxtheme.dll" "system" fn EndBufferedPaint(hbufferedpaint : isize, fupdatetarget : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - EndBufferedPaint(core::mem::transmute(hbufferedpaint), fupdatetarget.param().abi()).ok() + EndBufferedPaint(core::mem::transmute(hbufferedpaint), fupdatetarget.into()).ok() } #[inline] -pub unsafe fn EndPanningFeedback(hwnd: super::super::Foundation::HWND, fanimateback: P1) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn EndPanningFeedback(hwnd: super::super::Foundation::HWND, fanimateback: bool) -> super::super::Foundation::BOOL { windows_targets::link!("uxtheme.dll" "system" fn EndPanningFeedback(hwnd : super::super::Foundation:: HWND, fanimateback : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - EndPanningFeedback(core::mem::transmute(hwnd), fanimateback.param().abi()) + EndPanningFeedback(core::mem::transmute(hwnd), fanimateback.into()) } #[inline] pub unsafe fn EvaluateProximityToPolygon(controlpolygon: &[super::super::Foundation::POINT], phittestinginput: *const TOUCH_HIT_TESTING_INPUT, pproximityeval: *mut TOUCH_HIT_TESTING_PROXIMITY_EVALUATION) -> windows_core::Result<()> { @@ -497,47 +485,32 @@ pub unsafe fn FlatSB_GetScrollRange(param0: super::super::Foundation::HWND, code } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn FlatSB_SetScrollInfo(param0: super::super::Foundation::HWND, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, psi: *mut super::WindowsAndMessaging::SCROLLINFO, fredraw: P3) -> i32 -where - P3: windows_core::Param, -{ +pub unsafe fn FlatSB_SetScrollInfo(param0: super::super::Foundation::HWND, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, psi: *mut super::WindowsAndMessaging::SCROLLINFO, fredraw: bool) -> i32 { windows_targets::link!("comctl32.dll" "system" fn FlatSB_SetScrollInfo(param0 : super::super::Foundation:: HWND, code : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, psi : *mut super::WindowsAndMessaging:: SCROLLINFO, fredraw : super::super::Foundation:: BOOL) -> i32); - FlatSB_SetScrollInfo(core::mem::transmute(param0), core::mem::transmute(code), core::mem::transmute(psi), fredraw.param().abi()) + FlatSB_SetScrollInfo(core::mem::transmute(param0), core::mem::transmute(code), core::mem::transmute(psi), fredraw.into()) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn FlatSB_SetScrollPos(param0: super::super::Foundation::HWND, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, pos: i32, fredraw: P3) -> i32 -where - P3: windows_core::Param, -{ +pub unsafe fn FlatSB_SetScrollPos(param0: super::super::Foundation::HWND, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, pos: i32, fredraw: bool) -> i32 { windows_targets::link!("comctl32.dll" "system" fn FlatSB_SetScrollPos(param0 : super::super::Foundation:: HWND, code : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, pos : i32, fredraw : super::super::Foundation:: BOOL) -> i32); - FlatSB_SetScrollPos(core::mem::transmute(param0), core::mem::transmute(code), core::mem::transmute(pos), fredraw.param().abi()) + FlatSB_SetScrollPos(core::mem::transmute(param0), core::mem::transmute(code), core::mem::transmute(pos), fredraw.into()) } #[inline] -pub unsafe fn FlatSB_SetScrollProp(param0: super::super::Foundation::HWND, index: WSB_PROP, newvalue: isize, param3: P3) -> super::super::Foundation::BOOL -where - P3: windows_core::Param, -{ +pub unsafe fn FlatSB_SetScrollProp(param0: super::super::Foundation::HWND, index: WSB_PROP, newvalue: isize, param3: bool) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn FlatSB_SetScrollProp(param0 : super::super::Foundation:: HWND, index : u32, newvalue : isize, param3 : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - FlatSB_SetScrollProp(core::mem::transmute(param0), index.0 as _, core::mem::transmute(newvalue), param3.param().abi()) + FlatSB_SetScrollProp(core::mem::transmute(param0), index.0 as _, core::mem::transmute(newvalue), param3.into()) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn FlatSB_SetScrollRange(param0: super::super::Foundation::HWND, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, min: i32, max: i32, fredraw: P4) -> i32 -where - P4: windows_core::Param, -{ +pub unsafe fn FlatSB_SetScrollRange(param0: super::super::Foundation::HWND, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, min: i32, max: i32, fredraw: bool) -> i32 { windows_targets::link!("comctl32.dll" "system" fn FlatSB_SetScrollRange(param0 : super::super::Foundation:: HWND, code : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, min : i32, max : i32, fredraw : super::super::Foundation:: BOOL) -> i32); - FlatSB_SetScrollRange(core::mem::transmute(param0), core::mem::transmute(code), core::mem::transmute(min), core::mem::transmute(max), fredraw.param().abi()) + FlatSB_SetScrollRange(core::mem::transmute(param0), core::mem::transmute(code), core::mem::transmute(min), core::mem::transmute(max), fredraw.into()) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn FlatSB_ShowScrollBar(param0: super::super::Foundation::HWND, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, param2: P2) -> super::super::Foundation::BOOL -where - P2: windows_core::Param, -{ +pub unsafe fn FlatSB_ShowScrollBar(param0: super::super::Foundation::HWND, code: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, param2: bool) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn FlatSB_ShowScrollBar(param0 : super::super::Foundation:: HWND, code : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, param2 : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - FlatSB_ShowScrollBar(core::mem::transmute(param0), core::mem::transmute(code), param2.param().abi()) + FlatSB_ShowScrollBar(core::mem::transmute(param0), core::mem::transmute(code), param2.into()) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -871,12 +844,9 @@ pub unsafe fn ImageList_DragMove(x: i32, y: i32) -> super::super::Foundation::BO ImageList_DragMove(core::mem::transmute(x), core::mem::transmute(y)) } #[inline] -pub unsafe fn ImageList_DragShowNolock(fshow: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn ImageList_DragShowNolock(fshow: bool) -> super::super::Foundation::BOOL { windows_targets::link!("comctl32.dll" "system" fn ImageList_DragShowNolock(fshow : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - ImageList_DragShowNolock(fshow.param().abi()) + ImageList_DragShowNolock(fshow.into()) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1100,12 +1070,9 @@ pub unsafe fn IsThemePartDefined(htheme: HTHEME, ipartid: i32, istateid: i32) -> IsThemePartDefined(core::mem::transmute(htheme), core::mem::transmute(ipartid), core::mem::transmute(istateid)) } #[inline] -pub unsafe fn LBItemFromPt(hlb: super::super::Foundation::HWND, pt: super::super::Foundation::POINT, bautoscroll: P2) -> i32 -where - P2: windows_core::Param, -{ +pub unsafe fn LBItemFromPt(hlb: super::super::Foundation::HWND, pt: super::super::Foundation::POINT, bautoscroll: bool) -> i32 { windows_targets::link!("comctl32.dll" "system" fn LBItemFromPt(hlb : super::super::Foundation:: HWND, pt : super::super::Foundation:: POINT, bautoscroll : super::super::Foundation:: BOOL) -> i32); - LBItemFromPt(core::mem::transmute(hlb), core::mem::transmute(pt), bautoscroll.param().abi()) + LBItemFromPt(core::mem::transmute(hlb), core::mem::transmute(pt), bautoscroll.into()) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -1172,12 +1139,9 @@ pub unsafe fn PropertySheetW(param0: *mut PROPSHEETHEADERW_V2) -> isize { PropertySheetW(core::mem::transmute(param0)) } #[inline] -pub unsafe fn RegisterPointerDeviceNotifications(window: super::super::Foundation::HWND, notifyrange: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn RegisterPointerDeviceNotifications(window: super::super::Foundation::HWND, notifyrange: bool) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn RegisterPointerDeviceNotifications(window : super::super::Foundation:: HWND, notifyrange : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - RegisterPointerDeviceNotifications(core::mem::transmute(window), notifyrange.param().abi()).ok() + RegisterPointerDeviceNotifications(core::mem::transmute(window), notifyrange.into()).ok() } #[inline] pub unsafe fn RegisterTouchHitTestingWindow(hwnd: super::super::Foundation::HWND, value: u32) -> windows_core::Result<()> { @@ -1186,30 +1150,21 @@ pub unsafe fn RegisterTouchHitTestingWindow(hwnd: super::super::Foundation::HWND } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn SetScrollInfo(hwnd: super::super::Foundation::HWND, nbar: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, lpsi: *const super::WindowsAndMessaging::SCROLLINFO, redraw: P3) -> i32 -where - P3: windows_core::Param, -{ +pub unsafe fn SetScrollInfo(hwnd: super::super::Foundation::HWND, nbar: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, lpsi: *const super::WindowsAndMessaging::SCROLLINFO, redraw: bool) -> i32 { windows_targets::link!("user32.dll" "system" fn SetScrollInfo(hwnd : super::super::Foundation:: HWND, nbar : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, lpsi : *const super::WindowsAndMessaging:: SCROLLINFO, redraw : super::super::Foundation:: BOOL) -> i32); - SetScrollInfo(core::mem::transmute(hwnd), core::mem::transmute(nbar), core::mem::transmute(lpsi), redraw.param().abi()) + SetScrollInfo(core::mem::transmute(hwnd), core::mem::transmute(nbar), core::mem::transmute(lpsi), redraw.into()) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn SetScrollPos(hwnd: super::super::Foundation::HWND, nbar: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, npos: i32, bredraw: P3) -> i32 -where - P3: windows_core::Param, -{ +pub unsafe fn SetScrollPos(hwnd: super::super::Foundation::HWND, nbar: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, npos: i32, bredraw: bool) -> i32 { windows_targets::link!("user32.dll" "system" fn SetScrollPos(hwnd : super::super::Foundation:: HWND, nbar : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, npos : i32, bredraw : super::super::Foundation:: BOOL) -> i32); - SetScrollPos(core::mem::transmute(hwnd), core::mem::transmute(nbar), core::mem::transmute(npos), bredraw.param().abi()) + SetScrollPos(core::mem::transmute(hwnd), core::mem::transmute(nbar), core::mem::transmute(npos), bredraw.into()) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn SetScrollRange(hwnd: super::super::Foundation::HWND, nbar: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, nminpos: i32, nmaxpos: i32, bredraw: P4) -> windows_core::Result<()> -where - P4: windows_core::Param, -{ +pub unsafe fn SetScrollRange(hwnd: super::super::Foundation::HWND, nbar: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, nminpos: i32, nmaxpos: i32, bredraw: bool) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetScrollRange(hwnd : super::super::Foundation:: HWND, nbar : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, nminpos : i32, nmaxpos : i32, bredraw : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetScrollRange(core::mem::transmute(hwnd), core::mem::transmute(nbar), core::mem::transmute(nminpos), core::mem::transmute(nmaxpos), bredraw.param().abi()).ok() + SetScrollRange(core::mem::transmute(hwnd), core::mem::transmute(nbar), core::mem::transmute(nminpos), core::mem::transmute(nmaxpos), bredraw.into()).ok() } #[inline] pub unsafe fn SetThemeAppProperties(dwflags: SET_THEME_APP_PROPERTIES_FLAGS) { @@ -1242,12 +1197,9 @@ pub unsafe fn ShowHideMenuCtl(hwnd: super::super::Foundation::HWND, uflags: usiz } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn ShowScrollBar(hwnd: super::super::Foundation::HWND, wbar: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, bshow: P2) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn ShowScrollBar(hwnd: super::super::Foundation::HWND, wbar: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, bshow: bool) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn ShowScrollBar(hwnd : super::super::Foundation:: HWND, wbar : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, bshow : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - ShowScrollBar(core::mem::transmute(hwnd), core::mem::transmute(wbar), bshow.param().abi()).ok() + ShowScrollBar(core::mem::transmute(hwnd), core::mem::transmute(wbar), bshow.into()).ok() } #[inline] pub unsafe fn Str_SetPtrW(ppsz: *mut windows_core::PWSTR, psz: P1) -> super::super::Foundation::BOOL @@ -1280,12 +1232,9 @@ pub unsafe fn UninitializeFlatSB(param0: super::super::Foundation::HWND) -> wind UninitializeFlatSB(core::mem::transmute(param0)).ok() } #[inline] -pub unsafe fn UpdatePanningFeedback(hwnd: super::super::Foundation::HWND, ltotaloverpanoffsetx: i32, ltotaloverpanoffsety: i32, fininertia: P3) -> super::super::Foundation::BOOL -where - P3: windows_core::Param, -{ +pub unsafe fn UpdatePanningFeedback(hwnd: super::super::Foundation::HWND, ltotaloverpanoffsetx: i32, ltotaloverpanoffsety: i32, fininertia: bool) -> super::super::Foundation::BOOL { windows_targets::link!("uxtheme.dll" "system" fn UpdatePanningFeedback(hwnd : super::super::Foundation:: HWND, ltotaloverpanoffsetx : i32, ltotaloverpanoffsety : i32, fininertia : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - UpdatePanningFeedback(core::mem::transmute(hwnd), core::mem::transmute(ltotaloverpanoffsetx), core::mem::transmute(ltotaloverpanoffsety), fininertia.param().abi()) + UpdatePanningFeedback(core::mem::transmute(hwnd), core::mem::transmute(ltotaloverpanoffsetx), core::mem::transmute(ltotaloverpanoffsety), fininertia.into()) } pub const ABS_DOWNDISABLED: ARROWBTNSTATES = ARROWBTNSTATES(8i32); pub const ABS_DOWNHOT: ARROWBTNSTATES = ARROWBTNSTATES(6i32); @@ -3115,9 +3064,6 @@ pub const HDN_TRACKW: u32 = 4294966968u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HDPA(pub isize); -impl windows_core::TypeKind for HDPA { - type TypeKind = windows_core::CopyType; -} impl HDPA { pub fn is_invalid(&self) -> bool { self.0 == -1 || self.0 == 0 @@ -3135,9 +3081,6 @@ impl windows_core::Free for HDPA { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HDSA(pub isize); -impl windows_core::TypeKind for HDSA { - type TypeKind = windows_core::CopyType; -} impl HDSA { pub fn is_invalid(&self) -> bool { self.0 == -1 || self.0 == 0 @@ -3311,9 +3254,6 @@ pub const HILS_PRESSED: HEADERITEMLEFTSTATES = HEADERITEMLEFTSTATES(3i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HIMAGELIST(pub isize); -impl windows_core::TypeKind for HIMAGELIST { - type TypeKind = windows_core::CopyType; -} impl HIMAGELIST { pub fn is_invalid(&self) -> bool { self.0 == -1 || self.0 == 0 @@ -3389,9 +3329,6 @@ pub const HOVER_DEFAULT: u32 = 4294967295u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HPROPSHEETPAGE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HPROPSHEETPAGE { - type TypeKind = windows_core::CopyType; -} impl HPROPSHEETPAGE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -3427,9 +3364,6 @@ pub const HSS_PUSHED: HORZSCROLLSTATES = HORZSCROLLSTATES(3i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HSYNTHETICPOINTERDEVICE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HSYNTHETICPOINTERDEVICE { - type TypeKind = windows_core::CopyType; -} impl HSYNTHETICPOINTERDEVICE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -3452,9 +3386,6 @@ impl Default for HSYNTHETICPOINTERDEVICE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HTHEME(pub isize); -impl windows_core::TypeKind for HTHEME { - type TypeKind = windows_core::CopyType; -} impl HTHEME { pub fn is_invalid(&self) -> bool { self.0 == 0 @@ -3472,9 +3403,6 @@ impl windows_core::Free for HTHEME { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct HTREEITEM(pub isize); -impl windows_core::TypeKind for HTREEITEM { - type TypeKind = windows_core::CopyType; -} pub const HTS_DISABLED: HORZTHUMBSTATES = HORZTHUMBSTATES(4i32); pub const HTS_HOT: HORZTHUMBSTATES = HORZTHUMBSTATES(2i32); pub const HTS_NORMAL: HORZTHUMBSTATES = HORZTHUMBSTATES(1i32); @@ -3637,11 +3565,8 @@ impl IImageList { { (windows_core::Interface::vtable(self).SetDragCursorImage)(windows_core::Interface::as_raw(self), punk.param().abi(), core::mem::transmute(idrag), core::mem::transmute(dxhotspot), core::mem::transmute(dyhotspot)).ok() } - pub unsafe fn DragShowNolock(&self, fshow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).DragShowNolock)(windows_core::Interface::as_raw(self), fshow.param().abi()).ok() + pub unsafe fn DragShowNolock(&self, fshow: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DragShowNolock)(windows_core::Interface::as_raw(self), fshow.into()).ok() } pub unsafe fn GetDragImage(&self, ppt: Option<*mut super::super::Foundation::POINT>, ppthotspot: Option<*mut super::super::Foundation::POINT>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDragImage)(windows_core::Interface::as_raw(self), core::mem::transmute(ppt.unwrap_or(core::mem::zeroed())), core::mem::transmute(ppthotspot.unwrap_or(core::mem::zeroed())), core::mem::transmute(riid), core::mem::transmute(ppv)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/UI/HiDpi/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/HiDpi/mod.rs index 6e6e32d561..89330d71ec 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/HiDpi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/HiDpi/mod.rs @@ -1,11 +1,8 @@ #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] -pub unsafe fn AdjustWindowRectExForDpi(lprect: *mut super::super::Foundation::RECT, dwstyle: super::WindowsAndMessaging::WINDOW_STYLE, bmenu: P2, dwexstyle: super::WindowsAndMessaging::WINDOW_EX_STYLE, dpi: u32) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn AdjustWindowRectExForDpi(lprect: *mut super::super::Foundation::RECT, dwstyle: super::WindowsAndMessaging::WINDOW_STYLE, bmenu: bool, dwexstyle: super::WindowsAndMessaging::WINDOW_EX_STYLE, dpi: u32) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn AdjustWindowRectExForDpi(lprect : *mut super::super::Foundation:: RECT, dwstyle : super::WindowsAndMessaging:: WINDOW_STYLE, bmenu : super::super::Foundation:: BOOL, dwexstyle : super::WindowsAndMessaging:: WINDOW_EX_STYLE, dpi : u32) -> super::super::Foundation:: BOOL); - AdjustWindowRectExForDpi(core::mem::transmute(lprect), core::mem::transmute(dwstyle), bmenu.param().abi(), core::mem::transmute(dwexstyle), core::mem::transmute(dpi)).ok() + AdjustWindowRectExForDpi(core::mem::transmute(lprect), core::mem::transmute(dwstyle), bmenu.into(), core::mem::transmute(dwexstyle), core::mem::transmute(dpi)).ok() } #[inline] pub unsafe fn AreDpiAwarenessContextsEqual(dpicontexta: DPI_AWARENESS_CONTEXT, dpicontextb: DPI_AWARENESS_CONTEXT) -> super::super::Foundation::BOOL { @@ -239,9 +236,6 @@ pub struct DPI_AWARENESS(pub i32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct DPI_AWARENESS_CONTEXT(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for DPI_AWARENESS_CONTEXT { - type TypeKind = windows_core::CopyType; -} impl DPI_AWARENESS_CONTEXT { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/UI/Input/Ime/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Input/Ime/mod.rs index c7936ba97c..6c995ff0cf 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/Ime/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/Ime/mod.rs @@ -428,12 +428,9 @@ pub unsafe fn ImmSetHotKey(param0: u32, param1: u32, param2: u32, param3: super: ImmSetHotKey(core::mem::transmute(param0), core::mem::transmute(param1), core::mem::transmute(param2), core::mem::transmute(param3)) } #[inline] -pub unsafe fn ImmSetOpenStatus(param0: HIMC, param1: P1) -> super::super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn ImmSetOpenStatus(param0: HIMC, param1: bool) -> super::super::super::Foundation::BOOL { windows_targets::link!("imm32.dll" "system" fn ImmSetOpenStatus(param0 : HIMC, param1 : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - ImmSetOpenStatus(core::mem::transmute(param0), param1.param().abi()) + ImmSetOpenStatus(core::mem::transmute(param0), param1.into()) } #[inline] pub unsafe fn ImmSetStatusWindowPos(param0: HIMC, lpptpos: *const super::super::super::Foundation::POINT) -> super::super::super::Foundation::BOOL { @@ -750,9 +747,6 @@ impl Default for GUIDELINE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HIMC(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HIMC { - type TypeKind = windows_core::CopyType; -} impl HIMC { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -775,9 +769,6 @@ impl Default for HIMC { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HIMCC(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HIMCC { - type TypeKind = windows_core::CopyType; -} impl HIMCC { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -813,11 +804,8 @@ impl IActiveIME { pub unsafe fn Escape(&self, himc: HIMC, uescape: u32, pdata: *mut core::ffi::c_void, plresult: *mut super::super::super::Foundation::LRESULT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Escape)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(uescape), core::mem::transmute(pdata), core::mem::transmute(plresult)).ok() } - pub unsafe fn SetActiveContext(&self, himc: HIMC, fflag: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetActiveContext)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), fflag.param().abi()).ok() + pub unsafe fn SetActiveContext(&self, himc: HIMC, fflag: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetActiveContext)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), fflag.into()).ok() } pub unsafe fn ProcessKey(&self, himc: HIMC, uvirkey: u32, lparam: u32, pbkeystate: *const u8) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ProcessKey)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(uvirkey), core::mem::transmute(lparam), core::mem::transmute(pbkeystate)).ok() @@ -825,11 +813,8 @@ impl IActiveIME { pub unsafe fn Notify(&self, himc: HIMC, dwaction: u32, dwindex: u32, dwvalue: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Notify)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwaction), core::mem::transmute(dwindex), core::mem::transmute(dwvalue)).ok() } - pub unsafe fn Select(&self, himc: HIMC, fselect: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).Select)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), fselect.param().abi()).ok() + pub unsafe fn Select(&self, himc: HIMC, fselect: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Select)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), fselect.into()).ok() } pub unsafe fn SetCompositionString(&self, himc: HIMC, dwindex: u32, pcomp: *const core::ffi::c_void, dwcomplen: u32, pread: *const core::ffi::c_void, dwreadlen: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetCompositionString)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(dwindex), core::mem::transmute(pcomp), core::mem::transmute(dwcomplen), core::mem::transmute(pread), core::mem::transmute(dwreadlen)).ok() @@ -1043,11 +1028,8 @@ impl IActiveIME2 { pub unsafe fn Sleep(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Sleep)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn Unsleep(&self, fdead: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Unsleep)(windows_core::Interface::as_raw(self), fdead.param().abi()).ok() + pub unsafe fn Unsleep(&self, fdead: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Unsleep)(windows_core::Interface::as_raw(self), fdead.into()).ok() } } #[repr(C)] @@ -1304,11 +1286,8 @@ impl IActiveIMMApp { pub unsafe fn SetConversionStatus(&self, himc: HIMC, fdwconversion: u32, fdwsentence: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetConversionStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(fdwconversion), core::mem::transmute(fdwsentence)).ok() } - pub unsafe fn SetOpenStatus(&self, himc: HIMC, fopen: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetOpenStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), fopen.param().abi()).ok() + pub unsafe fn SetOpenStatus(&self, himc: HIMC, fopen: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetOpenStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), fopen.into()).ok() } pub unsafe fn SetStatusWindowPos(&self, himc: HIMC, pptpos: *const super::super::super::Foundation::POINT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetStatusWindowPos)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(pptpos)).ok() @@ -1332,11 +1311,8 @@ impl IActiveIMMApp { { (windows_core::Interface::vtable(self).UnregisterWordW)(windows_core::Interface::as_raw(self), core::mem::transmute(hkl), szreading.param().abi(), core::mem::transmute(dwstyle), szunregister.param().abi()).ok() } - pub unsafe fn Activate(&self, frestorelayout: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), frestorelayout.param().abi()).ok() + pub unsafe fn Activate(&self, frestorelayout: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), frestorelayout.into()).ok() } pub unsafe fn Deactivate(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Deactivate)(windows_core::Interface::as_raw(self)).ok() @@ -2277,11 +2253,8 @@ impl IActiveIMMIME { pub unsafe fn SetConversionStatus(&self, himc: HIMC, fdwconversion: u32, fdwsentence: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetConversionStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(fdwconversion), core::mem::transmute(fdwsentence)).ok() } - pub unsafe fn SetOpenStatus(&self, himc: HIMC, fopen: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetOpenStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), fopen.param().abi()).ok() + pub unsafe fn SetOpenStatus(&self, himc: HIMC, fopen: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetOpenStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), fopen.into()).ok() } pub unsafe fn SetStatusWindowPos(&self, himc: HIMC, pptpos: *const super::super::super::Foundation::POINT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetStatusWindowPos)(windows_core::Interface::as_raw(self), core::mem::transmute(himc), core::mem::transmute(pptpos)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/UI/Input/Ink/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Input/Ink/mod.rs index 9d220e3ae2..56820226c8 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/Ink/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/Ink/mod.rs @@ -29,13 +29,12 @@ impl windows_core::RuntimeName for IInkCommitRequestHandler {} windows_core::imp::define_interface!(IInkD2DRenderer, IInkD2DRenderer_Vtbl, 0x407fb1de_f85a_4150_97cf_b7fb274fb4f8); windows_core::imp::interface_hierarchy!(IInkD2DRenderer, windows_core::IUnknown); impl IInkD2DRenderer { - pub unsafe fn Draw(&self, pd2d1devicecontext: P0, pinkstrokeiterable: P1, fhighcontrast: P2) -> windows_core::Result<()> + pub unsafe fn Draw(&self, pd2d1devicecontext: P0, pinkstrokeiterable: P1, fhighcontrast: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), pd2d1devicecontext.param().abi(), pinkstrokeiterable.param().abi(), fhighcontrast.param().abi()).ok() + (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), pd2d1devicecontext.param().abi(), pinkstrokeiterable.param().abi(), fhighcontrast.into()).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/UI/Input/KeyboardAndMouse/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Input/KeyboardAndMouse/mod.rs index f7b8133466..4fe2e418d4 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/KeyboardAndMouse/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/KeyboardAndMouse/mod.rs @@ -5,12 +5,9 @@ pub unsafe fn ActivateKeyboardLayout(hkl: HKL, flags: ACTIVATE_KEYBOARD_LAYOUT_F (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn BlockInput(fblockit: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn BlockInput(fblockit: bool) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn BlockInput(fblockit : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - BlockInput(fblockit.param().abi()).ok() + BlockInput(fblockit.into()).ok() } #[inline] pub unsafe fn DragDetect(hwnd: super::super::super::Foundation::HWND, pt: super::super::super::Foundation::POINT) -> super::super::super::Foundation::BOOL { @@ -18,12 +15,9 @@ pub unsafe fn DragDetect(hwnd: super::super::super::Foundation::HWND, pt: super: DragDetect(core::mem::transmute(hwnd), core::mem::transmute(pt)) } #[inline] -pub unsafe fn EnableWindow(hwnd: super::super::super::Foundation::HWND, benable: P1) -> super::super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn EnableWindow(hwnd: super::super::super::Foundation::HWND, benable: bool) -> super::super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn EnableWindow(hwnd : super::super::super::Foundation:: HWND, benable : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - EnableWindow(core::mem::transmute(hwnd), benable.param().abi()) + EnableWindow(core::mem::transmute(hwnd), benable.into()) } #[inline] pub unsafe fn GetActiveWindow() -> super::super::super::Foundation::HWND { @@ -201,12 +195,9 @@ pub unsafe fn SetKeyboardState(lpkeystate: &[u8; 256]) -> windows_core::Result<( SetKeyboardState(core::mem::transmute(lpkeystate.as_ptr())).ok() } #[inline] -pub unsafe fn SwapMouseButton(fswap: P0) -> super::super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn SwapMouseButton(fswap: bool) -> super::super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn SwapMouseButton(fswap : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - SwapMouseButton(fswap.param().abi()) + SwapMouseButton(fswap.into()) } #[inline] pub unsafe fn ToAscii(uvirtkey: u32, uscancode: u32, lpkeystate: Option<&[u8; 256]>, lpchar: *mut u16, uflags: u32) -> i32 { @@ -336,9 +327,6 @@ impl Default for HARDWAREINPUT { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HKL(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HKL { - type TypeKind = windows_core::CopyType; -} impl HKL { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/UI/Input/Pointer/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Input/Pointer/mod.rs index 3779b8d5d1..4e5b072a24 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/Pointer/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/Pointer/mod.rs @@ -1,10 +1,7 @@ #[inline] -pub unsafe fn EnableMouseInPointer(fenable: P0) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn EnableMouseInPointer(fenable: bool) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn EnableMouseInPointer(fenable : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - EnableMouseInPointer(fenable.param().abi()).ok() + EnableMouseInPointer(fenable.into()).ok() } #[inline] pub unsafe fn GetPointerCursorId(pointerid: u32, cursorid: *mut u32) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/UI/Input/Touch/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Input/Touch/mod.rs index 91e82722d7..b82e47e497 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/Touch/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/Touch/mod.rs @@ -139,9 +139,6 @@ pub const GID_ZOOM: GESTURECONFIG_ID = GESTURECONFIG_ID(3u32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HGESTUREINFO(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HGESTUREINFO { - type TypeKind = windows_core::CopyType; -} impl HGESTUREINFO { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -164,9 +161,6 @@ impl Default for HGESTUREINFO { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HTOUCHINPUT(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HTOUCHINPUT { - type TypeKind = windows_core::CopyType; -} impl HTOUCHINPUT { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/UI/Input/XboxController/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Input/XboxController/mod.rs index 408dd9407d..5f80e01c4f 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/XboxController/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/XboxController/mod.rs @@ -1,10 +1,7 @@ #[inline] -pub unsafe fn XInputEnable(enable: P0) -where - P0: windows_core::Param, -{ +pub unsafe fn XInputEnable(enable: bool) { windows_targets::link!("xinput1_4.dll" "system" fn XInputEnable(enable : super::super::super::Foundation:: BOOL)); - XInputEnable(enable.param().abi()) + XInputEnable(enable.into()) } #[inline] pub unsafe fn XInputGetAudioDeviceIds(dwuserindex: u32, prenderdeviceid: Option, prendercount: Option<*mut u32>, pcapturedeviceid: Option, pcapturecount: Option<*mut u32>) -> u32 { diff --git a/crates/libs/windows/src/Windows/Win32/UI/Input/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Input/mod.rs index 076ff23755..0eba1dc32c 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/mod.rs @@ -65,9 +65,6 @@ pub unsafe fn RegisterRawInputDevices(prawinputdevices: &[RAWINPUTDEVICE], cbsiz #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HRAWINPUT(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HRAWINPUT { - type TypeKind = windows_core::CopyType; -} impl HRAWINPUT { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/UI/InteractionContext/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/InteractionContext/mod.rs index a6842e0a5b..235678aa8b 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/InteractionContext/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/InteractionContext/mod.rs @@ -226,9 +226,6 @@ pub const CROSS_SLIDE_THRESHOLD_SPEED_BUMP_START: CROSS_SLIDE_THRESHOLD = CROSS_ #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HINTERACTIONCONTEXT(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HINTERACTIONCONTEXT { - type TypeKind = windows_core::CopyType; -} impl HINTERACTIONCONTEXT { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/UI/Magnification/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Magnification/mod.rs index 164da21780..a1bc2dcb84 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Magnification/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Magnification/mod.rs @@ -66,12 +66,9 @@ pub unsafe fn MagSetImageScalingCallback(hwnd: super::super::Foundation::HWND, c MagSetImageScalingCallback(core::mem::transmute(hwnd), core::mem::transmute(callback)) } #[inline] -pub unsafe fn MagSetInputTransform(fenabled: P0, prectsource: *const super::super::Foundation::RECT, prectdest: *const super::super::Foundation::RECT) -> windows_core::Result<()> -where - P0: windows_core::Param, -{ +pub unsafe fn MagSetInputTransform(fenabled: bool, prectsource: *const super::super::Foundation::RECT, prectdest: *const super::super::Foundation::RECT) -> windows_core::Result<()> { windows_targets::link!("magnification.dll" "system" fn MagSetInputTransform(fenabled : super::super::Foundation:: BOOL, prectsource : *const super::super::Foundation:: RECT, prectdest : *const super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - MagSetInputTransform(fenabled.param().abi(), core::mem::transmute(prectsource), core::mem::transmute(prectdest)).ok() + MagSetInputTransform(fenabled.into(), core::mem::transmute(prectsource), core::mem::transmute(prectdest)).ok() } #[inline] pub unsafe fn MagSetWindowFilterList(hwnd: super::super::Foundation::HWND, dwfiltermode: MW_FILTERMODE, count: i32, phwnd: *mut super::super::Foundation::HWND) -> super::super::Foundation::BOOL { @@ -89,12 +86,9 @@ pub unsafe fn MagSetWindowTransform(hwnd: super::super::Foundation::HWND, ptrans MagSetWindowTransform(core::mem::transmute(hwnd), core::mem::transmute(ptransform)) } #[inline] -pub unsafe fn MagShowSystemCursor(fshowcursor: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn MagShowSystemCursor(fshowcursor: bool) -> super::super::Foundation::BOOL { windows_targets::link!("magnification.dll" "system" fn MagShowSystemCursor(fshowcursor : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - MagShowSystemCursor(fshowcursor.param().abi()) + MagShowSystemCursor(fshowcursor.into()) } #[inline] pub unsafe fn MagUninitialize() -> super::super::Foundation::BOOL { diff --git a/crates/libs/windows/src/Windows/Win32/UI/Shell/PropertiesSystem/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Shell/PropertiesSystem/mod.rs index 4005f20480..040739a741 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Shell/PropertiesSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Shell/PropertiesSystem/mod.rs @@ -95,23 +95,21 @@ pub unsafe fn PSGetImageReferenceForValue(propkey: *const super::super::super::F PSGetImageReferenceForValue(core::mem::transmute(propkey), core::mem::transmute(propvar), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn PSGetItemPropertyHandler(punkitem: P0, freadwrite: P1, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn PSGetItemPropertyHandler(punkitem: P0, freadwrite: bool, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { windows_targets::link!("propsys.dll" "system" fn PSGetItemPropertyHandler(punkitem : * mut core::ffi::c_void, freadwrite : super::super::super::Foundation:: BOOL, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - PSGetItemPropertyHandler(punkitem.param().abi(), freadwrite.param().abi(), core::mem::transmute(riid), core::mem::transmute(ppv)).ok() + PSGetItemPropertyHandler(punkitem.param().abi(), freadwrite.into(), core::mem::transmute(riid), core::mem::transmute(ppv)).ok() } #[inline] -pub unsafe fn PSGetItemPropertyHandlerWithCreateObject(punkitem: P0, freadwrite: P1, punkcreateobject: P2, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> +pub unsafe fn PSGetItemPropertyHandlerWithCreateObject(punkitem: P0, freadwrite: bool, punkcreateobject: P2, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("propsys.dll" "system" fn PSGetItemPropertyHandlerWithCreateObject(punkitem : * mut core::ffi::c_void, freadwrite : super::super::super::Foundation:: BOOL, punkcreateobject : * mut core::ffi::c_void, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - PSGetItemPropertyHandlerWithCreateObject(punkitem.param().abi(), freadwrite.param().abi(), punkcreateobject.param().abi(), core::mem::transmute(riid), core::mem::transmute(ppv)).ok() + PSGetItemPropertyHandlerWithCreateObject(punkitem.param().abi(), freadwrite.into(), punkcreateobject.param().abi(), core::mem::transmute(riid), core::mem::transmute(ppv)).ok() } #[inline] pub unsafe fn PSGetNameFromPropertyKey(propkey: *const super::super::super::Foundation::PROPERTYKEY) -> windows_core::Result { @@ -385,14 +383,13 @@ where } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] -pub unsafe fn PSPropertyBag_WriteBOOL(propbag: P0, propname: P1, value: P2) -> windows_core::Result<()> +pub unsafe fn PSPropertyBag_WriteBOOL(propbag: P0, propname: P1, value: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("propsys.dll" "system" fn PSPropertyBag_WriteBOOL(propbag : * mut core::ffi::c_void, propname : windows_core::PCWSTR, value : super::super::super::Foundation:: BOOL) -> windows_core::HRESULT); - PSPropertyBag_WriteBOOL(propbag.param().abi(), propname.param().abi(), value.param().abi()).ok() + PSPropertyBag_WriteBOOL(propbag.param().abi(), propname.param().abi(), value.into()).ok() } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] @@ -1331,12 +1328,9 @@ impl IPropertyDescription { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetSortDescription)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn GetSortDescriptionLabel(&self, fdescending: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetSortDescriptionLabel(&self, fdescending: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetSortDescriptionLabel)(windows_core::Interface::as_raw(self), fdescending.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetSortDescriptionLabel)(windows_core::Interface::as_raw(self), fdescending.into(), &mut result__).map(|| result__) } pub unsafe fn GetAggregationType(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2758,9 +2752,6 @@ pub const InMemoryPropertyStoreMarshalByValue: windows_core::GUID = windows_core #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PCUSERIALIZEDPROPSTORAGE(pub isize); -impl windows_core::TypeKind for PCUSERIALIZEDPROPSTORAGE { - type TypeKind = windows_core::CopyType; -} pub const PDAT_AVERAGE: PROPDESC_AGGREGATION_TYPE = PROPDESC_AGGREGATION_TYPE(3i32); pub const PDAT_DATERANGE: PROPDESC_AGGREGATION_TYPE = PROPDESC_AGGREGATION_TYPE(4i32); pub const PDAT_DEFAULT: PROPDESC_AGGREGATION_TYPE = PROPDESC_AGGREGATION_TYPE(0i32); @@ -3283,9 +3274,6 @@ pub const PropertySystem: windows_core::GUID = windows_core::GUID::from_u128(0xb #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct SERIALIZEDPROPSTORAGE(pub isize); -impl windows_core::TypeKind for SERIALIZEDPROPSTORAGE { - type TypeKind = windows_core::CopyType; -} pub const SESF_ALL_FLAGS: SYNC_ENGINE_STATE_FLAGS = SYNC_ENGINE_STATE_FLAGS(511i32); pub const SESF_AUTHENTICATION_ERROR: SYNC_ENGINE_STATE_FLAGS = SYNC_ENGINE_STATE_FLAGS(4i32); pub const SESF_NONE: SYNC_ENGINE_STATE_FLAGS = SYNC_ENGINE_STATE_FLAGS(0i32); diff --git a/crates/libs/windows/src/Windows/Win32/UI/Shell/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Shell/mod.rs index d5f0b74f0e..b175b263b1 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Shell/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Shell/mod.rs @@ -144,12 +144,9 @@ pub unsafe fn ChrCmpIW(w1: u16, w2: u16) -> super::super::Foundation::BOOL { ChrCmpIW(core::mem::transmute(w1), core::mem::transmute(w2)) } #[inline] -pub unsafe fn ColorAdjustLuma(clrrgb: super::super::Foundation::COLORREF, n: i32, fscale: P2) -> super::super::Foundation::COLORREF -where - P2: windows_core::Param, -{ +pub unsafe fn ColorAdjustLuma(clrrgb: super::super::Foundation::COLORREF, n: i32, fscale: bool) -> super::super::Foundation::COLORREF { windows_targets::link!("shlwapi.dll" "system" fn ColorAdjustLuma(clrrgb : super::super::Foundation:: COLORREF, n : i32, fscale : super::super::Foundation:: BOOL) -> super::super::Foundation:: COLORREF); - ColorAdjustLuma(core::mem::transmute(clrrgb), core::mem::transmute(n), fscale.param().abi()) + ColorAdjustLuma(core::mem::transmute(clrrgb), core::mem::transmute(n), fscale.into()) } #[inline] pub unsafe fn ColorHLSToRGB(whue: u16, wluminance: u16, wsaturation: u16) -> super::super::Foundation::COLORREF { @@ -171,14 +168,13 @@ where } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn ConnectToConnectionPoint(punk: P0, riidevent: *const windows_core::GUID, fconnect: P2, punktarget: P3, pdwcookie: *mut u32, ppcpout: Option<*mut Option>) -> windows_core::Result<()> +pub unsafe fn ConnectToConnectionPoint(punk: P0, riidevent: *const windows_core::GUID, fconnect: bool, punktarget: P3, pdwcookie: *mut u32, ppcpout: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn ConnectToConnectionPoint(punk : * mut core::ffi::c_void, riidevent : *const windows_core::GUID, fconnect : super::super::Foundation:: BOOL, punktarget : * mut core::ffi::c_void, pdwcookie : *mut u32, ppcpout : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - ConnectToConnectionPoint(punk.param().abi(), core::mem::transmute(riidevent), fconnect.param().abi(), punktarget.param().abi(), core::mem::transmute(pdwcookie), core::mem::transmute(ppcpout.unwrap_or(core::mem::zeroed()))).ok() + ConnectToConnectionPoint(punk.param().abi(), core::mem::transmute(riidevent), fconnect.into(), punktarget.param().abi(), core::mem::transmute(pdwcookie), core::mem::transmute(ppcpout.unwrap_or(core::mem::zeroed()))).ok() } #[inline] pub unsafe fn CreateProfile(pszusersid: P0, pszusername: P1, pszprofilepath: &mut [u16]) -> windows_core::Result<()> @@ -225,12 +221,9 @@ pub unsafe fn DAD_SetDragImage(him: super::Controls::HIMAGELIST, pptoffset: *mut DAD_SetDragImage(core::mem::transmute(him), core::mem::transmute(pptoffset)) } #[inline] -pub unsafe fn DAD_ShowDragImage(fshow: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn DAD_ShowDragImage(fshow: bool) -> super::super::Foundation::BOOL { windows_targets::link!("shell32.dll" "system" fn DAD_ShowDragImage(fshow : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - DAD_ShowDragImage(fshow.param().abi()) + DAD_ShowDragImage(fshow.into()) } #[inline] pub unsafe fn DefSubclassProc(hwnd: super::super::Foundation::HWND, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LRESULT { @@ -268,12 +261,9 @@ pub unsafe fn DoEnvironmentSubstW(pszsrc: &mut [u16]) -> u32 { DoEnvironmentSubstW(core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap()) } #[inline] -pub unsafe fn DragAcceptFiles(hwnd: super::super::Foundation::HWND, faccept: P1) -where - P1: windows_core::Param, -{ +pub unsafe fn DragAcceptFiles(hwnd: super::super::Foundation::HWND, faccept: bool) { windows_targets::link!("shell32.dll" "system" fn DragAcceptFiles(hwnd : super::super::Foundation:: HWND, faccept : super::super::Foundation:: BOOL)); - DragAcceptFiles(core::mem::transmute(hwnd), faccept.param().abi()) + DragAcceptFiles(core::mem::transmute(hwnd), faccept.into()) } #[inline] pub unsafe fn DragFinish(hdrop: HDROP) { @@ -736,14 +726,13 @@ where } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn HlinkParseDisplayName(pibc: P0, pwzdisplayname: P1, fnoforceabs: P2, pccheaten: *mut u32, ppimk: *mut Option) -> windows_core::Result<()> +pub unsafe fn HlinkParseDisplayName(pibc: P0, pwzdisplayname: P1, fnoforceabs: bool, pccheaten: *mut u32, ppimk: *mut Option) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("hlink.dll" "system" fn HlinkParseDisplayName(pibc : * mut core::ffi::c_void, pwzdisplayname : windows_core::PCWSTR, fnoforceabs : super::super::Foundation:: BOOL, pccheaten : *mut u32, ppimk : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - HlinkParseDisplayName(pibc.param().abi(), pwzdisplayname.param().abi(), fnoforceabs.param().abi(), core::mem::transmute(pccheaten), core::mem::transmute(ppimk)).ok() + HlinkParseDisplayName(pibc.param().abi(), pwzdisplayname.param().abi(), fnoforceabs.into(), core::mem::transmute(pccheaten), core::mem::transmute(ppimk)).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -848,12 +837,9 @@ where } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] -pub unsafe fn ILAppendID(pidl: Option<*const Common::ITEMIDLIST>, pmkid: *const Common::SHITEMID, fappend: P2) -> *mut Common::ITEMIDLIST -where - P2: windows_core::Param, -{ +pub unsafe fn ILAppendID(pidl: Option<*const Common::ITEMIDLIST>, pmkid: *const Common::SHITEMID, fappend: bool) -> *mut Common::ITEMIDLIST { windows_targets::link!("shell32.dll" "system" fn ILAppendID(pidl : *const Common:: ITEMIDLIST, pmkid : *const Common:: SHITEMID, fappend : super::super::Foundation:: BOOL) -> *mut Common:: ITEMIDLIST); - ILAppendID(core::mem::transmute(pidl.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmkid), fappend.param().abi()) + ILAppendID(core::mem::transmute(pidl.unwrap_or(core::mem::zeroed())), core::mem::transmute(pmkid), fappend.into()) } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -929,12 +915,9 @@ pub unsafe fn ILIsEqual(pidl1: *const Common::ITEMIDLIST, pidl2: *const Common:: } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] -pub unsafe fn ILIsParent(pidl1: *const Common::ITEMIDLIST, pidl2: *const Common::ITEMIDLIST, fimmediate: P2) -> super::super::Foundation::BOOL -where - P2: windows_core::Param, -{ +pub unsafe fn ILIsParent(pidl1: *const Common::ITEMIDLIST, pidl2: *const Common::ITEMIDLIST, fimmediate: bool) -> super::super::Foundation::BOOL { windows_targets::link!("shell32.dll" "system" fn ILIsParent(pidl1 : *const Common:: ITEMIDLIST, pidl2 : *const Common:: ITEMIDLIST, fimmediate : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - ILIsParent(core::mem::transmute(pidl1), core::mem::transmute(pidl2), fimmediate.param().abi()) + ILIsParent(core::mem::transmute(pidl1), core::mem::transmute(pidl2), fimmediate.into()) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] #[inline] @@ -1125,24 +1108,22 @@ pub unsafe fn InitVariantFromStrRet(pstrret: *const Common::STRRET, pidl: *const InitVariantFromStrRet(core::mem::transmute(pstrret), core::mem::transmute(pidl), &mut result__).map(|| core::mem::transmute(result__)) } #[inline] -pub unsafe fn IntlStrEqWorkerA(fcasesens: P0, lpstring1: P1, lpstring2: P2, nchar: i32) -> super::super::Foundation::BOOL +pub unsafe fn IntlStrEqWorkerA(fcasesens: bool, lpstring1: P1, lpstring2: P2, nchar: i32) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn IntlStrEqWorkerA(fcasesens : super::super::Foundation:: BOOL, lpstring1 : windows_core::PCSTR, lpstring2 : windows_core::PCSTR, nchar : i32) -> super::super::Foundation:: BOOL); - IntlStrEqWorkerA(fcasesens.param().abi(), lpstring1.param().abi(), lpstring2.param().abi(), core::mem::transmute(nchar)) + IntlStrEqWorkerA(fcasesens.into(), lpstring1.param().abi(), lpstring2.param().abi(), core::mem::transmute(nchar)) } #[inline] -pub unsafe fn IntlStrEqWorkerW(fcasesens: P0, lpstring1: P1, lpstring2: P2, nchar: i32) -> super::super::Foundation::BOOL +pub unsafe fn IntlStrEqWorkerW(fcasesens: bool, lpstring1: P1, lpstring2: P2, nchar: i32) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn IntlStrEqWorkerW(fcasesens : super::super::Foundation:: BOOL, lpstring1 : windows_core::PCWSTR, lpstring2 : windows_core::PCWSTR, nchar : i32) -> super::super::Foundation:: BOOL); - IntlStrEqWorkerW(fcasesens.param().abi(), lpstring1.param().abi(), lpstring2.param().abi(), core::mem::transmute(nchar)) + IntlStrEqWorkerW(fcasesens.into(), lpstring1.param().abi(), lpstring2.param().abi(), core::mem::transmute(nchar)) } #[inline] pub unsafe fn IsCharSpaceA(wch: i8) -> super::super::Foundation::BOOL { @@ -1202,14 +1183,13 @@ pub unsafe fn LoadUserProfileW(htoken: super::super::Foundation::HANDLE, lpprofi } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn OleSaveToStreamEx(piunk: P0, pistm: P1, fcleardirty: P2) -> windows_core::Result<()> +pub unsafe fn OleSaveToStreamEx(piunk: P0, pistm: P1, fcleardirty: bool) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("hlink.dll" "system" fn OleSaveToStreamEx(piunk : * mut core::ffi::c_void, pistm : * mut core::ffi::c_void, fcleardirty : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - OleSaveToStreamEx(piunk.param().abi(), pistm.param().abi(), fcleardirty.param().abi()).ok() + OleSaveToStreamEx(piunk.param().abi(), pistm.param().abi(), fcleardirty.into()).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Registry"))] #[inline] @@ -2309,12 +2289,9 @@ pub unsafe fn ReadCabinetState(pcs: *mut CABINETSTATE, clength: i32) -> super::s ReadCabinetState(core::mem::transmute(pcs), core::mem::transmute(clength)) } #[inline] -pub unsafe fn RealDriveType(idrive: i32, foktohitnet: P1) -> i32 -where - P1: windows_core::Param, -{ +pub unsafe fn RealDriveType(idrive: i32, foktohitnet: bool) -> i32 { windows_targets::link!("shell32.dll" "system" fn RealDriveType(idrive : i32, foktohitnet : super::super::Foundation:: BOOL) -> i32); - RealDriveType(core::mem::transmute(idrive), foktohitnet.param().abi()) + RealDriveType(core::mem::transmute(idrive), foktohitnet.into()) } #[inline] pub unsafe fn RegisterAppConstrainedChangeNotification(routine: PAPPCONSTRAIN_CHANGE_ROUTINE, context: Option<*const core::ffi::c_void>, registration: *mut PAPPCONSTRAIN_REGISTRATION) -> u32 { @@ -2530,12 +2507,9 @@ pub unsafe fn SHChangeNotifyRegisterThread(status: SCNRT_STATUS) { } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] -pub unsafe fn SHCloneSpecialIDList(hwnd: Option, csidl: i32, fcreate: P2) -> *mut Common::ITEMIDLIST -where - P2: windows_core::Param, -{ +pub unsafe fn SHCloneSpecialIDList(hwnd: Option, csidl: i32, fcreate: bool) -> *mut Common::ITEMIDLIST { windows_targets::link!("shell32.dll" "system" fn SHCloneSpecialIDList(hwnd : super::super::Foundation:: HWND, csidl : i32, fcreate : super::super::Foundation:: BOOL) -> *mut Common:: ITEMIDLIST); - SHCloneSpecialIDList(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(csidl), fcreate.param().abi()) + SHCloneSpecialIDList(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(csidl), fcreate.into()) } #[inline] pub unsafe fn SHCoCreateInstance(pszclsid: P0, pclsid: Option<*const windows_core::GUID>, punkouter: P2) -> windows_core::Result @@ -2821,15 +2795,14 @@ where } #[cfg(feature = "Win32_System_Com")] #[inline] -pub unsafe fn SHCreateStreamOnFileEx(pszfile: P0, grfmode: u32, dwattributes: u32, fcreate: P3, pstmtemplate: P4) -> windows_core::Result +pub unsafe fn SHCreateStreamOnFileEx(pszfile: P0, grfmode: u32, dwattributes: u32, fcreate: bool, pstmtemplate: P4) -> windows_core::Result where P0: windows_core::Param, - P3: windows_core::Param, P4: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHCreateStreamOnFileEx(pszfile : windows_core::PCWSTR, grfmode : u32, dwattributes : u32, fcreate : super::super::Foundation:: BOOL, pstmtemplate : * mut core::ffi::c_void, ppstm : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - SHCreateStreamOnFileEx(pszfile.param().abi(), core::mem::transmute(grfmode), core::mem::transmute(dwattributes), fcreate.param().abi(), pstmtemplate.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + SHCreateStreamOnFileEx(pszfile.param().abi(), core::mem::transmute(grfmode), core::mem::transmute(dwattributes), fcreate.into(), pstmtemplate.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -3334,12 +3307,9 @@ where SHGetSetFolderCustomSettings(core::mem::transmute(pfcs), pszpath.param().abi(), core::mem::transmute(dwreadwrite)).ok() } #[inline] -pub unsafe fn SHGetSetSettings(lpss: Option<*mut SHELLSTATEA>, dwmask: SSF_MASK, bset: P2) -where - P2: windows_core::Param, -{ +pub unsafe fn SHGetSetSettings(lpss: Option<*mut SHELLSTATEA>, dwmask: SSF_MASK, bset: bool) { windows_targets::link!("shell32.dll" "system" fn SHGetSetSettings(lpss : *mut SHELLSTATEA, dwmask : SSF_MASK, bset : super::super::Foundation:: BOOL)); - SHGetSetSettings(core::mem::transmute(lpss.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwmask), bset.param().abi()) + SHGetSetSettings(core::mem::transmute(lpss.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwmask), bset.into()) } #[inline] pub unsafe fn SHGetSettings(psfs: *mut SHELLFLAGSTATE, dwmask: u32) { @@ -3354,20 +3324,14 @@ pub unsafe fn SHGetSpecialFolderLocation(hwnd: Option(hwnd: Option, pszpath: &mut [u8; 260], csidl: i32, fcreate: P3) -> super::super::Foundation::BOOL -where - P3: windows_core::Param, -{ +pub unsafe fn SHGetSpecialFolderPathA(hwnd: Option, pszpath: &mut [u8; 260], csidl: i32, fcreate: bool) -> super::super::Foundation::BOOL { windows_targets::link!("shell32.dll" "system" fn SHGetSpecialFolderPathA(hwnd : super::super::Foundation:: HWND, pszpath : windows_core::PSTR, csidl : i32, fcreate : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SHGetSpecialFolderPathA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(csidl), fcreate.param().abi()) + SHGetSpecialFolderPathA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(csidl), fcreate.into()) } #[inline] -pub unsafe fn SHGetSpecialFolderPathW(hwnd: Option, pszpath: &mut [u16; 260], csidl: i32, fcreate: P3) -> super::super::Foundation::BOOL -where - P3: windows_core::Param, -{ +pub unsafe fn SHGetSpecialFolderPathW(hwnd: Option, pszpath: &mut [u16; 260], csidl: i32, fcreate: bool) -> super::super::Foundation::BOOL { windows_targets::link!("shell32.dll" "system" fn SHGetSpecialFolderPathW(hwnd : super::super::Foundation:: HWND, pszpath : windows_core::PWSTR, csidl : i32, fcreate : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SHGetSpecialFolderPathW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(csidl), fcreate.param().abi()) + SHGetSpecialFolderPathW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(csidl), fcreate.into()) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -3462,24 +3426,22 @@ where SHILCreateFromPath(pszpath.param().abi(), core::mem::transmute(ppidl), core::mem::transmute(rgfinout.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn SHInvokePrinterCommandA(hwnd: Option, uaction: u32, lpbuf1: P2, lpbuf2: P3, fmodal: P4) -> super::super::Foundation::BOOL +pub unsafe fn SHInvokePrinterCommandA(hwnd: Option, uaction: u32, lpbuf1: P2, lpbuf2: P3, fmodal: bool) -> super::super::Foundation::BOOL where P2: windows_core::Param, P3: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHInvokePrinterCommandA(hwnd : super::super::Foundation:: HWND, uaction : u32, lpbuf1 : windows_core::PCSTR, lpbuf2 : windows_core::PCSTR, fmodal : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SHInvokePrinterCommandA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(uaction), lpbuf1.param().abi(), lpbuf2.param().abi(), fmodal.param().abi()) + SHInvokePrinterCommandA(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(uaction), lpbuf1.param().abi(), lpbuf2.param().abi(), fmodal.into()) } #[inline] -pub unsafe fn SHInvokePrinterCommandW(hwnd: Option, uaction: u32, lpbuf1: P2, lpbuf2: P3, fmodal: P4) -> super::super::Foundation::BOOL +pub unsafe fn SHInvokePrinterCommandW(hwnd: Option, uaction: u32, lpbuf1: P2, lpbuf2: P3, fmodal: bool) -> super::super::Foundation::BOOL where P2: windows_core::Param, P3: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHInvokePrinterCommandW(hwnd : super::super::Foundation:: HWND, uaction : u32, lpbuf1 : windows_core::PCWSTR, lpbuf2 : windows_core::PCWSTR, fmodal : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SHInvokePrinterCommandW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(uaction), lpbuf1.param().abi(), lpbuf2.param().abi(), fmodal.param().abi()) + SHInvokePrinterCommandW(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed())), core::mem::transmute(uaction), lpbuf1.param().abi(), lpbuf2.param().abi(), fmodal.into()) } #[inline] pub unsafe fn SHIsFileAvailableOffline(pwszpath: P0, pdwstatus: Option<*mut u32>) -> windows_core::Result<()> @@ -3795,26 +3757,22 @@ pub unsafe fn SHRegEnumUSValueW(huskey: isize, dwindex: u32, pszvaluename: windo SHRegEnumUSValueW(core::mem::transmute(huskey), core::mem::transmute(dwindex), core::mem::transmute(pszvaluename), core::mem::transmute(pcchvaluename), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumregflags)) } #[inline] -pub unsafe fn SHRegGetBoolUSValueA(pszsubkey: P0, pszvalue: P1, fignorehkcu: P2, fdefault: P3) -> super::super::Foundation::BOOL +pub unsafe fn SHRegGetBoolUSValueA(pszsubkey: P0, pszvalue: P1, fignorehkcu: bool, fdefault: bool) -> super::super::Foundation::BOOL where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegGetBoolUSValueA(pszsubkey : windows_core::PCSTR, pszvalue : windows_core::PCSTR, fignorehkcu : super::super::Foundation:: BOOL, fdefault : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SHRegGetBoolUSValueA(pszsubkey.param().abi(), pszvalue.param().abi(), fignorehkcu.param().abi(), fdefault.param().abi()) + SHRegGetBoolUSValueA(pszsubkey.param().abi(), pszvalue.param().abi(), fignorehkcu.into(), fdefault.into()) } #[inline] -pub unsafe fn SHRegGetBoolUSValueW(pszsubkey: P0, pszvalue: P1, fignorehkcu: P2, fdefault: P3) -> super::super::Foundation::BOOL +pub unsafe fn SHRegGetBoolUSValueW(pszsubkey: P0, pszvalue: P1, fignorehkcu: bool, fdefault: bool) -> super::super::Foundation::BOOL where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, - P3: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegGetBoolUSValueW(pszsubkey : windows_core::PCWSTR, pszvalue : windows_core::PCWSTR, fignorehkcu : super::super::Foundation:: BOOL, fdefault : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SHRegGetBoolUSValueW(pszsubkey.param().abi(), pszvalue.param().abi(), fignorehkcu.param().abi(), fdefault.param().abi()) + SHRegGetBoolUSValueW(pszsubkey.param().abi(), pszvalue.param().abi(), fignorehkcu.into(), fdefault.into()) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -3846,24 +3804,22 @@ where SHRegGetPathW(core::mem::transmute(hkey), pcszsubkey.param().abi(), pcszvalue.param().abi(), core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(dwflags)) } #[inline] -pub unsafe fn SHRegGetUSValueA(pszsubkey: P0, pszvalue: P1, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>, fignorehkcu: P5, pvdefaultdata: Option<*const core::ffi::c_void>, dwdefaultdatasize: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegGetUSValueA(pszsubkey: P0, pszvalue: P1, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>, fignorehkcu: bool, pvdefaultdata: Option<*const core::ffi::c_void>, dwdefaultdatasize: u32) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, P1: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegGetUSValueA(pszsubkey : windows_core::PCSTR, pszvalue : windows_core::PCSTR, pdwtype : *mut u32, pvdata : *mut core::ffi::c_void, pcbdata : *mut u32, fignorehkcu : super::super::Foundation:: BOOL, pvdefaultdata : *const core::ffi::c_void, dwdefaultdatasize : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegGetUSValueA(pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed())), fignorehkcu.param().abi(), core::mem::transmute(pvdefaultdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdefaultdatasize)) + SHRegGetUSValueA(pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed())), fignorehkcu.into(), core::mem::transmute(pvdefaultdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdefaultdatasize)) } #[inline] -pub unsafe fn SHRegGetUSValueW(pszsubkey: P0, pszvalue: P1, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>, fignorehkcu: P5, pvdefaultdata: Option<*const core::ffi::c_void>, dwdefaultdatasize: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegGetUSValueW(pszsubkey: P0, pszvalue: P1, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>, fignorehkcu: bool, pvdefaultdata: Option<*const core::ffi::c_void>, dwdefaultdatasize: u32) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, P1: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegGetUSValueW(pszsubkey : windows_core::PCWSTR, pszvalue : windows_core::PCWSTR, pdwtype : *mut u32, pvdata : *mut core::ffi::c_void, pcbdata : *mut u32, fignorehkcu : super::super::Foundation:: BOOL, pvdefaultdata : *const core::ffi::c_void, dwdefaultdatasize : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegGetUSValueW(pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed())), fignorehkcu.param().abi(), core::mem::transmute(pvdefaultdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdefaultdatasize)) + SHRegGetUSValueW(pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed())), fignorehkcu.into(), core::mem::transmute(pvdefaultdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdefaultdatasize)) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -3895,22 +3851,20 @@ where SHRegGetValueW(core::mem::transmute(hkey), pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(srrfflags), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SHRegOpenUSKeyA(pszpath: P0, samdesired: u32, hrelativeuskey: Option, phnewuskey: *mut isize, fignorehkcu: P4) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegOpenUSKeyA(pszpath: P0, samdesired: u32, hrelativeuskey: Option, phnewuskey: *mut isize, fignorehkcu: bool) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegOpenUSKeyA(pszpath : windows_core::PCSTR, samdesired : u32, hrelativeuskey : isize, phnewuskey : *mut isize, fignorehkcu : super::super::Foundation:: BOOL) -> super::super::Foundation:: WIN32_ERROR); - SHRegOpenUSKeyA(pszpath.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(hrelativeuskey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phnewuskey), fignorehkcu.param().abi()) + SHRegOpenUSKeyA(pszpath.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(hrelativeuskey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phnewuskey), fignorehkcu.into()) } #[inline] -pub unsafe fn SHRegOpenUSKeyW(pwzpath: P0, samdesired: u32, hrelativeuskey: Option, phnewuskey: *mut isize, fignorehkcu: P4) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegOpenUSKeyW(pwzpath: P0, samdesired: u32, hrelativeuskey: Option, phnewuskey: *mut isize, fignorehkcu: bool) -> super::super::Foundation::WIN32_ERROR where P0: windows_core::Param, - P4: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegOpenUSKeyW(pwzpath : windows_core::PCWSTR, samdesired : u32, hrelativeuskey : isize, phnewuskey : *mut isize, fignorehkcu : super::super::Foundation:: BOOL) -> super::super::Foundation:: WIN32_ERROR); - SHRegOpenUSKeyW(pwzpath.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(hrelativeuskey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phnewuskey), fignorehkcu.param().abi()) + SHRegOpenUSKeyW(pwzpath.param().abi(), core::mem::transmute(samdesired), core::mem::transmute(hrelativeuskey.unwrap_or(core::mem::zeroed())), core::mem::transmute(phnewuskey), fignorehkcu.into()) } #[inline] pub unsafe fn SHRegQueryInfoUSKeyA(huskey: isize, pcsubkeys: Option<*mut u32>, pcchmaxsubkeylen: Option<*mut u32>, pcvalues: Option<*mut u32>, pcchmaxvaluenamelen: Option<*mut u32>, enumregflags: SHREGENUM_FLAGS) -> super::super::Foundation::WIN32_ERROR { @@ -3923,22 +3877,20 @@ pub unsafe fn SHRegQueryInfoUSKeyW(huskey: isize, pcsubkeys: Option<*mut u32>, p SHRegQueryInfoUSKeyW(core::mem::transmute(huskey), core::mem::transmute(pcsubkeys.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchmaxsubkeylen.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcvalues.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchmaxvaluenamelen.unwrap_or(core::mem::zeroed())), core::mem::transmute(enumregflags)) } #[inline] -pub unsafe fn SHRegQueryUSValueA(huskey: isize, pszvalue: P1, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>, fignorehkcu: P5, pvdefaultdata: Option<*const core::ffi::c_void>, dwdefaultdatasize: Option) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegQueryUSValueA(huskey: isize, pszvalue: P1, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>, fignorehkcu: bool, pvdefaultdata: Option<*const core::ffi::c_void>, dwdefaultdatasize: Option) -> super::super::Foundation::WIN32_ERROR where P1: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegQueryUSValueA(huskey : isize, pszvalue : windows_core::PCSTR, pdwtype : *mut u32, pvdata : *mut core::ffi::c_void, pcbdata : *mut u32, fignorehkcu : super::super::Foundation:: BOOL, pvdefaultdata : *const core::ffi::c_void, dwdefaultdatasize : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegQueryUSValueA(core::mem::transmute(huskey), pszvalue.param().abi(), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed())), fignorehkcu.param().abi(), core::mem::transmute(pvdefaultdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdefaultdatasize.unwrap_or(core::mem::zeroed()))) + SHRegQueryUSValueA(core::mem::transmute(huskey), pszvalue.param().abi(), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed())), fignorehkcu.into(), core::mem::transmute(pvdefaultdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdefaultdatasize.unwrap_or(core::mem::zeroed()))) } #[inline] -pub unsafe fn SHRegQueryUSValueW(huskey: isize, pszvalue: P1, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>, fignorehkcu: P5, pvdefaultdata: Option<*const core::ffi::c_void>, dwdefaultdatasize: Option) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegQueryUSValueW(huskey: isize, pszvalue: P1, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>, fignorehkcu: bool, pvdefaultdata: Option<*const core::ffi::c_void>, dwdefaultdatasize: Option) -> super::super::Foundation::WIN32_ERROR where P1: windows_core::Param, - P5: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHRegQueryUSValueW(huskey : isize, pszvalue : windows_core::PCWSTR, pdwtype : *mut u32, pvdata : *mut core::ffi::c_void, pcbdata : *mut u32, fignorehkcu : super::super::Foundation:: BOOL, pvdefaultdata : *const core::ffi::c_void, dwdefaultdatasize : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegQueryUSValueW(core::mem::transmute(huskey), pszvalue.param().abi(), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed())), fignorehkcu.param().abi(), core::mem::transmute(pvdefaultdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdefaultdatasize.unwrap_or(core::mem::zeroed()))) + SHRegQueryUSValueW(core::mem::transmute(huskey), pszvalue.param().abi(), core::mem::transmute(pdwtype.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcbdata.unwrap_or(core::mem::zeroed())), fignorehkcu.into(), core::mem::transmute(pvdefaultdata.unwrap_or(core::mem::zeroed())), core::mem::transmute(dwdefaultdatasize.unwrap_or(core::mem::zeroed()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -4755,24 +4707,22 @@ pub unsafe fn StrFromTimeIntervalW(pszout: &mut [u16], dwtimems: u32, digits: i3 StrFromTimeIntervalW(core::mem::transmute(pszout.as_ptr()), pszout.len().try_into().unwrap(), core::mem::transmute(dwtimems), core::mem::transmute(digits)) } #[inline] -pub unsafe fn StrIsIntlEqualA(fcasesens: P0, pszstring1: P1, pszstring2: P2, nchar: i32) -> super::super::Foundation::BOOL +pub unsafe fn StrIsIntlEqualA(fcasesens: bool, pszstring1: P1, pszstring2: P2, nchar: i32) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn StrIsIntlEqualA(fcasesens : super::super::Foundation:: BOOL, pszstring1 : windows_core::PCSTR, pszstring2 : windows_core::PCSTR, nchar : i32) -> super::super::Foundation:: BOOL); - StrIsIntlEqualA(fcasesens.param().abi(), pszstring1.param().abi(), pszstring2.param().abi(), core::mem::transmute(nchar)) + StrIsIntlEqualA(fcasesens.into(), pszstring1.param().abi(), pszstring2.param().abi(), core::mem::transmute(nchar)) } #[inline] -pub unsafe fn StrIsIntlEqualW(fcasesens: P0, pszstring1: P1, pszstring2: P2, nchar: i32) -> super::super::Foundation::BOOL +pub unsafe fn StrIsIntlEqualW(fcasesens: bool, pszstring1: P1, pszstring2: P2, nchar: i32) -> super::super::Foundation::BOOL where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn StrIsIntlEqualW(fcasesens : super::super::Foundation:: BOOL, pszstring1 : windows_core::PCWSTR, pszstring2 : windows_core::PCWSTR, nchar : i32) -> super::super::Foundation:: BOOL); - StrIsIntlEqualW(fcasesens.param().abi(), pszstring1.param().abi(), pszstring2.param().abi(), core::mem::transmute(nchar)) + StrIsIntlEqualW(fcasesens.into(), pszstring1.param().abi(), pszstring2.param().abi(), core::mem::transmute(nchar)) } #[inline] pub unsafe fn StrNCatA(psz1: &mut [u8], psz2: P1) -> windows_core::PSTR @@ -5101,24 +5051,22 @@ where UrlCombineW(pszbase.param().abi(), pszrelative.param().abi(), core::mem::transmute(pszcombined.unwrap_or(core::mem::zeroed())), core::mem::transmute(pcchcombined), core::mem::transmute(dwflags)).ok() } #[inline] -pub unsafe fn UrlCompareA(psz1: P0, psz2: P1, fignoreslash: P2) -> i32 +pub unsafe fn UrlCompareA(psz1: P0, psz2: P1, fignoreslash: bool) -> i32 where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn UrlCompareA(psz1 : windows_core::PCSTR, psz2 : windows_core::PCSTR, fignoreslash : super::super::Foundation:: BOOL) -> i32); - UrlCompareA(psz1.param().abi(), psz2.param().abi(), fignoreslash.param().abi()) + UrlCompareA(psz1.param().abi(), psz2.param().abi(), fignoreslash.into()) } #[inline] -pub unsafe fn UrlCompareW(psz1: P0, psz2: P1, fignoreslash: P2) -> i32 +pub unsafe fn UrlCompareW(psz1: P0, psz2: P1, fignoreslash: bool) -> i32 where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn UrlCompareW(psz1 : windows_core::PCWSTR, psz2 : windows_core::PCWSTR, fignoreslash : super::super::Foundation:: BOOL) -> i32); - UrlCompareW(psz1.param().abi(), psz2.param().abi(), fignoreslash.param().abi()) + UrlCompareW(psz1.param().abi(), psz2.param().abi(), fignoreslash.into()) } #[inline] pub unsafe fn UrlCreateFromPathA(pszpath: P0, pszurl: windows_core::PSTR, pcchurl: *mut u32, dwflags: u32) -> windows_core::Result<()> @@ -6516,11 +6464,8 @@ impl CIE4ConnectionPoint { (windows_core::Interface::vtable(self).DoInvokeIE4)(windows_core::Interface::as_raw(self), core::mem::transmute(pf), core::mem::transmute(ppv), core::mem::transmute(dispid), core::mem::transmute(pdispparams)).ok() } #[cfg(feature = "Win32_UI_Shell_Common")] - pub unsafe fn DoInvokePIDLIE4(&self, dispid: i32, pidl: *mut Common::ITEMIDLIST, fcancancel: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).DoInvokePIDLIE4)(windows_core::Interface::as_raw(self), core::mem::transmute(dispid), core::mem::transmute(pidl), fcancancel.param().abi()).ok() + pub unsafe fn DoInvokePIDLIE4(&self, dispid: i32, pidl: *mut Common::ITEMIDLIST, fcancancel: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).DoInvokePIDLIE4)(windows_core::Interface::as_raw(self), core::mem::transmute(dispid), core::mem::transmute(pidl), fcancancel.into()).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -10396,9 +10341,6 @@ pub const GenericCredentialProvider: windows_core::GUID = windows_core::GUID::fr #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HDROP(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HDROP { - type TypeKind = windows_core::CopyType; -} impl HDROP { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -10741,9 +10683,6 @@ pub const HOMEGROUP_SECURITY_GROUP_MULTI: windows_core::PCWSTR = windows_core::w #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HPSXA(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HPSXA { - type TypeKind = windows_core::CopyType; -} impl HPSXA { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -10979,12 +10918,11 @@ impl IActionProgress { pub unsafe fn UpdateProgress(&self, ulcompleted: u64, ultotal: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UpdateProgress)(windows_core::Interface::as_raw(self), core::mem::transmute(ulcompleted), core::mem::transmute(ultotal)).ok() } - pub unsafe fn UpdateText(&self, sptext: SPTEXT, psztext: P1, fmaycompact: P2) -> windows_core::Result<()> + pub unsafe fn UpdateText(&self, sptext: SPTEXT, psztext: P1, fmaycompact: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).UpdateText)(windows_core::Interface::as_raw(self), core::mem::transmute(sptext), psztext.param().abi(), fmaycompact.param().abi()).ok() + (windows_core::Interface::vtable(self).UpdateText)(windows_core::Interface::as_raw(self), core::mem::transmute(sptext), psztext.param().abi(), fmaycompact.into()).ok() } pub unsafe fn QueryCancel(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -11404,11 +11342,8 @@ impl IAppVisibilityEvents { pub unsafe fn AppVisibilityOnMonitorChanged(&self, hmonitor: super::super::Graphics::Gdi::HMONITOR, previousmode: MONITOR_APP_VISIBILITY, currentmode: MONITOR_APP_VISIBILITY) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AppVisibilityOnMonitorChanged)(windows_core::Interface::as_raw(self), core::mem::transmute(hmonitor), core::mem::transmute(previousmode), core::mem::transmute(currentmode)).ok() } - pub unsafe fn LauncherVisibilityChange(&self, currentvisiblestate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).LauncherVisibilityChange)(windows_core::Interface::as_raw(self), currentvisiblestate.param().abi()).ok() + pub unsafe fn LauncherVisibilityChange(&self, currentvisiblestate: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).LauncherVisibilityChange)(windows_core::Interface::as_raw(self), currentvisiblestate.into()).ok() } } #[repr(C)] @@ -11807,11 +11742,8 @@ impl IApplicationDesignModeSettings2 { pub unsafe fn SetAdjacentDisplayEdges(&self, adjacentdisplayedges: ADJACENT_DISPLAY_EDGES) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetAdjacentDisplayEdges)(windows_core::Interface::as_raw(self), core::mem::transmute(adjacentdisplayedges)).ok() } - pub unsafe fn SetIsOnLockScreen(&self, isonlockscreen: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetIsOnLockScreen)(windows_core::Interface::as_raw(self), isonlockscreen.param().abi()).ok() + pub unsafe fn SetIsOnLockScreen(&self, isonlockscreen: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetIsOnLockScreen)(windows_core::Interface::as_raw(self), isonlockscreen.into()).ok() } pub unsafe fn SetApplicationViewMinWidth(&self, viewminwidth: APPLICATION_VIEW_MIN_WIDTH) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetApplicationViewMinWidth)(windows_core::Interface::as_raw(self), core::mem::transmute(viewminwidth)).ok() @@ -12350,11 +12282,8 @@ impl IAutoComplete { { (windows_core::Interface::vtable(self).Init)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndedit), punkacl.param().abi(), pwszregkeypath.param().abi(), pwszquickcomplete.param().abi()).ok() } - pub unsafe fn Enable(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn Enable(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), fenable.into()).ok() } } #[repr(C)] @@ -12478,20 +12407,15 @@ impl windows_core::RuntimeName for IAutoCompleteDropDown {} windows_core::imp::define_interface!(IBandHost, IBandHost_Vtbl, 0xb9075c7c_d48e_403f_ab99_d6c77a1084ac); windows_core::imp::interface_hierarchy!(IBandHost, windows_core::IUnknown); impl IBandHost { - pub unsafe fn CreateBand(&self, rclsidband: *const windows_core::GUID, favailable: P1, fvisible: P2) -> windows_core::Result + pub unsafe fn CreateBand(&self, rclsidband: *const windows_core::GUID, favailable: bool, fvisible: bool) -> windows_core::Result where - P1: windows_core::Param, - P2: windows_core::Param, T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).CreateBand)(windows_core::Interface::as_raw(self), core::mem::transmute(rclsidband), favailable.param().abi(), fvisible.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateBand)(windows_core::Interface::as_raw(self), core::mem::transmute(rclsidband), favailable.into(), fvisible.into(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn SetBandAvailability(&self, rclsidband: *const windows_core::GUID, favailable: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetBandAvailability)(windows_core::Interface::as_raw(self), core::mem::transmute(rclsidband), favailable.param().abi()).ok() + pub unsafe fn SetBandAvailability(&self, rclsidband: *const windows_core::GUID, favailable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetBandAvailability)(windows_core::Interface::as_raw(self), core::mem::transmute(rclsidband), favailable.into()).ok() } pub unsafe fn DestroyBand(&self, rclsidband: *const windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DestroyBand)(windows_core::Interface::as_raw(self), core::mem::transmute(rclsidband)).ok() @@ -12838,11 +12762,8 @@ impl IBrowserService { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetTravelLog)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn ShowControlWindow(&self, id: u32, fshow: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).ShowControlWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(id), fshow.param().abi()).ok() + pub unsafe fn ShowControlWindow(&self, id: u32, fshow: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ShowControlWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(id), fshow.into()).ok() } pub unsafe fn IsControlWindowShown(&self, id: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -12922,12 +12843,11 @@ impl IBrowserService { (windows_core::Interface::vtable(self).GetHistoryObject)(windows_core::Interface::as_raw(self), core::mem::transmute(ppole), core::mem::transmute(pstm), core::mem::transmute(ppbc)).ok() } #[cfg(feature = "Win32_System_Ole")] - pub unsafe fn SetHistoryObject(&self, pole: P0, fislocalanchor: P1) -> windows_core::Result<()> + pub unsafe fn SetHistoryObject(&self, pole: P0, fislocalanchor: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetHistoryObject)(windows_core::Interface::as_raw(self), pole.param().abi(), fislocalanchor.param().abi()).ok() + (windows_core::Interface::vtable(self).SetHistoryObject)(windows_core::Interface::as_raw(self), pole.param().abi(), fislocalanchor.into()).ok() } #[cfg(feature = "Win32_System_Ole")] pub unsafe fn CacheOLEServer(&self, pole: P0) -> windows_core::Result<()> @@ -12942,24 +12862,20 @@ impl IBrowserService { (windows_core::Interface::vtable(self).GetSetCodePage)(windows_core::Interface::as_raw(self), core::mem::transmute(pvarin), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn OnHttpEquiv(&self, psv: P0, fdone: P1, pvarargin: *const super::super::System::Variant::VARIANT) -> windows_core::Result + pub unsafe fn OnHttpEquiv(&self, psv: P0, fdone: bool, pvarargin: *const super::super::System::Variant::VARIANT) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).OnHttpEquiv)(windows_core::Interface::as_raw(self), psv.param().abi(), fdone.param().abi(), core::mem::transmute(pvarargin), &mut result__).map(|| core::mem::transmute(result__)) + (windows_core::Interface::vtable(self).OnHttpEquiv)(windows_core::Interface::as_raw(self), psv.param().abi(), fdone.into(), core::mem::transmute(pvarargin), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetPalette(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetPalette)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn RegisterWindow(&self, fforceregister: P0, swc: ShellWindowTypeConstants) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterWindow)(windows_core::Interface::as_raw(self), fforceregister.param().abi(), core::mem::transmute(swc)).ok() + pub unsafe fn RegisterWindow(&self, fforceregister: bool, swc: ShellWindowTypeConstants) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterWindow)(windows_core::Interface::as_raw(self), fforceregister.into(), core::mem::transmute(swc)).ok() } } #[repr(C)] @@ -13357,11 +13273,8 @@ impl IBrowserService2 { pub unsafe fn OnSetFocus(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnSetFocus)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn OnFrameWindowActivateBS(&self, factive: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnFrameWindowActivateBS)(windows_core::Interface::as_raw(self), factive.param().abi()).ok() + pub unsafe fn OnFrameWindowActivateBS(&self, factive: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnFrameWindowActivateBS)(windows_core::Interface::as_raw(self), factive.into()).ok() } pub unsafe fn ReleaseShellView(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReleaseShellView)(windows_core::Interface::as_raw(self)).ok() @@ -13406,11 +13319,8 @@ impl IBrowserService2 { pub unsafe fn Offline(&self, icmd: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Offline)(windows_core::Interface::as_raw(self), core::mem::transmute(icmd)).ok() } - pub unsafe fn AllowViewResize(&self, f: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).AllowViewResize)(windows_core::Interface::as_raw(self), f.param().abi()).ok() + pub unsafe fn AllowViewResize(&self, f: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).AllowViewResize)(windows_core::Interface::as_raw(self), f.into()).ok() } pub unsafe fn SetActivateState(&self, u: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetActivateState)(windows_core::Interface::as_raw(self), core::mem::transmute(u)).ok() @@ -13439,11 +13349,8 @@ impl IBrowserService2 { pub unsafe fn _MaySaveChanges(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self)._MaySaveChanges)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn _PauseOrResumeView(&self, fpaused: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self)._PauseOrResumeView)(windows_core::Interface::as_raw(self), fpaused.param().abi()).ok() + pub unsafe fn _PauseOrResumeView(&self, fpaused: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self)._PauseOrResumeView)(windows_core::Interface::as_raw(self), fpaused.into()).ok() } pub unsafe fn _DisableModeless(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self)._DisableModeless)(windows_core::Interface::as_raw(self)).ok() @@ -13463,18 +13370,14 @@ impl IBrowserService2 { (windows_core::Interface::vtable(self)._SwitchActivationNow)(windows_core::Interface::as_raw(self)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] - pub unsafe fn _ExecChildren(&self, punkbar: P0, fbroadcast: P1, pguidcmdgroup: Option<*const windows_core::GUID>, ncmdid: u32, ncmdexecopt: u32, pvarargin: Option<*const super::super::System::Variant::VARIANT>, pvarargout: Option<*mut super::super::System::Variant::VARIANT>) -> windows_core::Result<()> + pub unsafe fn _ExecChildren(&self, punkbar: P0, fbroadcast: bool, pguidcmdgroup: Option<*const windows_core::GUID>, ncmdid: u32, ncmdexecopt: u32, pvarargin: Option<*const super::super::System::Variant::VARIANT>, pvarargout: Option<*mut super::super::System::Variant::VARIANT>) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self)._ExecChildren)(windows_core::Interface::as_raw(self), punkbar.param().abi(), fbroadcast.param().abi(), core::mem::transmute(pguidcmdgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(ncmdid), core::mem::transmute(ncmdexecopt), core::mem::transmute(pvarargin.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvarargout.unwrap_or(core::mem::zeroed()))).ok() + (windows_core::Interface::vtable(self)._ExecChildren)(windows_core::Interface::as_raw(self), punkbar.param().abi(), fbroadcast.into(), core::mem::transmute(pguidcmdgroup.unwrap_or(core::mem::zeroed())), core::mem::transmute(ncmdid), core::mem::transmute(ncmdexecopt), core::mem::transmute(pvarargin.unwrap_or(core::mem::zeroed())), core::mem::transmute(pvarargout.unwrap_or(core::mem::zeroed()))).ok() } - pub unsafe fn _SendChildren(&self, hwndbar: super::super::Foundation::HWND, fbroadcast: P1, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self)._SendChildren)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndbar), fbroadcast.param().abi(), core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() + pub unsafe fn _SendChildren(&self, hwndbar: super::super::Foundation::HWND, fbroadcast: bool, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self)._SendChildren)(windows_core::Interface::as_raw(self), core::mem::transmute(hwndbar), fbroadcast.into(), core::mem::transmute(umsg), core::mem::transmute(wparam), core::mem::transmute(lparam)).ok() } pub unsafe fn GetFolderSetData(&self, pfsd: *mut FOLDERSETDATA) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetFolderSetData)(windows_core::Interface::as_raw(self), core::mem::transmute(pfsd)).ok() @@ -13482,11 +13385,8 @@ impl IBrowserService2 { pub unsafe fn _OnFocusChange(&self, itb: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self)._OnFocusChange)(windows_core::Interface::as_raw(self), core::mem::transmute(itb)).ok() } - pub unsafe fn v_ShowHideChildWindows(&self, fchildonly: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).v_ShowHideChildWindows)(windows_core::Interface::as_raw(self), fchildonly.param().abi()).ok() + pub unsafe fn v_ShowHideChildWindows(&self, fchildonly: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).v_ShowHideChildWindows)(windows_core::Interface::as_raw(self), fchildonly.into()).ok() } pub unsafe fn _get_itbLastFocus(&self) -> u32 { (windows_core::Interface::vtable(self)._get_itbLastFocus)(windows_core::Interface::as_raw(self)) @@ -13548,21 +13448,15 @@ impl IBrowserService2 { { (windows_core::Interface::vtable(self)._LoadToolbars)(windows_core::Interface::as_raw(self), pstm.param().abi()).ok() } - pub unsafe fn _CloseAndReleaseToolbars(&self, fclose: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self)._CloseAndReleaseToolbars)(windows_core::Interface::as_raw(self), fclose.param().abi()).ok() + pub unsafe fn _CloseAndReleaseToolbars(&self, fclose: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self)._CloseAndReleaseToolbars)(windows_core::Interface::as_raw(self), fclose.into()).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Ole", feature = "Win32_UI_WindowsAndMessaging"))] pub unsafe fn v_MayGetNextToolbarFocus(&self, lpmsg: *const super::WindowsAndMessaging::MSG, itbnext: u32, citb: i32, pptbi: *mut *mut TOOLBARITEM, phwnd: *mut super::super::Foundation::HWND) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).v_MayGetNextToolbarFocus)(windows_core::Interface::as_raw(self), core::mem::transmute(lpmsg), core::mem::transmute(itbnext), core::mem::transmute(citb), core::mem::transmute(pptbi), core::mem::transmute(phwnd)).ok() } - pub unsafe fn _ResizeNextBorderHelper(&self, itb: u32, busehmonitor: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self)._ResizeNextBorderHelper)(windows_core::Interface::as_raw(self), core::mem::transmute(itb), busehmonitor.param().abi()).ok() + pub unsafe fn _ResizeNextBorderHelper(&self, itb: u32, busehmonitor: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self)._ResizeNextBorderHelper)(windows_core::Interface::as_raw(self), core::mem::transmute(itb), busehmonitor.into()).ok() } pub unsafe fn _FindTBar(&self, punksrc: P0) -> u32 where @@ -13578,12 +13472,11 @@ impl IBrowserService2 { pub unsafe fn v_MayTranslateAccelerator(&self, pmsg: *mut super::WindowsAndMessaging::MSG) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).v_MayTranslateAccelerator)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg)).ok() } - pub unsafe fn _GetBorderDWHelper(&self, punksrc: P0, lprectborder: *mut super::super::Foundation::RECT, busehmonitor: P2) -> windows_core::Result<()> + pub unsafe fn _GetBorderDWHelper(&self, punksrc: P0, lprectborder: *mut super::super::Foundation::RECT, busehmonitor: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self)._GetBorderDWHelper)(windows_core::Interface::as_raw(self), punksrc.param().abi(), core::mem::transmute(lprectborder), busehmonitor.param().abi()).ok() + (windows_core::Interface::vtable(self)._GetBorderDWHelper)(windows_core::Interface::as_raw(self), punksrc.param().abi(), core::mem::transmute(lprectborder), busehmonitor.into()).ok() } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn v_CheckZoneCrossing(&self, pidl: *const Common::ITEMIDLIST) -> windows_core::Result<()> { @@ -14195,11 +14088,8 @@ impl core::ops::Deref for IBrowserService4 { } windows_core::imp::interface_hierarchy!(IBrowserService4, windows_core::IUnknown, IBrowserService, IBrowserService2, IBrowserService3); impl IBrowserService4 { - pub unsafe fn ActivateView(&self, fpendingview: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ActivateView)(windows_core::Interface::as_raw(self), fpendingview.param().abi()).ok() + pub unsafe fn ActivateView(&self, fpendingview: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ActivateView)(windows_core::Interface::as_raw(self), fpendingview.into()).ok() } pub unsafe fn SaveViewState(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SaveViewState)(windows_core::Interface::as_raw(self)).ok() @@ -15590,11 +15480,8 @@ impl ICredentialProviderCredential { { (windows_core::Interface::vtable(self).SetStringValue)(windows_core::Interface::as_raw(self), core::mem::transmute(dwfieldid), psz.param().abi()).ok() } - pub unsafe fn SetCheckboxValue(&self, dwfieldid: u32, bchecked: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCheckboxValue)(windows_core::Interface::as_raw(self), core::mem::transmute(dwfieldid), bchecked.param().abi()).ok() + pub unsafe fn SetCheckboxValue(&self, dwfieldid: u32, bchecked: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCheckboxValue)(windows_core::Interface::as_raw(self), core::mem::transmute(dwfieldid), bchecked.into()).ok() } pub unsafe fn SetComboBoxSelectedValue(&self, dwfieldid: u32, dwselecteditem: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetComboBoxSelectedValue)(windows_core::Interface::as_raw(self), core::mem::transmute(dwfieldid), core::mem::transmute(dwselecteditem)).ok() @@ -15847,13 +15734,12 @@ impl ICredentialProviderCredentialEvents { { (windows_core::Interface::vtable(self).SetFieldString)(windows_core::Interface::as_raw(self), pcpc.param().abi(), core::mem::transmute(dwfieldid), psz.param().abi()).ok() } - pub unsafe fn SetFieldCheckbox(&self, pcpc: P0, dwfieldid: u32, bchecked: P2, pszlabel: P3) -> windows_core::Result<()> + pub unsafe fn SetFieldCheckbox(&self, pcpc: P0, dwfieldid: u32, bchecked: bool, pszlabel: P3) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).SetFieldCheckbox)(windows_core::Interface::as_raw(self), pcpc.param().abi(), core::mem::transmute(dwfieldid), bchecked.param().abi(), pszlabel.param().abi()).ok() + (windows_core::Interface::vtable(self).SetFieldCheckbox)(windows_core::Interface::as_raw(self), pcpc.param().abi(), core::mem::transmute(dwfieldid), bchecked.into(), pszlabel.param().abi()).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn SetFieldBitmap(&self, pcpc: P0, dwfieldid: u32, hbmp: super::super::Graphics::Gdi::HBITMAP) -> windows_core::Result<()> @@ -16593,11 +16479,8 @@ pub const ID_APP: u32 = 100u32; windows_core::imp::define_interface!(IDataObjectAsyncCapability, IDataObjectAsyncCapability_Vtbl, 0x3d8b0590_f691_11d2_8ea9_006097df5bd4); windows_core::imp::interface_hierarchy!(IDataObjectAsyncCapability, windows_core::IUnknown); impl IDataObjectAsyncCapability { - pub unsafe fn SetAsyncMode(&self, fdoopasync: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAsyncMode)(windows_core::Interface::as_raw(self), fdoopasync.param().abi()).ok() + pub unsafe fn SetAsyncMode(&self, fdoopasync: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAsyncMode)(windows_core::Interface::as_raw(self), fdoopasync.into()).ok() } pub unsafe fn GetAsyncMode(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -17104,11 +16987,8 @@ impl IDeskBand2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CanRenderComposited)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetCompositionState(&self, fcompositionenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCompositionState)(windows_core::Interface::as_raw(self), fcompositionenabled.param().abi()).ok() + pub unsafe fn SetCompositionState(&self, fcompositionenabled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCompositionState)(windows_core::Interface::as_raw(self), fcompositionenabled.into()).ok() } pub unsafe fn GetCompositionState(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -17467,11 +17347,8 @@ impl IDesktopWallpaper { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn Enable(&self, enable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), enable.param().abi()).ok() + pub unsafe fn Enable(&self, enable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), enable.into()).ok() } } #[repr(C)] @@ -17766,21 +17643,17 @@ impl core::ops::Deref for IDockingWindow { windows_core::imp::interface_hierarchy!(IDockingWindow, windows_core::IUnknown, super::super::System::Ole::IOleWindow); #[cfg(feature = "Win32_System_Ole")] impl IDockingWindow { - pub unsafe fn ShowDW(&self, fshow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ShowDW)(windows_core::Interface::as_raw(self), fshow.param().abi()).ok() + pub unsafe fn ShowDW(&self, fshow: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ShowDW)(windows_core::Interface::as_raw(self), fshow.into()).ok() } pub unsafe fn CloseDW(&self, dwreserved: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CloseDW)(windows_core::Interface::as_raw(self), core::mem::transmute(dwreserved)).ok() } - pub unsafe fn ResizeBorderDW(&self, prcborder: *const super::super::Foundation::RECT, punktoolbarsite: P1, freserved: P2) -> windows_core::Result<()> + pub unsafe fn ResizeBorderDW(&self, prcborder: *const super::super::Foundation::RECT, punktoolbarsite: P1, freserved: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).ResizeBorderDW)(windows_core::Interface::as_raw(self), core::mem::transmute(prcborder), punktoolbarsite.param().abi(), freserved.param().abi()).ok() + (windows_core::Interface::vtable(self).ResizeBorderDW)(windows_core::Interface::as_raw(self), core::mem::transmute(prcborder), punktoolbarsite.param().abi(), freserved.into()).ok() } } #[cfg(feature = "Win32_System_Ole")] @@ -18100,11 +17973,8 @@ impl IDropTargetHelper { { (windows_core::Interface::vtable(self).Drop)(windows_core::Interface::as_raw(self), pdataobject.param().abi(), core::mem::transmute(ppt), core::mem::transmute(dweffect)).ok() } - pub unsafe fn Show(&self, fshow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), fshow.param().abi()).ok() + pub unsafe fn Show(&self, fshow: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), fshow.into()).ok() } } #[repr(C)] @@ -19306,11 +19176,8 @@ impl IExecuteCommand { pub unsafe fn SetShowWindow(&self, nshow: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetShowWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(nshow)).ok() } - pub unsafe fn SetNoShowUI(&self, fnoshowui: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetNoShowUI)(windows_core::Interface::as_raw(self), fnoshowui.param().abi()).ok() + pub unsafe fn SetNoShowUI(&self, fnoshowui: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetNoShowUI)(windows_core::Interface::as_raw(self), fnoshowui.into()).ok() } pub unsafe fn SetDirectory(&self, pszdirectory: P0) -> windows_core::Result<()> where @@ -19930,13 +19797,12 @@ impl IExplorerCommand { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetCanonicalName)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn GetState(&self, psiitemarray: P0, foktobeslow: P1) -> windows_core::Result + pub unsafe fn GetState(&self, psiitemarray: P0, foktobeslow: bool) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetState)(windows_core::Interface::as_raw(self), psiitemarray.param().abi(), foktobeslow.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetState)(windows_core::Interface::as_raw(self), psiitemarray.param().abi(), foktobeslow.into(), &mut result__).map(|| result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Invoke(&self, psiitemarray: P0, pbc: P1) -> windows_core::Result<()> @@ -20129,13 +19995,12 @@ impl windows_core::RuntimeName for IExplorerCommandProvider {} windows_core::imp::define_interface!(IExplorerCommandState, IExplorerCommandState_Vtbl, 0xbddacb60_7657_47ae_8445_d23e1acf82ae); windows_core::imp::interface_hierarchy!(IExplorerCommandState, windows_core::IUnknown); impl IExplorerCommandState { - pub unsafe fn GetState(&self, psiitemarray: P0, foktobeslow: P1) -> windows_core::Result + pub unsafe fn GetState(&self, psiitemarray: P0, foktobeslow: bool) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetState)(windows_core::Interface::as_raw(self), psiitemarray.param().abi(), foktobeslow.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetState)(windows_core::Interface::as_raw(self), psiitemarray.param().abi(), foktobeslow.into(), &mut result__).map(|| result__) } } #[repr(C)] @@ -20863,12 +20728,11 @@ impl IFileDialogControlEvents { { (windows_core::Interface::vtable(self).OnButtonClicked)(windows_core::Interface::as_raw(self), pfdc.param().abi(), core::mem::transmute(dwidctl)).ok() } - pub unsafe fn OnCheckButtonToggled(&self, pfdc: P0, dwidctl: u32, bchecked: P2) -> windows_core::Result<()> + pub unsafe fn OnCheckButtonToggled(&self, pfdc: P0, dwidctl: u32, bchecked: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).OnCheckButtonToggled)(windows_core::Interface::as_raw(self), pfdc.param().abi(), core::mem::transmute(dwidctl), bchecked.param().abi()).ok() + (windows_core::Interface::vtable(self).OnCheckButtonToggled)(windows_core::Interface::as_raw(self), pfdc.param().abi(), core::mem::transmute(dwidctl), bchecked.into()).ok() } pub unsafe fn OnControlActivating(&self, pfdc: P0, dwidctl: u32) -> windows_core::Result<()> where @@ -20946,12 +20810,11 @@ impl IFileDialogCustomize { pub unsafe fn AddRadioButtonList(&self, dwidctl: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AddRadioButtonList)(windows_core::Interface::as_raw(self), core::mem::transmute(dwidctl)).ok() } - pub unsafe fn AddCheckButton(&self, dwidctl: u32, pszlabel: P1, bchecked: P2) -> windows_core::Result<()> + pub unsafe fn AddCheckButton(&self, dwidctl: u32, pszlabel: P1, bchecked: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddCheckButton)(windows_core::Interface::as_raw(self), core::mem::transmute(dwidctl), pszlabel.param().abi(), bchecked.param().abi()).ok() + (windows_core::Interface::vtable(self).AddCheckButton)(windows_core::Interface::as_raw(self), core::mem::transmute(dwidctl), pszlabel.param().abi(), bchecked.into()).ok() } pub unsafe fn AddEditBox(&self, dwidctl: u32, psztext: P1) -> windows_core::Result<()> where @@ -20995,11 +20858,8 @@ impl IFileDialogCustomize { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetCheckButtonState)(windows_core::Interface::as_raw(self), core::mem::transmute(dwidctl), &mut result__).map(|| result__) } - pub unsafe fn SetCheckButtonState(&self, dwidctl: u32, bchecked: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCheckButtonState)(windows_core::Interface::as_raw(self), core::mem::transmute(dwidctl), bchecked.param().abi()).ok() + pub unsafe fn SetCheckButtonState(&self, dwidctl: u32, bchecked: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCheckButtonState)(windows_core::Interface::as_raw(self), core::mem::transmute(dwidctl), bchecked.into()).ok() } pub unsafe fn AddControlItem(&self, dwidctl: u32, dwiditem: u32, pszlabel: P2) -> windows_core::Result<()> where @@ -22165,12 +22025,11 @@ impl IFileSaveDialog { (windows_core::Interface::vtable(self).SetProperties)(windows_core::Interface::as_raw(self), pstore.param().abi()).ok() } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] - pub unsafe fn SetCollectedProperties(&self, plist: P0, fappenddefault: P1) -> windows_core::Result<()> + pub unsafe fn SetCollectedProperties(&self, plist: P0, fappenddefault: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetCollectedProperties)(windows_core::Interface::as_raw(self), plist.param().abi(), fappenddefault.param().abi()).ok() + (windows_core::Interface::vtable(self).SetCollectedProperties)(windows_core::Interface::as_raw(self), plist.param().abi(), fappenddefault.into()).ok() } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn GetProperties(&self) -> windows_core::Result { @@ -22579,29 +22438,17 @@ impl windows_core::RuntimeName for IFileSystemBindData2 {} windows_core::imp::define_interface!(IFolderBandPriv, IFolderBandPriv_Vtbl, 0x47c01f95_e185_412c_b5c5_4f27df965aea); windows_core::imp::interface_hierarchy!(IFolderBandPriv, windows_core::IUnknown); impl IFolderBandPriv { - pub unsafe fn SetCascade(&self, fcascade: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCascade)(windows_core::Interface::as_raw(self), fcascade.param().abi()).ok() + pub unsafe fn SetCascade(&self, fcascade: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCascade)(windows_core::Interface::as_raw(self), fcascade.into()).ok() } - pub unsafe fn SetAccelerators(&self, faccelerators: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAccelerators)(windows_core::Interface::as_raw(self), faccelerators.param().abi()).ok() + pub unsafe fn SetAccelerators(&self, faccelerators: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAccelerators)(windows_core::Interface::as_raw(self), faccelerators.into()).ok() } - pub unsafe fn SetNoIcons(&self, fnoicons: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetNoIcons)(windows_core::Interface::as_raw(self), fnoicons.param().abi()).ok() + pub unsafe fn SetNoIcons(&self, fnoicons: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetNoIcons)(windows_core::Interface::as_raw(self), fnoicons.into()).ok() } - pub unsafe fn SetNoText(&self, fnotext: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetNoText)(windows_core::Interface::as_raw(self), fnotext.param().abi()).ok() + pub unsafe fn SetNoText(&self, fnotext: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetNoText)(windows_core::Interface::as_raw(self), fnotext.into()).ok() } } #[repr(C)] @@ -22980,11 +22827,8 @@ impl core::ops::Deref for IFolderView2 { } windows_core::imp::interface_hierarchy!(IFolderView2, windows_core::IUnknown, IFolderView); impl IFolderView2 { - pub unsafe fn SetGroupBy(&self, key: *const super::super::Foundation::PROPERTYKEY, fascending: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetGroupBy)(windows_core::Interface::as_raw(self), core::mem::transmute(key), fascending.param().abi()).ok() + pub unsafe fn SetGroupBy(&self, key: *const super::super::Foundation::PROPERTYKEY, fascending: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetGroupBy)(windows_core::Interface::as_raw(self), core::mem::transmute(key), fascending.into()).ok() } pub unsafe fn GetGroupBy(&self, pkey: *mut super::super::Foundation::PROPERTYKEY, pfascending: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetGroupBy)(windows_core::Interface::as_raw(self), core::mem::transmute(pkey), core::mem::transmute(pfascending.unwrap_or(core::mem::zeroed()))).ok() @@ -23042,23 +22886,17 @@ impl IFolderView2 { let mut result__ = core::ptr::null_mut(); (windows_core::Interface::vtable(self).GetItem)(windows_core::Interface::as_raw(self), core::mem::transmute(iitem), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn GetVisibleItem(&self, istart: i32, fprevious: P1) -> windows_core::Result - where - P1: windows_core::Param, - { + pub unsafe fn GetVisibleItem(&self, istart: i32, fprevious: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetVisibleItem)(windows_core::Interface::as_raw(self), core::mem::transmute(istart), fprevious.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetVisibleItem)(windows_core::Interface::as_raw(self), core::mem::transmute(istart), fprevious.into(), &mut result__).map(|| result__) } pub unsafe fn GetSelectedItem(&self, istart: i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetSelectedItem)(windows_core::Interface::as_raw(self), core::mem::transmute(istart), &mut result__).map(|| result__) } - pub unsafe fn GetSelection(&self, fnoneimpliesfolder: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetSelection(&self, fnoneimpliesfolder: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetSelection)(windows_core::Interface::as_raw(self), fnoneimpliesfolder.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetSelection)(windows_core::Interface::as_raw(self), fnoneimpliesfolder.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetSelectionState(&self, pidl: *const Common::ITEMIDLIST) -> windows_core::Result { @@ -23084,11 +22922,8 @@ impl IFolderView2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetGroupSubsetCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetRedraw(&self, fredrawon: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRedraw)(windows_core::Interface::as_raw(self), fredrawon.param().abi()).ok() + pub unsafe fn SetRedraw(&self, fredrawon: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRedraw)(windows_core::Interface::as_raw(self), fredrawon.into()).ok() } pub unsafe fn IsMoveInSameFolder(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).IsMoveInSameFolder)(windows_core::Interface::as_raw(self)).ok() @@ -23694,17 +23529,11 @@ impl windows_core::RuntimeName for IFrameworkInputPane {} windows_core::imp::define_interface!(IFrameworkInputPaneHandler, IFrameworkInputPaneHandler_Vtbl, 0x226c537b_1e76_4d9e_a760_33db29922f18); windows_core::imp::interface_hierarchy!(IFrameworkInputPaneHandler, windows_core::IUnknown); impl IFrameworkInputPaneHandler { - pub unsafe fn Showing(&self, prcinputpanescreenlocation: *const super::super::Foundation::RECT, fensurefocusedelementinview: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).Showing)(windows_core::Interface::as_raw(self), core::mem::transmute(prcinputpanescreenlocation), fensurefocusedelementinview.param().abi()).ok() + pub unsafe fn Showing(&self, prcinputpanescreenlocation: *const super::super::Foundation::RECT, fensurefocusedelementinview: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Showing)(windows_core::Interface::as_raw(self), core::mem::transmute(prcinputpanescreenlocation), fensurefocusedelementinview.into()).ok() } - pub unsafe fn Hiding(&self, fensurefocusedelementinview: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Hiding)(windows_core::Interface::as_raw(self), fensurefocusedelementinview.param().abi()).ok() + pub unsafe fn Hiding(&self, fensurefocusedelementinview: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Hiding)(windows_core::Interface::as_raw(self), fensurefocusedelementinview.into()).ok() } } #[repr(C)] @@ -24282,13 +24111,12 @@ impl IHlinkBrowseContext { (windows_core::Interface::vtable(self).Register)(windows_core::Interface::as_raw(self), core::mem::transmute(reserved), piunk.param().abi(), pimk.param().abi(), &mut result__).map(|| result__) } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn GetObject(&self, pimk: P0, fbindifrootregistered: P1) -> windows_core::Result + pub unsafe fn GetObject(&self, pimk: P0, fbindifrootregistered: bool) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), pimk.param().abi(), fbindifrootregistered.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), pimk.param().abi(), fbindifrootregistered.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn Revoke(&self, dwregister: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Revoke)(windows_core::Interface::as_raw(self), core::mem::transmute(dwregister)).ok() @@ -25240,11 +25068,8 @@ windows_core::imp::define_interface!(IInputObject, IInputObject_Vtbl, 0x68284faa windows_core::imp::interface_hierarchy!(IInputObject, windows_core::IUnknown); impl IInputObject { #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn UIActivateIO(&self, factivate: P0, pmsg: *const super::WindowsAndMessaging::MSG) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).UIActivateIO)(windows_core::Interface::as_raw(self), factivate.param().abi(), core::mem::transmute(pmsg)).ok() + pub unsafe fn UIActivateIO(&self, factivate: bool, pmsg: *const super::WindowsAndMessaging::MSG) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).UIActivateIO)(windows_core::Interface::as_raw(self), factivate.into(), core::mem::transmute(pmsg)).ok() } pub unsafe fn HasFocusIO(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).HasFocusIO)(windows_core::Interface::as_raw(self)).ok() @@ -25345,12 +25170,11 @@ impl windows_core::RuntimeName for IInputObject2 {} windows_core::imp::define_interface!(IInputObjectSite, IInputObjectSite_Vtbl, 0xf1db8392_7331_11d0_8c99_00a0c92dbfe8); windows_core::imp::interface_hierarchy!(IInputObjectSite, windows_core::IUnknown); impl IInputObjectSite { - pub unsafe fn OnFocusChangeIS(&self, punkobj: P0, fsetfocus: P1) -> windows_core::Result<()> + pub unsafe fn OnFocusChangeIS(&self, punkobj: P0, fsetfocus: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).OnFocusChangeIS)(windows_core::Interface::as_raw(self), punkobj.param().abi(), fsetfocus.param().abi()).ok() + (windows_core::Interface::vtable(self).OnFocusChangeIS)(windows_core::Interface::as_raw(self), punkobj.param().abi(), fsetfocus.into()).ok() } } #[repr(C)] @@ -26215,12 +26039,11 @@ impl IMenuPopup { pub unsafe fn OnSelect(&self, dwselecttype: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnSelect)(windows_core::Interface::as_raw(self), core::mem::transmute(dwselecttype)).ok() } - pub unsafe fn SetSubMenu(&self, pmp: P0, fset: P1) -> windows_core::Result<()> + pub unsafe fn SetSubMenu(&self, pmp: P0, fset: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetSubMenu)(windows_core::Interface::as_raw(self), pmp.param().abi(), fset.param().abi()).ok() + (windows_core::Interface::vtable(self).SetSubMenu)(windows_core::Interface::as_raw(self), pmp.param().abi(), fset.into()).ok() } } #[cfg(feature = "Win32_System_Ole")] @@ -26852,13 +26675,12 @@ impl windows_core::RuntimeName for INameSpaceTreeControlCustomDraw {} windows_core::imp::define_interface!(INameSpaceTreeControlDropHandler, INameSpaceTreeControlDropHandler_Vtbl, 0xf9c665d6_c2f2_4c19_bf33_8322d7352f51); windows_core::imp::interface_hierarchy!(INameSpaceTreeControlDropHandler, windows_core::IUnknown); impl INameSpaceTreeControlDropHandler { - pub unsafe fn OnDragEnter(&self, psiover: P0, psiadata: P1, foutsidesource: P2, grfkeystate: u32, pdweffect: *mut u32) -> windows_core::Result<()> + pub unsafe fn OnDragEnter(&self, psiover: P0, psiadata: P1, foutsidesource: bool, grfkeystate: u32, pdweffect: *mut u32) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).OnDragEnter)(windows_core::Interface::as_raw(self), psiover.param().abi(), psiadata.param().abi(), foutsidesource.param().abi(), core::mem::transmute(grfkeystate), core::mem::transmute(pdweffect)).ok() + (windows_core::Interface::vtable(self).OnDragEnter)(windows_core::Interface::as_raw(self), psiover.param().abi(), psiadata.param().abi(), foutsidesource.into(), core::mem::transmute(grfkeystate), core::mem::transmute(pdweffect)).ok() } pub unsafe fn OnDragOver(&self, psiover: P0, psiadata: P1, grfkeystate: u32, pdweffect: *mut u32) -> windows_core::Result<()> where @@ -27026,19 +26848,17 @@ impl INameSpaceTreeControlEvents { { (windows_core::Interface::vtable(self).OnBeforeItemDelete)(windows_core::Interface::as_raw(self), psi.param().abi()).ok() } - pub unsafe fn OnItemAdded(&self, psi: P0, fisroot: P1) -> windows_core::Result<()> + pub unsafe fn OnItemAdded(&self, psi: P0, fisroot: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).OnItemAdded)(windows_core::Interface::as_raw(self), psi.param().abi(), fisroot.param().abi()).ok() + (windows_core::Interface::vtable(self).OnItemAdded)(windows_core::Interface::as_raw(self), psi.param().abi(), fisroot.into()).ok() } - pub unsafe fn OnItemDeleted(&self, psi: P0, fisroot: P1) -> windows_core::Result<()> + pub unsafe fn OnItemDeleted(&self, psi: P0, fisroot: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).OnItemDeleted)(windows_core::Interface::as_raw(self), psi.param().abi(), fisroot.param().abi()).ok() + (windows_core::Interface::vtable(self).OnItemDeleted)(windows_core::Interface::as_raw(self), psi.param().abi(), fisroot.into()).ok() } pub unsafe fn OnBeforeContextMenu(&self, psi: P0, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where @@ -27849,15 +27669,14 @@ impl windows_core::RuntimeName for INewWDEvents {} windows_core::imp::define_interface!(INewWindowManager, INewWindowManager_Vtbl, 0xd2bc4c84_3f72_4a52_a604_7bcbf3982cbb); windows_core::imp::interface_hierarchy!(INewWindowManager, windows_core::IUnknown); impl INewWindowManager { - pub unsafe fn EvaluateNewWindow(&self, pszurl: P0, pszname: P1, pszurlcontext: P2, pszfeatures: P3, freplace: P4, dwflags: u32, dwuseractiontime: u32) -> windows_core::Result<()> + pub unsafe fn EvaluateNewWindow(&self, pszurl: P0, pszname: P1, pszurlcontext: P2, pszfeatures: P3, freplace: bool, dwflags: u32, dwuseractiontime: u32) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, P3: windows_core::Param, - P4: windows_core::Param, { - (windows_core::Interface::vtable(self).EvaluateNewWindow)(windows_core::Interface::as_raw(self), pszurl.param().abi(), pszname.param().abi(), pszurlcontext.param().abi(), pszfeatures.param().abi(), freplace.param().abi(), core::mem::transmute(dwflags), core::mem::transmute(dwuseractiontime)).ok() + (windows_core::Interface::vtable(self).EvaluateNewWindow)(windows_core::Interface::as_raw(self), pszurl.param().abi(), pszname.param().abi(), pszurlcontext.param().abi(), pszfeatures.param().abi(), freplace.into(), core::mem::transmute(dwflags), core::mem::transmute(dwuseractiontime)).ok() } } #[repr(C)] @@ -29369,13 +29188,12 @@ impl windows_core::RuntimeName for IPreviewItem {} windows_core::imp::define_interface!(IPreviousVersionsInfo, IPreviousVersionsInfo_Vtbl, 0x76e54780_ad74_48e3_a695_3ba9a0aff10d); windows_core::imp::interface_hierarchy!(IPreviousVersionsInfo, windows_core::IUnknown); impl IPreviousVersionsInfo { - pub unsafe fn AreSnapshotsAvailable(&self, pszpath: P0, foktobeslow: P1) -> windows_core::Result + pub unsafe fn AreSnapshotsAvailable(&self, pszpath: P0, foktobeslow: bool) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).AreSnapshotsAvailable)(windows_core::Interface::as_raw(self), pszpath.param().abi(), foktobeslow.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).AreSnapshotsAvailable)(windows_core::Interface::as_raw(self), pszpath.param().abi(), foktobeslow.into(), &mut result__).map(|| result__) } } #[repr(C)] @@ -29493,12 +29311,11 @@ impl IProgressDialog { pub unsafe fn SetProgress64(&self, ullcompleted: u64, ulltotal: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetProgress64)(windows_core::Interface::as_raw(self), core::mem::transmute(ullcompleted), core::mem::transmute(ulltotal)).ok() } - pub unsafe fn SetLine(&self, dwlinenum: u32, pwzstring: P1, fcompactpath: P2, pvresevered: Option<*const core::ffi::c_void>) -> windows_core::Result<()> + pub unsafe fn SetLine(&self, dwlinenum: u32, pwzstring: P1, fcompactpath: bool, pvresevered: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).SetLine)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlinenum), pwzstring.param().abi(), fcompactpath.param().abi(), core::mem::transmute(pvresevered.unwrap_or(core::mem::zeroed()))).ok() + (windows_core::Interface::vtable(self).SetLine)(windows_core::Interface::as_raw(self), core::mem::transmute(dwlinenum), pwzstring.param().abi(), fcompactpath.into(), core::mem::transmute(pvresevered.unwrap_or(core::mem::zeroed()))).ok() } pub unsafe fn SetCancelMsg(&self, pwzcancelmsg: P0, pvresevered: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where @@ -30154,11 +29971,8 @@ impl IRegTreeItem { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetCheckState)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetCheckState(&self, bcheck: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetCheckState)(windows_core::Interface::as_raw(self), bcheck.param().abi()).ok() + pub unsafe fn SetCheckState(&self, bcheck: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetCheckState)(windows_core::Interface::as_raw(self), bcheck.into()).ok() } } #[repr(C)] @@ -30263,12 +30077,11 @@ impl windows_core::RuntimeName for IRelatedItem {} windows_core::imp::define_interface!(IRemoteComputer, IRemoteComputer_Vtbl, 0x000214fe_0000_0000_c000_000000000046); windows_core::imp::interface_hierarchy!(IRemoteComputer, windows_core::IUnknown); impl IRemoteComputer { - pub unsafe fn Initialize(&self, pszmachine: P0, benumerating: P1) -> windows_core::Result<()> + pub unsafe fn Initialize(&self, pszmachine: P0, benumerating: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pszmachine.param().abi(), benumerating.param().abi()).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pszmachine.param().abi(), benumerating.into()).ok() } } #[repr(C)] @@ -30417,11 +30230,8 @@ impl IRunnableTask { pub unsafe fn Run(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Run)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn Kill(&self, bwait: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Kill)(windows_core::Interface::as_raw(self), bwait.param().abi()).ok() + pub unsafe fn Kill(&self, bwait: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Kill)(windows_core::Interface::as_raw(self), bwait.into()).ok() } pub unsafe fn Suspend(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Suspend)(windows_core::Interface::as_raw(self)).ok() @@ -30568,21 +30378,15 @@ impl IScriptErrorList { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).getDetailsPaneOpen)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn setDetailsPaneOpen(&self, fdetailspaneopen: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).setDetailsPaneOpen)(windows_core::Interface::as_raw(self), fdetailspaneopen.param().abi()).ok() + pub unsafe fn setDetailsPaneOpen(&self, fdetailspaneopen: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).setDetailsPaneOpen)(windows_core::Interface::as_raw(self), fdetailspaneopen.into()).ok() } pub unsafe fn getPerErrorDisplay(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).getPerErrorDisplay)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn setPerErrorDisplay(&self, fpererrordisplay: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).setPerErrorDisplay)(windows_core::Interface::as_raw(self), fpererrordisplay.param().abi()).ok() + pub unsafe fn setPerErrorDisplay(&self, fpererrordisplay: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).setPerErrorDisplay)(windows_core::Interface::as_raw(self), fpererrordisplay.into()).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -31381,11 +31185,8 @@ impl IShellBrowser { { (windows_core::Interface::vtable(self).SetStatusTextSB)(windows_core::Interface::as_raw(self), pszstatustext.param().abi()).ok() } - pub unsafe fn EnableModelessSB(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableModelessSB)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn EnableModelessSB(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableModelessSB)(windows_core::Interface::as_raw(self), fenable.into()).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn TranslateAcceleratorSB(&self, pmsg: *const super::WindowsAndMessaging::MSG, wid: u16) -> windows_core::Result<()> { @@ -33061,11 +32862,8 @@ impl IShellFolderView { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).RefreshObject)(windows_core::Interface::as_raw(self), core::mem::transmute(pidl), &mut result__).map(|| result__) } - pub unsafe fn SetRedraw(&self, bredraw: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetRedraw)(windows_core::Interface::as_raw(self), bredraw.param().abi()).ok() + pub unsafe fn SetRedraw(&self, bredraw: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetRedraw)(windows_core::Interface::as_raw(self), bredraw.into()).ok() } pub unsafe fn GetSelectedCount(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -33108,11 +32906,8 @@ impl IShellFolderView { { (windows_core::Interface::vtable(self).IsBkDropTarget)(windows_core::Interface::as_raw(self), pdroptarget.param().abi()).ok() } - pub unsafe fn SetClipboard(&self, bmove: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetClipboard)(windows_core::Interface::as_raw(self), bmove.param().abi()).ok() + pub unsafe fn SetClipboard(&self, bmove: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetClipboard)(windows_core::Interface::as_raw(self), bmove.into()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SetPoints(&self, pdataobject: P0) -> windows_core::Result<()> @@ -34085,11 +33880,8 @@ impl IShellIconOverlayManager { pub unsafe fn LoadNonloadedOverlayIdentifiers(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).LoadNonloadedOverlayIdentifiers)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn OverlayIndexFromImageIndex(&self, iimage: i32, piindex: *mut i32, fadd: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).OverlayIndexFromImageIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(iimage), core::mem::transmute(piindex), fadd.param().abi()).ok() + pub unsafe fn OverlayIndexFromImageIndex(&self, iimage: i32, piindex: *mut i32, fadd: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OverlayIndexFromImageIndex)(windows_core::Interface::as_raw(self), core::mem::transmute(iimage), core::mem::transmute(piindex), fadd.into()).ok() } } #[repr(C)] @@ -37211,11 +37003,8 @@ impl IShellTaskScheduler { { (windows_core::Interface::vtable(self).AddTask)(windows_core::Interface::as_raw(self), prt.param().abi(), core::mem::transmute(rtoid), core::mem::transmute(lparam), core::mem::transmute(dwpriority)).ok() } - pub unsafe fn RemoveTasks(&self, rtoid: *const windows_core::GUID, lparam: usize, bwaitifrunning: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).RemoveTasks)(windows_core::Interface::as_raw(self), core::mem::transmute(rtoid), core::mem::transmute(lparam), bwaitifrunning.param().abi()).ok() + pub unsafe fn RemoveTasks(&self, rtoid: *const windows_core::GUID, lparam: usize, bwaitifrunning: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RemoveTasks)(windows_core::Interface::as_raw(self), core::mem::transmute(rtoid), core::mem::transmute(lparam), bwaitifrunning.into()).ok() } pub unsafe fn CountTasks(&self, rtoid: *const windows_core::GUID) -> u32 { (windows_core::Interface::vtable(self).CountTasks)(windows_core::Interface::as_raw(self), core::mem::transmute(rtoid)) @@ -38872,11 +38661,8 @@ impl IShellView { pub unsafe fn TranslateAccelerator(&self, pmsg: *const super::WindowsAndMessaging::MSG) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).TranslateAccelerator)(windows_core::Interface::as_raw(self), core::mem::transmute(pmsg)) } - pub unsafe fn EnableModeless(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableModeless)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn EnableModeless(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableModeless)(windows_core::Interface::as_raw(self), fenable.into()).ok() } pub unsafe fn UIActivate(&self, ustate: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UIActivate)(windows_core::Interface::as_raw(self), core::mem::transmute(ustate)).ok() @@ -39766,11 +39552,8 @@ impl IStreamAsync { (windows_core::Interface::vtable(self).WriteAsync)(windows_core::Interface::as_raw(self), core::mem::transmute(lpbuffer), core::mem::transmute(cb), core::mem::transmute(pcbwritten.unwrap_or(core::mem::zeroed())), core::mem::transmute(lpoverlapped)).ok() } #[cfg(feature = "Win32_System_IO")] - pub unsafe fn OverlappedResult(&self, lpoverlapped: *const super::super::System::IO::OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).OverlappedResult)(windows_core::Interface::as_raw(self), core::mem::transmute(lpoverlapped), core::mem::transmute(lpnumberofbytestransferred), bwait.param().abi()).ok() + pub unsafe fn OverlappedResult(&self, lpoverlapped: *const super::super::System::IO::OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OverlappedResult)(windows_core::Interface::as_raw(self), core::mem::transmute(lpoverlapped), core::mem::transmute(lpnumberofbytestransferred), bwait.into()).ok() } pub unsafe fn CancelIo(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CancelIo)(windows_core::Interface::as_raw(self)).ok() @@ -40226,11 +40009,8 @@ impl ISyncMgrConflictResolveInfo { pub unsafe fn SetPresenterNextStep(&self, npresenternextstep: SYNCMGR_PRESENTER_NEXT_STEP) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetPresenterNextStep)(windows_core::Interface::as_raw(self), core::mem::transmute(npresenternextstep)).ok() } - pub unsafe fn SetPresenterChoice(&self, npresenterchoice: SYNCMGR_PRESENTER_CHOICE, fapplytoall: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetPresenterChoice)(windows_core::Interface::as_raw(self), core::mem::transmute(npresenterchoice), fapplytoall.param().abi()).ok() + pub unsafe fn SetPresenterChoice(&self, npresenterchoice: SYNCMGR_PRESENTER_CHOICE, fapplytoall: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetPresenterChoice)(windows_core::Interface::as_raw(self), core::mem::transmute(npresenterchoice), fapplytoall.into()).ok() } pub unsafe fn SetItemChoices(&self, prgiconflictitemindexes: *mut u32, cchoices: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetItemChoices)(windows_core::Interface::as_raw(self), core::mem::transmute(prgiconflictitemindexes), core::mem::transmute(cchoices)).ok() @@ -40500,27 +40280,24 @@ impl ISyncMgrControl { { (windows_core::Interface::vtable(self).UpdateConflicts)(windows_core::Interface::as_raw(self), pszhandlerid.param().abi(), pszitemid.param().abi(), core::mem::transmute(ncontrolflags)).ok() } - pub unsafe fn ActivateHandler(&self, factivate: P0, pszhandlerid: P1, hwndowner: super::super::Foundation::HWND, ncontrolflags: SYNCMGR_CONTROL_FLAGS) -> windows_core::Result<()> + pub unsafe fn ActivateHandler(&self, factivate: bool, pszhandlerid: P1, hwndowner: super::super::Foundation::HWND, ncontrolflags: SYNCMGR_CONTROL_FLAGS) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).ActivateHandler)(windows_core::Interface::as_raw(self), factivate.param().abi(), pszhandlerid.param().abi(), core::mem::transmute(hwndowner), core::mem::transmute(ncontrolflags)).ok() + (windows_core::Interface::vtable(self).ActivateHandler)(windows_core::Interface::as_raw(self), factivate.into(), pszhandlerid.param().abi(), core::mem::transmute(hwndowner), core::mem::transmute(ncontrolflags)).ok() } - pub unsafe fn EnableHandler(&self, fenable: P0, pszhandlerid: P1, hwndowner: super::super::Foundation::HWND, ncontrolflags: SYNCMGR_CONTROL_FLAGS) -> windows_core::Result<()> + pub unsafe fn EnableHandler(&self, fenable: bool, pszhandlerid: P1, hwndowner: super::super::Foundation::HWND, ncontrolflags: SYNCMGR_CONTROL_FLAGS) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).EnableHandler)(windows_core::Interface::as_raw(self), fenable.param().abi(), pszhandlerid.param().abi(), core::mem::transmute(hwndowner), core::mem::transmute(ncontrolflags)).ok() + (windows_core::Interface::vtable(self).EnableHandler)(windows_core::Interface::as_raw(self), fenable.into(), pszhandlerid.param().abi(), core::mem::transmute(hwndowner), core::mem::transmute(ncontrolflags)).ok() } - pub unsafe fn EnableItem(&self, fenable: P0, pszhandlerid: P1, pszitemid: P2, hwndowner: super::super::Foundation::HWND, ncontrolflags: SYNCMGR_CONTROL_FLAGS) -> windows_core::Result<()> + pub unsafe fn EnableItem(&self, fenable: bool, pszhandlerid: P1, pszitemid: P2, hwndowner: super::super::Foundation::HWND, ncontrolflags: SYNCMGR_CONTROL_FLAGS) -> windows_core::Result<()> where - P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).EnableItem)(windows_core::Interface::as_raw(self), fenable.param().abi(), pszhandlerid.param().abi(), pszitemid.param().abi(), core::mem::transmute(hwndowner), core::mem::transmute(ncontrolflags)).ok() + (windows_core::Interface::vtable(self).EnableItem)(windows_core::Interface::as_raw(self), fenable.into(), pszhandlerid.param().abi(), pszitemid.param().abi(), core::mem::transmute(hwndowner), core::mem::transmute(ncontrolflags)).ok() } } #[repr(C)] @@ -41073,17 +40850,11 @@ impl ISyncMgrHandler { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetPolicies)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn Activate(&self, factivate: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), factivate.param().abi()).ok() + pub unsafe fn Activate(&self, factivate: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), factivate.into()).ok() } - pub unsafe fn Enable(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn Enable(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), fenable.into()).ok() } pub unsafe fn Synchronize(&self, ppszitemids: &[windows_core::PCWSTR], hwndowner: super::super::Foundation::HWND, psessioncreator: P3, punk: P4) -> windows_core::Result<()> where @@ -41805,11 +41576,8 @@ impl ISyncMgrSyncItem { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetPolicies)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn Enable(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn Enable(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), fenable.into()).ok() } pub unsafe fn Delete(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Delete)(windows_core::Interface::as_raw(self)).ok() @@ -42277,11 +42045,8 @@ impl ISyncMgrSynchronizeCallback { pub unsafe fn ShowErrorCompleted(&self, hr: windows_core::HRESULT, pitemids: &[windows_core::GUID]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ShowErrorCompleted)(windows_core::Interface::as_raw(self), core::mem::transmute(hr), pitemids.len().try_into().unwrap(), core::mem::transmute(pitemids.as_ptr())).ok() } - pub unsafe fn EnableModeless(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableModeless)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn EnableModeless(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableModeless)(windows_core::Interface::as_raw(self), fenable.into()).ok() } pub unsafe fn Progress(&self, itemid: *const windows_core::GUID, psyncprogressitem: *const SYNCMGRPROGRESSITEM) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Progress)(windows_core::Interface::as_raw(self), core::mem::transmute(itemid), core::mem::transmute(psyncprogressitem)).ok() @@ -42551,11 +42316,8 @@ impl core::ops::Deref for ITaskbarList2 { } windows_core::imp::interface_hierarchy!(ITaskbarList2, windows_core::IUnknown, ITaskbarList); impl ITaskbarList2 { - pub unsafe fn MarkFullscreenWindow(&self, hwnd: super::super::Foundation::HWND, ffullscreen: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).MarkFullscreenWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), ffullscreen.param().abi()).ok() + pub unsafe fn MarkFullscreenWindow(&self, hwnd: super::super::Foundation::HWND, ffullscreen: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).MarkFullscreenWindow)(windows_core::Interface::as_raw(self), core::mem::transmute(hwnd), ffullscreen.into()).ok() } } #[repr(C)] @@ -43616,12 +43378,11 @@ impl ITravelEntry { { (windows_core::Interface::vtable(self).Invoke)(windows_core::Interface::as_raw(self), punk.param().abi()).ok() } - pub unsafe fn Update(&self, punk: P0, fislocalanchor: P1) -> windows_core::Result<()> + pub unsafe fn Update(&self, punk: P0, fislocalanchor: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Update)(windows_core::Interface::as_raw(self), punk.param().abi(), fislocalanchor.param().abi()).ok() + (windows_core::Interface::vtable(self).Update)(windows_core::Interface::as_raw(self), punk.param().abi(), fislocalanchor.into()).ok() } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetPidl(&self) -> windows_core::Result<*mut Common::ITEMIDLIST> { @@ -43682,19 +43443,17 @@ impl windows_core::RuntimeName for ITravelEntry {} windows_core::imp::define_interface!(ITravelLog, ITravelLog_Vtbl, 0x66a9cb08_4802_11d2_a561_00a0c92dbfe8); windows_core::imp::interface_hierarchy!(ITravelLog, windows_core::IUnknown); impl ITravelLog { - pub unsafe fn AddEntry(&self, punk: P0, fislocalanchor: P1) -> windows_core::Result<()> + pub unsafe fn AddEntry(&self, punk: P0, fislocalanchor: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).AddEntry)(windows_core::Interface::as_raw(self), punk.param().abi(), fislocalanchor.param().abi()).ok() + (windows_core::Interface::vtable(self).AddEntry)(windows_core::Interface::as_raw(self), punk.param().abi(), fislocalanchor.into()).ok() } - pub unsafe fn UpdateEntry(&self, punk: P0, fislocalanchor: P1) -> windows_core::Result<()> + pub unsafe fn UpdateEntry(&self, punk: P0, fislocalanchor: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P1: windows_core::Param, { - (windows_core::Interface::vtable(self).UpdateEntry)(windows_core::Interface::as_raw(self), punk.param().abi(), fislocalanchor.param().abi()).ok() + (windows_core::Interface::vtable(self).UpdateEntry)(windows_core::Interface::as_raw(self), punk.param().abi(), fislocalanchor.into()).ok() } pub unsafe fn UpdateExternal(&self, punk: P0, punkhlbrowsecontext: P1) -> windows_core::Result<()> where @@ -43990,15 +43749,14 @@ impl windows_core::RuntimeName for ITravelLogEntry {} windows_core::imp::define_interface!(ITravelLogStg, ITravelLogStg_Vtbl, 0x7ebfdd80_ad18_11d3_a4c5_00c04f72d6b8); windows_core::imp::interface_hierarchy!(ITravelLogStg, windows_core::IUnknown); impl ITravelLogStg { - pub unsafe fn CreateEntry(&self, pszurl: P0, psztitle: P1, ptlerelativeto: P2, fprepend: P3) -> windows_core::Result + pub unsafe fn CreateEntry(&self, pszurl: P0, psztitle: P1, ptlerelativeto: P2, fprepend: bool) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, P2: windows_core::Param, - P3: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateEntry)(windows_core::Interface::as_raw(self), pszurl.param().abi(), psztitle.param().abi(), ptlerelativeto.param().abi(), fprepend.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateEntry)(windows_core::Interface::as_raw(self), pszurl.param().abi(), psztitle.param().abi(), ptlerelativeto.param().abi(), fprepend.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn TravelTo(&self, ptle: P0) -> windows_core::Result<()> where @@ -44836,11 +44594,8 @@ impl IVisualProperties { (windows_core::Interface::vtable(self).GetItemHeight)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } #[cfg(feature = "Win32_Graphics_Gdi")] - pub unsafe fn SetFont(&self, plf: *const super::super::Graphics::Gdi::LOGFONTW, bredraw: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetFont)(windows_core::Interface::as_raw(self), core::mem::transmute(plf), bredraw.param().abi()).ok() + pub unsafe fn SetFont(&self, plf: *const super::super::Graphics::Gdi::LOGFONTW, bredraw: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetFont)(windows_core::Interface::as_raw(self), core::mem::transmute(plf), bredraw.into()).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetFont(&self, plf: *mut super::super::Graphics::Gdi::LOGFONTW) -> windows_core::Result<()> { @@ -47709,16 +47464,10 @@ pub type PAPPCONSTRAIN_CHANGE_ROUTINE = Option; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Default)] pub struct PAPPSTATE_REGISTRATION(pub isize); -impl windows_core::TypeKind for PAPPSTATE_REGISTRATION { - type TypeKind = windows_core::CopyType; -} #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] pub struct PARSEDURLA { diff --git a/crates/libs/windows/src/Windows/Win32/UI/TabletPC/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/TabletPC/mod.rs index 823b043dbc..0d46376fcb 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/TabletPC/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/TabletPC/mod.rs @@ -13,12 +13,9 @@ where AddWordsToWordList(core::mem::transmute(hwl), pwcwords.param().abi()).ok() } #[inline] -pub unsafe fn AdviseInkChange(hrc: HRECOCONTEXT, bnewstroke: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn AdviseInkChange(hrc: HRECOCONTEXT, bnewstroke: bool) -> windows_core::Result<()> { windows_targets::link!("inkobjcore.dll" "system" fn AdviseInkChange(hrc : HRECOCONTEXT, bnewstroke : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - AdviseInkChange(core::mem::transmute(hrc), bnewstroke.param().abi()).ok() + AdviseInkChange(core::mem::transmute(hrc), bnewstroke.into()).ok() } #[inline] pub unsafe fn CreateContext(hrec: HRECOGNIZER, phrc: *mut HRECOCONTEXT) -> windows_core::Result<()> { @@ -1073,9 +1070,6 @@ pub const GestureRecognizer: windows_core::GUID = windows_core::GUID::from_u128( #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HRECOALT(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HRECOALT { - type TypeKind = windows_core::CopyType; -} impl HRECOALT { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1089,9 +1083,6 @@ impl Default for HRECOALT { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HRECOCONTEXT(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HRECOCONTEXT { - type TypeKind = windows_core::CopyType; -} impl HRECOCONTEXT { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1114,9 +1105,6 @@ impl Default for HRECOCONTEXT { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HRECOGNIZER(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HRECOGNIZER { - type TypeKind = windows_core::CopyType; -} impl HRECOGNIZER { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1139,9 +1127,6 @@ impl Default for HRECOGNIZER { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HRECOLATTICE(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HRECOLATTICE { - type TypeKind = windows_core::CopyType; -} impl HRECOLATTICE { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1155,9 +1140,6 @@ impl Default for HRECOLATTICE { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HRECOWORDLIST(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HRECOWORDLIST { - type TypeKind = windows_core::CopyType; -} impl HRECOWORDLIST { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -1279,11 +1261,8 @@ impl IDynamicRenderer { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, benabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), benabled.param().abi()).ok() + pub unsafe fn SetEnabled(&self, benabled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), benabled.into()).ok() } pub unsafe fn HWND(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1322,11 +1301,8 @@ impl IDynamicRenderer { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).DataCacheEnabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetDataCacheEnabled(&self, fcachedata: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDataCacheEnabled)(windows_core::Interface::as_raw(self), fcachedata.param().abi()).ok() + pub unsafe fn SetDataCacheEnabled(&self, fcachedata: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDataCacheEnabled)(windows_core::Interface::as_raw(self), fcachedata.into()).ok() } pub unsafe fn ReleaseCachedData(&self, strokeid: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReleaseCachedData)(windows_core::Interface::as_raw(self), core::mem::transmute(strokeid)).ok() @@ -1575,11 +1551,8 @@ impl IGestureRecognizer { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, fenabled: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), fenabled.param().abi()).ok() + pub unsafe fn SetEnabled(&self, fenabled: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), fenabled.into()).ok() } pub unsafe fn MaxStrokeCount(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1670,19 +1643,15 @@ windows_core::imp::define_interface!(IHandwrittenTextInsertion, IHandwrittenText windows_core::imp::interface_hierarchy!(IHandwrittenTextInsertion, windows_core::IUnknown); impl IHandwrittenTextInsertion { #[cfg(feature = "Win32_System_Com")] - pub unsafe fn InsertRecognitionResultsArray(&self, psaalternates: *const super::super::System::Com::SAFEARRAY, locale: u32, falternatecontainsautospacinginformation: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).InsertRecognitionResultsArray)(windows_core::Interface::as_raw(self), core::mem::transmute(psaalternates), core::mem::transmute(locale), falternatecontainsautospacinginformation.param().abi()).ok() + pub unsafe fn InsertRecognitionResultsArray(&self, psaalternates: *const super::super::System::Com::SAFEARRAY, locale: u32, falternatecontainsautospacinginformation: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InsertRecognitionResultsArray)(windows_core::Interface::as_raw(self), core::mem::transmute(psaalternates), core::mem::transmute(locale), falternatecontainsautospacinginformation.into()).ok() } #[cfg(feature = "Win32_System_Com")] - pub unsafe fn InsertInkRecognitionResult(&self, piinkrecoresult: P0, locale: u32, falternatecontainsautospacinginformation: P2) -> windows_core::Result<()> + pub unsafe fn InsertInkRecognitionResult(&self, piinkrecoresult: P0, locale: u32, falternatecontainsautospacinginformation: bool) -> windows_core::Result<()> where P0: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).InsertInkRecognitionResult)(windows_core::Interface::as_raw(self), piinkrecoresult.param().abi(), core::mem::transmute(locale), falternatecontainsautospacinginformation.param().abi()).ok() + (windows_core::Interface::vtable(self).InsertInkRecognitionResult)(windows_core::Interface::as_raw(self), piinkrecoresult.param().abi(), core::mem::transmute(locale), falternatecontainsautospacinginformation.into()).ok() } } #[repr(C)] @@ -11835,11 +11804,8 @@ impl IRealTimeStylus { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).Enabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn SetEnabled(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), fenable.into()).ok() } pub unsafe fn HWND(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -11911,11 +11877,8 @@ impl IRealTimeStylus { pub unsafe fn ClearStylusQueues(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ClearStylusQueues)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetAllTabletsMode(&self, fusemouseforinput: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetAllTabletsMode)(windows_core::Interface::as_raw(self), fusemouseforinput.param().abi()).ok() + pub unsafe fn SetAllTabletsMode(&self, fusemouseforinput: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetAllTabletsMode)(windows_core::Interface::as_raw(self), fusemouseforinput.into()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SetSingleTabletMode(&self, pitablet: P0) -> windows_core::Result<()> @@ -12305,11 +12268,8 @@ impl IRealTimeStylus2 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).FlicksEnabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetFlicksEnabled(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetFlicksEnabled)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn SetFlicksEnabled(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetFlicksEnabled)(windows_core::Interface::as_raw(self), fenable.into()).ok() } } #[repr(C)] @@ -12356,11 +12316,8 @@ impl IRealTimeStylus3 { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).MultiTouchEnabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetMultiTouchEnabled(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetMultiTouchEnabled)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn SetMultiTouchEnabled(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetMultiTouchEnabled)(windows_core::Interface::as_raw(self), fenable.into()).ok() } } #[repr(C)] @@ -12952,21 +12909,15 @@ impl ITextInputPanel { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).ExpandPostInsertionCorrection)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetExpandPostInsertionCorrection(&self, expand: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetExpandPostInsertionCorrection)(windows_core::Interface::as_raw(self), expand.param().abi()).ok() + pub unsafe fn SetExpandPostInsertionCorrection(&self, expand: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetExpandPostInsertionCorrection)(windows_core::Interface::as_raw(self), expand.into()).ok() } pub unsafe fn InPlaceVisibleOnFocus(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).InPlaceVisibleOnFocus)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetInPlaceVisibleOnFocus(&self, visible: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetInPlaceVisibleOnFocus)(windows_core::Interface::as_raw(self), visible.param().abi()).ok() + pub unsafe fn SetInPlaceVisibleOnFocus(&self, visible: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetInPlaceVisibleOnFocus)(windows_core::Interface::as_raw(self), visible.into()).ok() } pub unsafe fn InPlaceBoundingRectangle(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -12983,11 +12934,8 @@ impl ITextInputPanel { pub unsafe fn CommitPendingInput(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CommitPendingInput)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn SetInPlaceVisibility(&self, visible: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetInPlaceVisibility)(windows_core::Interface::as_raw(self), visible.param().abi()).ok() + pub unsafe fn SetInPlaceVisibility(&self, visible: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetInPlaceVisibility)(windows_core::Interface::as_raw(self), visible.into()).ok() } pub unsafe fn SetInPlacePosition(&self, xposition: i32, yposition: i32, position: CorrectionPosition) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetInPlacePosition)(windows_core::Interface::as_raw(self), core::mem::transmute(xposition), core::mem::transmute(yposition), core::mem::transmute(position)).ok() @@ -13305,19 +13253,11 @@ impl ITextInputPanelEventSink { pub unsafe fn CorrectionModeChanged(&self, oldcorrectionmode: CorrectionMode, newcorrectionmode: CorrectionMode) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CorrectionModeChanged)(windows_core::Interface::as_raw(self), core::mem::transmute(oldcorrectionmode), core::mem::transmute(newcorrectionmode)).ok() } - pub unsafe fn InPlaceVisibilityChanging(&self, oldvisible: P0, newvisible: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).InPlaceVisibilityChanging)(windows_core::Interface::as_raw(self), oldvisible.param().abi(), newvisible.param().abi()).ok() + pub unsafe fn InPlaceVisibilityChanging(&self, oldvisible: bool, newvisible: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InPlaceVisibilityChanging)(windows_core::Interface::as_raw(self), oldvisible.into(), newvisible.into()).ok() } - pub unsafe fn InPlaceVisibilityChanged(&self, oldvisible: P0, newvisible: P1) -> windows_core::Result<()> - where - P0: windows_core::Param, - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).InPlaceVisibilityChanged)(windows_core::Interface::as_raw(self), oldvisible.param().abi(), newvisible.param().abi()).ok() + pub unsafe fn InPlaceVisibilityChanged(&self, oldvisible: bool, newvisible: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InPlaceVisibilityChanged)(windows_core::Interface::as_raw(self), oldvisible.into(), newvisible.into()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn TextInserting(&self, ink: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()> { @@ -13563,11 +13503,8 @@ impl ITipAutoCompleteProvider { pub unsafe fn UpdatePendingText(&self, bstrpendingtext: &windows_core::BSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UpdatePendingText)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrpendingtext)).ok() } - pub unsafe fn Show(&self, fshow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), fshow.param().abi()).ok() + pub unsafe fn Show(&self, fshow: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), fshow.into()).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/UI/TextServices/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/TextServices/mod.rs index 61c7d004fc..c6b60fbfba 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/TextServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/TextServices/mod.rs @@ -3250,13 +3250,12 @@ impl ITextStoreAnchor { pub unsafe fn SetSelection(&self, pselection: &[TS_SELECTION_ANCHOR]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetSelection)(windows_core::Interface::as_raw(self), pselection.len().try_into().unwrap(), core::mem::transmute(pselection.as_ptr())).ok() } - pub unsafe fn GetText(&self, dwflags: u32, pastart: P1, paend: P2, pchtext: &mut [u16], pcch: *mut u32, fupdateanchor: P6) -> windows_core::Result<()> + pub unsafe fn GetText(&self, dwflags: u32, pastart: P1, paend: P2, pchtext: &mut [u16], pcch: *mut u32, fupdateanchor: bool) -> windows_core::Result<()> where P1: windows_core::Param, P2: windows_core::Param, - P6: windows_core::Param, { - (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), core::mem::transmute(dwflags), pastart.param().abi(), paend.param().abi(), core::mem::transmute(pchtext.as_ptr()), pchtext.len().try_into().unwrap(), core::mem::transmute(pcch), fupdateanchor.param().abi()).ok() + (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), core::mem::transmute(dwflags), pastart.param().abi(), paend.param().abi(), core::mem::transmute(pchtext.as_ptr()), pchtext.len().try_into().unwrap(), core::mem::transmute(pcch), fupdateanchor.into()).ok() } pub unsafe fn SetText(&self, dwflags: u32, pastart: P1, paend: P2, pchtext: &[u16]) -> windows_core::Result<()> where @@ -3831,11 +3830,8 @@ impl windows_core::RuntimeName for ITextStoreSinkAnchorEx {} windows_core::imp::define_interface!(ITfActiveLanguageProfileNotifySink, ITfActiveLanguageProfileNotifySink_Vtbl, 0xb246cb75_a93e_4652_bf8c_b3fe0cfd7e57); windows_core::imp::interface_hierarchy!(ITfActiveLanguageProfileNotifySink, windows_core::IUnknown); impl ITfActiveLanguageProfileNotifySink { - pub unsafe fn OnActivated(&self, clsid: *const windows_core::GUID, guidprofile: *const windows_core::GUID, factivated: P2) -> windows_core::Result<()> - where - P2: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnActivated)(windows_core::Interface::as_raw(self), core::mem::transmute(clsid), core::mem::transmute(guidprofile), factivated.param().abi()).ok() + pub unsafe fn OnActivated(&self, clsid: *const windows_core::GUID, guidprofile: *const windows_core::GUID, factivated: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnActivated)(windows_core::Interface::as_raw(self), core::mem::transmute(clsid), core::mem::transmute(guidprofile), factivated.into()).ok() } } #[repr(C)] @@ -6717,18 +6713,12 @@ impl ITfFnLMProcessor { { (windows_core::Interface::vtable(self).Reconvert)(windows_core::Interface::as_raw(self), prange.param().abi()).ok() } - pub unsafe fn QueryKey(&self, fup: P0, vkey: super::super::Foundation::WPARAM, lparamkeydata: super::super::Foundation::LPARAM) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn QueryKey(&self, fup: bool, vkey: super::super::Foundation::WPARAM, lparamkeydata: super::super::Foundation::LPARAM) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).QueryKey)(windows_core::Interface::as_raw(self), fup.param().abi(), core::mem::transmute(vkey), core::mem::transmute(lparamkeydata), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).QueryKey)(windows_core::Interface::as_raw(self), fup.into(), core::mem::transmute(vkey), core::mem::transmute(lparamkeydata), &mut result__).map(|| result__) } - pub unsafe fn InvokeKey(&self, fup: P0, vkey: super::super::Foundation::WPARAM, lparamkeydata: super::super::Foundation::LPARAM) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).InvokeKey)(windows_core::Interface::as_raw(self), fup.param().abi(), core::mem::transmute(vkey), core::mem::transmute(lparamkeydata)).ok() + pub unsafe fn InvokeKey(&self, fup: bool, vkey: super::super::Foundation::WPARAM, lparamkeydata: super::super::Foundation::LPARAM) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).InvokeKey)(windows_core::Interface::as_raw(self), fup.into(), core::mem::transmute(vkey), core::mem::transmute(lparamkeydata)).ok() } pub unsafe fn InvokeFunc(&self, pic: P0, refguidfunc: *const windows_core::GUID) -> windows_core::Result<()> where @@ -7300,11 +7290,8 @@ impl ITfInputProcessorProfileMgr { (windows_core::Interface::vtable(self).ReleaseInputProcessor)(windows_core::Interface::as_raw(self), core::mem::transmute(rclsid), core::mem::transmute(dwflags)).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] - pub unsafe fn RegisterProfile(&self, rclsid: *const windows_core::GUID, langid: u16, guidprofile: *const windows_core::GUID, pchdesc: &[u16], pchiconfile: &[u16], uiconindex: u32, hklsubstitute: super::Input::KeyboardAndMouse::HKL, dwpreferredlayout: u32, benabledbydefault: P10, dwflags: u32) -> windows_core::Result<()> - where - P10: windows_core::Param, - { - (windows_core::Interface::vtable(self).RegisterProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(rclsid), core::mem::transmute(langid), core::mem::transmute(guidprofile), core::mem::transmute(pchdesc.as_ptr()), pchdesc.len().try_into().unwrap(), core::mem::transmute(pchiconfile.as_ptr()), pchiconfile.len().try_into().unwrap(), core::mem::transmute(uiconindex), core::mem::transmute(hklsubstitute), core::mem::transmute(dwpreferredlayout), benabledbydefault.param().abi(), core::mem::transmute(dwflags)).ok() + pub unsafe fn RegisterProfile(&self, rclsid: *const windows_core::GUID, langid: u16, guidprofile: *const windows_core::GUID, pchdesc: &[u16], pchiconfile: &[u16], uiconindex: u32, hklsubstitute: super::Input::KeyboardAndMouse::HKL, dwpreferredlayout: u32, benabledbydefault: bool, dwflags: u32) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RegisterProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(rclsid), core::mem::transmute(langid), core::mem::transmute(guidprofile), core::mem::transmute(pchdesc.as_ptr()), pchdesc.len().try_into().unwrap(), core::mem::transmute(pchiconfile.as_ptr()), pchiconfile.len().try_into().unwrap(), core::mem::transmute(uiconindex), core::mem::transmute(hklsubstitute), core::mem::transmute(dwpreferredlayout), benabledbydefault.into(), core::mem::transmute(dwflags)).ok() } pub unsafe fn UnregisterProfile(&self, rclsid: *const windows_core::GUID, langid: u16, guidprofile: *const windows_core::GUID, dwflags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UnregisterProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(rclsid), core::mem::transmute(langid), core::mem::transmute(guidprofile), core::mem::transmute(dwflags)).ok() @@ -7503,21 +7490,15 @@ impl ITfInputProcessorProfiles { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).EnumLanguageProfiles)(windows_core::Interface::as_raw(self), core::mem::transmute(langid), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn EnableLanguageProfile(&self, rclsid: *const windows_core::GUID, langid: u16, guidprofile: *const windows_core::GUID, fenable: P3) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableLanguageProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(rclsid), core::mem::transmute(langid), core::mem::transmute(guidprofile), fenable.param().abi()).ok() + pub unsafe fn EnableLanguageProfile(&self, rclsid: *const windows_core::GUID, langid: u16, guidprofile: *const windows_core::GUID, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableLanguageProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(rclsid), core::mem::transmute(langid), core::mem::transmute(guidprofile), fenable.into()).ok() } pub unsafe fn IsEnabledLanguageProfile(&self, rclsid: *const windows_core::GUID, langid: u16, guidprofile: *const windows_core::GUID) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsEnabledLanguageProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(rclsid), core::mem::transmute(langid), core::mem::transmute(guidprofile), &mut result__).map(|| result__) } - pub unsafe fn EnableLanguageProfileByDefault(&self, rclsid: *const windows_core::GUID, langid: u16, guidprofile: *const windows_core::GUID, fenable: P3) -> windows_core::Result<()> - where - P3: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableLanguageProfileByDefault)(windows_core::Interface::as_raw(self), core::mem::transmute(rclsid), core::mem::transmute(langid), core::mem::transmute(guidprofile), fenable.param().abi()).ok() + pub unsafe fn EnableLanguageProfileByDefault(&self, rclsid: *const windows_core::GUID, langid: u16, guidprofile: *const windows_core::GUID, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableLanguageProfileByDefault)(windows_core::Interface::as_raw(self), core::mem::transmute(rclsid), core::mem::transmute(langid), core::mem::transmute(guidprofile), fenable.into()).ok() } #[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] pub unsafe fn SubstituteKeyboardLayout(&self, rclsid: *const windows_core::GUID, langid: u16, guidprofile: *const windows_core::GUID, hkl: super::Input::KeyboardAndMouse::HKL) -> windows_core::Result<()> { @@ -8046,11 +8027,8 @@ impl windows_core::RuntimeName for ITfIntegratableCandidateListUIElement {} windows_core::imp::define_interface!(ITfKeyEventSink, ITfKeyEventSink_Vtbl, 0xaa80e7f5_2021_11d2_93e0_0060b067b86e); windows_core::imp::interface_hierarchy!(ITfKeyEventSink, windows_core::IUnknown); impl ITfKeyEventSink { - pub unsafe fn OnSetFocus(&self, fforeground: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnSetFocus)(windows_core::Interface::as_raw(self), fforeground.param().abi()).ok() + pub unsafe fn OnSetFocus(&self, fforeground: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnSetFocus)(windows_core::Interface::as_raw(self), fforeground.into()).ok() } pub unsafe fn OnTestKeyDown(&self, pic: P0, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result where @@ -8221,12 +8199,11 @@ impl windows_core::RuntimeName for ITfKeyTraceEventSink {} windows_core::imp::define_interface!(ITfKeystrokeMgr, ITfKeystrokeMgr_Vtbl, 0xaa80e7f0_2021_11d2_93e0_0060b067b86e); windows_core::imp::interface_hierarchy!(ITfKeystrokeMgr, windows_core::IUnknown); impl ITfKeystrokeMgr { - pub unsafe fn AdviseKeyEventSink(&self, tid: u32, psink: P1, fforeground: P2) -> windows_core::Result<()> + pub unsafe fn AdviseKeyEventSink(&self, tid: u32, psink: P1, fforeground: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AdviseKeyEventSink)(windows_core::Interface::as_raw(self), core::mem::transmute(tid), psink.param().abi(), fforeground.param().abi()).ok() + (windows_core::Interface::vtable(self).AdviseKeyEventSink)(windows_core::Interface::as_raw(self), core::mem::transmute(tid), psink.param().abi(), fforeground.into()).ok() } pub unsafe fn UnadviseKeyEventSink(&self, tid: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UnadviseKeyEventSink)(windows_core::Interface::as_raw(self), core::mem::transmute(tid)).ok() @@ -8605,11 +8582,8 @@ impl ITfLangBarItem { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn Show(&self, fshow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), fshow.param().abi()).ok() + pub unsafe fn Show(&self, fshow: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), fshow.into()).ok() } pub unsafe fn GetTooltipString(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -9269,11 +9243,8 @@ impl ITfLangBarMgr { pub unsafe fn GetInputProcessorProfiles(&self, dwthreadid: u32, ppaip: *mut Option, pdwthreadid: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetInputProcessorProfiles)(windows_core::Interface::as_raw(self), core::mem::transmute(dwthreadid), core::mem::transmute(ppaip), core::mem::transmute(pdwthreadid)).ok() } - pub unsafe fn RestoreLastFocus(&self, pdwthreadid: *mut u32, fprev: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).RestoreLastFocus)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwthreadid), fprev.param().abi()).ok() + pub unsafe fn RestoreLastFocus(&self, pdwthreadid: *mut u32, fprev: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).RestoreLastFocus)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwthreadid), fprev.into()).ok() } pub unsafe fn SetModalInput(&self, psink: P0, dwthreadid: u32, dwflags: u32) -> windows_core::Result<()> where @@ -11008,11 +10979,8 @@ impl ITfSpeechUIServer { pub unsafe fn Initialize(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn ShowUI(&self, fshow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).ShowUI)(windows_core::Interface::as_raw(self), fshow.param().abi()).ok() + pub unsafe fn ShowUI(&self, fshow: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ShowUI)(windows_core::Interface::as_raw(self), fshow.into()).ok() } pub unsafe fn UpdateBalloon(&self, style: TfLBBalloonStyle, pch: &[u16]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UpdateBalloon)(windows_core::Interface::as_raw(self), core::mem::transmute(style), core::mem::transmute(pch.as_ptr()), pch.len().try_into().unwrap()).ok() @@ -12162,11 +12130,8 @@ impl ITfUIElement { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetGUID)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn Show(&self, bshow: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), bshow.param().abi()).ok() + pub unsafe fn Show(&self, bshow: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Show)(windows_core::Interface::as_raw(self), bshow.into()).ok() } pub unsafe fn IsShown(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Win32/UI/WindowsAndMessaging/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/WindowsAndMessaging/mod.rs index 9d59419966..b4903555b9 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/WindowsAndMessaging/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/WindowsAndMessaging/mod.rs @@ -1,18 +1,12 @@ #[inline] -pub unsafe fn AdjustWindowRect(lprect: *mut super::super::Foundation::RECT, dwstyle: WINDOW_STYLE, bmenu: P2) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn AdjustWindowRect(lprect: *mut super::super::Foundation::RECT, dwstyle: WINDOW_STYLE, bmenu: bool) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn AdjustWindowRect(lprect : *mut super::super::Foundation:: RECT, dwstyle : WINDOW_STYLE, bmenu : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - AdjustWindowRect(core::mem::transmute(lprect), core::mem::transmute(dwstyle), bmenu.param().abi()).ok() + AdjustWindowRect(core::mem::transmute(lprect), core::mem::transmute(dwstyle), bmenu.into()).ok() } #[inline] -pub unsafe fn AdjustWindowRectEx(lprect: *mut super::super::Foundation::RECT, dwstyle: WINDOW_STYLE, bmenu: P2, dwexstyle: WINDOW_EX_STYLE) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn AdjustWindowRectEx(lprect: *mut super::super::Foundation::RECT, dwstyle: WINDOW_STYLE, bmenu: bool, dwexstyle: WINDOW_EX_STYLE) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn AdjustWindowRectEx(lprect : *mut super::super::Foundation:: RECT, dwstyle : WINDOW_STYLE, bmenu : super::super::Foundation:: BOOL, dwexstyle : WINDOW_EX_STYLE) -> super::super::Foundation:: BOOL); - AdjustWindowRectEx(core::mem::transmute(lprect), core::mem::transmute(dwstyle), bmenu.param().abi(), core::mem::transmute(dwexstyle)).ok() + AdjustWindowRectEx(core::mem::transmute(lprect), core::mem::transmute(dwstyle), bmenu.into(), core::mem::transmute(dwexstyle)).ok() } #[inline] pub unsafe fn AllowSetForegroundWindow(dwprocessid: u32) -> windows_core::Result<()> { @@ -363,21 +357,15 @@ pub unsafe fn CreateIcon(hinstance: Option, (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn CreateIconFromResource(presbits: &[u8], ficon: P2, dwver: u32) -> windows_core::Result -where - P2: windows_core::Param, -{ +pub unsafe fn CreateIconFromResource(presbits: &[u8], ficon: bool, dwver: u32) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn CreateIconFromResource(presbits : *const u8, dwressize : u32, ficon : super::super::Foundation:: BOOL, dwver : u32) -> HICON); - let result__ = CreateIconFromResource(core::mem::transmute(presbits.as_ptr()), presbits.len().try_into().unwrap(), ficon.param().abi(), core::mem::transmute(dwver)); + let result__ = CreateIconFromResource(core::mem::transmute(presbits.as_ptr()), presbits.len().try_into().unwrap(), ficon.into(), core::mem::transmute(dwver)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn CreateIconFromResourceEx(presbits: &[u8], ficon: P2, dwver: u32, cxdesired: i32, cydesired: i32, flags: IMAGE_FLAGS) -> windows_core::Result -where - P2: windows_core::Param, -{ +pub unsafe fn CreateIconFromResourceEx(presbits: &[u8], ficon: bool, dwver: u32, cxdesired: i32, cydesired: i32, flags: IMAGE_FLAGS) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn CreateIconFromResourceEx(presbits : *const u8, dwressize : u32, ficon : super::super::Foundation:: BOOL, dwver : u32, cxdesired : i32, cydesired : i32, flags : IMAGE_FLAGS) -> HICON); - let result__ = CreateIconFromResourceEx(core::mem::transmute(presbits.as_ptr()), presbits.len().try_into().unwrap(), ficon.param().abi(), core::mem::transmute(dwver), core::mem::transmute(cxdesired), core::mem::transmute(cydesired), core::mem::transmute(flags)); + let result__ = CreateIconFromResourceEx(core::mem::transmute(presbits.as_ptr()), presbits.len().try_into().unwrap(), ficon.into(), core::mem::transmute(dwver), core::mem::transmute(cxdesired), core::mem::transmute(cydesired), core::mem::transmute(flags)); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Graphics_Gdi")] @@ -706,12 +694,9 @@ where (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn FlashWindow(hwnd: super::super::Foundation::HWND, binvert: P1) -> super::super::Foundation::BOOL -where - P1: windows_core::Param, -{ +pub unsafe fn FlashWindow(hwnd: super::super::Foundation::HWND, binvert: bool) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn FlashWindow(hwnd : super::super::Foundation:: HWND, binvert : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - FlashWindow(core::mem::transmute(hwnd), binvert.param().abi()) + FlashWindow(core::mem::transmute(hwnd), binvert.into()) } #[inline] pub unsafe fn FlashWindowEx(pfwi: *const FLASHWINFO) -> super::super::Foundation::BOOL { @@ -863,12 +848,9 @@ pub unsafe fn GetDlgItem(hdlg: Option, niddlgite (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn GetDlgItemInt(hdlg: super::super::Foundation::HWND, niddlgitem: i32, lptranslated: Option<*mut super::super::Foundation::BOOL>, bsigned: P3) -> u32 -where - P3: windows_core::Param, -{ +pub unsafe fn GetDlgItemInt(hdlg: super::super::Foundation::HWND, niddlgitem: i32, lptranslated: Option<*mut super::super::Foundation::BOOL>, bsigned: bool) -> u32 { windows_targets::link!("user32.dll" "system" fn GetDlgItemInt(hdlg : super::super::Foundation:: HWND, niddlgitem : i32, lptranslated : *mut super::super::Foundation:: BOOL, bsigned : super::super::Foundation:: BOOL) -> u32); - GetDlgItemInt(core::mem::transmute(hdlg), core::mem::transmute(niddlgitem), core::mem::transmute(lptranslated.unwrap_or(core::mem::zeroed())), bsigned.param().abi()) + GetDlgItemInt(core::mem::transmute(hdlg), core::mem::transmute(niddlgitem), core::mem::transmute(lptranslated.unwrap_or(core::mem::zeroed())), bsigned.into()) } #[inline] pub unsafe fn GetDlgItemTextA(hdlg: super::super::Foundation::HWND, niddlgitem: i32, lpstring: &mut [u8]) -> u32 { @@ -961,21 +943,15 @@ pub unsafe fn GetMenuItemID(hmenu: HMENU, npos: i32) -> u32 { } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetMenuItemInfoA(hmenu: HMENU, item: u32, fbyposition: P2, lpmii: *mut MENUITEMINFOA) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn GetMenuItemInfoA(hmenu: HMENU, item: u32, fbyposition: bool, lpmii: *mut MENUITEMINFOA) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetMenuItemInfoA(hmenu : HMENU, item : u32, fbyposition : super::super::Foundation:: BOOL, lpmii : *mut MENUITEMINFOA) -> super::super::Foundation:: BOOL); - GetMenuItemInfoA(core::mem::transmute(hmenu), core::mem::transmute(item), fbyposition.param().abi(), core::mem::transmute(lpmii)).ok() + GetMenuItemInfoA(core::mem::transmute(hmenu), core::mem::transmute(item), fbyposition.into(), core::mem::transmute(lpmii)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn GetMenuItemInfoW(hmenu: HMENU, item: u32, fbyposition: P2, lpmii: *mut MENUITEMINFOW) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn GetMenuItemInfoW(hmenu: HMENU, item: u32, fbyposition: bool, lpmii: *mut MENUITEMINFOW) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn GetMenuItemInfoW(hmenu : HMENU, item : u32, fbyposition : super::super::Foundation:: BOOL, lpmii : *mut MENUITEMINFOW) -> super::super::Foundation:: BOOL); - GetMenuItemInfoW(core::mem::transmute(hmenu), core::mem::transmute(item), fbyposition.param().abi(), core::mem::transmute(lpmii)).ok() + GetMenuItemInfoW(core::mem::transmute(hmenu), core::mem::transmute(item), fbyposition.into(), core::mem::transmute(lpmii)).ok() } #[inline] pub unsafe fn GetMenuItemRect(hwnd: Option, hmenu: HMENU, uitem: u32, lprcitem: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { @@ -1023,21 +999,15 @@ pub unsafe fn GetMessageW(lpmsg: *mut MSG, hwnd: Option(hdlg: super::super::Foundation::HWND, hctl: Option, bprevious: P2) -> windows_core::Result -where - P2: windows_core::Param, -{ +pub unsafe fn GetNextDlgGroupItem(hdlg: super::super::Foundation::HWND, hctl: Option, bprevious: bool) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn GetNextDlgGroupItem(hdlg : super::super::Foundation:: HWND, hctl : super::super::Foundation:: HWND, bprevious : super::super::Foundation:: BOOL) -> super::super::Foundation:: HWND); - let result__ = GetNextDlgGroupItem(core::mem::transmute(hdlg), core::mem::transmute(hctl.unwrap_or(core::mem::zeroed())), bprevious.param().abi()); + let result__ = GetNextDlgGroupItem(core::mem::transmute(hdlg), core::mem::transmute(hctl.unwrap_or(core::mem::zeroed())), bprevious.into()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] -pub unsafe fn GetNextDlgTabItem(hdlg: super::super::Foundation::HWND, hctl: Option, bprevious: P2) -> windows_core::Result -where - P2: windows_core::Param, -{ +pub unsafe fn GetNextDlgTabItem(hdlg: super::super::Foundation::HWND, hctl: Option, bprevious: bool) -> windows_core::Result { windows_targets::link!("user32.dll" "system" fn GetNextDlgTabItem(hdlg : super::super::Foundation:: HWND, hctl : super::super::Foundation:: HWND, bprevious : super::super::Foundation:: BOOL) -> super::super::Foundation:: HWND); - let result__ = GetNextDlgTabItem(core::mem::transmute(hdlg), core::mem::transmute(hctl.unwrap_or(core::mem::zeroed())), bprevious.param().abi()); + let result__ = GetNextDlgTabItem(core::mem::transmute(hdlg), core::mem::transmute(hctl.unwrap_or(core::mem::zeroed())), bprevious.into()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1108,12 +1078,9 @@ pub unsafe fn GetSubMenu(hmenu: HMENU, npos: i32) -> HMENU { GetSubMenu(core::mem::transmute(hmenu), core::mem::transmute(npos)) } #[inline] -pub unsafe fn GetSystemMenu(hwnd: super::super::Foundation::HWND, brevert: P1) -> HMENU -where - P1: windows_core::Param, -{ +pub unsafe fn GetSystemMenu(hwnd: super::super::Foundation::HWND, brevert: bool) -> HMENU { windows_targets::link!("user32.dll" "system" fn GetSystemMenu(hwnd : super::super::Foundation:: HWND, brevert : super::super::Foundation:: BOOL) -> HMENU); - GetSystemMenu(core::mem::transmute(hwnd), brevert.param().abi()) + GetSystemMenu(core::mem::transmute(hwnd), brevert.into()) } #[inline] pub unsafe fn GetSystemMetrics(nindex: SYSTEM_METRICS_INDEX) -> i32 { @@ -1266,21 +1233,15 @@ where } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn InsertMenuItemA(hmenu: HMENU, item: u32, fbyposition: P2, lpmi: *const MENUITEMINFOA) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn InsertMenuItemA(hmenu: HMENU, item: u32, fbyposition: bool, lpmi: *const MENUITEMINFOA) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn InsertMenuItemA(hmenu : HMENU, item : u32, fbyposition : super::super::Foundation:: BOOL, lpmi : *const MENUITEMINFOA) -> super::super::Foundation:: BOOL); - InsertMenuItemA(core::mem::transmute(hmenu), core::mem::transmute(item), fbyposition.param().abi(), core::mem::transmute(lpmi)).ok() + InsertMenuItemA(core::mem::transmute(hmenu), core::mem::transmute(item), fbyposition.into(), core::mem::transmute(lpmi)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn InsertMenuItemW(hmenu: HMENU, item: u32, fbyposition: P2, lpmi: *const MENUITEMINFOW) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn InsertMenuItemW(hmenu: HMENU, item: u32, fbyposition: bool, lpmi: *const MENUITEMINFOW) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn InsertMenuItemW(hmenu : HMENU, item : u32, fbyposition : super::super::Foundation:: BOOL, lpmi : *const MENUITEMINFOW) -> super::super::Foundation:: BOOL); - InsertMenuItemW(core::mem::transmute(hmenu), core::mem::transmute(item), fbyposition.param().abi(), core::mem::transmute(lpmi)).ok() + InsertMenuItemW(core::mem::transmute(hmenu), core::mem::transmute(item), fbyposition.into(), core::mem::transmute(lpmi)).ok() } #[inline] pub unsafe fn InsertMenuW(hmenu: HMENU, uposition: u32, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P4) -> windows_core::Result<()> @@ -1346,12 +1307,9 @@ pub unsafe fn IsDialogMessageW(hdlg: super::super::Foundation::HWND, lpmsg: *con IsDialogMessageW(core::mem::transmute(hdlg), core::mem::transmute(lpmsg)) } #[inline] -pub unsafe fn IsGUIThread(bconvert: P0) -> super::super::Foundation::BOOL -where - P0: windows_core::Param, -{ +pub unsafe fn IsGUIThread(bconvert: bool) -> super::super::Foundation::BOOL { windows_targets::link!("user32.dll" "system" fn IsGUIThread(bconvert : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - IsGUIThread(bconvert.param().abi()) + IsGUIThread(bconvert.into()) } #[inline] pub unsafe fn IsHungAppWindow(hwnd: super::super::Foundation::HWND) -> super::super::Foundation::BOOL { @@ -1549,20 +1507,14 @@ pub unsafe fn LogicalToPhysicalPoint(hwnd: super::super::Foundation::HWND, lppoi LogicalToPhysicalPoint(core::mem::transmute(hwnd), core::mem::transmute(lppoint)) } #[inline] -pub unsafe fn LookupIconIdFromDirectory(presbits: *const u8, ficon: P1) -> i32 -where - P1: windows_core::Param, -{ +pub unsafe fn LookupIconIdFromDirectory(presbits: *const u8, ficon: bool) -> i32 { windows_targets::link!("user32.dll" "system" fn LookupIconIdFromDirectory(presbits : *const u8, ficon : super::super::Foundation:: BOOL) -> i32); - LookupIconIdFromDirectory(core::mem::transmute(presbits), ficon.param().abi()) + LookupIconIdFromDirectory(core::mem::transmute(presbits), ficon.into()) } #[inline] -pub unsafe fn LookupIconIdFromDirectoryEx(presbits: *const u8, ficon: P1, cxdesired: i32, cydesired: i32, flags: IMAGE_FLAGS) -> i32 -where - P1: windows_core::Param, -{ +pub unsafe fn LookupIconIdFromDirectoryEx(presbits: *const u8, ficon: bool, cxdesired: i32, cydesired: i32, flags: IMAGE_FLAGS) -> i32 { windows_targets::link!("user32.dll" "system" fn LookupIconIdFromDirectoryEx(presbits : *const u8, ficon : super::super::Foundation:: BOOL, cxdesired : i32, cydesired : i32, flags : IMAGE_FLAGS) -> i32); - LookupIconIdFromDirectoryEx(core::mem::transmute(presbits), ficon.param().abi(), core::mem::transmute(cxdesired), core::mem::transmute(cydesired), core::mem::transmute(flags)) + LookupIconIdFromDirectoryEx(core::mem::transmute(presbits), ficon.into(), core::mem::transmute(cxdesired), core::mem::transmute(cydesired), core::mem::transmute(flags)) } #[inline] pub unsafe fn MapDialogRect(hdlg: super::super::Foundation::HWND, lprect: *mut super::super::Foundation::RECT) -> windows_core::Result<()> { @@ -1639,12 +1591,9 @@ where ModifyMenuW(core::mem::transmute(hmnu), core::mem::transmute(uposition), core::mem::transmute(uflags), core::mem::transmute(uidnewitem), lpnewitem.param().abi()).ok() } #[inline] -pub unsafe fn MoveWindow(hwnd: super::super::Foundation::HWND, x: i32, y: i32, nwidth: i32, nheight: i32, brepaint: P5) -> windows_core::Result<()> -where - P5: windows_core::Param, -{ +pub unsafe fn MoveWindow(hwnd: super::super::Foundation::HWND, x: i32, y: i32, nwidth: i32, nheight: i32, brepaint: bool) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn MoveWindow(hwnd : super::super::Foundation:: HWND, x : i32, y : i32, nwidth : i32, nheight : i32, brepaint : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - MoveWindow(core::mem::transmute(hwnd), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(nwidth), core::mem::transmute(nheight), brepaint.param().abi()).ok() + MoveWindow(core::mem::transmute(hwnd), core::mem::transmute(x), core::mem::transmute(y), core::mem::transmute(nwidth), core::mem::transmute(nheight), brepaint.into()).ok() } #[inline] pub unsafe fn MrmCreateConfig(platformversion: MrmPlatformVersion, defaultqualifiers: P1, outputxmlfile: P2) -> windows_core::Result<()> @@ -1836,12 +1785,9 @@ pub unsafe fn MrmPeekResourceIndexerMessages(handle: MrmResourceIndexerHandle, m MrmPeekResourceIndexerMessages(core::mem::transmute(handle), core::mem::transmute(messages), core::mem::transmute(nummsgs)).ok() } #[inline] -pub unsafe fn MsgWaitForMultipleObjects(phandles: Option<&[super::super::Foundation::HANDLE]>, fwaitall: P2, dwmilliseconds: u32, dwwakemask: QUEUE_STATUS_FLAGS) -> super::super::Foundation::WAIT_EVENT -where - P2: windows_core::Param, -{ +pub unsafe fn MsgWaitForMultipleObjects(phandles: Option<&[super::super::Foundation::HANDLE]>, fwaitall: bool, dwmilliseconds: u32, dwwakemask: QUEUE_STATUS_FLAGS) -> super::super::Foundation::WAIT_EVENT { windows_targets::link!("user32.dll" "system" fn MsgWaitForMultipleObjects(ncount : u32, phandles : *const super::super::Foundation:: HANDLE, fwaitall : super::super::Foundation:: BOOL, dwmilliseconds : u32, dwwakemask : QUEUE_STATUS_FLAGS) -> super::super::Foundation:: WAIT_EVENT); - MsgWaitForMultipleObjects(phandles.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(phandles.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fwaitall.param().abi(), core::mem::transmute(dwmilliseconds), core::mem::transmute(dwwakemask)) + MsgWaitForMultipleObjects(phandles.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(phandles.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fwaitall.into(), core::mem::transmute(dwmilliseconds), core::mem::transmute(dwwakemask)) } #[inline] pub unsafe fn MsgWaitForMultipleObjectsEx(phandles: Option<&[super::super::Foundation::HANDLE]>, dwmilliseconds: u32, dwwakemask: QUEUE_STATUS_FLAGS, dwflags: MSG_WAIT_FOR_MULTIPLE_OBJECTS_EX_FLAGS) -> super::super::Foundation::WAIT_EVENT { @@ -2170,12 +2116,9 @@ pub unsafe fn SetDebugErrorLevel(dwlevel: u32) { SetDebugErrorLevel(core::mem::transmute(dwlevel)) } #[inline] -pub unsafe fn SetDlgItemInt(hdlg: super::super::Foundation::HWND, niddlgitem: i32, uvalue: u32, bsigned: P3) -> windows_core::Result<()> -where - P3: windows_core::Param, -{ +pub unsafe fn SetDlgItemInt(hdlg: super::super::Foundation::HWND, niddlgitem: i32, uvalue: u32, bsigned: bool) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetDlgItemInt(hdlg : super::super::Foundation:: HWND, niddlgitem : i32, uvalue : u32, bsigned : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetDlgItemInt(core::mem::transmute(hdlg), core::mem::transmute(niddlgitem), core::mem::transmute(uvalue), bsigned.param().abi()).ok() + SetDlgItemInt(core::mem::transmute(hdlg), core::mem::transmute(niddlgitem), core::mem::transmute(uvalue), bsigned.into()).ok() } #[inline] pub unsafe fn SetDlgItemTextA(hdlg: super::super::Foundation::HWND, niddlgitem: i32, lpstring: P2) -> windows_core::Result<()> @@ -2227,21 +2170,15 @@ pub unsafe fn SetMenuItemBitmaps(hmenu: HMENU, uposition: u32, uflags: MENU_ITEM } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn SetMenuItemInfoA(hmenu: HMENU, item: u32, fbypositon: P2, lpmii: *const MENUITEMINFOA) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn SetMenuItemInfoA(hmenu: HMENU, item: u32, fbypositon: bool, lpmii: *const MENUITEMINFOA) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetMenuItemInfoA(hmenu : HMENU, item : u32, fbypositon : super::super::Foundation:: BOOL, lpmii : *const MENUITEMINFOA) -> super::super::Foundation:: BOOL); - SetMenuItemInfoA(core::mem::transmute(hmenu), core::mem::transmute(item), fbypositon.param().abi(), core::mem::transmute(lpmii)).ok() + SetMenuItemInfoA(core::mem::transmute(hmenu), core::mem::transmute(item), fbypositon.into(), core::mem::transmute(lpmii)).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] -pub unsafe fn SetMenuItemInfoW(hmenu: HMENU, item: u32, fbypositon: P2, lpmii: *const MENUITEMINFOW) -> windows_core::Result<()> -where - P2: windows_core::Param, -{ +pub unsafe fn SetMenuItemInfoW(hmenu: HMENU, item: u32, fbypositon: bool, lpmii: *const MENUITEMINFOW) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn SetMenuItemInfoW(hmenu : HMENU, item : u32, fbypositon : super::super::Foundation:: BOOL, lpmii : *const MENUITEMINFOW) -> super::super::Foundation:: BOOL); - SetMenuItemInfoW(core::mem::transmute(hmenu), core::mem::transmute(item), fbypositon.param().abi(), core::mem::transmute(lpmii)).ok() + SetMenuItemInfoW(core::mem::transmute(hmenu), core::mem::transmute(item), fbypositon.into(), core::mem::transmute(lpmii)).ok() } #[inline] pub unsafe fn SetMessageExtraInfo(lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::LPARAM { @@ -2390,20 +2327,14 @@ pub unsafe fn ShowCaret(hwnd: Option) -> windows ShowCaret(core::mem::transmute(hwnd.unwrap_or(core::mem::zeroed()))).ok() } #[inline] -pub unsafe fn ShowCursor(bshow: P0) -> i32 -where - P0: windows_core::Param, -{ +pub unsafe fn ShowCursor(bshow: bool) -> i32 { windows_targets::link!("user32.dll" "system" fn ShowCursor(bshow : super::super::Foundation:: BOOL) -> i32); - ShowCursor(bshow.param().abi()) + ShowCursor(bshow.into()) } #[inline] -pub unsafe fn ShowOwnedPopups(hwnd: super::super::Foundation::HWND, fshow: P1) -> windows_core::Result<()> -where - P1: windows_core::Param, -{ +pub unsafe fn ShowOwnedPopups(hwnd: super::super::Foundation::HWND, fshow: bool) -> windows_core::Result<()> { windows_targets::link!("user32.dll" "system" fn ShowOwnedPopups(hwnd : super::super::Foundation:: HWND, fshow : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - ShowOwnedPopups(core::mem::transmute(hwnd), fshow.param().abi()).ok() + ShowOwnedPopups(core::mem::transmute(hwnd), fshow.into()).ok() } #[inline] pub unsafe fn ShowWindow(hwnd: super::super::Foundation::HWND, ncmdshow: SHOW_WINDOW_CMD) -> super::super::Foundation::BOOL { @@ -2421,12 +2352,9 @@ pub unsafe fn SoundSentry() -> super::super::Foundation::BOOL { SoundSentry() } #[inline] -pub unsafe fn SwitchToThisWindow(hwnd: super::super::Foundation::HWND, funknown: P1) -where - P1: windows_core::Param, -{ +pub unsafe fn SwitchToThisWindow(hwnd: super::super::Foundation::HWND, funknown: bool) { windows_targets::link!("user32.dll" "system" fn SwitchToThisWindow(hwnd : super::super::Foundation:: HWND, funknown : super::super::Foundation:: BOOL)); - SwitchToThisWindow(core::mem::transmute(hwnd), funknown.param().abi()) + SwitchToThisWindow(core::mem::transmute(hwnd), funknown.into()) } #[inline] pub unsafe fn SystemParametersInfoA(uiaction: SYSTEM_PARAMETERS_INFO_ACTION, uiparam: u32, pvparam: Option<*mut core::ffi::c_void>, fwinini: SYSTEM_PARAMETERS_INFO_UPDATE_FLAGS) -> windows_core::Result<()> { @@ -3995,9 +3923,6 @@ pub const GW_OWNER: GET_WINDOW_CMD = GET_WINDOW_CMD(4u32); #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HACCEL(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HACCEL { - type TypeKind = windows_core::CopyType; -} impl HACCEL { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -4072,9 +3997,6 @@ pub const HCF_LOGONDESKTOP: u32 = 256u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HCURSOR(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HCURSOR { - type TypeKind = windows_core::CopyType; -} impl HCURSOR { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -4110,9 +4032,6 @@ pub const HC_SYSMODALON: u32 = 4u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HDEVNOTIFY(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HDEVNOTIFY { - type TypeKind = windows_core::CopyType; -} impl HDEVNOTIFY { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -4135,9 +4054,6 @@ impl Default for HDEVNOTIFY { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HDWP(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HDWP { - type TypeKind = windows_core::CopyType; -} impl HDWP { pub fn is_invalid(&self) -> bool { self.0.is_null() @@ -4172,9 +4088,6 @@ pub const HELP_WM_HELP: u32 = 12u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HHOOK(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HHOOK { - type TypeKind = windows_core::CopyType; -} impl HHOOK { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -4197,9 +4110,6 @@ impl Default for HHOOK { #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HICON(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HICON { - type TypeKind = windows_core::CopyType; -} impl HICON { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ @@ -4225,9 +4135,6 @@ pub const HKL_PREV: u32 = 0u32; #[repr(transparent)] #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct HMENU(pub *mut core::ffi::c_void); -impl windows_core::TypeKind for HMENU { - type TypeKind = windows_core::CopyType; -} impl HMENU { pub fn is_invalid(&self) -> bool { self.0 == -1 as _ || self.0 == 0 as _ diff --git a/crates/libs/windows/src/Windows/Win32/Web/InternetExplorer/mod.rs b/crates/libs/windows/src/Windows/Win32/Web/InternetExplorer/mod.rs index fe4d5693f3..f18edd929e 100644 --- a/crates/libs/windows/src/Windows/Win32/Web/InternetExplorer/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Web/InternetExplorer/mod.rs @@ -199,13 +199,12 @@ where IERegSetValueEx(lpsubkey.param().abi(), lpvaluename.param().abi(), core::mem::transmute(reserved), core::mem::transmute(dwtype), core::mem::transmute(lpdata.as_ptr()), lpdata.len().try_into().unwrap()).ok() } #[inline] -pub unsafe fn IERegisterWritableRegistryKey(guid: windows_core::GUID, lpsubkey: P1, fsubkeyallowed: P2) -> windows_core::Result<()> +pub unsafe fn IERegisterWritableRegistryKey(guid: windows_core::GUID, lpsubkey: P1, fsubkeyallowed: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("ieframe.dll" "system" fn IERegisterWritableRegistryKey(guid : windows_core::GUID, lpsubkey : windows_core::PCWSTR, fsubkeyallowed : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - IERegisterWritableRegistryKey(core::mem::transmute(guid), lpsubkey.param().abi(), fsubkeyallowed.param().abi()).ok() + IERegisterWritableRegistryKey(core::mem::transmute(guid), lpsubkey.param().abi(), fsubkeyallowed.into()).ok() } #[inline] pub unsafe fn IERegisterWritableRegistryValue(guid: windows_core::GUID, lppath: P1, lpvaluename: P2, dwtype: u32, lpdata: Option<&[u8]>) -> windows_core::Result<()> @@ -313,15 +312,12 @@ where RatingAccessDeniedDialogW(core::mem::transmute(hdlg), pszusername.param().abi(), pszcontentdescription.param().abi(), core::mem::transmute(pratingdetails)).ok() } #[inline] -pub unsafe fn RatingAddToApprovedSites(hdlg: super::super::Foundation::HWND, pbpasswordblob: &mut [u8], lpszurl: P3, falwaysnever: P4, fsitepage: P5, fapprovedsitesenforced: P6) -> windows_core::Result<()> +pub unsafe fn RatingAddToApprovedSites(hdlg: super::super::Foundation::HWND, pbpasswordblob: &mut [u8], lpszurl: P3, falwaysnever: bool, fsitepage: bool, fapprovedsitesenforced: bool) -> windows_core::Result<()> where P3: windows_core::Param, - P4: windows_core::Param, - P5: windows_core::Param, - P6: windows_core::Param, { windows_targets::link!("msrating.dll" "system" fn RatingAddToApprovedSites(hdlg : super::super::Foundation:: HWND, cbpasswordblob : u32, pbpasswordblob : *mut u8, lpszurl : windows_core::PCWSTR, falwaysnever : super::super::Foundation:: BOOL, fsitepage : super::super::Foundation:: BOOL, fapprovedsitesenforced : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - RatingAddToApprovedSites(core::mem::transmute(hdlg), pbpasswordblob.len().try_into().unwrap(), core::mem::transmute(pbpasswordblob.as_ptr()), lpszurl.param().abi(), falwaysnever.param().abi(), fsitepage.param().abi(), fapprovedsitesenforced.param().abi()).ok() + RatingAddToApprovedSites(core::mem::transmute(hdlg), pbpasswordblob.len().try_into().unwrap(), core::mem::transmute(pbpasswordblob.as_ptr()), lpszurl.param().abi(), falwaysnever.into(), fsitepage.into(), fapprovedsitesenforced.into()).ok() } #[inline] pub unsafe fn RatingCheckUserAccess(pszusername: P0, pszurl: P1, pszratinginfo: P2, pdata: Option<&[u8]>, ppratingdetails: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> @@ -360,22 +356,20 @@ where RatingClickedOnRATInternal(core::mem::transmute(hwndowner), core::mem::transmute(param1), lpszfilename.param().abi(), core::mem::transmute(nshow)).ok() } #[inline] -pub unsafe fn RatingEnable(hwndparent: super::super::Foundation::HWND, pszusername: P1, fenable: P2) -> windows_core::Result<()> +pub unsafe fn RatingEnable(hwndparent: super::super::Foundation::HWND, pszusername: P1, fenable: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("msrating.dll" "system" fn RatingEnable(hwndparent : super::super::Foundation:: HWND, pszusername : windows_core::PCSTR, fenable : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - RatingEnable(core::mem::transmute(hwndparent), pszusername.param().abi(), fenable.param().abi()).ok() + RatingEnable(core::mem::transmute(hwndparent), pszusername.param().abi(), fenable.into()).ok() } #[inline] -pub unsafe fn RatingEnableW(hwndparent: super::super::Foundation::HWND, pszusername: P1, fenable: P2) -> windows_core::Result<()> +pub unsafe fn RatingEnableW(hwndparent: super::super::Foundation::HWND, pszusername: P1, fenable: bool) -> windows_core::Result<()> where P1: windows_core::Param, - P2: windows_core::Param, { windows_targets::link!("msrating.dll" "system" fn RatingEnableW(hwndparent : super::super::Foundation:: HWND, pszusername : windows_core::PCWSTR, fenable : super::super::Foundation:: BOOL) -> windows_core::HRESULT); - RatingEnableW(core::mem::transmute(hwndparent), pszusername.param().abi(), fenable.param().abi()).ok() + RatingEnableW(core::mem::transmute(hwndparent), pszusername.param().abi(), fenable.into()).ok() } #[inline] pub unsafe fn RatingEnabledQuery() -> windows_core::Result<()> { @@ -716,13 +710,12 @@ impl IActiveXUIHandlerSite { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateScrollableContextMenu)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } - pub unsafe fn PickFileAndGetResult(&self, filepicker: P0, allowmultipleselections: P1) -> windows_core::Result + pub unsafe fn PickFileAndGetResult(&self, filepicker: P0, allowmultipleselections: bool) -> windows_core::Result where P0: windows_core::Param, - P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).PickFileAndGetResult)(windows_core::Interface::as_raw(self), filepicker.param().abi(), allowmultipleselections.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).PickFileAndGetResult)(windows_core::Interface::as_raw(self), filepicker.param().abi(), allowmultipleselections.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -1073,16 +1066,15 @@ windows_core::imp::define_interface!(IDocObjectService, IDocObjectService_Vtbl, windows_core::imp::interface_hierarchy!(IDocObjectService, windows_core::IUnknown); impl IDocObjectService { #[cfg(feature = "Win32_System_Com")] - pub unsafe fn FireBeforeNavigate2(&self, pdispatch: P0, lpszurl: P1, dwflags: u32, lpszframename: P3, ppostdata: *const u8, cbpostdata: u32, lpszheaders: P6, fplaynavsound: P7) -> windows_core::Result + pub unsafe fn FireBeforeNavigate2(&self, pdispatch: P0, lpszurl: P1, dwflags: u32, lpszframename: P3, ppostdata: *const u8, cbpostdata: u32, lpszheaders: P6, fplaynavsound: bool) -> windows_core::Result where P0: windows_core::Param, P1: windows_core::Param, P3: windows_core::Param, P6: windows_core::Param, - P7: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).FireBeforeNavigate2)(windows_core::Interface::as_raw(self), pdispatch.param().abi(), lpszurl.param().abi(), core::mem::transmute(dwflags), lpszframename.param().abi(), core::mem::transmute(ppostdata), core::mem::transmute(cbpostdata), lpszheaders.param().abi(), fplaynavsound.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).FireBeforeNavigate2)(windows_core::Interface::as_raw(self), pdispatch.param().abi(), lpszurl.param().abi(), core::mem::transmute(dwflags), lpszframename.param().abi(), core::mem::transmute(ppostdata), core::mem::transmute(cbpostdata), lpszheaders.param().abi(), fplaynavsound.into(), &mut result__).map(|| result__) } pub unsafe fn FireDownloadBegin(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).FireDownloadBegin)(windows_core::Interface::as_raw(self)).ok() @@ -2675,11 +2667,8 @@ impl IImageDecodeEventSink { pub unsafe fn OnPalette(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnPalette)(windows_core::Interface::as_raw(self)).ok() } - pub unsafe fn OnProgress(&self, pbounds: *const super::super::Foundation::RECT, bcomplete: P1) -> windows_core::Result<()> - where - P1: windows_core::Param, - { - (windows_core::Interface::vtable(self).OnProgress)(windows_core::Interface::as_raw(self), core::mem::transmute(pbounds), bcomplete.param().abi()).ok() + pub unsafe fn OnProgress(&self, pbounds: *const super::super::Foundation::RECT, bcomplete: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).OnProgress)(windows_core::Interface::as_raw(self), core::mem::transmute(pbounds), bcomplete.into()).ok() } } #[repr(C)] @@ -3191,11 +3180,8 @@ pub const IMGDECODE_HINT_TOPDOWN: u32 = 1u32; windows_core::imp::define_interface!(IMapMIMEToCLSID, IMapMIMEToCLSID_Vtbl, 0xd9e89500_30fa_11d0_b724_00aa006c1a01); windows_core::imp::interface_hierarchy!(IMapMIMEToCLSID, windows_core::IUnknown); impl IMapMIMEToCLSID { - pub unsafe fn EnableDefaultMappings(&self, benable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).EnableDefaultMappings)(windows_core::Interface::as_raw(self), benable.param().abi()).ok() + pub unsafe fn EnableDefaultMappings(&self, benable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).EnableDefaultMappings)(windows_core::Interface::as_raw(self), benable.into()).ok() } pub unsafe fn MapMIMEToCLSID(&self, pszmimetype: P0, pclsid: *const windows_core::GUID) -> windows_core::Result<()> where @@ -3302,11 +3288,8 @@ impl IOpenService { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsDefault)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetDefault(&self, fdefault: P0, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetDefault)(windows_core::Interface::as_raw(self), fdefault.param().abi(), core::mem::transmute(hwnd)).ok() + pub unsafe fn SetDefault(&self, fdefault: bool, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetDefault)(windows_core::Interface::as_raw(self), fdefault.into(), core::mem::transmute(hwnd)).ok() } pub unsafe fn GetID(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3438,12 +3421,9 @@ impl IOpenServiceActivity { (windows_core::Interface::vtable(self).GetIconPath)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__)) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] - pub unsafe fn GetIcon(&self, fsmallicon: P0) -> windows_core::Result - where - P0: windows_core::Param, - { + pub unsafe fn GetIcon(&self, fsmallicon: bool) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetIcon)(windows_core::Interface::as_raw(self), fsmallicon.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetIcon)(windows_core::Interface::as_raw(self), fsmallicon.into(), &mut result__).map(|| result__) } pub unsafe fn GetDescriptionFilePath(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3461,11 +3441,8 @@ impl IOpenServiceActivity { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).IsEnabled)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } - pub unsafe fn SetEnabled(&self, fenable: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() + pub unsafe fn SetEnabled(&self, fenable: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), fenable.into()).ok() } } #[repr(C)] @@ -5359,11 +5336,8 @@ impl ITimer { pub unsafe fn Unadvise(&self, dwcookie: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Unadvise)(windows_core::Interface::as_raw(self), core::mem::transmute(dwcookie)).ok() } - pub unsafe fn Freeze(&self, ffreeze: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).Freeze)(windows_core::Interface::as_raw(self), ffreeze.param().abi()).ok() + pub unsafe fn Freeze(&self, ffreeze: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).Freeze)(windows_core::Interface::as_raw(self), ffreeze.into()).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetTime(&self) -> windows_core::Result { @@ -5776,15 +5750,14 @@ impl core::ops::Deref for IUrlHistoryStg2 { windows_core::imp::interface_hierarchy!(IUrlHistoryStg2, windows_core::IUnknown, IUrlHistoryStg); impl IUrlHistoryStg2 { #[cfg(feature = "Win32_System_Ole")] - pub unsafe fn AddUrlAndNotify(&self, pocsurl: P0, pocstitle: P1, dwflags: u32, fwritehistory: P3, poctnotify: P4, punkisfolder: P5) -> windows_core::Result<()> + pub unsafe fn AddUrlAndNotify(&self, pocsurl: P0, pocstitle: P1, dwflags: u32, fwritehistory: bool, poctnotify: P4, punkisfolder: P5) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, - P3: windows_core::Param, P4: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).AddUrlAndNotify)(windows_core::Interface::as_raw(self), pocsurl.param().abi(), pocstitle.param().abi(), core::mem::transmute(dwflags), fwritehistory.param().abi(), poctnotify.param().abi(), punkisfolder.param().abi()).ok() + (windows_core::Interface::vtable(self).AddUrlAndNotify)(windows_core::Interface::as_raw(self), pocsurl.param().abi(), pocstitle.param().abi(), core::mem::transmute(dwflags), fwritehistory.into(), poctnotify.param().abi(), punkisfolder.param().abi()).ok() } pub unsafe fn ClearHistory(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ClearHistory)(windows_core::Interface::as_raw(self)).ok() @@ -5830,11 +5803,8 @@ impl windows_core::RuntimeName for IUrlHistoryStg2 {} windows_core::imp::define_interface!(IViewObjectPresentFlip, IViewObjectPresentFlip_Vtbl, 0x30510847_98b5_11cf_bb82_00aa00bdce0b); windows_core::imp::interface_hierarchy!(IViewObjectPresentFlip, windows_core::IUnknown); impl IViewObjectPresentFlip { - pub unsafe fn NotifyRender(&self, frecreatepresenter: P0) -> windows_core::Result<()> - where - P0: windows_core::Param, - { - (windows_core::Interface::vtable(self).NotifyRender)(windows_core::Interface::as_raw(self), frecreatepresenter.param().abi()).ok() + pub unsafe fn NotifyRender(&self, frecreatepresenter: bool) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).NotifyRender)(windows_core::Interface::as_raw(self), frecreatepresenter.into()).ok() } pub unsafe fn RenderObjectToBitmap(&self, pbitmap: P0) -> windows_core::Result<()> where diff --git a/crates/libs/windows/src/extensions/Win32/Foundation/BOOL.rs b/crates/libs/windows/src/extensions/Win32/Foundation/BOOL.rs index 42bc5d9f00..029964984e 100644 --- a/crates/libs/windows/src/extensions/Win32/Foundation/BOOL.rs +++ b/crates/libs/windows/src/extensions/Win32/Foundation/BOOL.rs @@ -68,8 +68,3 @@ impl core::ops::Not for BOOL { } } } -impl windows_core::Param for bool { - unsafe fn param(self) -> windows_core::ParamValue { - windows_core::ParamValue::Owned(self.into()) - } -} diff --git a/crates/libs/windows/src/extensions/Win32/Foundation/BOOLEAN.rs b/crates/libs/windows/src/extensions/Win32/Foundation/BOOLEAN.rs index 43dd9dffed..8661e00742 100644 --- a/crates/libs/windows/src/extensions/Win32/Foundation/BOOLEAN.rs +++ b/crates/libs/windows/src/extensions/Win32/Foundation/BOOLEAN.rs @@ -68,8 +68,3 @@ impl core::ops::Not for BOOLEAN { } } } -impl windows_core::Param for bool { - unsafe fn param(self) -> windows_core::ParamValue { - windows_core::ParamValue::Owned(self.into()) - } -}