From 4e9dca4314554b8a0b24468b6e46f5fccc21d845 Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Sat, 16 Dec 2023 22:16:25 -0600 Subject: [PATCH] Eliminate the need for `call_unsafe_wdf_function_binding` via helper lib --- Cargo.lock | 1 + crates/sample-kmdf-driver/src/lib.rs | 8 +- crates/wdk-sys/Cargo.toml | 1 + crates/wdk-sys/build.rs | 82 +- .../wdk-sys/generated_bindings/constants.rs | 48 +- crates/wdk-sys/generated_bindings/ntddk.rs | 23 + crates/wdk-sys/generated_bindings/types.rs | 3633 ++++++++++++++++- crates/wdk-sys/generated_bindings/wdf.rs | 2723 ++++++++++++ crates/wdk-sys/src/wdf.c | 9 + crates/wdk/src/wdf/spinlock.rs | 37 +- crates/wdk/src/wdf/timer.rs | 33 +- 11 files changed, 6367 insertions(+), 231 deletions(-) create mode 100644 crates/wdk-sys/src/wdf.c diff --git a/Cargo.lock b/Cargo.lock index 0983b7a4a..9f8879f6c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -609,6 +609,7 @@ name = "wdk-sys" version = "0.1.0" dependencies = [ "bindgen", + "cc", "lazy_static", "rustversion", "thiserror", diff --git a/crates/sample-kmdf-driver/src/lib.rs b/crates/sample-kmdf-driver/src/lib.rs index 255352b88..22e22ffb4 100644 --- a/crates/sample-kmdf-driver/src/lib.rs +++ b/crates/sample-kmdf-driver/src/lib.rs @@ -21,9 +21,9 @@ use static_assertions::const_assert; use wdk::println; #[cfg(not(test))] use wdk_alloc::WDKAllocator; -use wdk_macros::call_unsafe_wdf_function_binding; use wdk_sys::{ ntddk::DbgPrint, + wdf::*, DRIVER_OBJECT, NTSTATUS, PCUNICODE_STRING, @@ -82,8 +82,7 @@ pub unsafe extern "system" fn driver_entry( let driver_handle_output = WDF_NO_HANDLE.cast::<*mut wdk_sys::WDFDRIVER__>(); let wdf_driver_create_ntstatus = unsafe { - call_unsafe_wdf_function_binding!( - WdfDriverCreate, + WdfDriverCreate( driver as wdk_sys::PDRIVER_OBJECT, registry_path, driver_attributes, @@ -118,8 +117,7 @@ extern "C" fn evt_driver_device_add( let mut device_handle_output: WDFDEVICE = WDF_NO_HANDLE.cast(); let ntstatus = unsafe { - wdk_macros::call_unsafe_wdf_function_binding!( - WdfDeviceCreate, + WdfDeviceCreate( &mut device_init, WDF_NO_OBJECT_ATTRIBUTES, &mut device_handle_output, diff --git a/crates/wdk-sys/Cargo.toml b/crates/wdk-sys/Cargo.toml index dd6acb3b7..bc21ca713 100644 --- a/crates/wdk-sys/Cargo.toml +++ b/crates/wdk-sys/Cargo.toml @@ -21,6 +21,7 @@ bindgen.workspace = true wdk-build.workspace = true thiserror = "1.0.48" tracing-subscriber = "0.3.17" +cc = "1.0.83" [dependencies] wdk-macros.workspace = true diff --git a/crates/wdk-sys/build.rs b/crates/wdk-sys/build.rs index 97b3a4aa5..4e801190a 100644 --- a/crates/wdk-sys/build.rs +++ b/crates/wdk-sys/build.rs @@ -7,7 +7,7 @@ use std::{ }; use bindgen::CodegenConfig; -use wdk_build::{BuilderExt, Config, ConfigError, DriverConfig, KMDFConfig}; +use wdk_build::{BuilderExt, CPUArchitecture, Config, ConfigError, DriverConfig, KMDFConfig}; // FIXME: feature gate the WDF version // FIXME: check that the features are exclusive @@ -55,6 +55,8 @@ fn generate_wdf(out_path: &Path, config: Config) -> Result<(), ConfigError> { // WDKs may introduce non-inlined functions. Ok( bindgen::Builder::wdk_default(vec!["src/wdf-input.h"], config)? + .clang_arg("-fkeep-inline-functions") + .generate_inline_functions(true) .with_codegen_config((CodegenConfig::TYPES | CodegenConfig::VARS).complement()) .allowlist_file("(?i).*wdf.*") // Only generate for files that are prefixed with (case-insensitive) wdf (ie. // /some/path/WdfSomeHeader.h), to prevent duplication of code in ntddk.rs @@ -94,6 +96,84 @@ fn main() -> Result<(), ConfigError> { generate_wdf(&out_path, config.clone())?; } + // FIXME: This is mostly duplicated from wdk-build/src/bindgen.rs. + let args = config + .get_include_paths()? + .iter() + .map(|include_path| { + format!( + "--include-directory={}", + include_path + .to_str() + .expect("Non Unicode paths are not supported") + ) + }) + .chain([format!( + "--define-macro={}", + match config.cpu_architecture { + CPUArchitecture::AMD64 => "_AMD64_", + CPUArchitecture::ARM64 => "_ARM64EC_", + } + )]) + .chain( + match config.driver_config { + // FIXME: Add support for KMDF_MINIMUM_VERSION_REQUIRED and + // UMDF_MINIMUM_VERSION_REQUIRED + DriverConfig::WDM() => { + vec![] + } + DriverConfig::KMDF(kmdf_config) => { + vec![ + format!("KMDF_VERSION_MAJOR={}", kmdf_config.kmdf_version_major), + format!("KMDF_VERSION_MINOR={}", kmdf_config.kmdf_version_minor), + ] + } + DriverConfig::UMDF(umdf_config) => { + let mut umdf_definitions = vec![ + format!("UMDF_VERSION_MAJOR={}", umdf_config.umdf_version_major), + format!("UMDF_VERSION_MINOR={}", umdf_config.umdf_version_minor), + ]; + + if umdf_config.umdf_version_major >= 2 { + umdf_definitions.push("UMDF_USING_NTSTATUS".to_string()); + umdf_definitions.push("_UNICODE".to_string()); + umdf_definitions.push("UNICODE".to_string()); + } + + umdf_definitions + } + } + .iter() + .map(|preprocessor_definition| format!("--define-macro={preprocessor_definition}")), + ) + // Windows SDK & DDK have non-portable paths (ex. #include "DriverSpecs.h" but the file + // is actually driverspecs.h) + .chain(["--warn-=no-nonportable-include-path".to_string()]) + // Windows SDK & DDK use pshpack and poppack headers to change packing + .chain(["--warn-=no-pragma-pack".to_string()]) + .chain(["--warn-=no-ignored-attributes".to_string()]) + .chain(["--warn-=no-ignored-pragma-intrinsic".to_string()]) + .chain(["--warn-=no-visibility".to_string()]) + .chain(["--warn-=no-microsoft-anon-tag".to_string()]) + .chain(["--warn-=no-microsoft-enum-forward-reference".to_string()]) + // Don't warn for deprecated declarations. deprecated items are already blocklisted + // below and if there are any non-blocklisted function definitions, it will throw a + // -WDeprecated warning + .chain(["--warn-=no-deprecated-declarations".to_string()]) + .chain(["-fms-extensions".to_string()]) + .collect::>(); + + // Generate the inline `Wdf*` functions for linking. + let mut cc = cc::Build::new(); + for flag in args { + cc.flag(&flag); + } + + cc.compiler("clang") + .warnings(false) + .file("src/wdf.c") + .compile("wdf"); + config.configure_library_build()?; Ok(config.export_config()?) } diff --git a/crates/wdk-sys/generated_bindings/constants.rs b/crates/wdk-sys/generated_bindings/constants.rs index beffc8223..eb64e3f44 100644 --- a/crates/wdk-sys/generated_bindings/constants.rs +++ b/crates/wdk-sys/generated_bindings/constants.rs @@ -1958,6 +1958,7 @@ pub const PF_AVX512F_INSTRUCTIONS_AVAILABLE: u32 = 41; pub const PF_ERMS_AVAILABLE: u32 = 42; pub const PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE: u32 = 43; pub const PF_ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE: u32 = 44; +pub const PF_ARM_V83_LRCPC_INSTRUCTIONS_AVAILABLE: u32 = 45; pub const IsNEC_98: u32 = 0; pub const IsNotNEC_98: u32 = 1; pub const PROCESSOR_FEATURE_MAX: u32 = 64; @@ -2457,8 +2458,9 @@ pub const DMA_IOMMU_INTERFACE_VERSION: u32 = 1; pub const DMA_IOMMU_INTERFACE_EX_VERSION_1: u32 = 1; pub const DMA_IOMMU_INTERFACE_EX_VERSION_2: u32 = 2; pub const DMA_IOMMU_INTERFACE_EX_VERSION_MIN: u32 = 1; -pub const DMA_IOMMU_INTERFACE_EX_VERSION_MAX: u32 = 2; -pub const DMA_IOMMU_INTERFACE_EX_VERSION: u32 = 1; +pub const DMA_IOMMU_INTERFACE_EX_VERSION_3: u32 = 3; +pub const DMA_IOMMU_INTERFACE_EX_VERSION_MAX: u32 = 3; +pub const DMA_IOMMU_INTERFACE_EX_VERSION: u32 = 3; pub const PO_MEM_PRESERVE: u32 = 1; pub const PO_MEM_CLONE: u32 = 2; pub const PO_MEM_CL_OR_NCHK: u32 = 4; @@ -3685,6 +3687,7 @@ pub const TOKEN_READ: u32 = 131080; pub const TOKEN_WRITE: u32 = 131296; pub const TOKEN_EXECUTE: u32 = 131072; pub const TOKEN_TRUST_CONSTRAINT_MASK: u32 = 131096; +pub const TOKEN_TRUST_ALLOWED_MASK: u32 = 131102; pub const TOKEN_ACCESS_PSEUDO_HANDLE_WIN8: u32 = 24; pub const TOKEN_ACCESS_PSEUDO_HANDLE: u32 = 24; pub const TOKEN_MANDATORY_POLICY_OFF: u32 = 0; @@ -4229,6 +4232,8 @@ pub const PERSISTENT_VOLUME_STATE_REALLOCATE_ALL_DATA_WRITES: u32 = 512; pub const PERSISTENT_VOLUME_STATE_CHKDSK_RAN_ONCE: u32 = 1024; pub const PERSISTENT_VOLUME_STATE_MODIFIED_BY_CHKDSK: u32 = 2048; pub const PERSISTENT_VOLUME_STATE_DAX_FORMATTED: u32 = 4096; +pub const PERSISTENT_VOLUME_STATE_DEV_VOLUME: u32 = 8192; +pub const PERSISTENT_VOLUME_STATE_TRUSTED_VOLUME: u32 = 16384; pub const OPLOCK_LEVEL_CACHE_READ: u32 = 1; pub const OPLOCK_LEVEL_CACHE_HANDLE: u32 = 2; pub const OPLOCK_LEVEL_CACHE_WRITE: u32 = 4; @@ -4238,6 +4243,7 @@ pub const REQUEST_OPLOCK_INPUT_FLAG_COMPLETE_ACK_ON_CLOSE: u32 = 4; pub const REQUEST_OPLOCK_CURRENT_VERSION: u32 = 1; pub const REQUEST_OPLOCK_OUTPUT_FLAG_ACK_REQUIRED: u32 = 1; pub const REQUEST_OPLOCK_OUTPUT_FLAG_MODES_PROVIDED: u32 = 2; +pub const REQUEST_OPLOCK_OUTPUT_FLAG_WRITABLE_SECTION_PRESENT: u32 = 4; pub const QUERY_DEPENDENT_VOLUME_REQUEST_FLAG_HOST_VOLUMES: u32 = 1; pub const QUERY_DEPENDENT_VOLUME_REQUEST_FLAG_GUEST_VOLUMES: u32 = 2; pub const SD_GLOBAL_CHANGE_TYPE_MACHINE_SID: u32 = 1; @@ -4285,12 +4291,12 @@ pub const STREAM_LAYOUT_ENTRY_NO_CLUSTERS_ALLOCATED: u32 = 8; pub const STREAM_LAYOUT_ENTRY_HAS_INFORMATION: u32 = 16; pub const STREAM_EXTENT_ENTRY_AS_RETRIEVAL_POINTERS: u32 = 1; pub const STREAM_EXTENT_ENTRY_ALL_EXTENTS: u32 = 2; -pub const CHECKSUM_TYPE_UNCHANGED: i32 = -1; pub const CHECKSUM_TYPE_NONE: u32 = 0; pub const CHECKSUM_TYPE_CRC32: u32 = 1; pub const CHECKSUM_TYPE_CRC64: u32 = 2; pub const CHECKSUM_TYPE_ECC: u32 = 3; -pub const CHECKSUM_TYPE_FIRST_UNUSED_TYPE: u32 = 4; +pub const CHECKSUM_TYPE_SHA256: u32 = 4; +pub const CHECKSUM_TYPE_FIRST_UNUSED_TYPE: u32 = 5; pub const FSCTL_INTEGRITY_FLAG_CHECKSUM_ENFORCEMENT_OFF: u32 = 1; pub const OFFLOAD_READ_FLAG_ALL_ZERO_BEYOND_CURRENT_RANGE: u32 = 1; pub const SET_PURGE_FAILURE_MODE_ENABLED: u32 = 1; @@ -4366,6 +4372,7 @@ pub const IO_REPARSE_TAG_RESERVED_ONE: u32 = 1; pub const IO_REPARSE_TAG_RESERVED_TWO: u32 = 2; pub const IO_REPARSE_TAG_RESERVED_RANGE: u32 = 2; pub const IO_REPARSE_TAG_VALID_VALUES: u32 = 4026597375; +pub const IO_REPARSE_TAG_RESERVED_INVALID: u32 = 3221258240; pub const IO_REPARSE_TAG_MOUNT_POINT: u32 = 2684354563; pub const IO_REPARSE_TAG_HSM: u32 = 3221225476; pub const IO_REPARSE_TAG_DRIVE_EXTENDER: u32 = 2147483653; @@ -4540,6 +4547,14 @@ pub const FILE_PIPE_SYMLINK_FLAG_RELATIVE: u32 = 2; pub const FILE_PIPE_SYMLINK_VALID_FLAGS: u32 = 3; pub const QUERY_DIRECT_ACCESS_IMAGE_EXTENTS: u32 = 1; pub const QUERY_DIRECT_ACCESS_DATA_EXTENTS: u32 = 2; +pub const REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER_VERSION: u32 = 1; +pub const REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER_VERSION: u32 = 1; +pub const REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER_VERSION: u32 = 1; +pub const REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER_VERSION: u32 = 1; +pub const REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER_VERSION: u32 = 1; +pub const REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER_VERSION: u32 = 1; +pub const REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER_VERSION: u32 = 1; +pub const REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER_VERSION: u32 = 1; pub const IO_QOS_MAX_RESERVATION: u32 = 1000000000; pub const SMB_CCF_APP_INSTANCE_EA_NAME: &[u8; 29] = b"ClusteredApplicationInstance\0"; pub const NETWORK_APP_INSTANCE_CSV_FLAGS_VALID_ONLY_IF_CSV_COORDINATOR: u32 = 1; @@ -4547,6 +4562,7 @@ pub const LX_FILE_METADATA_UID_EA_NAME: &[u8; 7] = b"$LXUID\0"; pub const LX_FILE_METADATA_GID_EA_NAME: &[u8; 7] = b"$LXGID\0"; pub const LX_FILE_METADATA_MODE_EA_NAME: &[u8; 7] = b"$LXMOD\0"; pub const LX_FILE_METADATA_DEVICE_ID_EA_NAME: &[u8; 7] = b"$LXDEV\0"; +pub const VALID_COPY_FILE_CHUNK_FLAGS: u32 = 0; pub const SYSTEM_PAGE_PRIORITY_BITS: u32 = 3; pub const SYSTEM_PAGE_PRIORITY_LEVELS: u32 = 8; pub const TOKEN_HAS_TRAVERSE_PRIVILEGE: u32 = 1; @@ -4576,6 +4592,7 @@ pub const TOKEN_AUDIT_REDIRECTION_TRUST: u32 = 8388608; pub const TOKEN_LEARNING_MODE_LOGGING: u32 = 16777216; pub const TOKEN_PERMISSIVE_LEARNING_MODE: u32 = 50331648; pub const TOKEN_INHERIT_SECURITY_FLAGS: u32 = 3670016; +pub const SECURITY_DESCRIPTOR_DO_NOT_FREE: u32 = 67108864; pub const IO_OPEN_PAGING_FILE: u32 = 2; pub const IO_OPEN_TARGET_DIRECTORY: u32 = 4; pub const IO_STOP_ON_SYMLINK: u32 = 8; @@ -4743,6 +4760,7 @@ pub const ECP_OPEN_PARAMETERS_FLAG_OPEN_FOR_WRITE: u32 = 2; pub const ECP_OPEN_PARAMETERS_FLAG_OPEN_FOR_DELETE: u32 = 4; pub const ECP_OPEN_PARAMETERS_FLAG_IGNORE_DIR_CASE_SENSITIVITY: u32 = 8; pub const ECP_OPEN_PARAMETERS_FLAG_FAIL_ON_CASE_SENSITIVE_DIR: u32 = 16; +pub const OPLOCK_FS_FILTER_FLAGS_MASK: u32 = 8; pub const QoCFileStatInformation: u32 = 1; pub const QoCFileLxInformation: u32 = 2; pub const QoCFileEaInformation: u32 = 4; @@ -4847,10 +4865,22 @@ pub const SECBUFFER_SUBSCRIBE_GENERIC_TLS_EXTENSION: u32 = 26; pub const SECBUFFER_FLAGS: u32 = 27; pub const SECBUFFER_TRAFFIC_SECRETS: u32 = 28; pub const SECBUFFER_CERTIFICATE_REQUEST_CONTEXT: u32 = 29; +pub const SECBUFFER_CHANNEL_BINDINGS_RESULT: u32 = 30; pub const SECBUFFER_ATTRMASK: u32 = 4026531840; pub const SECBUFFER_READONLY: u32 = 2147483648; pub const SECBUFFER_READONLY_WITH_CHECKSUM: u32 = 268435456; pub const SECBUFFER_RESERVED: u32 = 1610612736; +pub const SEC_CHANNEL_BINDINGS_AUDIT_BINDINGS: u32 = 1; +pub const SEC_CHANNEL_BINDINGS_VALID_FLAGS: u32 = 1; +pub const SEC_CHANNEL_BINDINGS_RESULT_CLIENT_SUPPORT: u32 = 1; +pub const SEC_CHANNEL_BINDINGS_RESULT_ABSENT: u32 = 2; +pub const SEC_CHANNEL_BINDINGS_RESULT_NOTVALID_MISMATCH: u32 = 4; +pub const SEC_CHANNEL_BINDINGS_RESULT_NOTVALID_MISSING: u32 = 8; +pub const SEC_CHANNEL_BINDINGS_RESULT_VALID_MATCHED: u32 = 16; +pub const SEC_CHANNEL_BINDINGS_RESULT_VALID_PROXY: u32 = 32; +pub const SEC_CHANNEL_BINDINGS_RESULT_VALID_MISSING: u32 = 64; +pub const SEC_CHANNEL_BINDINGS_RESULT_VALID: u32 = 112; +pub const SEC_CHANNEL_BINDINGS_RESULT_NOTVALID: u32 = 12; pub const SZ_ALG_MAX_SIZE: u32 = 64; pub const SECURITY_NATIVE_DREP: u32 = 16; pub const SECURITY_NETWORK_DREP: u32 = 0; @@ -5290,10 +5320,16 @@ extern "C" { pub static GUID_STANDBY_RESET_PERCENT: GUID; } extern "C" { - pub static GUID_HUPR_ADAPTIVE_DISPLAY_TIMEOUT: GUID; + pub static GUID_HUPR_ADAPTIVE_AWAY_DISPLAY_TIMEOUT: GUID; } extern "C" { - pub static GUID_HUPR_ADAPTIVE_DIM_TIMEOUT: GUID; + pub static GUID_HUPR_ADAPTIVE_INATTENTIVE_DIM_TIMEOUT: GUID; +} +extern "C" { + pub static GUID_HUPR_ADAPTIVE_INATTENTIVE_DISPLAY_TIMEOUT: GUID; +} +extern "C" { + pub static GUID_HUPR_ADAPTIVE_AWAY_DIM_TIMEOUT: GUID; } extern "C" { pub static GUID_ALLOW_STANDBY_STATES: GUID; diff --git a/crates/wdk-sys/generated_bindings/ntddk.rs b/crates/wdk-sys/generated_bindings/ntddk.rs index d0541a526..ced3f3065 100644 --- a/crates/wdk-sys/generated_bindings/ntddk.rs +++ b/crates/wdk-sys/generated_bindings/ntddk.rs @@ -10512,6 +10512,21 @@ extern "C" { IoStatusBlock: PIO_STATUS_BLOCK, ) -> NTSTATUS; } +extern "C" { + #[must_use] + pub fn NtCopyFileChunk( + SourceHandle: HANDLE, + DestHandle: HANDLE, + Event: HANDLE, + IoStatusBlock: PIO_STATUS_BLOCK, + Length: ULONG, + SourceOffset: PLARGE_INTEGER, + DestOffset: PLARGE_INTEGER, + SourceKey: PULONG, + DestKey: PULONG, + Flags: ULONG, + ) -> NTSTATUS; +} extern "C" { #[must_use] pub fn NtQueryObject( @@ -12874,6 +12889,14 @@ extern "C" { NotifyRoutine: POPLOCK_NOTIFY_ROUTINE, ) -> NTSTATUS; } +extern "C" { + #[must_use] + pub fn FsRtlCheckOplockForFsFilterCallback( + Oplock: POPLOCK, + CallbackData: PVOID, + Flags: ULONG, + ) -> NTSTATUS; +} extern "C" { pub fn FsRtlGetCurrentProcessLoaderList() -> PLIST_ENTRY; } diff --git a/crates/wdk-sys/generated_bindings/types.rs b/crates/wdk-sys/generated_bindings/types.rs index a4b024087..e6ffa9bc8 100644 --- a/crates/wdk-sys/generated_bindings/types.rs +++ b/crates/wdk-sys/generated_bindings/types.rs @@ -5429,7 +5429,12 @@ pub mod _FILE_INFORMATION_CLASS { pub const FileStorageReserveIdInformation: Type = 74; pub const FileCaseSensitiveInformationForceAccessCheck: Type = 75; pub const FileKnownFolderInformation: Type = 76; - pub const FileMaximumInformation: Type = 77; + pub const FileStatBasicInformation: Type = 77; + pub const FileId64ExtdDirectoryInformation: Type = 78; + pub const FileId64ExtdBothDirectoryInformation: Type = 79; + pub const FileIdAllExtdDirectoryInformation: Type = 80; + pub const FileIdAllExtdBothDirectoryInformation: Type = 81; + pub const FileMaximumInformation: Type = 82; } pub use self::_FILE_INFORMATION_CLASS::Type as FILE_INFORMATION_CLASS; pub type PFILE_INFORMATION_CLASS = *mut _FILE_INFORMATION_CLASS::Type; @@ -6576,7 +6581,8 @@ pub mod _FSINFOCLASS { pub const FileFsDataCopyInformation: Type = 12; pub const FileFsMetadataSizeInformation: Type = 13; pub const FileFsFullSizeInformationEx: Type = 14; - pub const FileFsMaximumInformation: Type = 15; + pub const FileFsGuidInformation: Type = 15; + pub const FileFsMaximumInformation: Type = 16; } pub use self::_FSINFOCLASS::Type as FS_INFORMATION_CLASS; pub type PFS_INFORMATION_CLASS = *mut _FSINFOCLASS::Type; @@ -37532,6 +37538,7 @@ impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_19 { pub struct _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_20 { pub Vpb: PVPB, pub DeviceObject: PDEVICE_OBJECT, + pub OutputBufferLength: ULONG, } #[test] fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_20() { @@ -37541,7 +37548,7 @@ fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_20() { let ptr = UNINIT.as_ptr(); assert_eq!( ::core::mem::size_of::<_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_20>(), - 16usize, + 24usize, concat!("Size of: ", stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_20)), ); assert_eq!( @@ -37572,6 +37579,18 @@ fn bindgen_test_layout__IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_20() { stringify!(DeviceObject), ), ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).OutputBufferLength) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_20), + "::", + stringify!(OutputBufferLength), + ), + ); } impl Default for _IO_STACK_LOCATION__bindgen_ty_1__bindgen_ty_20 { fn default() -> Self { @@ -49930,6 +49949,13 @@ pub struct _IOMMU_DMA_DOMAIN { } pub type IOMMU_DMA_DOMAIN = _IOMMU_DMA_DOMAIN; pub type PIOMMU_DMA_DOMAIN = *mut _IOMMU_DMA_DOMAIN; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _IOMMU_DMA_PASID_DEVICE { + _unused: [u8; 0], +} +pub type IOMMU_DMA_PASID_DEVICE = _IOMMU_DMA_PASID_DEVICE; +pub type PIOMMU_DMA_PASID_DEVICE = *mut _IOMMU_DMA_PASID_DEVICE; pub mod _FAULT_INFORMATION_ARCH { pub type Type = ::core::ffi::c_int; pub const FaultInformationInvalid: Type = 0; @@ -50821,7 +50847,8 @@ pub mod _IOMMU_DMA_DOMAIN_TYPE { pub const DomainTypeTranslate: Type = 0; pub const DomainTypePassThrough: Type = 1; pub const DomainTypeUnmanaged: Type = 2; - pub const DomainTypeMax: Type = 3; + pub const DomainTypeTranslateS1: Type = 3; + pub const DomainTypeMax: Type = 4; } pub use self::_IOMMU_DMA_DOMAIN_TYPE::Type as IOMMU_DMA_DOMAIN_TYPE; pub type PIOMMU_DMA_DOMAIN_TYPE = *mut _IOMMU_DMA_DOMAIN_TYPE::Type; @@ -50922,7 +50949,8 @@ pub mod _IOMMU_DEVICE_CREATION_CONFIGURATION_TYPE { pub const IommuDeviceCreationConfigTypeNone: Type = 0; pub const IommuDeviceCreationConfigTypeAcpi: Type = 1; pub const IommuDeviceCreationConfigTypeDeviceId: Type = 2; - pub const IommuDeviceCreationConfigTypeMax: Type = 3; + pub const IommuDeviceCreationConfigTypePasid: Type = 3; + pub const IommuDeviceCreationConfigTypeMax: Type = 4; } pub use self::_IOMMU_DEVICE_CREATION_CONFIGURATION_TYPE::Type as IOMMU_DEVICE_CREATION_CONFIGURATION_TYPE; pub type PIOMMU_DEVICE_CREATION_CONFIGURATION_TYPE = *mut _IOMMU_DEVICE_CREATION_CONFIGURATION_TYPE::Type; @@ -50971,6 +50999,68 @@ fn bindgen_test_layout__IOMMU_DEVICE_CREATION_CONFIGURATION_ACPI() { } pub type IOMMU_DEVICE_CREATION_CONFIGURATION_ACPI = _IOMMU_DEVICE_CREATION_CONFIGURATION_ACPI; pub type PIOMMU_DEVICE_CREATION_CONFIGURATION_ACPI = *mut _IOMMU_DEVICE_CREATION_CONFIGURATION_ACPI; +pub mod _IOMMU_PASID_CONFIGURATION_TYPE { + pub type Type = ::core::ffi::c_int; + pub const PasidConfigTypeDefaultPasidOnly: Type = 0; + pub const PasidConfigTypePasidTaggedDma: Type = 1; + pub const PasidConfigTypeMax: Type = 2; +} +pub use self::_IOMMU_PASID_CONFIGURATION_TYPE::Type as IOMMU_PASID_CONFIGURATION_TYPE; +pub type PIOMMU_PASID_CONFIGURATION_TYPE = *mut _IOMMU_PASID_CONFIGURATION_TYPE::Type; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _IOMMU_DEVICE_CREATION_CONFIGURATION_PASID { + pub ConfigType: IOMMU_PASID_CONFIGURATION_TYPE, + pub SuppressPasidFaults: BOOLEAN, +} +#[test] +fn bindgen_test_layout__IOMMU_DEVICE_CREATION_CONFIGURATION_PASID() { + const UNINIT: ::core::mem::MaybeUninit<_IOMMU_DEVICE_CREATION_CONFIGURATION_PASID> = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::<_IOMMU_DEVICE_CREATION_CONFIGURATION_PASID>(), + 8usize, + concat!("Size of: ", stringify!(_IOMMU_DEVICE_CREATION_CONFIGURATION_PASID)), + ); + assert_eq!( + ::core::mem::align_of::<_IOMMU_DEVICE_CREATION_CONFIGURATION_PASID>(), + 4usize, + concat!("Alignment of ", stringify!(_IOMMU_DEVICE_CREATION_CONFIGURATION_PASID)), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ConfigType) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_IOMMU_DEVICE_CREATION_CONFIGURATION_PASID), + "::", + stringify!(ConfigType), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).SuppressPasidFaults) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_IOMMU_DEVICE_CREATION_CONFIGURATION_PASID), + "::", + stringify!(SuppressPasidFaults), + ), + ); +} +impl Default for _IOMMU_DEVICE_CREATION_CONFIGURATION_PASID { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type IOMMU_DEVICE_CREATION_CONFIGURATION_PASID = _IOMMU_DEVICE_CREATION_CONFIGURATION_PASID; +pub type PIOMMU_DEVICE_CREATION_CONFIGURATION_PASID = *mut _IOMMU_DEVICE_CREATION_CONFIGURATION_PASID; #[repr(C)] #[derive(Copy, Clone)] pub struct _IOMMU_DEVICE_CREATION_CONFIGURATION { @@ -50983,6 +51073,7 @@ pub struct _IOMMU_DEVICE_CREATION_CONFIGURATION { pub union _IOMMU_DEVICE_CREATION_CONFIGURATION__bindgen_ty_1 { pub Acpi: IOMMU_DEVICE_CREATION_CONFIGURATION_ACPI, pub DeviceId: PVOID, + pub Pasid: IOMMU_DEVICE_CREATION_CONFIGURATION_PASID, } #[test] fn bindgen_test_layout__IOMMU_DEVICE_CREATION_CONFIGURATION__bindgen_ty_1() { @@ -51026,6 +51117,16 @@ fn bindgen_test_layout__IOMMU_DEVICE_CREATION_CONFIGURATION__bindgen_ty_1() { stringify!(DeviceId), ), ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Pasid) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_IOMMU_DEVICE_CREATION_CONFIGURATION__bindgen_ty_1), + "::", + stringify!(Pasid), + ), + ); } impl Default for _IOMMU_DEVICE_CREATION_CONFIGURATION__bindgen_ty_1 { fn default() -> Self { @@ -51879,6 +51980,66 @@ pub type IOMMU_INTERFACE_STATE_CHANGE_CALLBACK = ::core::option::Option< unsafe extern "C" fn(StateChange: PIOMMU_INTERFACE_STATE_CHANGE, Context: PVOID), >; pub type PIOMMU_INTERFACE_STATE_CHANGE_CALLBACK = IOMMU_INTERFACE_STATE_CHANGE_CALLBACK; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _IOMMU_DMA_DEVICE_INFORMATION { + pub DefaultPasidEnabled: BOOLEAN, + pub PasidTaggedDmaEnabled: BOOLEAN, + pub PasidFaultsSuppressed: BOOLEAN, +} +#[test] +fn bindgen_test_layout__IOMMU_DMA_DEVICE_INFORMATION() { + const UNINIT: ::core::mem::MaybeUninit<_IOMMU_DMA_DEVICE_INFORMATION> = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::<_IOMMU_DMA_DEVICE_INFORMATION>(), + 3usize, + concat!("Size of: ", stringify!(_IOMMU_DMA_DEVICE_INFORMATION)), + ); + assert_eq!( + ::core::mem::align_of::<_IOMMU_DMA_DEVICE_INFORMATION>(), + 1usize, + concat!("Alignment of ", stringify!(_IOMMU_DMA_DEVICE_INFORMATION)), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).DefaultPasidEnabled) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_IOMMU_DMA_DEVICE_INFORMATION), + "::", + stringify!(DefaultPasidEnabled), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).PasidTaggedDmaEnabled) as usize - ptr as usize + }, + 1usize, + concat!( + "Offset of field: ", + stringify!(_IOMMU_DMA_DEVICE_INFORMATION), + "::", + stringify!(PasidTaggedDmaEnabled), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).PasidFaultsSuppressed) as usize - ptr as usize + }, + 2usize, + concat!( + "Offset of field: ", + stringify!(_IOMMU_DMA_DEVICE_INFORMATION), + "::", + stringify!(PasidFaultsSuppressed), + ), + ); +} +pub type IOMMU_DMA_DEVICE_INFORMATION = _IOMMU_DMA_DEVICE_INFORMATION; +pub type PIOMMU_DMA_DEVICE_INFORMATION = *mut _IOMMU_DMA_DEVICE_INFORMATION; pub type IOMMU_DOMAIN_CREATE = ::core::option::Option< unsafe extern "C" fn( OsManagedPageTable: BOOLEAN, @@ -52128,6 +52289,38 @@ pub type IOMMU_SET_DEVICE_FAULT_REPORTING_EX = ::core::option::Option< ) -> NTSTATUS, >; pub type PIOMMU_SET_DEVICE_FAULT_REPORTING_EX = IOMMU_SET_DEVICE_FAULT_REPORTING_EX; +pub type IOMMU_PASID_DEVICE_CREATE = ::core::option::Option< + unsafe extern "C" fn( + DmaDevice: PIOMMU_DMA_DEVICE, + PasidDeviceOut: *mut PIOMMU_DMA_PASID_DEVICE, + AsidOut: PULONG, + ) -> NTSTATUS, +>; +pub type PIOMMU_PASID_DEVICE_CREATE = IOMMU_PASID_DEVICE_CREATE; +pub type IOMMU_PASID_DEVICE_DELETE = ::core::option::Option< + unsafe extern "C" fn(PasidDevice: PIOMMU_DMA_PASID_DEVICE) -> NTSTATUS, +>; +pub type PIOMMU_PASID_DEVICE_DELETE = IOMMU_PASID_DEVICE_DELETE; +pub type IOMMU_DOMAIN_ATTACH_PASID_DEVICE = ::core::option::Option< + unsafe extern "C" fn( + Domain: PIOMMU_DMA_DOMAIN, + PasidDevice: PIOMMU_DMA_PASID_DEVICE, + ) -> NTSTATUS, +>; +pub type PIOMMU_DOMAIN_ATTACH_PASID_DEVICE = IOMMU_DOMAIN_ATTACH_PASID_DEVICE; +pub type IOMMU_DOMAIN_DETACH_PASID_DEVICE = ::core::option::Option< + unsafe extern "C" fn(PasidDevice: PIOMMU_DMA_PASID_DEVICE) -> NTSTATUS, +>; +pub type PIOMMU_DOMAIN_DETACH_PASID_DEVICE = IOMMU_DOMAIN_DETACH_PASID_DEVICE; +pub type IOMMU_DEVICE_QUERY_INFORMATION = ::core::option::Option< + unsafe extern "C" fn( + DmaDevice: PIOMMU_DMA_DEVICE, + Size: ULONG, + BytesWritten: PULONG, + Buffer: PIOMMU_DMA_DEVICE_INFORMATION, + ) -> NTSTATUS, +>; +pub type PIOMMU_DEVICE_QUERY_INFORMATION = IOMMU_DEVICE_QUERY_INFORMATION; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct _DMA_IOMMU_INTERFACE { @@ -52788,6 +52981,367 @@ fn bindgen_test_layout__DMA_IOMMU_INTERFACE_V2() { pub type DMA_IOMMU_INTERFACE_V2 = _DMA_IOMMU_INTERFACE_V2; pub type PDMA_IOMMU_INTERFACE_V2 = *mut _DMA_IOMMU_INTERFACE_V2; #[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _DMA_IOMMU_INTERFACE_V3 { + pub CreateDomainEx: PIOMMU_DOMAIN_CREATE_EX, + pub DeleteDomain: PIOMMU_DOMAIN_DELETE, + pub AttachDeviceEx: PIOMMU_DOMAIN_ATTACH_DEVICE_EX, + pub DetachDeviceEx: PIOMMU_DOMAIN_DETACH_DEVICE_EX, + pub FlushDomain: PIOMMU_FLUSH_DOMAIN, + pub FlushDomainByVaList: PIOMMU_FLUSH_DOMAIN_VA_LIST, + pub QueryInputMappings: PIOMMU_QUERY_INPUT_MAPPINGS, + pub MapLogicalRangeEx: PIOMMU_MAP_LOGICAL_RANGE_EX, + pub UnmapLogicalRange: PIOMMU_UNMAP_LOGICAL_RANGE, + pub MapIdentityRangeEx: PIOMMU_MAP_IDENTITY_RANGE_EX, + pub UnmapIdentityRangeEx: PIOMMU_UNMAP_IDENTITY_RANGE_EX, + pub SetDeviceFaultReportingEx: PIOMMU_SET_DEVICE_FAULT_REPORTING_EX, + pub ConfigureDomain: PIOMMU_DOMAIN_CONFIGURE, + pub QueryAvailableDomainTypes: PIOMMU_DEVICE_QUERY_DOMAIN_TYPES, + pub RegisterInterfaceStateChangeCallback: PIOMMU_REGISTER_INTERFACE_STATE_CHANGE_CALLBACK, + pub UnregisterInterfaceStateChangeCallback: PIOMMU_UNREGISTER_INTERFACE_STATE_CHANGE_CALLBACK, + pub ReserveLogicalAddressRange: PIOMMU_RESERVE_LOGICAL_ADDRESS_RANGE, + pub FreeReservedLogicalAddressRange: PIOMMU_FREE_RESERVED_LOGICAL_ADDRESS_RANGE, + pub MapReservedLogicalRange: PIOMMU_MAP_RESERVED_LOGICAL_RANGE, + pub UnmapReservedLogicalRange: PIOMMU_UNMAP_RESERVED_LOGICAL_RANGE, + pub CreateDevice: PIOMMU_DEVICE_CREATE, + pub DeleteDevice: PIOMMU_DEVICE_DELETE, + pub CreatePasidDevice: PIOMMU_PASID_DEVICE_CREATE, + pub DeletePasidDevice: PIOMMU_PASID_DEVICE_DELETE, + pub AttachPasidDevice: PIOMMU_DOMAIN_ATTACH_PASID_DEVICE, + pub DetachPasidDevice: PIOMMU_DOMAIN_DETACH_PASID_DEVICE, + pub QueryDeviceInfo: PIOMMU_DEVICE_QUERY_INFORMATION, +} +#[test] +fn bindgen_test_layout__DMA_IOMMU_INTERFACE_V3() { + const UNINIT: ::core::mem::MaybeUninit<_DMA_IOMMU_INTERFACE_V3> = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::<_DMA_IOMMU_INTERFACE_V3>(), + 216usize, + concat!("Size of: ", stringify!(_DMA_IOMMU_INTERFACE_V3)), + ); + assert_eq!( + ::core::mem::align_of::<_DMA_IOMMU_INTERFACE_V3>(), + 8usize, + concat!("Alignment of ", stringify!(_DMA_IOMMU_INTERFACE_V3)), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).CreateDomainEx) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(CreateDomainEx), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).DeleteDomain) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(DeleteDomain), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).AttachDeviceEx) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(AttachDeviceEx), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).DetachDeviceEx) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(DetachDeviceEx), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FlushDomain) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(FlushDomain), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).FlushDomainByVaList) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(FlushDomainByVaList), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).QueryInputMappings) as usize - ptr as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(QueryInputMappings), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).MapLogicalRangeEx) as usize - ptr as usize + }, + 56usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(MapLogicalRangeEx), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).UnmapLogicalRange) as usize - ptr as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(UnmapLogicalRange), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).MapIdentityRangeEx) as usize - ptr as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(MapIdentityRangeEx), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).UnmapIdentityRangeEx) as usize - ptr as usize + }, + 80usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(UnmapIdentityRangeEx), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).SetDeviceFaultReportingEx) as usize + - ptr as usize + }, + 88usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(SetDeviceFaultReportingEx), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ConfigureDomain) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(ConfigureDomain), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).QueryAvailableDomainTypes) as usize + - ptr as usize + }, + 104usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(QueryAvailableDomainTypes), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).RegisterInterfaceStateChangeCallback) as usize + - ptr as usize + }, + 112usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(RegisterInterfaceStateChangeCallback), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).UnregisterInterfaceStateChangeCallback) as usize + - ptr as usize + }, + 120usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(UnregisterInterfaceStateChangeCallback), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).ReserveLogicalAddressRange) as usize + - ptr as usize + }, + 128usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(ReserveLogicalAddressRange), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).FreeReservedLogicalAddressRange) as usize + - ptr as usize + }, + 136usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(FreeReservedLogicalAddressRange), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).MapReservedLogicalRange) as usize - ptr as usize + }, + 144usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(MapReservedLogicalRange), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).UnmapReservedLogicalRange) as usize + - ptr as usize + }, + 152usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(UnmapReservedLogicalRange), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).CreateDevice) as usize - ptr as usize }, + 160usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(CreateDevice), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).DeleteDevice) as usize - ptr as usize }, + 168usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(DeleteDevice), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).CreatePasidDevice) as usize - ptr as usize + }, + 176usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(CreatePasidDevice), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).DeletePasidDevice) as usize - ptr as usize + }, + 184usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(DeletePasidDevice), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).AttachPasidDevice) as usize - ptr as usize + }, + 192usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(AttachPasidDevice), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).DetachPasidDevice) as usize - ptr as usize + }, + 200usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(DetachPasidDevice), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).QueryDeviceInfo) as usize - ptr as usize }, + 208usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_V3), + "::", + stringify!(QueryDeviceInfo), + ), + ); +} +pub type DMA_IOMMU_INTERFACE_V3 = _DMA_IOMMU_INTERFACE_V3; +pub type PDMA_IOMMU_INTERFACE_V3 = *mut _DMA_IOMMU_INTERFACE_V3; +#[repr(C)] #[derive(Copy, Clone)] pub struct _DMA_IOMMU_INTERFACE_EX { pub Size: SIZE_T, @@ -52799,6 +53353,7 @@ pub struct _DMA_IOMMU_INTERFACE_EX { pub union _DMA_IOMMU_INTERFACE_EX__bindgen_ty_1 { pub V1: DMA_IOMMU_INTERFACE_V1, pub V2: DMA_IOMMU_INTERFACE_V2, + pub V3: DMA_IOMMU_INTERFACE_V3, } #[test] fn bindgen_test_layout__DMA_IOMMU_INTERFACE_EX__bindgen_ty_1() { @@ -52806,7 +53361,7 @@ fn bindgen_test_layout__DMA_IOMMU_INTERFACE_EX__bindgen_ty_1() { let ptr = UNINIT.as_ptr(); assert_eq!( ::core::mem::size_of::<_DMA_IOMMU_INTERFACE_EX__bindgen_ty_1>(), - 176usize, + 216usize, concat!("Size of: ", stringify!(_DMA_IOMMU_INTERFACE_EX__bindgen_ty_1)), ); assert_eq!( @@ -52834,6 +53389,16 @@ fn bindgen_test_layout__DMA_IOMMU_INTERFACE_EX__bindgen_ty_1() { stringify!(V2), ), ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).V3) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_DMA_IOMMU_INTERFACE_EX__bindgen_ty_1), + "::", + stringify!(V3), + ), + ); } impl Default for _DMA_IOMMU_INTERFACE_EX__bindgen_ty_1 { fn default() -> Self { @@ -52850,7 +53415,7 @@ fn bindgen_test_layout__DMA_IOMMU_INTERFACE_EX() { let ptr = UNINIT.as_ptr(); assert_eq!( ::core::mem::size_of::<_DMA_IOMMU_INTERFACE_EX>(), - 192usize, + 232usize, concat!("Size of: ", stringify!(_DMA_IOMMU_INTERFACE_EX)), ); assert_eq!( @@ -79663,7 +80228,8 @@ pub mod _PROCESS_MITIGATION_POLICY { pub const ProcessRedirectionTrustPolicy: Type = 16; pub const ProcessUserPointerAuthPolicy: Type = 17; pub const ProcessSEHOPPolicy: Type = 18; - pub const MaxProcessMitigationPolicy: Type = 19; + pub const ProcessActivationContextTrustPolicy: Type = 19; + pub const MaxProcessMitigationPolicy: Type = 20; } pub use self::_PROCESS_MITIGATION_POLICY::Type as PROCESS_MITIGATION_POLICY; pub type PPROCESS_MITIGATION_POLICY = *mut _PROCESS_MITIGATION_POLICY::Type; @@ -80508,20 +81074,44 @@ impl _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1 } } #[inline] + pub fn DisallowFsctlSystemCalls(&self) -> ULONG { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_DisallowFsctlSystemCalls(&mut self, val: ULONG) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn AuditDisallowFsctlSystemCalls(&self) -> ULONG { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_AuditDisallowFsctlSystemCalls(&mut self, val: ULONG) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] pub fn ReservedFlags(&self) -> ULONG { - unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 28u8) as u32) } } #[inline] pub fn set_ReservedFlags(&mut self, val: ULONG) { unsafe { let val: u32 = ::core::mem::transmute(val); - self._bitfield_1.set(2usize, 30u8, val as u64) + self._bitfield_1.set(4usize, 28u8, val as u64) } } #[inline] pub fn new_bitfield_1( DisallowWin32kSystemCalls: ULONG, AuditDisallowWin32kSystemCalls: ULONG, + DisallowFsctlSystemCalls: ULONG, + AuditDisallowFsctlSystemCalls: ULONG, ReservedFlags: ULONG, ) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); @@ -80550,7 +81140,29 @@ impl _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY__bindgen_ty_1__bindgen_ty_1 __bindgen_bitfield_unit .set( 2usize, - 30u8, + 1u8, + { + let DisallowFsctlSystemCalls: u32 = unsafe { + ::core::mem::transmute(DisallowFsctlSystemCalls) + }; + DisallowFsctlSystemCalls as u64 + }, + ); + __bindgen_bitfield_unit + .set( + 3usize, + 1u8, + { + let AuditDisallowFsctlSystemCalls: u32 = unsafe { + ::core::mem::transmute(AuditDisallowFsctlSystemCalls) + }; + AuditDisallowFsctlSystemCalls as u64 + }, + ); + __bindgen_bitfield_unit + .set( + 4usize, + 28u8, { let ReservedFlags: u32 = unsafe { ::core::mem::transmute(ReservedFlags) @@ -83827,6 +84439,183 @@ impl Default for _PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY { pub type PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY = _PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY; pub type PPROCESS_MITIGATION_REDIRECTION_TRUST_POLICY = *mut _PROCESS_MITIGATION_REDIRECTION_TRUST_POLICY; #[repr(C)] +#[derive(Copy, Clone)] +pub struct _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY { + pub __bindgen_anon_1: _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1 { + pub Flags: ULONG, + pub __bindgen_anon_1: _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone)] +pub struct _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[test] +fn bindgen_test_layout__PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1() { + assert_eq!( + ::core::mem::size_of::< + _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1, + >(), + 4usize, + concat!( + "Size of: ", + stringify!( + _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1 + ), + ), + ); + assert_eq!( + ::core::mem::align_of::< + _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1, + >(), + 4usize, + concat!( + "Alignment of ", + stringify!( + _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1 + ), + ), + ); +} +impl _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn AssemblyManifestRedirectionTrust(&self) -> ULONG { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_AssemblyManifestRedirectionTrust(&mut self, val: ULONG) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn ReservedFlags(&self) -> ULONG { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 31u8) as u32) } + } + #[inline] + pub fn set_ReservedFlags(&mut self, val: ULONG) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 31u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + AssemblyManifestRedirectionTrust: ULONG, + ReservedFlags: ULONG, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + .set( + 0usize, + 1u8, + { + let AssemblyManifestRedirectionTrust: u32 = unsafe { + ::core::mem::transmute(AssemblyManifestRedirectionTrust) + }; + AssemblyManifestRedirectionTrust as u64 + }, + ); + __bindgen_bitfield_unit + .set( + 1usize, + 31u8, + { + let ReservedFlags: u32 = unsafe { + ::core::mem::transmute(ReservedFlags) + }; + ReservedFlags as u64 + }, + ); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout__PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1() { + const UNINIT: ::core::mem::MaybeUninit< + _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1, + > = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::< + _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1, + >(), + 4usize, + concat!( + "Size of: ", + stringify!(_PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1), + ), + ); + assert_eq!( + ::core::mem::align_of::< + _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1, + >(), + 4usize, + concat!( + "Alignment of ", + stringify!(_PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!( + _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1 + ), + "::", + stringify!(Flags), + ), + ); +} +impl Default for _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[test] +fn bindgen_test_layout__PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY() { + assert_eq!( + ::core::mem::size_of::<_PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY>(), + 4usize, + concat!( + "Size of: ", + stringify!(_PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY), + ), + ); + assert_eq!( + ::core::mem::align_of::<_PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY>(), + 4usize, + concat!( + "Alignment of ", + stringify!(_PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY), + ), + ); +} +impl Default for _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY = _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY; +pub type PPROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY = *mut _PROCESS_MITIGATION_ACTIVATION_CONTEXT_TRUST_POLICY; +#[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct _PROCESS_KEEPALIVE_COUNT_INFORMATION { pub WakeCount: ULONG, @@ -156036,6 +156825,808 @@ pub type FILE_ID_EXTD_BOTH_DIR_INFORMATION = _FILE_ID_EXTD_BOTH_DIR_INFORMATION; pub type PFILE_ID_EXTD_BOTH_DIR_INFORMATION = *mut _FILE_ID_EXTD_BOTH_DIR_INFORMATION; #[repr(C)] #[derive(Copy, Clone)] +pub struct _FILE_ID_64_EXTD_DIR_INFORMATION { + pub NextEntryOffset: ULONG, + pub FileIndex: ULONG, + pub CreationTime: LARGE_INTEGER, + pub LastAccessTime: LARGE_INTEGER, + pub LastWriteTime: LARGE_INTEGER, + pub ChangeTime: LARGE_INTEGER, + pub EndOfFile: LARGE_INTEGER, + pub AllocationSize: LARGE_INTEGER, + pub FileAttributes: ULONG, + pub FileNameLength: ULONG, + pub EaSize: ULONG, + pub ReparsePointTag: ULONG, + pub FileId: LARGE_INTEGER, + pub FileName: [WCHAR; 1usize], +} +#[test] +fn bindgen_test_layout__FILE_ID_64_EXTD_DIR_INFORMATION() { + const UNINIT: ::core::mem::MaybeUninit<_FILE_ID_64_EXTD_DIR_INFORMATION> = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::<_FILE_ID_64_EXTD_DIR_INFORMATION>(), + 88usize, + concat!("Size of: ", stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION)), + ); + assert_eq!( + ::core::mem::align_of::<_FILE_ID_64_EXTD_DIR_INFORMATION>(), + 8usize, + concat!("Alignment of ", stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION)), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), + "::", + stringify!(NextEntryOffset), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FileIndex) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), + "::", + stringify!(FileIndex), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), + "::", + stringify!(CreationTime), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), + "::", + stringify!(LastAccessTime), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), + "::", + stringify!(LastWriteTime), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), + "::", + stringify!(ChangeTime), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), + "::", + stringify!(EndOfFile), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), + "::", + stringify!(AllocationSize), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), + "::", + stringify!(FileAttributes), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, + 60usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), + "::", + stringify!(FileNameLength), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).EaSize) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), + "::", + stringify!(EaSize), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ReparsePointTag) as usize - ptr as usize }, + 68usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), + "::", + stringify!(ReparsePointTag), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), + "::", + stringify!(FileId), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_DIR_INFORMATION), + "::", + stringify!(FileName), + ), + ); +} +impl Default for _FILE_ID_64_EXTD_DIR_INFORMATION { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type FILE_ID_64_EXTD_DIR_INFORMATION = _FILE_ID_64_EXTD_DIR_INFORMATION; +pub type PFILE_ID_64_EXTD_DIR_INFORMATION = *mut _FILE_ID_64_EXTD_DIR_INFORMATION; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _FILE_ID_64_EXTD_BOTH_DIR_INFORMATION { + pub NextEntryOffset: ULONG, + pub FileIndex: ULONG, + pub CreationTime: LARGE_INTEGER, + pub LastAccessTime: LARGE_INTEGER, + pub LastWriteTime: LARGE_INTEGER, + pub ChangeTime: LARGE_INTEGER, + pub EndOfFile: LARGE_INTEGER, + pub AllocationSize: LARGE_INTEGER, + pub FileAttributes: ULONG, + pub FileNameLength: ULONG, + pub EaSize: ULONG, + pub ReparsePointTag: ULONG, + pub FileId: LARGE_INTEGER, + pub ShortNameLength: CCHAR, + pub ShortName: [WCHAR; 12usize], + pub FileName: [WCHAR; 1usize], +} +#[test] +fn bindgen_test_layout__FILE_ID_64_EXTD_BOTH_DIR_INFORMATION() { + const UNINIT: ::core::mem::MaybeUninit<_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION> = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::<_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION>(), + 112usize, + concat!("Size of: ", stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION)), + ); + assert_eq!( + ::core::mem::align_of::<_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION>(), + 8usize, + concat!("Alignment of ", stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION)), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(NextEntryOffset), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FileIndex) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(FileIndex), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(CreationTime), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(LastAccessTime), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(LastWriteTime), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(ChangeTime), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(EndOfFile), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(AllocationSize), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(FileAttributes), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, + 60usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(FileNameLength), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).EaSize) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(EaSize), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ReparsePointTag) as usize - ptr as usize }, + 68usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(ReparsePointTag), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(FileId), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ShortNameLength) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(ShortNameLength), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ShortName) as usize - ptr as usize }, + 82usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(ShortName), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, + 106usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_64_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(FileName), + ), + ); +} +impl Default for _FILE_ID_64_EXTD_BOTH_DIR_INFORMATION { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type FILE_ID_64_EXTD_BOTH_DIR_INFORMATION = _FILE_ID_64_EXTD_BOTH_DIR_INFORMATION; +pub type PFILE_ID_64_EXTD_BOTH_DIR_INFORMATION = *mut _FILE_ID_64_EXTD_BOTH_DIR_INFORMATION; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _FILE_ID_ALL_EXTD_DIR_INFORMATION { + pub NextEntryOffset: ULONG, + pub FileIndex: ULONG, + pub CreationTime: LARGE_INTEGER, + pub LastAccessTime: LARGE_INTEGER, + pub LastWriteTime: LARGE_INTEGER, + pub ChangeTime: LARGE_INTEGER, + pub EndOfFile: LARGE_INTEGER, + pub AllocationSize: LARGE_INTEGER, + pub FileAttributes: ULONG, + pub FileNameLength: ULONG, + pub EaSize: ULONG, + pub ReparsePointTag: ULONG, + pub FileId: LARGE_INTEGER, + pub FileId128: FILE_ID_128, + pub FileName: [WCHAR; 1usize], +} +#[test] +fn bindgen_test_layout__FILE_ID_ALL_EXTD_DIR_INFORMATION() { + const UNINIT: ::core::mem::MaybeUninit<_FILE_ID_ALL_EXTD_DIR_INFORMATION> = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::<_FILE_ID_ALL_EXTD_DIR_INFORMATION>(), + 104usize, + concat!("Size of: ", stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION)), + ); + assert_eq!( + ::core::mem::align_of::<_FILE_ID_ALL_EXTD_DIR_INFORMATION>(), + 8usize, + concat!("Alignment of ", stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION)), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), + "::", + stringify!(NextEntryOffset), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FileIndex) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), + "::", + stringify!(FileIndex), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), + "::", + stringify!(CreationTime), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), + "::", + stringify!(LastAccessTime), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), + "::", + stringify!(LastWriteTime), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), + "::", + stringify!(ChangeTime), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), + "::", + stringify!(EndOfFile), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), + "::", + stringify!(AllocationSize), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), + "::", + stringify!(FileAttributes), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, + 60usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), + "::", + stringify!(FileNameLength), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).EaSize) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), + "::", + stringify!(EaSize), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ReparsePointTag) as usize - ptr as usize }, + 68usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), + "::", + stringify!(ReparsePointTag), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), + "::", + stringify!(FileId), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FileId128) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), + "::", + stringify!(FileId128), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_DIR_INFORMATION), + "::", + stringify!(FileName), + ), + ); +} +impl Default for _FILE_ID_ALL_EXTD_DIR_INFORMATION { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type FILE_ID_ALL_EXTD_DIR_INFORMATION = _FILE_ID_ALL_EXTD_DIR_INFORMATION; +pub type PFILE_ID_ALL_EXTD_DIR_INFORMATION = *mut _FILE_ID_ALL_EXTD_DIR_INFORMATION; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION { + pub NextEntryOffset: ULONG, + pub FileIndex: ULONG, + pub CreationTime: LARGE_INTEGER, + pub LastAccessTime: LARGE_INTEGER, + pub LastWriteTime: LARGE_INTEGER, + pub ChangeTime: LARGE_INTEGER, + pub EndOfFile: LARGE_INTEGER, + pub AllocationSize: LARGE_INTEGER, + pub FileAttributes: ULONG, + pub FileNameLength: ULONG, + pub EaSize: ULONG, + pub ReparsePointTag: ULONG, + pub FileId: LARGE_INTEGER, + pub FileId128: FILE_ID_128, + pub ShortNameLength: CCHAR, + pub ShortName: [WCHAR; 12usize], + pub FileName: [WCHAR; 1usize], +} +#[test] +fn bindgen_test_layout__FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION() { + const UNINIT: ::core::mem::MaybeUninit<_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION> = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::<_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION>(), + 128usize, + concat!("Size of: ", stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION)), + ); + assert_eq!( + ::core::mem::align_of::<_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION>(), + 8usize, + concat!("Alignment of ", stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION)), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).NextEntryOffset) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(NextEntryOffset), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FileIndex) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(FileIndex), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).CreationTime) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(CreationTime), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).LastAccessTime) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(LastAccessTime), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).LastWriteTime) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(LastWriteTime), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ChangeTime) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(ChangeTime), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).EndOfFile) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(EndOfFile), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).AllocationSize) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(AllocationSize), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FileAttributes) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(FileAttributes), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FileNameLength) as usize - ptr as usize }, + 60usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(FileNameLength), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).EaSize) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(EaSize), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ReparsePointTag) as usize - ptr as usize }, + 68usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(ReparsePointTag), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FileId) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(FileId), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FileId128) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(FileId128), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ShortNameLength) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(ShortNameLength), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ShortName) as usize - ptr as usize }, + 98usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(ShortName), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FileName) as usize - ptr as usize }, + 122usize, + concat!( + "Offset of field: ", + stringify!(_FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION), + "::", + stringify!(FileName), + ), + ); +} +impl Default for _FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION = _FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION; +pub type PFILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION = *mut _FILE_ID_ALL_EXTD_BOTH_DIR_INFORMATION; +#[repr(C)] +#[derive(Copy, Clone)] pub struct _FILE_OBJECTID_INFORMATION { pub FileReference: LONGLONG, pub ObjectId: [UCHAR; 16usize], @@ -159381,6 +160972,38 @@ fn bindgen_test_layout__FILE_FS_DATA_COPY_INFORMATION() { pub type FILE_FS_DATA_COPY_INFORMATION = _FILE_FS_DATA_COPY_INFORMATION; pub type PFILE_FS_DATA_COPY_INFORMATION = *mut _FILE_FS_DATA_COPY_INFORMATION; #[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _FILE_FS_GUID_INFORMATION { + pub FsGuid: GUID, +} +#[test] +fn bindgen_test_layout__FILE_FS_GUID_INFORMATION() { + const UNINIT: ::core::mem::MaybeUninit<_FILE_FS_GUID_INFORMATION> = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::<_FILE_FS_GUID_INFORMATION>(), + 16usize, + concat!("Size of: ", stringify!(_FILE_FS_GUID_INFORMATION)), + ); + assert_eq!( + ::core::mem::align_of::<_FILE_FS_GUID_INFORMATION>(), + 4usize, + concat!("Alignment of ", stringify!(_FILE_FS_GUID_INFORMATION)), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).FsGuid) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_FILE_FS_GUID_INFORMATION), + "::", + stringify!(FsGuid), + ), + ); +} +pub type FILE_FS_GUID_INFORMATION = _FILE_FS_GUID_INFORMATION; +pub type PFILE_FS_GUID_INFORMATION = *mut _FILE_FS_GUID_INFORMATION; +#[repr(C)] #[derive(Copy, Clone)] pub struct _FILE_END_OF_FILE_INFORMATION_EX { pub EndOfFile: LARGE_INTEGER, @@ -159898,7 +161521,9 @@ pub struct REFS_VOLUME_DATA_BUFFER { pub FastTierDataFillRatio: USHORT, pub SlowTierDataFillRatio: USHORT, pub DestagesFastTierToSlowTierRate: ULONG, - pub Reserved: [LARGE_INTEGER; 9usize], + pub MetadataChecksumType: USHORT, + pub Reserved0: [UCHAR; 6usize], + pub Reserved: [LARGE_INTEGER; 8usize], } #[test] fn bindgen_test_layout_REFS_VOLUME_DATA_BUFFER() { @@ -160079,8 +161704,30 @@ fn bindgen_test_layout_REFS_VOLUME_DATA_BUFFER() { ), ); assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, + unsafe { + ::core::ptr::addr_of!((*ptr).MetadataChecksumType) as usize - ptr as usize + }, 80usize, + concat!( + "Offset of field: ", + stringify!(REFS_VOLUME_DATA_BUFFER), + "::", + stringify!(MetadataChecksumType), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Reserved0) as usize - ptr as usize }, + 82usize, + concat!( + "Offset of field: ", + stringify!(REFS_VOLUME_DATA_BUFFER), + "::", + stringify!(Reserved0), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, + 88usize, concat!( "Offset of field: ", stringify!(REFS_VOLUME_DATA_BUFFER), @@ -179398,54 +181045,54 @@ pub struct _VOLUME_REFS_INFO_BUFFER { pub CachePopulationUpdatesCounter: LONG, pub CacheWriteThroughUpdatesCounter: LONG, pub MaxCacheTransactionsOutstanding: LONG, - pub DataWritesReallocationCount: LONG, - pub DataInPlaceWriteCount: LONG, - pub MetadataAllocationsFastTierCount: LONG, - pub MetadataAllocationsSlowTierCount: LONG, - pub DataAllocationsFastTierCount: LONG, - pub DataAllocationsSlowTierCount: LONG, - pub DestagesSlowTierToFastTier: LONG, - pub DestagesFastTierToSlowTier: LONG, + pub DataWritesReallocationCount: LONGLONG, + pub DataInPlaceWriteCount: LONGLONG, + pub MetadataAllocationsFastTierCount: LONGLONG, + pub MetadataAllocationsSlowTierCount: LONGLONG, + pub DataAllocationsFastTierCount: LONGLONG, + pub DataAllocationsSlowTierCount: LONGLONG, + pub DestagesSlowTierToFastTier: LONGLONG, + pub DestagesFastTierToSlowTier: LONGLONG, pub SlowTierDataFillRatio: LONG, pub FastTierDataFillRatio: LONG, pub SlowTierMetadataFillRatio: LONG, pub FastTierMetadataFillRatio: LONG, - pub SlowToFastDestageReadLatency: LONG, + pub SlowToFastDestageReadLatency: LONGLONG, pub SlowToFastDestageReadLatencyBase: LONG, - pub SlowToFastDestageWriteLatency: LONG, + pub SlowToFastDestageWriteLatency: LONGLONG, pub SlowToFastDestageWriteLatencyBase: LONG, - pub FastToSlowDestageReadLatency: LONG, + pub FastToSlowDestageReadLatency: LONGLONG, pub FastToSlowDestageReadLatencyBase: LONG, - pub FastToSlowDestageWriteLatency: LONG, + pub FastToSlowDestageWriteLatency: LONGLONG, pub FastToSlowDestageWriteLatencyBase: LONG, - pub SlowTierContainerFillRatio: LONG, + pub SlowTierContainerFillRatio: LONGLONG, pub SlowTierContainerFillRatioBase: LONG, - pub FastTierContainerFillRatio: LONG, + pub FastTierContainerFillRatio: LONGLONG, pub FastTierContainerFillRatioBase: LONG, - pub TreeUpdateLatency: LONG, - pub TreeUpdateLatencyBase: LONG, - pub CheckpointLatency: LONG, - pub CheckpointLatencyBase: LONG, - pub TreeUpdateCount: LONG, - pub CheckpointCount: LONG, - pub LogWriteCount: LONG, + pub Unused1: LONG, + pub Unused2: LONG, + pub Unused3: LONG, + pub Unused4: LONG, + pub TreeUpdateCount: LONGLONG, + pub CheckpointCount: LONGLONG, + pub LogWriteCount: LONGLONG, pub LogFillRatio: LONG, pub ReadCacheInvalidationsForOverwrite: LONG, pub ReadCacheInvalidationsForReuse: LONG, pub ReadCacheInvalidationsGeneral: LONG, pub ReadCacheChecksOnMount: LONG, pub ReadCacheIssuesOnMount: LONG, - pub TrimLatency: LONG, + pub TrimLatency: LONGLONG, pub TrimLatencyBase: LONG, - pub DataCompactionCount: LONG, - pub CompactionReadLatency: LONG, + pub DataCompactionCount: LONGLONG, + pub CompactionReadLatency: LONGLONG, pub CompactionReadLatencyBase: LONG, - pub CompactionWriteLatency: LONG, + pub CompactionWriteLatency: LONGLONG, pub CompactionWriteLatencyBase: LONG, pub DataInPlaceWriteClusterCount: LARGE_INTEGER, pub CompactionFailedDueToIneligibleContainer: LONG, pub CompactionFailedDueToMaxFragmentation: LONG, - pub CompactedContainerFillRatio: LONG, + pub CompactedContainerFillRatio: LONGLONG, pub CompactedContainerFillRatioBase: LONG, pub ContainerMoveRetryCount: LONG, pub ContainerMoveFailedDueToIneligibleContainer: LONG, @@ -179454,6 +181101,22 @@ pub struct _VOLUME_REFS_INFO_BUFFER { pub NumberOfDirtyMetadataPages: LARGE_INTEGER, pub NumberOfDirtyTableListEntries: LONG, pub NumberOfDeleteQueueEntries: LONG, + pub MAAFilteredViewSize: LONG, + pub MAAFilteredViewInsertions: LONG, + pub MAAFilteredViewDeletions: LONG, + pub MAAFilteredViewCollisions: LONG, + pub MAAFilteredViewPurges: LONG, + pub MAARegionsVisitedPerAllocationSum: LONGLONG, + pub MAARegionsVisitedPerAllocationBase: LONG, + pub MAAMaxRegionsVisitedPerAllocation: LONG, + pub TreeUpdateLatencyExclusive: LONGLONG, + pub TreeUpdateLatencyTotal: LONGLONG, + pub TreeUpdateLatencyBase: LONG, + pub CheckpointLatencyTreeUpdateExclusive: LONGLONG, + pub CheckpointLatencyTreeUpdateTotal: LONGLONG, + pub CheckpointLatencyTreeUpdateBase: LONG, + pub CheckpointLatencyTotal: LONGLONG, + pub CheckpointLatencyTotalBase: LONG, } #[test] fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { @@ -179461,7 +181124,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { let ptr = UNINIT.as_ptr(); assert_eq!( ::core::mem::size_of::<_VOLUME_REFS_INFO_BUFFER>(), - 376usize, + 608usize, concat!("Size of: ", stringify!(_VOLUME_REFS_INFO_BUFFER)), ); assert_eq!( @@ -179754,7 +181417,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).DataWritesReallocationCount) as usize - ptr as usize }, - 140usize, + 144usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -179766,7 +181429,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { unsafe { ::core::ptr::addr_of!((*ptr).DataInPlaceWriteCount) as usize - ptr as usize }, - 144usize, + 152usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -179779,7 +181442,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).MetadataAllocationsFastTierCount) as usize - ptr as usize }, - 148usize, + 160usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -179792,7 +181455,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).MetadataAllocationsSlowTierCount) as usize - ptr as usize }, - 152usize, + 168usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -179805,7 +181468,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).DataAllocationsFastTierCount) as usize - ptr as usize }, - 156usize, + 176usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -179818,7 +181481,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).DataAllocationsSlowTierCount) as usize - ptr as usize }, - 160usize, + 184usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -179831,7 +181494,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).DestagesSlowTierToFastTier) as usize - ptr as usize }, - 164usize, + 192usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -179844,7 +181507,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).DestagesFastTierToSlowTier) as usize - ptr as usize }, - 168usize, + 200usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -179856,7 +181519,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { unsafe { ::core::ptr::addr_of!((*ptr).SlowTierDataFillRatio) as usize - ptr as usize }, - 172usize, + 208usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -179868,7 +181531,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { unsafe { ::core::ptr::addr_of!((*ptr).FastTierDataFillRatio) as usize - ptr as usize }, - 176usize, + 212usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -179881,7 +181544,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).SlowTierMetadataFillRatio) as usize - ptr as usize }, - 180usize, + 216usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -179894,7 +181557,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).FastTierMetadataFillRatio) as usize - ptr as usize }, - 184usize, + 220usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -179907,7 +181570,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).SlowToFastDestageReadLatency) as usize - ptr as usize }, - 188usize, + 224usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -179920,7 +181583,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).SlowToFastDestageReadLatencyBase) as usize - ptr as usize }, - 192usize, + 232usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -179933,7 +181596,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).SlowToFastDestageWriteLatency) as usize - ptr as usize }, - 196usize, + 240usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -179946,7 +181609,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).SlowToFastDestageWriteLatencyBase) as usize - ptr as usize }, - 200usize, + 248usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -179959,7 +181622,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).FastToSlowDestageReadLatency) as usize - ptr as usize }, - 204usize, + 256usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -179972,7 +181635,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).FastToSlowDestageReadLatencyBase) as usize - ptr as usize }, - 208usize, + 264usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -179985,7 +181648,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).FastToSlowDestageWriteLatency) as usize - ptr as usize }, - 212usize, + 272usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -179998,7 +181661,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).FastToSlowDestageWriteLatencyBase) as usize - ptr as usize }, - 216usize, + 280usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180011,7 +181674,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).SlowTierContainerFillRatio) as usize - ptr as usize }, - 220usize, + 288usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180024,7 +181687,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).SlowTierContainerFillRatioBase) as usize - ptr as usize }, - 224usize, + 296usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180037,7 +181700,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).FastTierContainerFillRatio) as usize - ptr as usize }, - 228usize, + 304usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180050,7 +181713,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).FastTierContainerFillRatioBase) as usize - ptr as usize }, - 232usize, + 312usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180059,56 +181722,48 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ), ); assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TreeUpdateLatency) as usize - ptr as usize - }, - 236usize, + unsafe { ::core::ptr::addr_of!((*ptr).Unused1) as usize - ptr as usize }, + 316usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), "::", - stringify!(TreeUpdateLatency), + stringify!(Unused1), ), ); assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).TreeUpdateLatencyBase) as usize - ptr as usize - }, - 240usize, + unsafe { ::core::ptr::addr_of!((*ptr).Unused2) as usize - ptr as usize }, + 320usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), "::", - stringify!(TreeUpdateLatencyBase), + stringify!(Unused2), ), ); assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CheckpointLatency) as usize - ptr as usize - }, - 244usize, + unsafe { ::core::ptr::addr_of!((*ptr).Unused3) as usize - ptr as usize }, + 324usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), "::", - stringify!(CheckpointLatency), + stringify!(Unused3), ), ); assert_eq!( - unsafe { - ::core::ptr::addr_of!((*ptr).CheckpointLatencyBase) as usize - ptr as usize - }, - 248usize, + unsafe { ::core::ptr::addr_of!((*ptr).Unused4) as usize - ptr as usize }, + 328usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), "::", - stringify!(CheckpointLatencyBase), + stringify!(Unused4), ), ); assert_eq!( unsafe { ::core::ptr::addr_of!((*ptr).TreeUpdateCount) as usize - ptr as usize }, - 252usize, + 336usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180118,7 +181773,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ); assert_eq!( unsafe { ::core::ptr::addr_of!((*ptr).CheckpointCount) as usize - ptr as usize }, - 256usize, + 344usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180128,7 +181783,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ); assert_eq!( unsafe { ::core::ptr::addr_of!((*ptr).LogWriteCount) as usize - ptr as usize }, - 260usize, + 352usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180138,7 +181793,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ); assert_eq!( unsafe { ::core::ptr::addr_of!((*ptr).LogFillRatio) as usize - ptr as usize }, - 264usize, + 360usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180151,7 +181806,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).ReadCacheInvalidationsForOverwrite) as usize - ptr as usize }, - 268usize, + 364usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180164,7 +181819,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).ReadCacheInvalidationsForReuse) as usize - ptr as usize }, - 272usize, + 368usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180177,7 +181832,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).ReadCacheInvalidationsGeneral) as usize - ptr as usize }, - 276usize, + 372usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180189,7 +181844,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { unsafe { ::core::ptr::addr_of!((*ptr).ReadCacheChecksOnMount) as usize - ptr as usize }, - 280usize, + 376usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180201,7 +181856,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { unsafe { ::core::ptr::addr_of!((*ptr).ReadCacheIssuesOnMount) as usize - ptr as usize }, - 284usize, + 380usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180211,7 +181866,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ); assert_eq!( unsafe { ::core::ptr::addr_of!((*ptr).TrimLatency) as usize - ptr as usize }, - 288usize, + 384usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180221,7 +181876,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ); assert_eq!( unsafe { ::core::ptr::addr_of!((*ptr).TrimLatencyBase) as usize - ptr as usize }, - 292usize, + 392usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180233,7 +181888,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { unsafe { ::core::ptr::addr_of!((*ptr).DataCompactionCount) as usize - ptr as usize }, - 296usize, + 400usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180245,7 +181900,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { unsafe { ::core::ptr::addr_of!((*ptr).CompactionReadLatency) as usize - ptr as usize }, - 300usize, + 408usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180258,7 +181913,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).CompactionReadLatencyBase) as usize - ptr as usize }, - 304usize, + 416usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180270,7 +181925,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { unsafe { ::core::ptr::addr_of!((*ptr).CompactionWriteLatency) as usize - ptr as usize }, - 308usize, + 424usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180283,7 +181938,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).CompactionWriteLatencyBase) as usize - ptr as usize }, - 312usize, + 432usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180296,7 +181951,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).DataInPlaceWriteClusterCount) as usize - ptr as usize }, - 320usize, + 440usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180309,7 +181964,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).CompactionFailedDueToIneligibleContainer) as usize - ptr as usize }, - 328usize, + 448usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180322,7 +181977,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).CompactionFailedDueToMaxFragmentation) as usize - ptr as usize }, - 332usize, + 452usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180335,7 +181990,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).CompactedContainerFillRatio) as usize - ptr as usize }, - 336usize, + 456usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180348,7 +182003,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).CompactedContainerFillRatioBase) as usize - ptr as usize }, - 340usize, + 464usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180360,7 +182015,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { unsafe { ::core::ptr::addr_of!((*ptr).ContainerMoveRetryCount) as usize - ptr as usize }, - 344usize, + 468usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180373,7 +182028,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).ContainerMoveFailedDueToIneligibleContainer) as usize - ptr as usize }, - 348usize, + 472usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180385,7 +182040,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { unsafe { ::core::ptr::addr_of!((*ptr).CompactionFailureCount) as usize - ptr as usize }, - 352usize, + 476usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180398,7 +182053,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).ContainerMoveFailureCount) as usize - ptr as usize }, - 356usize, + 480usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180411,7 +182066,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).NumberOfDirtyMetadataPages) as usize - ptr as usize }, - 360usize, + 488usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180424,7 +182079,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).NumberOfDirtyTableListEntries) as usize - ptr as usize }, - 368usize, + 496usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180437,7 +182092,7 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { ::core::ptr::addr_of!((*ptr).NumberOfDeleteQueueEntries) as usize - ptr as usize }, - 372usize, + 500usize, concat!( "Offset of field: ", stringify!(_VOLUME_REFS_INFO_BUFFER), @@ -180445,6 +182100,209 @@ fn bindgen_test_layout__VOLUME_REFS_INFO_BUFFER() { stringify!(NumberOfDeleteQueueEntries), ), ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).MAAFilteredViewSize) as usize - ptr as usize + }, + 504usize, + concat!( + "Offset of field: ", + stringify!(_VOLUME_REFS_INFO_BUFFER), + "::", + stringify!(MAAFilteredViewSize), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).MAAFilteredViewInsertions) as usize + - ptr as usize + }, + 508usize, + concat!( + "Offset of field: ", + stringify!(_VOLUME_REFS_INFO_BUFFER), + "::", + stringify!(MAAFilteredViewInsertions), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).MAAFilteredViewDeletions) as usize + - ptr as usize + }, + 512usize, + concat!( + "Offset of field: ", + stringify!(_VOLUME_REFS_INFO_BUFFER), + "::", + stringify!(MAAFilteredViewDeletions), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).MAAFilteredViewCollisions) as usize + - ptr as usize + }, + 516usize, + concat!( + "Offset of field: ", + stringify!(_VOLUME_REFS_INFO_BUFFER), + "::", + stringify!(MAAFilteredViewCollisions), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).MAAFilteredViewPurges) as usize - ptr as usize + }, + 520usize, + concat!( + "Offset of field: ", + stringify!(_VOLUME_REFS_INFO_BUFFER), + "::", + stringify!(MAAFilteredViewPurges), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).MAARegionsVisitedPerAllocationSum) as usize + - ptr as usize + }, + 528usize, + concat!( + "Offset of field: ", + stringify!(_VOLUME_REFS_INFO_BUFFER), + "::", + stringify!(MAARegionsVisitedPerAllocationSum), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).MAARegionsVisitedPerAllocationBase) as usize + - ptr as usize + }, + 536usize, + concat!( + "Offset of field: ", + stringify!(_VOLUME_REFS_INFO_BUFFER), + "::", + stringify!(MAARegionsVisitedPerAllocationBase), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).MAAMaxRegionsVisitedPerAllocation) as usize + - ptr as usize + }, + 540usize, + concat!( + "Offset of field: ", + stringify!(_VOLUME_REFS_INFO_BUFFER), + "::", + stringify!(MAAMaxRegionsVisitedPerAllocation), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).TreeUpdateLatencyExclusive) as usize + - ptr as usize + }, + 544usize, + concat!( + "Offset of field: ", + stringify!(_VOLUME_REFS_INFO_BUFFER), + "::", + stringify!(TreeUpdateLatencyExclusive), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).TreeUpdateLatencyTotal) as usize - ptr as usize + }, + 552usize, + concat!( + "Offset of field: ", + stringify!(_VOLUME_REFS_INFO_BUFFER), + "::", + stringify!(TreeUpdateLatencyTotal), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).TreeUpdateLatencyBase) as usize - ptr as usize + }, + 560usize, + concat!( + "Offset of field: ", + stringify!(_VOLUME_REFS_INFO_BUFFER), + "::", + stringify!(TreeUpdateLatencyBase), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).CheckpointLatencyTreeUpdateExclusive) as usize + - ptr as usize + }, + 568usize, + concat!( + "Offset of field: ", + stringify!(_VOLUME_REFS_INFO_BUFFER), + "::", + stringify!(CheckpointLatencyTreeUpdateExclusive), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).CheckpointLatencyTreeUpdateTotal) as usize + - ptr as usize + }, + 576usize, + concat!( + "Offset of field: ", + stringify!(_VOLUME_REFS_INFO_BUFFER), + "::", + stringify!(CheckpointLatencyTreeUpdateTotal), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).CheckpointLatencyTreeUpdateBase) as usize + - ptr as usize + }, + 584usize, + concat!( + "Offset of field: ", + stringify!(_VOLUME_REFS_INFO_BUFFER), + "::", + stringify!(CheckpointLatencyTreeUpdateBase), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).CheckpointLatencyTotal) as usize - ptr as usize + }, + 592usize, + concat!( + "Offset of field: ", + stringify!(_VOLUME_REFS_INFO_BUFFER), + "::", + stringify!(CheckpointLatencyTotal), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).CheckpointLatencyTotalBase) as usize + - ptr as usize + }, + 600usize, + concat!( + "Offset of field: ", + stringify!(_VOLUME_REFS_INFO_BUFFER), + "::", + stringify!(CheckpointLatencyTotalBase), + ), + ); } impl Default for _VOLUME_REFS_INFO_BUFFER { fn default() -> Self { @@ -181679,6 +183537,7 @@ pub type PREFS_STREAM_SNAPSHOT_QUERY_DELTAS_OUTPUT_BUFFER = *mut _REFS_STREAM_SN #[derive(Copy, Clone)] pub struct _DUPLICATE_CLUSTER_DATA { pub SourceLcn: LONGLONG, + pub TargetLcn: LONGLONG, pub TargetFileOffset: LARGE_INTEGER, pub DuplicationLimit: ULONG, pub Reserved: ULONG, @@ -181689,7 +183548,7 @@ fn bindgen_test_layout__DUPLICATE_CLUSTER_DATA() { let ptr = UNINIT.as_ptr(); assert_eq!( ::core::mem::size_of::<_DUPLICATE_CLUSTER_DATA>(), - 24usize, + 32usize, concat!("Size of: ", stringify!(_DUPLICATE_CLUSTER_DATA)), ); assert_eq!( @@ -181707,11 +183566,21 @@ fn bindgen_test_layout__DUPLICATE_CLUSTER_DATA() { stringify!(SourceLcn), ), ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).TargetLcn) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_DUPLICATE_CLUSTER_DATA), + "::", + stringify!(TargetLcn), + ), + ); assert_eq!( unsafe { ::core::ptr::addr_of!((*ptr).TargetFileOffset) as usize - ptr as usize }, - 8usize, + 16usize, concat!( "Offset of field: ", stringify!(_DUPLICATE_CLUSTER_DATA), @@ -181723,7 +183592,7 @@ fn bindgen_test_layout__DUPLICATE_CLUSTER_DATA() { unsafe { ::core::ptr::addr_of!((*ptr).DuplicationLimit) as usize - ptr as usize }, - 16usize, + 24usize, concat!( "Offset of field: ", stringify!(_DUPLICATE_CLUSTER_DATA), @@ -181733,7 +183602,7 @@ fn bindgen_test_layout__DUPLICATE_CLUSTER_DATA() { ); assert_eq!( unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 20usize, + 28usize, concat!( "Offset of field: ", stringify!(_DUPLICATE_CLUSTER_DATA), @@ -181756,9 +183625,13 @@ pub type PDUPLICATE_CLUSTER_DATA = *mut _DUPLICATE_CLUSTER_DATA; pub mod _LCN_WEAK_REFERENCE_STATE { pub type Type = ::core::ffi::c_int; pub const LCN_WEAK_REFERENCE_VALID: Type = 1; - pub const LCN_CHECKSUM_VALID: Type = 2; + pub const LCN_WEAK_REFERENCE_BROKEN: Type = 2; + pub const LCN_CHECKSUM_VALID: Type = 4; + pub const LCN_IS_VALID: Type = 8; + pub const LCN_IS_STREAM_RESERVED: Type = 16; + pub const LCN_IS_READ_ONLY: Type = 32; } -pub type LCN_WEAK_REFERENCE_STATE = USHORT; +pub type LCN_WEAK_REFERENCE_STATE = ULONG; pub type PLCN_WEAK_REFERENCE_STATE = *mut LCN_WEAK_REFERENCE_STATE; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] @@ -181896,70 +183769,456 @@ pub type LCN_WEAK_REFERENCE_CREATE_INPUT_BUFFER = _LCN_WEAK_REFERENCE_CREATE_INP pub type PLCN_WEAK_REFERENCE_CREATE_INPUT_BUFFER = *mut _LCN_WEAK_REFERENCE_CREATE_INPUT_BUFFER; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] -pub struct _REFS_SET_VOLUME_DEDUP_INFO_INPUT_BUFFER { +pub struct _LCN_WEAK_REFERENCE_VCN_MAPPING { + pub Vcn: LONGLONG, + pub Lcn: LONGLONG, + pub CountOfRange: LONGLONG, +} +#[test] +fn bindgen_test_layout__LCN_WEAK_REFERENCE_VCN_MAPPING() { + const UNINIT: ::core::mem::MaybeUninit<_LCN_WEAK_REFERENCE_VCN_MAPPING> = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::<_LCN_WEAK_REFERENCE_VCN_MAPPING>(), + 24usize, + concat!("Size of: ", stringify!(_LCN_WEAK_REFERENCE_VCN_MAPPING)), + ); + assert_eq!( + ::core::mem::align_of::<_LCN_WEAK_REFERENCE_VCN_MAPPING>(), + 8usize, + concat!("Alignment of ", stringify!(_LCN_WEAK_REFERENCE_VCN_MAPPING)), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Vcn) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_LCN_WEAK_REFERENCE_VCN_MAPPING), + "::", + stringify!(Vcn), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Lcn) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_LCN_WEAK_REFERENCE_VCN_MAPPING), + "::", + stringify!(Lcn), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).CountOfRange) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_LCN_WEAK_REFERENCE_VCN_MAPPING), + "::", + stringify!(CountOfRange), + ), + ); +} +pub type LCN_WEAK_REFERENCE_VCN_MAPPING = _LCN_WEAK_REFERENCE_VCN_MAPPING; +pub type PLCN_WEAK_REFERENCE_VCN_MAPPING = *mut _LCN_WEAK_REFERENCE_VCN_MAPPING; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER { + pub MappingCount: ULONG, + pub VcnLcnMappings: [LCN_WEAK_REFERENCE_VCN_MAPPING; 1usize], +} +#[test] +fn bindgen_test_layout__LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER() { + const UNINIT: ::core::mem::MaybeUninit<_LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::<_LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER>(), + 32usize, + concat!("Size of: ", stringify!(_LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER)), + ); + assert_eq!( + ::core::mem::align_of::<_LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER>(), + 8usize, + concat!("Alignment of ", stringify!(_LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER)), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).MappingCount) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER), + "::", + stringify!(MappingCount), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).VcnLcnMappings) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER), + "::", + stringify!(VcnLcnMappings), + ), + ); +} +pub type LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER = _LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER; +pub type PLCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER = *mut _LCN_WEAK_REFERENCE_CREATE_OUTPUT_BUFFER; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _LCN_WEAK_REFERENCE_RANGE { + pub StartOfRange: LONGLONG, + pub CountOfRange: LONGLONG, +} +#[test] +fn bindgen_test_layout__LCN_WEAK_REFERENCE_RANGE() { + const UNINIT: ::core::mem::MaybeUninit<_LCN_WEAK_REFERENCE_RANGE> = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::<_LCN_WEAK_REFERENCE_RANGE>(), + 16usize, + concat!("Size of: ", stringify!(_LCN_WEAK_REFERENCE_RANGE)), + ); + assert_eq!( + ::core::mem::align_of::<_LCN_WEAK_REFERENCE_RANGE>(), + 8usize, + concat!("Alignment of ", stringify!(_LCN_WEAK_REFERENCE_RANGE)), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).StartOfRange) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_LCN_WEAK_REFERENCE_RANGE), + "::", + stringify!(StartOfRange), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).CountOfRange) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_LCN_WEAK_REFERENCE_RANGE), + "::", + stringify!(CountOfRange), + ), + ); +} +pub type LCN_WEAK_REFERENCE_RANGE = _LCN_WEAK_REFERENCE_RANGE; +pub type PLCN_WEAK_REFERENCE_RANGE = *mut _LCN_WEAK_REFERENCE_RANGE; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER { + pub RangeCount: ULONG, + pub Ranges: [LCN_WEAK_REFERENCE_RANGE; 1usize], +} +#[test] +fn bindgen_test_layout__LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER() { + const UNINIT: ::core::mem::MaybeUninit<_LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::<_LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER>(), + 24usize, + concat!("Size of: ", stringify!(_LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER)), + ); + assert_eq!( + ::core::mem::align_of::<_LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER>(), + 8usize, + concat!("Alignment of ", stringify!(_LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER)), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).RangeCount) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER), + "::", + stringify!(RangeCount), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Ranges) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER), + "::", + stringify!(Ranges), + ), + ); +} +pub type LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER = _LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER; +pub type PLCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER = *mut _LCN_WEAK_REFERENCE_CLEAR_INPUT_BUFFER; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER { + pub Version: ULONG, + pub SetDedupState: BOOLEAN, pub Enable: BOOLEAN, + pub SetWeakRefState: BOOLEAN, + pub EnableWeakRef: BOOLEAN, + pub SetDirtyRangeTrackingState: BOOLEAN, + pub EnableDirtyRangeTracking: BOOLEAN, } #[test] -fn bindgen_test_layout__REFS_SET_VOLUME_DEDUP_INFO_INPUT_BUFFER() { - const UNINIT: ::core::mem::MaybeUninit<_REFS_SET_VOLUME_DEDUP_INFO_INPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); +fn bindgen_test_layout__REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER() { + const UNINIT: ::core::mem::MaybeUninit<_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( - ::core::mem::size_of::<_REFS_SET_VOLUME_DEDUP_INFO_INPUT_BUFFER>(), - 1usize, - concat!("Size of: ", stringify!(_REFS_SET_VOLUME_DEDUP_INFO_INPUT_BUFFER)), + ::core::mem::size_of::<_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER>(), + 12usize, + concat!("Size of: ", stringify!(_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER)), ); assert_eq!( - ::core::mem::align_of::<_REFS_SET_VOLUME_DEDUP_INFO_INPUT_BUFFER>(), - 1usize, - concat!("Alignment of ", stringify!(_REFS_SET_VOLUME_DEDUP_INFO_INPUT_BUFFER)), + ::core::mem::align_of::<_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER>(), + 4usize, + concat!("Alignment of ", stringify!(_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER)), ); assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Enable) as usize - ptr as usize }, + unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", - stringify!(_REFS_SET_VOLUME_DEDUP_INFO_INPUT_BUFFER), + stringify!(_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER), + "::", + stringify!(Version), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).SetDedupState) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER), + "::", + stringify!(SetDedupState), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Enable) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER), "::", stringify!(Enable), ), ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).SetWeakRefState) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER), + "::", + stringify!(SetWeakRefState), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).EnableWeakRef) as usize - ptr as usize }, + 7usize, + concat!( + "Offset of field: ", + stringify!(_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER), + "::", + stringify!(EnableWeakRef), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).SetDirtyRangeTrackingState) as usize + - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER), + "::", + stringify!(SetDirtyRangeTrackingState), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).EnableDirtyRangeTracking) as usize + - ptr as usize + }, + 9usize, + concat!( + "Offset of field: ", + stringify!(_REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER), + "::", + stringify!(EnableDirtyRangeTracking), + ), + ); } -pub type REFS_SET_VOLUME_DEDUP_INFO_INPUT_BUFFER = _REFS_SET_VOLUME_DEDUP_INFO_INPUT_BUFFER; -pub type PREFS_SET_VOLUME_DEDUP_INFO_INPUT_BUFFER = *mut _REFS_SET_VOLUME_DEDUP_INFO_INPUT_BUFFER; +pub type REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER = _REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER; +pub type PREFS_VOLUME_DEDUP_INFO_INPUT_BUFFER = *mut _REFS_VOLUME_DEDUP_INFO_INPUT_BUFFER; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] -pub struct _REFS_QUERY_VOLUME_DEDUP_INFO_OUTPUT_BUFFER { +pub struct _REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER { + pub Version: ULONG, pub Enabled: BOOLEAN, + pub EnabledWeakRef: BOOLEAN, + pub EnabledDirtyRangeTracking: BOOLEAN, + pub IsClustered: BOOLEAN, + pub VolumeIdHash: ULONG, + pub VolumeGuid: GUID, + pub VolumeUniqueGuid: GUID, +} +#[test] +fn bindgen_test_layout__REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER() { + const UNINIT: ::core::mem::MaybeUninit<_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER> = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::<_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER>(), + 44usize, + concat!("Size of: ", stringify!(_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER)), + ); + assert_eq!( + ::core::mem::align_of::<_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER>(), + 4usize, + concat!("Alignment of ", stringify!(_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER)), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER), + "::", + stringify!(Version), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Enabled) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER), + "::", + stringify!(Enabled), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).EnabledWeakRef) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER), + "::", + stringify!(EnabledWeakRef), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).EnabledDirtyRangeTracking) as usize + - ptr as usize + }, + 6usize, + concat!( + "Offset of field: ", + stringify!(_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER), + "::", + stringify!(EnabledDirtyRangeTracking), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).IsClustered) as usize - ptr as usize }, + 7usize, + concat!( + "Offset of field: ", + stringify!(_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER), + "::", + stringify!(IsClustered), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).VolumeIdHash) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER), + "::", + stringify!(VolumeIdHash), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).VolumeGuid) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER), + "::", + stringify!(VolumeGuid), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).VolumeUniqueGuid) as usize - ptr as usize + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(_REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER), + "::", + stringify!(VolumeUniqueGuid), + ), + ); +} +pub type REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER = _REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER; +pub type PREFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER = *mut _REFS_VOLUME_DEDUP_INFO_OUTPUT_BUFFER; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER { + pub Version: ULONG, + pub TotalSharedLcns: ULONGLONG, } #[test] -fn bindgen_test_layout__REFS_QUERY_VOLUME_DEDUP_INFO_OUTPUT_BUFFER() { +fn bindgen_test_layout__REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER() { const UNINIT: ::core::mem::MaybeUninit< - _REFS_QUERY_VOLUME_DEDUP_INFO_OUTPUT_BUFFER, + _REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER, > = ::core::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( - ::core::mem::size_of::<_REFS_QUERY_VOLUME_DEDUP_INFO_OUTPUT_BUFFER>(), - 1usize, - concat!("Size of: ", stringify!(_REFS_QUERY_VOLUME_DEDUP_INFO_OUTPUT_BUFFER)), + ::core::mem::size_of::<_REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER>(), + 16usize, + concat!( + "Size of: ", + stringify!(_REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER), + ), ); assert_eq!( - ::core::mem::align_of::<_REFS_QUERY_VOLUME_DEDUP_INFO_OUTPUT_BUFFER>(), - 1usize, - concat!("Alignment of ", stringify!(_REFS_QUERY_VOLUME_DEDUP_INFO_OUTPUT_BUFFER)), + ::core::mem::align_of::<_REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER>(), + 8usize, + concat!( + "Alignment of ", + stringify!(_REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER), + ), ); assert_eq!( - unsafe { ::core::ptr::addr_of!((*ptr).Enabled) as usize - ptr as usize }, + unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", - stringify!(_REFS_QUERY_VOLUME_DEDUP_INFO_OUTPUT_BUFFER), + stringify!(_REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER), "::", - stringify!(Enabled), + stringify!(Version), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).TotalSharedLcns) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER), + "::", + stringify!(TotalSharedLcns), ), ); } -pub type REFS_QUERY_VOLUME_DEDUP_INFO_OUTPUT_BUFFER = _REFS_QUERY_VOLUME_DEDUP_INFO_OUTPUT_BUFFER; -pub type PREFS_QUERY_VOLUME_DEDUP_INFO_OUTPUT_BUFFER = *mut _REFS_QUERY_VOLUME_DEDUP_INFO_OUTPUT_BUFFER; +pub type REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER = _REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER; +pub type PREFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER = *mut _REFS_QUERY_VOLUME_TOTAL_SHARED_LCNS_OUTPUT_BUFFER; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct _SET_CACHED_RUNS_STATE_INPUT_BUFFER { @@ -181994,28 +184253,35 @@ pub type SET_CACHED_RUNS_STATE_INPUT_BUFFER = _SET_CACHED_RUNS_STATE_INPUT_BUFFE pub type PSET_CACHED_RUNS_STATE_INPUT_BUFFER = *mut _SET_CACHED_RUNS_STATE_INPUT_BUFFER; pub mod _REFS_COMPRESSION_FORMATS { pub type Type = ::core::ffi::c_int; - pub const REFS_COMPRESSION_FORMAT_UNCOMPRESSED: Type = 0; - pub const REFS_COMPRESSION_FORMAT_LZ4: Type = 1; - pub const REFS_COMPRESSION_FORMAT_ZSTD: Type = 2; - pub const REFS_COMPRESSION_FORMAT_MAX: Type = 3; + pub const REFS_COMPRESSION_FORMAT_UNCHANGED: Type = 0; + pub const REFS_COMPRESSION_FORMAT_UNKNOWN: Type = 1; + pub const REFS_COMPRESSION_FORMAT_UNCOMPRESSED: Type = 2; + pub const REFS_COMPRESSION_FORMAT_LZ4: Type = 3; + pub const REFS_COMPRESSION_FORMAT_ZSTD: Type = 4; } pub use self::_REFS_COMPRESSION_FORMATS::Type as REFS_COMPRESSION_FORMATS; pub type PREFS_COMPRESSION_FORMATS = *mut _REFS_COMPRESSION_FORMATS::Type; pub mod _REFS_SET_VOLUME_COMPRESSION_INFO_FLAGS { pub type Type = ::core::ffi::c_int; - pub const REFS_SET_VOLUME_COMPRESSION_INFO_FLAG_COMPRESS_SYNC: Type = 1; - pub const REFS_SET_VOLUME_COMPRESSION_INFO_FLAG_MAX: Type = 1; + pub const REFS_SET_VOLUME_COMPRESSION_INFO_FLAG_START_COMPRESSION: Type = 1; + pub const REFS_SET_VOLUME_COMPRESSION_INFO_FLAG_STOP_COMPRESSION: Type = 2; + pub const REFS_SET_VOLUME_COMPRESSION_INFO_FLAG_GC_ONLY: Type = 4; + pub const REFS_SET_VOLUME_COMPRESSION_INFO_FLAG_MAX: Type = 2; } pub use self::_REFS_SET_VOLUME_COMPRESSION_INFO_FLAGS::Type as REFS_SET_VOLUME_COMPRESSION_INFO_FLAGS; pub type PREFS_SET_VOLUME_COMPRESSION_INFO_FLAGS = *mut _REFS_SET_VOLUME_COMPRESSION_INFO_FLAGS::Type; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER { + pub Version: ULONG, pub CompressionFormat: REFS_COMPRESSION_FORMATS, pub CompressionLevel: SHORT, pub CompressionChunkSizeBytes: ULONG, - pub Flags: REFS_SET_VOLUME_COMPRESSION_INFO_FLAGS, - pub Reserved: [ULONGLONG; 8usize], + pub Flags: ULONG, + pub CompressionTuning: ULONG, + pub RecompressionTuning: ULONG, + pub DecompressionTuning: ULONG, + pub Reserved: [ULONG; 6usize], } #[test] fn bindgen_test_layout__REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER() { @@ -182025,22 +184291,32 @@ fn bindgen_test_layout__REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER() { let ptr = UNINIT.as_ptr(); assert_eq!( ::core::mem::size_of::<_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER>(), - 80usize, + 56usize, concat!("Size of: ", stringify!(_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER)), ); assert_eq!( ::core::mem::align_of::<_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER>(), - 8usize, + 4usize, concat!( "Alignment of ", stringify!(_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER), ), ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER), + "::", + stringify!(Version), + ), + ); assert_eq!( unsafe { ::core::ptr::addr_of!((*ptr).CompressionFormat) as usize - ptr as usize }, - 0usize, + 4usize, concat!( "Offset of field: ", stringify!(_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER), @@ -182052,7 +184328,7 @@ fn bindgen_test_layout__REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER() { unsafe { ::core::ptr::addr_of!((*ptr).CompressionLevel) as usize - ptr as usize }, - 4usize, + 8usize, concat!( "Offset of field: ", stringify!(_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER), @@ -182065,7 +184341,7 @@ fn bindgen_test_layout__REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER() { ::core::ptr::addr_of!((*ptr).CompressionChunkSizeBytes) as usize - ptr as usize }, - 8usize, + 12usize, concat!( "Offset of field: ", stringify!(_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER), @@ -182075,7 +184351,7 @@ fn bindgen_test_layout__REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER() { ); assert_eq!( unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, - 12usize, + 16usize, concat!( "Offset of field: ", stringify!(_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER), @@ -182083,9 +184359,45 @@ fn bindgen_test_layout__REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER() { stringify!(Flags), ), ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).CompressionTuning) as usize - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER), + "::", + stringify!(CompressionTuning), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).RecompressionTuning) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER), + "::", + stringify!(RecompressionTuning), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).DecompressionTuning) as usize - ptr as usize + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER), + "::", + stringify!(DecompressionTuning), + ), + ); assert_eq!( unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 16usize, + 32usize, concat!( "Offset of field: ", stringify!(_REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER), @@ -182105,9 +184417,17 @@ impl Default for _REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER { } pub type REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER = _REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER; pub type PREFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER = *mut _REFS_SET_VOLUME_COMPRESSION_INFO_INPUT_BUFFER; +pub mod _REFS_QUERY_VOLUME_COMPRESSION_INFO_FLAGS { + pub type Type = ::core::ffi::c_int; + pub const REFS_QUERY_VOLUME_COMPRESSION_INFO_FLAGS_RUNNING: Type = 1; + pub const REFS_QUERY_VOLUME_COMPRESSION_INFO_FLAGS_STOPPED: Type = 2; +} +pub use self::_REFS_QUERY_VOLUME_COMPRESSION_INFO_FLAGS::Type as REFS_QUERY_VOLUME_COMPRESSION_INFO_FLAGS; +pub type PREFS_QUERY_VOLUME_COMPRESSION_INFO_FLAGS = *mut _REFS_QUERY_VOLUME_COMPRESSION_INFO_FLAGS::Type; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER { + pub Version: ULONG, pub DefaultCompressionFormat: REFS_COMPRESSION_FORMATS, pub DefaultCompressionLevel: SHORT, pub DefaultCompressionChunkSizeBytes: ULONG, @@ -182117,7 +184437,11 @@ pub struct _REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER { pub TotalCompressibleClustersAllocated: ULONGLONG, pub TotalCompressibleClustersInUse: ULONGLONG, pub TotalCompressedClusters: ULONGLONG, - pub Reserved: [ULONGLONG; 6usize], + pub Flags: ULONG, + pub CompressionTuning: ULONG, + pub RecompressionTuning: ULONG, + pub DecompressionTuning: ULONG, + pub Reserved: [ULONG; 9usize], } #[test] fn bindgen_test_layout__REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER() { @@ -182127,7 +184451,7 @@ fn bindgen_test_layout__REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER() { let ptr = UNINIT.as_ptr(); assert_eq!( ::core::mem::size_of::<_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER>(), - 104usize, + 120usize, concat!( "Size of: ", stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), @@ -182141,12 +184465,22 @@ fn bindgen_test_layout__REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER() { stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), ), ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), + "::", + stringify!(Version), + ), + ); assert_eq!( unsafe { ::core::ptr::addr_of!((*ptr).DefaultCompressionFormat) as usize - ptr as usize }, - 0usize, + 4usize, concat!( "Offset of field: ", stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), @@ -182158,7 +184492,7 @@ fn bindgen_test_layout__REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER() { unsafe { ::core::ptr::addr_of!((*ptr).DefaultCompressionLevel) as usize - ptr as usize }, - 4usize, + 8usize, concat!( "Offset of field: ", stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), @@ -182171,7 +184505,7 @@ fn bindgen_test_layout__REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER() { ::core::ptr::addr_of!((*ptr).DefaultCompressionChunkSizeBytes) as usize - ptr as usize }, - 8usize, + 12usize, concat!( "Offset of field: ", stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), @@ -182183,7 +184517,7 @@ fn bindgen_test_layout__REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER() { unsafe { ::core::ptr::addr_of!((*ptr).VolumeClusterSizeBytes) as usize - ptr as usize }, - 12usize, + 16usize, concat!( "Offset of field: ", stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), @@ -182195,7 +184529,7 @@ fn bindgen_test_layout__REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER() { unsafe { ::core::ptr::addr_of!((*ptr).TotalVolumeClusters) as usize - ptr as usize }, - 16usize, + 24usize, concat!( "Offset of field: ", stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), @@ -182207,7 +184541,7 @@ fn bindgen_test_layout__REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER() { unsafe { ::core::ptr::addr_of!((*ptr).TotalAllocatedClusters) as usize - ptr as usize }, - 24usize, + 32usize, concat!( "Offset of field: ", stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), @@ -182220,7 +184554,7 @@ fn bindgen_test_layout__REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER() { ::core::ptr::addr_of!((*ptr).TotalCompressibleClustersAllocated) as usize - ptr as usize }, - 32usize, + 40usize, concat!( "Offset of field: ", stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), @@ -182233,7 +184567,7 @@ fn bindgen_test_layout__REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER() { ::core::ptr::addr_of!((*ptr).TotalCompressibleClustersInUse) as usize - ptr as usize }, - 40usize, + 48usize, concat!( "Offset of field: ", stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), @@ -182245,7 +184579,7 @@ fn bindgen_test_layout__REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER() { unsafe { ::core::ptr::addr_of!((*ptr).TotalCompressedClusters) as usize - ptr as usize }, - 48usize, + 56usize, concat!( "Offset of field: ", stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), @@ -182253,9 +184587,55 @@ fn bindgen_test_layout__REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER() { stringify!(TotalCompressedClusters), ), ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), + "::", + stringify!(Flags), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).CompressionTuning) as usize - ptr as usize + }, + 68usize, + concat!( + "Offset of field: ", + stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), + "::", + stringify!(CompressionTuning), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).RecompressionTuning) as usize - ptr as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), + "::", + stringify!(RecompressionTuning), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).DecompressionTuning) as usize - ptr as usize + }, + 76usize, + concat!( + "Offset of field: ", + stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), + "::", + stringify!(DecompressionTuning), + ), + ); assert_eq!( unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, - 56usize, + 80usize, concat!( "Offset of field: ", stringify!(_REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER), @@ -182276,6 +184656,712 @@ impl Default for _REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER { pub type REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER = _REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER; pub type PREFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER = *mut _REFS_QUERY_VOLUME_COMPRESSION_INFO_OUTPUT_BUFFER; #[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER { + pub Version: ULONG, + pub GlobalSecondsToTrack: ULONG, + pub MetricsPeriodicitySeconds: ULONG, + pub MetricsGenerationsPerContainer: ULONG, + pub Reserved: [ULONG; 8usize], +} +#[test] +fn bindgen_test_layout__REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER() { + const UNINIT: ::core::mem::MaybeUninit< + _REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER, + > = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::<_REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER>(), + 48usize, + concat!("Size of: ", stringify!(_REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER)), + ); + assert_eq!( + ::core::mem::align_of::<_REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER>(), + 4usize, + concat!( + "Alignment of ", + stringify!(_REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER), + "::", + stringify!(Version), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).GlobalSecondsToTrack) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER), + "::", + stringify!(GlobalSecondsToTrack), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).MetricsPeriodicitySeconds) as usize + - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER), + "::", + stringify!(MetricsPeriodicitySeconds), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).MetricsGenerationsPerContainer) as usize + - ptr as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(_REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER), + "::", + stringify!(MetricsGenerationsPerContainer), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER), + "::", + stringify!(Reserved), + ), + ); +} +pub type REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER = _REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER; +pub type PREFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER = *mut _REFS_SET_VOLUME_IO_METRICS_INFO_INPUT_BUFFER; +pub mod _REFS_QUERY_VOLUME_IO_METRICS_INFO_QUERY_TYPE { + pub type Type = ::core::ffi::c_int; + pub const REFS_QUERY_VOLUME_IO_METRICS_INFO_QUERY_TYPE_PARAMETERS: Type = 1; + pub const REFS_QUERY_VOLUME_IO_METRICS_INFO_QUERY_TYPE_METRICS_DATA: Type = 2; +} +pub use self::_REFS_QUERY_VOLUME_IO_METRICS_INFO_QUERY_TYPE::Type as REFS_QUERY_VOLUME_IO_METRICS_INFO_QUERY_TYPE; +pub type PREFS_QUERY_VOLUME_IO_METRICS_INFO_QUERY_TYPE = *mut _REFS_QUERY_VOLUME_IO_METRICS_INFO_QUERY_TYPE::Type; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER { + pub Version: ULONG, + pub QueryType: REFS_QUERY_VOLUME_IO_METRICS_INFO_QUERY_TYPE, + pub Reserved: [ULONG; 6usize], + pub __bindgen_anon_1: _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1 { + pub UnusedAlign: ULONGLONG, + pub Parameters: _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_1, + pub MetricsData: _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_1 { + pub Reserved: [ULONG; 6usize], +} +#[test] +fn bindgen_test_layout__REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::core::mem::MaybeUninit< + _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_1, + > = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::< + _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_1, + >(), + 24usize, + concat!( + "Size of: ", + stringify!( + _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_1 + ), + ), + ); + assert_eq!( + ::core::mem::align_of::< + _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_1, + >(), + 4usize, + concat!( + "Alignment of ", + stringify!( + _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_1 + ), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!( + _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_1 + ), + "::", + stringify!(Reserved), + ), + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 { + pub ResumeKeyBlob: [ULONGLONG; 2usize], + pub Reserved: [ULONG; 6usize], +} +#[test] +fn bindgen_test_layout__REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::core::mem::MaybeUninit< + _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_2, + > = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::< + _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_2, + >(), + 40usize, + concat!( + "Size of: ", + stringify!( + _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 + ), + ), + ); + assert_eq!( + ::core::mem::align_of::< + _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_2, + >(), + 8usize, + concat!( + "Alignment of ", + stringify!( + _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 + ), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ResumeKeyBlob) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!( + _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 + ), + "::", + stringify!(ResumeKeyBlob), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!( + _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 + ), + "::", + stringify!(Reserved), + ), + ); +} +#[test] +fn bindgen_test_layout__REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1() { + const UNINIT: ::core::mem::MaybeUninit< + _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1, + > = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::< + _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1, + >(), + 40usize, + concat!( + "Size of: ", + stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1), + ), + ); + assert_eq!( + ::core::mem::align_of::< + _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1, + >(), + 8usize, + concat!( + "Alignment of ", + stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).UnusedAlign) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1), + "::", + stringify!(UnusedAlign), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Parameters) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1), + "::", + stringify!(Parameters), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).MetricsData) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1), + "::", + stringify!(MetricsData), + ), + ); +} +impl Default for _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[test] +fn bindgen_test_layout__REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER() { + const UNINIT: ::core::mem::MaybeUninit< + _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER, + > = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::<_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER>(), + 72usize, + concat!("Size of: ", stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER)), + ); + assert_eq!( + ::core::mem::align_of::<_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER>(), + 8usize, + concat!( + "Alignment of ", + stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER), + "::", + stringify!(Version), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).QueryType) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER), + "::", + stringify!(QueryType), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER), + "::", + stringify!(Reserved), + ), + ); +} +impl Default for _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER = _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER; +pub type PREFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER = *mut _REFS_QUERY_VOLUME_IO_METRICS_INFO_INPUT_BUFFER; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA { + pub PlaceHolder: ULONGLONG, +} +#[test] +fn bindgen_test_layout__REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA() { + const UNINIT: ::core::mem::MaybeUninit<_REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA> = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::<_REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA>(), + 8usize, + concat!("Size of: ", stringify!(_REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA)), + ); + assert_eq!( + ::core::mem::align_of::<_REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA>(), + 8usize, + concat!("Alignment of ", stringify!(_REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA)), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).PlaceHolder) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA), + "::", + stringify!(PlaceHolder), + ), + ); +} +pub type REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA = _REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA; +pub type PREFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA = *mut _REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER { + pub Version: ULONG, + pub QueryType: REFS_QUERY_VOLUME_IO_METRICS_INFO_QUERY_TYPE, + pub Reserved: [ULONG; 6usize], + pub __bindgen_anon_1: _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1 { + pub UnusedAlign: ULONGLONG, + pub Parameters: _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1, + pub MetricsData: _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1 { + pub GlobalSecondsToTrack: ULONG, + pub MetricsPeriodicitySeconds: ULONG, + pub MetricsGenerationsPerContainer: ULONG, + pub Reserved: [ULONG; 6usize], +} +#[test] +fn bindgen_test_layout__REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::core::mem::MaybeUninit< + _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1, + > = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::< + _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1, + >(), + 36usize, + concat!( + "Size of: ", + stringify!( + _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1 + ), + ), + ); + assert_eq!( + ::core::mem::align_of::< + _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1, + >(), + 4usize, + concat!( + "Alignment of ", + stringify!( + _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1 + ), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).GlobalSecondsToTrack) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!( + _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1 + ), + "::", + stringify!(GlobalSecondsToTrack), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).MetricsPeriodicitySeconds) as usize + - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!( + _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1 + ), + "::", + stringify!(MetricsPeriodicitySeconds), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).MetricsGenerationsPerContainer) as usize + - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!( + _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1 + ), + "::", + stringify!(MetricsGenerationsPerContainer), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!( + _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_1 + ), + "::", + stringify!(Reserved), + ), + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 { + pub EntryCount: ULONG, + pub ResumeKeyBlob: [ULONGLONG; 2usize], + pub Reserved: [ULONG; 6usize], + pub Metrics: [REFS_QUERY_VOLUME_IO_METRICS_METRICS_DATA; 1usize], +} +#[test] +fn bindgen_test_layout__REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::core::mem::MaybeUninit< + _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2, + > = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::< + _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2, + >(), + 56usize, + concat!( + "Size of: ", + stringify!( + _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 + ), + ), + ); + assert_eq!( + ::core::mem::align_of::< + _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2, + >(), + 8usize, + concat!( + "Alignment of ", + stringify!( + _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 + ), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).EntryCount) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!( + _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 + ), + "::", + stringify!(EntryCount), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).ResumeKeyBlob) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!( + _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 + ), + "::", + stringify!(ResumeKeyBlob), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!( + _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 + ), + "::", + stringify!(Reserved), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Metrics) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!( + _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1__bindgen_ty_2 + ), + "::", + stringify!(Metrics), + ), + ); +} +#[test] +fn bindgen_test_layout__REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1() { + const UNINIT: ::core::mem::MaybeUninit< + _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1, + > = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::< + _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1, + >(), + 56usize, + concat!( + "Size of: ", + stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1), + ), + ); + assert_eq!( + ::core::mem::align_of::< + _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1, + >(), + 8usize, + concat!( + "Alignment of ", + stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).UnusedAlign) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1), + "::", + stringify!(UnusedAlign), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Parameters) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1), + "::", + stringify!(Parameters), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).MetricsData) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1), + "::", + stringify!(MetricsData), + ), + ); +} +impl Default for _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[test] +fn bindgen_test_layout__REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER() { + const UNINIT: ::core::mem::MaybeUninit< + _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER, + > = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::<_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER>(), + 88usize, + concat!( + "Size of: ", + stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER), + ), + ); + assert_eq!( + ::core::mem::align_of::<_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER>(), + 8usize, + concat!( + "Alignment of ", + stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Version) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER), + "::", + stringify!(Version), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).QueryType) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER), + "::", + stringify!(QueryType), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).Reserved) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER), + "::", + stringify!(Reserved), + ), + ); +} +impl Default for _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER { + fn default() -> Self { + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER = _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER; +pub type PREFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER = *mut _REFS_QUERY_VOLUME_IO_METRICS_INFO_OUTPUT_BUFFER; +#[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _FILE_STORAGE_RESERVE_ID_INFORMATION { pub StorageReserveId: STORAGE_RESERVE_ID, @@ -190902,6 +193988,209 @@ fn bindgen_test_layout__SEC_CHANNEL_BINDINGS() { } pub type SEC_CHANNEL_BINDINGS = _SEC_CHANNEL_BINDINGS; pub type PSEC_CHANNEL_BINDINGS = *mut _SEC_CHANNEL_BINDINGS; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _SEC_CHANNEL_BINDINGS_EX { + pub magicNumber: ::core::ffi::c_ulong, + pub flags: ::core::ffi::c_ulong, + pub cbHeaderLength: ::core::ffi::c_ulong, + pub cbStructureLength: ::core::ffi::c_ulong, + pub dwInitiatorAddrType: ::core::ffi::c_ulong, + pub cbInitiatorLength: ::core::ffi::c_ulong, + pub dwInitiatorOffset: ::core::ffi::c_ulong, + pub dwAcceptorAddrType: ::core::ffi::c_ulong, + pub cbAcceptorLength: ::core::ffi::c_ulong, + pub dwAcceptorOffset: ::core::ffi::c_ulong, + pub cbApplicationDataLength: ::core::ffi::c_ulong, + pub dwApplicationDataOffset: ::core::ffi::c_ulong, +} +#[test] +fn bindgen_test_layout__SEC_CHANNEL_BINDINGS_EX() { + const UNINIT: ::core::mem::MaybeUninit<_SEC_CHANNEL_BINDINGS_EX> = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::<_SEC_CHANNEL_BINDINGS_EX>(), + 48usize, + concat!("Size of: ", stringify!(_SEC_CHANNEL_BINDINGS_EX)), + ); + assert_eq!( + ::core::mem::align_of::<_SEC_CHANNEL_BINDINGS_EX>(), + 4usize, + concat!("Alignment of ", stringify!(_SEC_CHANNEL_BINDINGS_EX)), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).magicNumber) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_SEC_CHANNEL_BINDINGS_EX), + "::", + stringify!(magicNumber), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_SEC_CHANNEL_BINDINGS_EX), + "::", + stringify!(flags), + ), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).cbHeaderLength) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_SEC_CHANNEL_BINDINGS_EX), + "::", + stringify!(cbHeaderLength), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).cbStructureLength) as usize - ptr as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(_SEC_CHANNEL_BINDINGS_EX), + "::", + stringify!(cbStructureLength), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).dwInitiatorAddrType) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_SEC_CHANNEL_BINDINGS_EX), + "::", + stringify!(dwInitiatorAddrType), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).cbInitiatorLength) as usize - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(_SEC_CHANNEL_BINDINGS_EX), + "::", + stringify!(cbInitiatorLength), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).dwInitiatorOffset) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_SEC_CHANNEL_BINDINGS_EX), + "::", + stringify!(dwInitiatorOffset), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).dwAcceptorAddrType) as usize - ptr as usize + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(_SEC_CHANNEL_BINDINGS_EX), + "::", + stringify!(dwAcceptorAddrType), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).cbAcceptorLength) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_SEC_CHANNEL_BINDINGS_EX), + "::", + stringify!(cbAcceptorLength), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).dwAcceptorOffset) as usize - ptr as usize + }, + 36usize, + concat!( + "Offset of field: ", + stringify!(_SEC_CHANNEL_BINDINGS_EX), + "::", + stringify!(dwAcceptorOffset), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).cbApplicationDataLength) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_SEC_CHANNEL_BINDINGS_EX), + "::", + stringify!(cbApplicationDataLength), + ), + ); + assert_eq!( + unsafe { + ::core::ptr::addr_of!((*ptr).dwApplicationDataOffset) as usize - ptr as usize + }, + 44usize, + concat!( + "Offset of field: ", + stringify!(_SEC_CHANNEL_BINDINGS_EX), + "::", + stringify!(dwApplicationDataOffset), + ), + ); +} +pub type SEC_CHANNEL_BINDINGS_EX = _SEC_CHANNEL_BINDINGS_EX; +pub type PSEC_CHANNEL_BINDINGS_EX = *mut _SEC_CHANNEL_BINDINGS_EX; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct _SEC_CHANNEL_BINDINGS_RESULT { + pub flags: ::core::ffi::c_ulong, +} +#[test] +fn bindgen_test_layout__SEC_CHANNEL_BINDINGS_RESULT() { + const UNINIT: ::core::mem::MaybeUninit<_SEC_CHANNEL_BINDINGS_RESULT> = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::<_SEC_CHANNEL_BINDINGS_RESULT>(), + 4usize, + concat!("Size of: ", stringify!(_SEC_CHANNEL_BINDINGS_RESULT)), + ); + assert_eq!( + ::core::mem::align_of::<_SEC_CHANNEL_BINDINGS_RESULT>(), + 4usize, + concat!("Alignment of ", stringify!(_SEC_CHANNEL_BINDINGS_RESULT)), + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_SEC_CHANNEL_BINDINGS_RESULT), + "::", + stringify!(flags), + ), + ); +} +pub type SEC_CHANNEL_BINDINGS_RESULT = _SEC_CHANNEL_BINDINGS_RESULT; +pub type PSEC_CHANNEL_BINDINGS_RESULT = *mut _SEC_CHANNEL_BINDINGS_RESULT; pub mod _SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT { pub type Type = ::core::ffi::c_int; pub const SecApplicationProtocolNegotiationExt_None: Type = 0; diff --git a/crates/wdk-sys/generated_bindings/wdf.rs b/crates/wdk-sys/generated_bindings/wdf.rs index 84321fbed..adfb1c3fe 100644 --- a/crates/wdk-sys/generated_bindings/wdf.rs +++ b/crates/wdk-sys/generated_bindings/wdf.rs @@ -8,3 +8,2726 @@ extern "C" { Message: PSTR, ); } +extern "C" { + pub fn WdfVerifierDbgBreakPoint(); +} +extern "C" { + pub fn WdfVerifierKeBugCheck( + BugCheckCode: ULONG, + BugCheckParameter1: ULONG_PTR, + BugCheckParameter2: ULONG_PTR, + BugCheckParameter3: ULONG_PTR, + BugCheckParameter4: ULONG_PTR, + ); +} +extern "C" { + pub fn WdfGetTriageInfo() -> PVOID; +} +extern "C" { + pub fn WDF_OBJECT_ATTRIBUTES_INIT(Attributes: PWDF_OBJECT_ATTRIBUTES); +} +extern "C" { + pub fn WdfObjectGetTypedContextWorker( + Handle: WDFOBJECT, + TypeInfo: PCWDF_OBJECT_CONTEXT_TYPE_INFO, + ) -> PVOID; +} +extern "C" { + #[must_use] + pub fn WdfObjectAllocateContext( + Handle: WDFOBJECT, + ContextAttributes: PWDF_OBJECT_ATTRIBUTES, + Context: *mut PVOID, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfObjectContextGetObject(ContextPointer: PVOID) -> WDFOBJECT; +} +extern "C" { + pub fn WdfObjectReferenceActual( + Handle: WDFOBJECT, + Tag: PVOID, + Line: LONG, + File: PCCH, + ); +} +extern "C" { + pub fn WdfObjectDereferenceActual( + Handle: WDFOBJECT, + Tag: PVOID, + Line: LONG, + File: PCCH, + ); +} +extern "C" { + #[must_use] + pub fn WdfObjectCreate( + Attributes: PWDF_OBJECT_ATTRIBUTES, + Object: *mut WDFOBJECT, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfObjectDelete(Object: WDFOBJECT); +} +extern "C" { + #[must_use] + pub fn WdfObjectQuery( + Object: WDFOBJECT, + Guid: *const GUID, + QueryBufferLength: ULONG, + QueryBuffer: PVOID, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfObjectAcquireLock(Object: WDFOBJECT); +} +extern "C" { + pub fn WdfObjectReleaseLock(Object: WDFOBJECT); +} +extern "C" { + #[must_use] + pub fn WdfWaitLockCreate( + LockAttributes: PWDF_OBJECT_ATTRIBUTES, + Lock: *mut WDFWAITLOCK, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfWaitLockAcquire(Lock: WDFWAITLOCK, Timeout: PLONGLONG) -> NTSTATUS; +} +extern "C" { + pub fn WdfWaitLockRelease(Lock: WDFWAITLOCK); +} +extern "C" { + #[must_use] + pub fn WdfSpinLockCreate( + SpinLockAttributes: PWDF_OBJECT_ATTRIBUTES, + SpinLock: *mut WDFSPINLOCK, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfSpinLockAcquire(SpinLock: WDFSPINLOCK); +} +extern "C" { + pub fn WdfSpinLockRelease(SpinLock: WDFSPINLOCK); +} +extern "C" { + pub fn WDF_REL_TIMEOUT_IN_SEC(Time: ULONGLONG) -> LONGLONG; +} +extern "C" { + pub fn WDF_ABS_TIMEOUT_IN_SEC(Time: ULONGLONG) -> LONGLONG; +} +extern "C" { + pub fn WDF_REL_TIMEOUT_IN_MS(Time: ULONGLONG) -> LONGLONG; +} +extern "C" { + pub fn WDF_ABS_TIMEOUT_IN_MS(Time: ULONGLONG) -> LONGLONG; +} +extern "C" { + pub fn WDF_REL_TIMEOUT_IN_US(Time: ULONGLONG) -> LONGLONG; +} +extern "C" { + pub fn WDF_ABS_TIMEOUT_IN_US(Time: ULONGLONG) -> LONGLONG; +} +extern "C" { + pub fn WDF_ALIGN_SIZE_DOWN(Length: usize, AlignTo: usize) -> usize; +} +extern "C" { + pub fn WDF_ALIGN_SIZE_UP(Length: usize, AlignTo: usize) -> usize; +} +extern "C" { + pub fn WDF_DRIVER_CONFIG_INIT( + Config: PWDF_DRIVER_CONFIG, + EvtDriverDeviceAdd: PFN_WDF_DRIVER_DEVICE_ADD, + ); +} +extern "C" { + pub fn WDF_DRIVER_VERSION_AVAILABLE_PARAMS_INIT( + Params: PWDF_DRIVER_VERSION_AVAILABLE_PARAMS, + MajorVersion: ULONG, + MinorVersion: ULONG, + ); +} +extern "C" { + pub fn WdfGetDriver() -> WDFDRIVER; +} +extern "C" { + #[must_use] + pub fn WdfDriverCreate( + DriverObject: PDRIVER_OBJECT, + RegistryPath: PCUNICODE_STRING, + DriverAttributes: PWDF_OBJECT_ATTRIBUTES, + DriverConfig: PWDF_DRIVER_CONFIG, + Driver: *mut WDFDRIVER, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfDriverGetRegistryPath(Driver: WDFDRIVER) -> PWSTR; +} +extern "C" { + pub fn WdfDriverWdmGetDriverObject(Driver: WDFDRIVER) -> PDRIVER_OBJECT; +} +extern "C" { + #[must_use] + pub fn WdfDriverOpenParametersRegistryKey( + Driver: WDFDRIVER, + DesiredAccess: ACCESS_MASK, + KeyAttributes: PWDF_OBJECT_ATTRIBUTES, + Key: *mut WDFKEY, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfWdmDriverGetWdfDriverHandle(DriverObject: PDRIVER_OBJECT) -> WDFDRIVER; +} +extern "C" { + #[must_use] + pub fn WdfDriverRegisterTraceInfo( + DriverObject: PDRIVER_OBJECT, + EvtTraceCallback: PFN_WDF_TRACE_CALLBACK, + ControlBlock: PVOID, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDriverRetrieveVersionString( + Driver: WDFDRIVER, + String: WDFSTRING, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfDriverIsVersionAvailable( + Driver: WDFDRIVER, + VersionAvailableParams: PWDF_DRIVER_VERSION_AVAILABLE_PARAMS, + ) -> BOOLEAN; +} +extern "C" { + #[must_use] + pub fn WdfDriverErrorReportApiMissing( + Driver: WDFDRIVER, + FrameworkExtensionName: PCWSTR, + ApiIndex: ULONG, + DoesApiReturnNtstatus: BOOLEAN, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDriverOpenPersistentStateRegistryKey( + Driver: WDFDRIVER, + DesiredAccess: ACCESS_MASK, + KeyAttributes: PWDF_OBJECT_ATTRIBUTES, + Key: *mut WDFKEY, + ) -> NTSTATUS; +} +extern "C" { + pub fn WDF_QUERY_INTERFACE_CONFIG_INIT( + InterfaceConfig: PWDF_QUERY_INTERFACE_CONFIG, + Interface: PINTERFACE, + InterfaceType: *const GUID, + EvtDeviceProcessQueryInterfaceRequest: PFN_WDF_DEVICE_PROCESS_QUERY_INTERFACE_REQUEST, + ); +} +extern "C" { + #[must_use] + pub fn WdfDeviceAddQueryInterface( + Device: WDFDEVICE, + InterfaceConfig: PWDF_QUERY_INTERFACE_CONFIG, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfDeviceInterfaceReferenceNoOp(Context: PVOID); +} +extern "C" { + pub fn WdfDeviceInterfaceDereferenceNoOp(Context: PVOID); +} +extern "C" { + pub fn WDF_MEMORY_DESCRIPTOR_INIT_BUFFER( + Descriptor: PWDF_MEMORY_DESCRIPTOR, + Buffer: PVOID, + BufferLength: ULONG, + ); +} +extern "C" { + pub fn WDF_MEMORY_DESCRIPTOR_INIT_HANDLE( + Descriptor: PWDF_MEMORY_DESCRIPTOR, + Memory: WDFMEMORY, + Offsets: PWDFMEMORY_OFFSET, + ); +} +extern "C" { + pub fn WDF_MEMORY_DESCRIPTOR_INIT_MDL( + Descriptor: PWDF_MEMORY_DESCRIPTOR, + Mdl: PMDL, + BufferLength: ULONG, + ); +} +extern "C" { + #[must_use] + pub fn WdfMemoryCreate( + Attributes: PWDF_OBJECT_ATTRIBUTES, + PoolType: POOL_TYPE, + PoolTag: ULONG, + BufferSize: usize, + Memory: *mut WDFMEMORY, + Buffer: *mut PVOID, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfMemoryCreatePreallocated( + Attributes: PWDF_OBJECT_ATTRIBUTES, + Buffer: PVOID, + BufferSize: usize, + Memory: *mut WDFMEMORY, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfMemoryGetBuffer(Memory: WDFMEMORY, BufferSize: *mut usize) -> PVOID; +} +extern "C" { + #[must_use] + pub fn WdfMemoryAssignBuffer( + Memory: WDFMEMORY, + Buffer: PVOID, + BufferSize: usize, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfMemoryCopyToBuffer( + SourceMemory: WDFMEMORY, + SourceOffset: usize, + Buffer: PVOID, + NumBytesToCopyTo: usize, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfMemoryCopyFromBuffer( + DestinationMemory: WDFMEMORY, + DestinationOffset: usize, + Buffer: PVOID, + NumBytesToCopyFrom: usize, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfLookasideListCreate( + LookasideAttributes: PWDF_OBJECT_ATTRIBUTES, + BufferSize: usize, + PoolType: POOL_TYPE, + MemoryAttributes: PWDF_OBJECT_ATTRIBUTES, + PoolTag: ULONG, + Lookaside: *mut WDFLOOKASIDE, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfMemoryCreateFromLookaside( + Lookaside: WDFLOOKASIDE, + Memory: *mut WDFMEMORY, + ) -> NTSTATUS; +} +extern "C" { + pub fn WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER_INIT( + Header: PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER, + IdentificationDescriptionSize: ULONG, + ); +} +extern "C" { + pub fn WDF_CHILD_ADDRESS_DESCRIPTION_HEADER_INIT( + Header: PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER, + AddressDescriptionSize: ULONG, + ); +} +extern "C" { + pub fn WDF_CHILD_RETRIEVE_INFO_INIT( + Info: PWDF_CHILD_RETRIEVE_INFO, + IdentificationDescription: PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER, + ); +} +extern "C" { + pub fn WDF_CHILD_LIST_CONFIG_INIT( + Config: PWDF_CHILD_LIST_CONFIG, + IdentificationDescriptionSize: ULONG, + EvtChildListCreateDevice: PFN_WDF_CHILD_LIST_CREATE_DEVICE, + ); +} +extern "C" { + pub fn WDF_CHILD_LIST_ITERATOR_INIT( + Iterator: PWDF_CHILD_LIST_ITERATOR, + Flags: ULONG, + ); +} +extern "C" { + #[must_use] + pub fn WdfChildListCreate( + Device: WDFDEVICE, + Config: PWDF_CHILD_LIST_CONFIG, + ChildListAttributes: PWDF_OBJECT_ATTRIBUTES, + ChildList: *mut WDFCHILDLIST, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfChildListGetDevice(ChildList: WDFCHILDLIST) -> WDFDEVICE; +} +extern "C" { + pub fn WdfChildListRetrievePdo( + ChildList: WDFCHILDLIST, + RetrieveInfo: PWDF_CHILD_RETRIEVE_INFO, + ) -> WDFDEVICE; +} +extern "C" { + #[must_use] + pub fn WdfChildListRetrieveAddressDescription( + ChildList: WDFCHILDLIST, + IdentificationDescription: PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER, + AddressDescription: PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfChildListBeginScan(ChildList: WDFCHILDLIST); +} +extern "C" { + pub fn WdfChildListEndScan(ChildList: WDFCHILDLIST); +} +extern "C" { + pub fn WdfChildListBeginIteration( + ChildList: WDFCHILDLIST, + Iterator: PWDF_CHILD_LIST_ITERATOR, + ); +} +extern "C" { + #[must_use] + pub fn WdfChildListRetrieveNextDevice( + ChildList: WDFCHILDLIST, + Iterator: PWDF_CHILD_LIST_ITERATOR, + Device: *mut WDFDEVICE, + Info: PWDF_CHILD_RETRIEVE_INFO, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfChildListEndIteration( + ChildList: WDFCHILDLIST, + Iterator: PWDF_CHILD_LIST_ITERATOR, + ); +} +extern "C" { + #[must_use] + pub fn WdfChildListAddOrUpdateChildDescriptionAsPresent( + ChildList: WDFCHILDLIST, + IdentificationDescription: PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER, + AddressDescription: PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfChildListUpdateChildDescriptionAsMissing( + ChildList: WDFCHILDLIST, + IdentificationDescription: PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfChildListUpdateAllChildDescriptionsAsPresent(ChildList: WDFCHILDLIST); +} +extern "C" { + pub fn WdfChildListRequestChildEject( + ChildList: WDFCHILDLIST, + IdentificationDescription: PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER, + ) -> BOOLEAN; +} +extern "C" { + pub fn WdfFileObjectGetFileName(FileObject: WDFFILEOBJECT) -> PUNICODE_STRING; +} +extern "C" { + pub fn WdfFileObjectGetFlags(FileObject: WDFFILEOBJECT) -> ULONG; +} +extern "C" { + pub fn WdfFileObjectGetDevice(FileObject: WDFFILEOBJECT) -> WDFDEVICE; +} +extern "C" { + pub fn WdfFileObjectGetInitiatorProcessId(FileObject: WDFFILEOBJECT) -> ULONG; +} +extern "C" { + pub fn WdfFileObjectWdmGetFileObject(FileObject: WDFFILEOBJECT) -> PFILE_OBJECT; +} +extern "C" { + pub fn WDF_FILEOBJECT_CONFIG_INIT( + FileEventCallbacks: PWDF_FILEOBJECT_CONFIG, + EvtDeviceFileCreate: PFN_WDF_DEVICE_FILE_CREATE, + EvtFileClose: PFN_WDF_FILE_CLOSE, + EvtFileCleanup: PFN_WDF_FILE_CLEANUP, + ); +} +extern "C" { + pub fn WDF_POWER_POLICY_EVENT_CALLBACKS_INIT( + Callbacks: PWDF_POWER_POLICY_EVENT_CALLBACKS, + ); +} +extern "C" { + pub fn WDF_PNPPOWER_EVENT_CALLBACKS_INIT(Callbacks: PWDF_PNPPOWER_EVENT_CALLBACKS); +} +extern "C" { + pub fn WdfDevStateNormalize(State: ULONG) -> ULONG; +} +extern "C" { + pub fn WdfDevStateIsNP(State: ULONG) -> BOOLEAN; +} +extern "C" { + pub fn WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_INIT( + Settings: PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS, + IdleCaps: WDF_POWER_POLICY_S0_IDLE_CAPABILITIES, + ); +} +extern "C" { + pub fn WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS_INIT( + Settings: PWDF_DEVICE_POWER_POLICY_WAKE_SETTINGS, + ); +} +extern "C" { + pub fn WDF_DEVICE_STATE_INIT(PnpDeviceState: PWDF_DEVICE_STATE); +} +extern "C" { + pub fn WDF_DEVICE_PNP_CAPABILITIES_INIT(Caps: PWDF_DEVICE_PNP_CAPABILITIES); +} +extern "C" { + pub fn WDF_DEVICE_POWER_CAPABILITIES_INIT(Caps: PWDF_DEVICE_POWER_CAPABILITIES); +} +extern "C" { + pub fn WDF_REMOVE_LOCK_OPTIONS_INIT( + RemoveLockOptions: PWDF_REMOVE_LOCK_OPTIONS, + Flags: ULONG, + ); +} +extern "C" { + pub fn WDF_POWER_FRAMEWORK_SETTINGS_INIT( + PowerFrameworkSettings: PWDF_POWER_FRAMEWORK_SETTINGS, + ); +} +extern "C" { + pub fn WDF_IO_TYPE_CONFIG_INIT(IoTypeConfig: PWDF_IO_TYPE_CONFIG); +} +extern "C" { + pub fn WDF_DEVICE_PROPERTY_DATA_INIT( + PropertyData: PWDF_DEVICE_PROPERTY_DATA, + PropertyKey: *const DEVPROPKEY, + ); +} +extern "C" { + pub fn WdfDeviceGetDeviceState(Device: WDFDEVICE, DeviceState: PWDF_DEVICE_STATE); +} +extern "C" { + pub fn WdfDeviceSetDeviceState(Device: WDFDEVICE, DeviceState: PWDF_DEVICE_STATE); +} +extern "C" { + pub fn WdfWdmDeviceGetWdfDeviceHandle(DeviceObject: PDEVICE_OBJECT) -> WDFDEVICE; +} +extern "C" { + pub fn WdfDeviceWdmGetDeviceObject(Device: WDFDEVICE) -> PDEVICE_OBJECT; +} +extern "C" { + pub fn WdfDeviceWdmGetAttachedDevice(Device: WDFDEVICE) -> PDEVICE_OBJECT; +} +extern "C" { + pub fn WdfDeviceWdmGetPhysicalDevice(Device: WDFDEVICE) -> PDEVICE_OBJECT; +} +extern "C" { + #[must_use] + pub fn WdfDeviceWdmDispatchPreprocessedIrp(Device: WDFDEVICE, Irp: PIRP) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDeviceWdmDispatchIrp( + Device: WDFDEVICE, + Irp: PIRP, + DispatchContext: WDFCONTEXT, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDeviceWdmDispatchIrpToIoQueue( + Device: WDFDEVICE, + Irp: PIRP, + Queue: WDFQUEUE, + Flags: ULONG, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDeviceAddDependentUsageDeviceObject( + Device: WDFDEVICE, + DependentDevice: PDEVICE_OBJECT, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfDeviceRemoveDependentUsageDeviceObject( + Device: WDFDEVICE, + DependentDevice: PDEVICE_OBJECT, + ); +} +extern "C" { + #[must_use] + pub fn WdfDeviceAddRemovalRelationsPhysicalDevice( + Device: WDFDEVICE, + PhysicalDevice: PDEVICE_OBJECT, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfDeviceRemoveRemovalRelationsPhysicalDevice( + Device: WDFDEVICE, + PhysicalDevice: PDEVICE_OBJECT, + ); +} +extern "C" { + pub fn WdfDeviceClearRemovalRelationsDevices(Device: WDFDEVICE); +} +extern "C" { + pub fn WdfDeviceGetDriver(Device: WDFDEVICE) -> WDFDRIVER; +} +extern "C" { + #[must_use] + pub fn WdfDeviceRetrieveDeviceName(Device: WDFDEVICE, String: WDFSTRING) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDeviceAssignMofResourceName( + Device: WDFDEVICE, + MofResourceName: PCUNICODE_STRING, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfDeviceGetIoTarget(Device: WDFDEVICE) -> WDFIOTARGET; +} +extern "C" { + pub fn WdfDeviceGetDevicePnpState(Device: WDFDEVICE) -> WDF_DEVICE_PNP_STATE; +} +extern "C" { + pub fn WdfDeviceGetDevicePowerState(Device: WDFDEVICE) -> WDF_DEVICE_POWER_STATE; +} +extern "C" { + pub fn WdfDeviceGetDevicePowerPolicyState( + Device: WDFDEVICE, + ) -> WDF_DEVICE_POWER_POLICY_STATE; +} +extern "C" { + #[must_use] + pub fn WdfDeviceAssignS0IdleSettings( + Device: WDFDEVICE, + Settings: PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDeviceAssignSxWakeSettings( + Device: WDFDEVICE, + Settings: PWDF_DEVICE_POWER_POLICY_WAKE_SETTINGS, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDeviceOpenRegistryKey( + Device: WDFDEVICE, + DeviceInstanceKeyType: ULONG, + DesiredAccess: ACCESS_MASK, + KeyAttributes: PWDF_OBJECT_ATTRIBUTES, + Key: *mut WDFKEY, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDeviceOpenDevicemapKey( + Device: WDFDEVICE, + KeyName: PCUNICODE_STRING, + DesiredAccess: ACCESS_MASK, + KeyAttributes: PWDF_OBJECT_ATTRIBUTES, + Key: *mut WDFKEY, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfDeviceSetSpecialFileSupport( + Device: WDFDEVICE, + FileType: WDF_SPECIAL_FILE_TYPE, + FileTypeIsSupported: BOOLEAN, + ); +} +extern "C" { + pub fn WdfDeviceSetCharacteristics(Device: WDFDEVICE, DeviceCharacteristics: ULONG); +} +extern "C" { + pub fn WdfDeviceGetCharacteristics(Device: WDFDEVICE) -> ULONG; +} +extern "C" { + pub fn WdfDeviceGetAlignmentRequirement(Device: WDFDEVICE) -> ULONG; +} +extern "C" { + pub fn WdfDeviceSetAlignmentRequirement( + Device: WDFDEVICE, + AlignmentRequirement: ULONG, + ); +} +extern "C" { + pub fn WdfDeviceInitFree(DeviceInit: PWDFDEVICE_INIT); +} +extern "C" { + pub fn WdfDeviceInitSetPnpPowerEventCallbacks( + DeviceInit: PWDFDEVICE_INIT, + PnpPowerEventCallbacks: PWDF_PNPPOWER_EVENT_CALLBACKS, + ); +} +extern "C" { + pub fn WdfDeviceInitSetPowerPolicyEventCallbacks( + DeviceInit: PWDFDEVICE_INIT, + PowerPolicyEventCallbacks: PWDF_POWER_POLICY_EVENT_CALLBACKS, + ); +} +extern "C" { + pub fn WdfDeviceInitSetPowerPolicyOwnership( + DeviceInit: PWDFDEVICE_INIT, + IsPowerPolicyOwner: BOOLEAN, + ); +} +extern "C" { + #[must_use] + pub fn WdfDeviceInitRegisterPnpStateChangeCallback( + DeviceInit: PWDFDEVICE_INIT, + PnpState: WDF_DEVICE_PNP_STATE, + EvtDevicePnpStateChange: PFN_WDF_DEVICE_PNP_STATE_CHANGE_NOTIFICATION, + CallbackTypes: ULONG, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDeviceInitRegisterPowerStateChangeCallback( + DeviceInit: PWDFDEVICE_INIT, + PowerState: WDF_DEVICE_POWER_STATE, + EvtDevicePowerStateChange: PFN_WDF_DEVICE_POWER_STATE_CHANGE_NOTIFICATION, + CallbackTypes: ULONG, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDeviceInitRegisterPowerPolicyStateChangeCallback( + DeviceInit: PWDFDEVICE_INIT, + PowerPolicyState: WDF_DEVICE_POWER_POLICY_STATE, + EvtDevicePowerPolicyStateChange: PFN_WDF_DEVICE_POWER_POLICY_STATE_CHANGE_NOTIFICATION, + CallbackTypes: ULONG, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfDeviceInitSetExclusive(DeviceInit: PWDFDEVICE_INIT, IsExclusive: BOOLEAN); +} +extern "C" { + pub fn WdfDeviceInitSetIoType( + DeviceInit: PWDFDEVICE_INIT, + IoType: WDF_DEVICE_IO_TYPE, + ); +} +extern "C" { + pub fn WdfDeviceInitSetPowerNotPageable(DeviceInit: PWDFDEVICE_INIT); +} +extern "C" { + pub fn WdfDeviceInitSetPowerPageable(DeviceInit: PWDFDEVICE_INIT); +} +extern "C" { + pub fn WdfDeviceInitSetPowerInrush(DeviceInit: PWDFDEVICE_INIT); +} +extern "C" { + pub fn WdfDeviceInitSetDeviceType(DeviceInit: PWDFDEVICE_INIT, DeviceType: ULONG); +} +extern "C" { + #[must_use] + pub fn WdfDeviceInitAssignName( + DeviceInit: PWDFDEVICE_INIT, + DeviceName: PCUNICODE_STRING, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDeviceInitAssignSDDLString( + DeviceInit: PWDFDEVICE_INIT, + SDDLString: PCUNICODE_STRING, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfDeviceInitSetDeviceClass( + DeviceInit: PWDFDEVICE_INIT, + DeviceClassGuid: *const GUID, + ); +} +extern "C" { + pub fn WdfDeviceInitSetCharacteristics( + DeviceInit: PWDFDEVICE_INIT, + DeviceCharacteristics: ULONG, + OrInValues: BOOLEAN, + ); +} +extern "C" { + pub fn WdfDeviceInitSetFileObjectConfig( + DeviceInit: PWDFDEVICE_INIT, + FileObjectConfig: PWDF_FILEOBJECT_CONFIG, + FileObjectAttributes: PWDF_OBJECT_ATTRIBUTES, + ); +} +extern "C" { + pub fn WdfDeviceInitSetRequestAttributes( + DeviceInit: PWDFDEVICE_INIT, + RequestAttributes: PWDF_OBJECT_ATTRIBUTES, + ); +} +extern "C" { + #[must_use] + pub fn WdfDeviceInitAssignWdmIrpPreprocessCallback( + DeviceInit: PWDFDEVICE_INIT, + EvtDeviceWdmIrpPreprocess: PFN_WDFDEVICE_WDM_IRP_PREPROCESS, + MajorFunction: UCHAR, + MinorFunctions: PUCHAR, + NumMinorFunctions: ULONG, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfDeviceInitSetIoInCallerContextCallback( + DeviceInit: PWDFDEVICE_INIT, + EvtIoInCallerContext: PFN_WDF_IO_IN_CALLER_CONTEXT, + ); +} +extern "C" { + pub fn WdfDeviceInitSetRemoveLockOptions( + DeviceInit: PWDFDEVICE_INIT, + Options: PWDF_REMOVE_LOCK_OPTIONS, + ); +} +extern "C" { + #[must_use] + pub fn WdfDeviceCreate( + DeviceInit: *mut PWDFDEVICE_INIT, + DeviceAttributes: PWDF_OBJECT_ATTRIBUTES, + Device: *mut WDFDEVICE, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfDeviceSetStaticStopRemove(Device: WDFDEVICE, Stoppable: BOOLEAN); +} +extern "C" { + #[must_use] + pub fn WdfDeviceCreateDeviceInterface( + Device: WDFDEVICE, + InterfaceClassGUID: *const GUID, + ReferenceString: PCUNICODE_STRING, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfDeviceSetDeviceInterfaceState( + Device: WDFDEVICE, + InterfaceClassGUID: *const GUID, + ReferenceString: PCUNICODE_STRING, + IsInterfaceEnabled: BOOLEAN, + ); +} +extern "C" { + pub fn WdfDeviceSetDeviceInterfaceStateEx( + Device: WDFDEVICE, + InterfaceClassGUID: *const GUID, + ReferenceString: PCUNICODE_STRING, + IsInterfaceEnabled: BOOLEAN, + ); +} +extern "C" { + #[must_use] + pub fn WdfDeviceRetrieveDeviceInterfaceString( + Device: WDFDEVICE, + InterfaceClassGUID: *const GUID, + ReferenceString: PCUNICODE_STRING, + String: WDFSTRING, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDeviceCreateSymbolicLink( + Device: WDFDEVICE, + SymbolicLinkName: PCUNICODE_STRING, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDeviceQueryProperty( + Device: WDFDEVICE, + DeviceProperty: DEVICE_REGISTRY_PROPERTY::Type, + BufferLength: ULONG, + PropertyBuffer: PVOID, + ResultLength: PULONG, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDeviceAllocAndQueryProperty( + Device: WDFDEVICE, + DeviceProperty: DEVICE_REGISTRY_PROPERTY::Type, + PoolType: POOL_TYPE, + PropertyMemoryAttributes: PWDF_OBJECT_ATTRIBUTES, + PropertyMemory: *mut WDFMEMORY, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfDeviceSetPnpCapabilities( + Device: WDFDEVICE, + PnpCapabilities: PWDF_DEVICE_PNP_CAPABILITIES, + ); +} +extern "C" { + pub fn WdfDeviceSetPowerCapabilities( + Device: WDFDEVICE, + PowerCapabilities: PWDF_DEVICE_POWER_CAPABILITIES, + ); +} +extern "C" { + pub fn WdfDeviceSetBusInformationForChildren( + Device: WDFDEVICE, + BusInformation: PPNP_BUS_INFORMATION, + ); +} +extern "C" { + #[must_use] + pub fn WdfDeviceIndicateWakeStatus( + Device: WDFDEVICE, + WaitWakeStatus: NTSTATUS, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfDeviceSetFailed(Device: WDFDEVICE, FailedAction: WDF_DEVICE_FAILED_ACTION); +} +extern "C" { + #[must_use] + pub fn WdfDeviceStopIdleNoTrack(Device: WDFDEVICE, WaitForD0: BOOLEAN) -> NTSTATUS; +} +extern "C" { + pub fn WdfDeviceResumeIdleNoTrack(Device: WDFDEVICE); +} +extern "C" { + #[must_use] + pub fn WdfDeviceStopIdleActual( + Device: WDFDEVICE, + WaitForD0: BOOLEAN, + Tag: PVOID, + Line: LONG, + File: PCCH, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfDeviceResumeIdleActual( + Device: WDFDEVICE, + Tag: PVOID, + Line: LONG, + File: PCCH, + ); +} +extern "C" { + pub fn WdfDeviceGetFileObject( + Device: WDFDEVICE, + FileObject: PFILE_OBJECT, + ) -> WDFFILEOBJECT; +} +extern "C" { + #[must_use] + pub fn WdfDeviceEnqueueRequest(Device: WDFDEVICE, Request: WDFREQUEST) -> NTSTATUS; +} +extern "C" { + pub fn WdfDeviceGetDefaultQueue(Device: WDFDEVICE) -> WDFQUEUE; +} +extern "C" { + #[must_use] + pub fn WdfDeviceConfigureRequestDispatching( + Device: WDFDEVICE, + Queue: WDFQUEUE, + RequestType: WDF_REQUEST_TYPE, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDeviceConfigureWdmIrpDispatchCallback( + Device: WDFDEVICE, + Driver: WDFDRIVER, + MajorFunction: UCHAR, + EvtDeviceWdmIrpDispatch: PFN_WDFDEVICE_WDM_IRP_DISPATCH, + DriverContext: WDFCONTEXT, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfDeviceGetSystemPowerAction(Device: WDFDEVICE) -> POWER_ACTION::Type; +} +extern "C" { + #[must_use] + pub fn WdfDeviceWdmAssignPowerFrameworkSettings( + Device: WDFDEVICE, + PowerFrameworkSettings: PWDF_POWER_FRAMEWORK_SETTINGS, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfDeviceInitSetReleaseHardwareOrderOnFailure( + DeviceInit: PWDFDEVICE_INIT, + ReleaseHardwareOrderOnFailure: WDF_RELEASE_HARDWARE_ORDER_ON_FAILURE, + ); +} +extern "C" { + pub fn WdfDeviceInitSetIoTypeEx( + DeviceInit: PWDFDEVICE_INIT, + IoTypeConfig: PWDF_IO_TYPE_CONFIG, + ); +} +extern "C" { + #[must_use] + pub fn WdfDeviceQueryPropertyEx( + Device: WDFDEVICE, + DeviceProperty: PWDF_DEVICE_PROPERTY_DATA, + BufferLength: ULONG, + PropertyBuffer: PVOID, + RequiredSize: PULONG, + Type: PDEVPROPTYPE, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDeviceAllocAndQueryPropertyEx( + Device: WDFDEVICE, + DeviceProperty: PWDF_DEVICE_PROPERTY_DATA, + PoolType: POOL_TYPE, + PropertyMemoryAttributes: PWDF_OBJECT_ATTRIBUTES, + PropertyMemory: *mut WDFMEMORY, + Type: PDEVPROPTYPE, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDeviceAssignProperty( + Device: WDFDEVICE, + DeviceProperty: PWDF_DEVICE_PROPERTY_DATA, + Type: DEVPROPTYPE, + Size: ULONG, + Data: PVOID, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDeviceRetrieveCompanionTarget( + Device: WDFDEVICE, + CompanionTarget: *mut WDFCOMPANIONTARGET, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfCollectionCreate( + CollectionAttributes: PWDF_OBJECT_ATTRIBUTES, + Collection: *mut WDFCOLLECTION, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfCollectionGetCount(Collection: WDFCOLLECTION) -> ULONG; +} +extern "C" { + #[must_use] + pub fn WdfCollectionAdd(Collection: WDFCOLLECTION, Object: WDFOBJECT) -> NTSTATUS; +} +extern "C" { + pub fn WdfCollectionRemove(Collection: WDFCOLLECTION, Item: WDFOBJECT); +} +extern "C" { + pub fn WdfCollectionRemoveItem(Collection: WDFCOLLECTION, Index: ULONG); +} +extern "C" { + pub fn WdfCollectionGetItem(Collection: WDFCOLLECTION, Index: ULONG) -> WDFOBJECT; +} +extern "C" { + pub fn WdfCollectionGetFirstItem(Collection: WDFCOLLECTION) -> WDFOBJECT; +} +extern "C" { + pub fn WdfCollectionGetLastItem(Collection: WDFCOLLECTION) -> WDFOBJECT; +} +extern "C" { + pub fn WDF_DPC_CONFIG_INIT(Config: PWDF_DPC_CONFIG, EvtDpcFunc: PFN_WDF_DPC); +} +extern "C" { + #[must_use] + pub fn WdfDpcCreate( + Config: PWDF_DPC_CONFIG, + Attributes: PWDF_OBJECT_ATTRIBUTES, + Dpc: *mut WDFDPC, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfDpcEnqueue(Dpc: WDFDPC) -> BOOLEAN; +} +extern "C" { + pub fn WdfDpcCancel(Dpc: WDFDPC, Wait: BOOLEAN) -> BOOLEAN; +} +extern "C" { + pub fn WdfDpcGetParentObject(Dpc: WDFDPC) -> WDFOBJECT; +} +extern "C" { + pub fn WdfDpcWdmGetDpc(Dpc: WDFDPC) -> PKDPC; +} +extern "C" { + pub fn WDF_TIMER_CONFIG_INIT(Config: PWDF_TIMER_CONFIG, EvtTimerFunc: PFN_WDF_TIMER); +} +extern "C" { + pub fn WDF_TIMER_CONFIG_INIT_PERIODIC( + Config: PWDF_TIMER_CONFIG, + EvtTimerFunc: PFN_WDF_TIMER, + Period: LONG, + ); +} +extern "C" { + #[must_use] + pub fn WdfTimerCreate( + Config: PWDF_TIMER_CONFIG, + Attributes: PWDF_OBJECT_ATTRIBUTES, + Timer: *mut WDFTIMER, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfTimerStart(Timer: WDFTIMER, DueTime: LONGLONG) -> BOOLEAN; +} +extern "C" { + pub fn WdfTimerStop(Timer: WDFTIMER, Wait: BOOLEAN) -> BOOLEAN; +} +extern "C" { + pub fn WdfTimerGetParentObject(Timer: WDFTIMER) -> WDFOBJECT; +} +extern "C" { + pub fn WDF_WORKITEM_CONFIG_INIT( + Config: PWDF_WORKITEM_CONFIG, + EvtWorkItemFunc: PFN_WDF_WORKITEM, + ); +} +extern "C" { + #[must_use] + pub fn WdfWorkItemCreate( + Config: PWDF_WORKITEM_CONFIG, + Attributes: PWDF_OBJECT_ATTRIBUTES, + WorkItem: *mut WDFWORKITEM, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfWorkItemEnqueue(WorkItem: WDFWORKITEM); +} +extern "C" { + pub fn WdfWorkItemGetParentObject(WorkItem: WDFWORKITEM) -> WDFOBJECT; +} +extern "C" { + pub fn WdfWorkItemFlush(WorkItem: WDFWORKITEM); +} +extern "C" { + pub fn WDF_INTERRUPT_CONFIG_INIT( + Configuration: PWDF_INTERRUPT_CONFIG, + EvtInterruptIsr: PFN_WDF_INTERRUPT_ISR, + EvtInterruptDpc: PFN_WDF_INTERRUPT_DPC, + ); +} +extern "C" { + pub fn WDF_INTERRUPT_INFO_INIT(Info: PWDF_INTERRUPT_INFO); +} +extern "C" { + pub fn WDF_INTERRUPT_EXTENDED_POLICY_INIT( + ExtendedPolicy: PWDF_INTERRUPT_EXTENDED_POLICY, + ); +} +extern "C" { + #[must_use] + pub fn WdfInterruptCreate( + Device: WDFDEVICE, + Configuration: PWDF_INTERRUPT_CONFIG, + Attributes: PWDF_OBJECT_ATTRIBUTES, + Interrupt: *mut WDFINTERRUPT, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfInterruptQueueDpcForIsr(Interrupt: WDFINTERRUPT) -> BOOLEAN; +} +extern "C" { + pub fn WdfInterruptQueueWorkItemForIsr(Interrupt: WDFINTERRUPT) -> BOOLEAN; +} +extern "C" { + pub fn WdfInterruptSynchronize( + Interrupt: WDFINTERRUPT, + Callback: PFN_WDF_INTERRUPT_SYNCHRONIZE, + Context: WDFCONTEXT, + ) -> BOOLEAN; +} +extern "C" { + pub fn WdfInterruptAcquireLock(Interrupt: WDFINTERRUPT); +} +extern "C" { + pub fn WdfInterruptReleaseLock(Interrupt: WDFINTERRUPT); +} +extern "C" { + pub fn WdfInterruptEnable(Interrupt: WDFINTERRUPT); +} +extern "C" { + pub fn WdfInterruptDisable(Interrupt: WDFINTERRUPT); +} +extern "C" { + pub fn WdfInterruptWdmGetInterrupt(Interrupt: WDFINTERRUPT) -> PKINTERRUPT; +} +extern "C" { + pub fn WdfInterruptGetInfo(Interrupt: WDFINTERRUPT, Info: PWDF_INTERRUPT_INFO); +} +extern "C" { + pub fn WdfInterruptSetPolicy( + Interrupt: WDFINTERRUPT, + Policy: WDF_INTERRUPT_POLICY, + Priority: WDF_INTERRUPT_PRIORITY, + TargetProcessorSet: KAFFINITY, + ); +} +extern "C" { + pub fn WdfInterruptSetExtendedPolicy( + Interrupt: WDFINTERRUPT, + PolicyAndGroup: PWDF_INTERRUPT_EXTENDED_POLICY, + ); +} +extern "C" { + pub fn WdfInterruptGetDevice(Interrupt: WDFINTERRUPT) -> WDFDEVICE; +} +extern "C" { + pub fn WdfInterruptTryToAcquireLock(Interrupt: WDFINTERRUPT) -> BOOLEAN; +} +extern "C" { + pub fn WdfInterruptReportActive(Interrupt: WDFINTERRUPT); +} +extern "C" { + pub fn WdfInterruptReportInactive(Interrupt: WDFINTERRUPT); +} +extern "C" { + pub fn WdfIoResourceRequirementsListSetSlotNumber( + RequirementsList: WDFIORESREQLIST, + SlotNumber: ULONG, + ); +} +extern "C" { + pub fn WdfIoResourceRequirementsListSetInterfaceType( + RequirementsList: WDFIORESREQLIST, + InterfaceType: INTERFACE_TYPE, + ); +} +extern "C" { + #[must_use] + pub fn WdfIoResourceRequirementsListAppendIoResList( + RequirementsList: WDFIORESREQLIST, + IoResList: WDFIORESLIST, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfIoResourceRequirementsListInsertIoResList( + RequirementsList: WDFIORESREQLIST, + IoResList: WDFIORESLIST, + Index: ULONG, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfIoResourceRequirementsListGetCount( + RequirementsList: WDFIORESREQLIST, + ) -> ULONG; +} +extern "C" { + pub fn WdfIoResourceRequirementsListGetIoResList( + RequirementsList: WDFIORESREQLIST, + Index: ULONG, + ) -> WDFIORESLIST; +} +extern "C" { + pub fn WdfIoResourceRequirementsListRemove( + RequirementsList: WDFIORESREQLIST, + Index: ULONG, + ); +} +extern "C" { + pub fn WdfIoResourceRequirementsListRemoveByIoResList( + RequirementsList: WDFIORESREQLIST, + IoResList: WDFIORESLIST, + ); +} +extern "C" { + #[must_use] + pub fn WdfIoResourceListCreate( + RequirementsList: WDFIORESREQLIST, + Attributes: PWDF_OBJECT_ATTRIBUTES, + ResourceList: *mut WDFIORESLIST, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfIoResourceListAppendDescriptor( + ResourceList: WDFIORESLIST, + Descriptor: PIO_RESOURCE_DESCRIPTOR, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfIoResourceListInsertDescriptor( + ResourceList: WDFIORESLIST, + Descriptor: PIO_RESOURCE_DESCRIPTOR, + Index: ULONG, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfIoResourceListUpdateDescriptor( + ResourceList: WDFIORESLIST, + Descriptor: PIO_RESOURCE_DESCRIPTOR, + Index: ULONG, + ); +} +extern "C" { + pub fn WdfIoResourceListGetCount(ResourceList: WDFIORESLIST) -> ULONG; +} +extern "C" { + pub fn WdfIoResourceListGetDescriptor( + ResourceList: WDFIORESLIST, + Index: ULONG, + ) -> PIO_RESOURCE_DESCRIPTOR; +} +extern "C" { + pub fn WdfIoResourceListRemove(ResourceList: WDFIORESLIST, Index: ULONG); +} +extern "C" { + pub fn WdfIoResourceListRemoveByDescriptor( + ResourceList: WDFIORESLIST, + Descriptor: PIO_RESOURCE_DESCRIPTOR, + ); +} +extern "C" { + #[must_use] + pub fn WdfCmResourceListAppendDescriptor( + List: WDFCMRESLIST, + Descriptor: PCM_PARTIAL_RESOURCE_DESCRIPTOR, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfCmResourceListInsertDescriptor( + List: WDFCMRESLIST, + Descriptor: PCM_PARTIAL_RESOURCE_DESCRIPTOR, + Index: ULONG, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfCmResourceListGetCount(List: WDFCMRESLIST) -> ULONG; +} +extern "C" { + pub fn WdfCmResourceListGetDescriptor( + List: WDFCMRESLIST, + Index: ULONG, + ) -> PCM_PARTIAL_RESOURCE_DESCRIPTOR; +} +extern "C" { + pub fn WdfCmResourceListRemove(List: WDFCMRESLIST, Index: ULONG); +} +extern "C" { + pub fn WdfCmResourceListRemoveByDescriptor( + List: WDFCMRESLIST, + Descriptor: PCM_PARTIAL_RESOURCE_DESCRIPTOR, + ); +} +extern "C" { + pub fn WDF_REQUEST_PARAMETERS_INIT(Parameters: PWDF_REQUEST_PARAMETERS); +} +extern "C" { + pub fn WDF_REQUEST_COMPLETION_PARAMS_INIT(Params: PWDF_REQUEST_COMPLETION_PARAMS); +} +extern "C" { + pub fn WDF_REQUEST_REUSE_PARAMS_INIT( + Params: PWDF_REQUEST_REUSE_PARAMS, + Flags: ULONG, + Status: NTSTATUS, + ); +} +extern "C" { + pub fn WDF_REQUEST_REUSE_PARAMS_SET_NEW_IRP( + Params: PWDF_REQUEST_REUSE_PARAMS, + NewIrp: PIRP, + ); +} +extern "C" { + pub fn WDF_REQUEST_SEND_OPTIONS_INIT( + Options: PWDF_REQUEST_SEND_OPTIONS, + Flags: ULONG, + ); +} +extern "C" { + pub fn WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT( + Options: PWDF_REQUEST_SEND_OPTIONS, + Timeout: LONGLONG, + ); +} +extern "C" { + pub fn WDF_REQUEST_FORWARD_OPTIONS_INIT( + ForwardOptions: PWDF_REQUEST_FORWARD_OPTIONS, + ); +} +extern "C" { + #[must_use] + pub fn WdfRequestCreate( + RequestAttributes: PWDF_OBJECT_ATTRIBUTES, + IoTarget: WDFIOTARGET, + Request: *mut WDFREQUEST, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfRequestGetRequestorProcessId(Request: WDFREQUEST) -> ULONG; +} +extern "C" { + #[must_use] + pub fn WdfRequestCreateFromIrp( + RequestAttributes: PWDF_OBJECT_ATTRIBUTES, + Irp: PIRP, + RequestFreesIrp: BOOLEAN, + Request: *mut WDFREQUEST, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRequestReuse( + Request: WDFREQUEST, + ReuseParams: PWDF_REQUEST_REUSE_PARAMS, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRequestChangeTarget( + Request: WDFREQUEST, + IoTarget: WDFIOTARGET, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfRequestFormatRequestUsingCurrentType(Request: WDFREQUEST); +} +extern "C" { + pub fn WdfRequestWdmFormatUsingStackLocation( + Request: WDFREQUEST, + Stack: PIO_STACK_LOCATION, + ); +} +extern "C" { + pub fn WdfRequestSend( + Request: WDFREQUEST, + Target: WDFIOTARGET, + Options: PWDF_REQUEST_SEND_OPTIONS, + ) -> BOOLEAN; +} +extern "C" { + #[must_use] + pub fn WdfRequestGetStatus(Request: WDFREQUEST) -> NTSTATUS; +} +extern "C" { + pub fn WdfRequestMarkCancelable( + Request: WDFREQUEST, + EvtRequestCancel: PFN_WDF_REQUEST_CANCEL, + ); +} +extern "C" { + #[must_use] + pub fn WdfRequestMarkCancelableEx( + Request: WDFREQUEST, + EvtRequestCancel: PFN_WDF_REQUEST_CANCEL, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRequestUnmarkCancelable(Request: WDFREQUEST) -> NTSTATUS; +} +extern "C" { + pub fn WdfRequestIsCanceled(Request: WDFREQUEST) -> BOOLEAN; +} +extern "C" { + pub fn WdfRequestCancelSentRequest(Request: WDFREQUEST) -> BOOLEAN; +} +extern "C" { + pub fn WdfRequestIsFrom32BitProcess(Request: WDFREQUEST) -> BOOLEAN; +} +extern "C" { + pub fn WdfRequestSetCompletionRoutine( + Request: WDFREQUEST, + CompletionRoutine: PFN_WDF_REQUEST_COMPLETION_ROUTINE, + CompletionContext: WDFCONTEXT, + ); +} +extern "C" { + pub fn WdfRequestGetCompletionParams( + Request: WDFREQUEST, + Params: PWDF_REQUEST_COMPLETION_PARAMS, + ); +} +extern "C" { + #[must_use] + pub fn WdfRequestAllocateTimer(Request: WDFREQUEST) -> NTSTATUS; +} +extern "C" { + pub fn WdfRequestComplete(Request: WDFREQUEST, Status: NTSTATUS); +} +extern "C" { + pub fn WdfRequestCompleteWithPriorityBoost( + Request: WDFREQUEST, + Status: NTSTATUS, + PriorityBoost: CCHAR, + ); +} +extern "C" { + pub fn WdfRequestCompleteWithInformation( + Request: WDFREQUEST, + Status: NTSTATUS, + Information: ULONG_PTR, + ); +} +extern "C" { + pub fn WdfRequestGetParameters( + Request: WDFREQUEST, + Parameters: PWDF_REQUEST_PARAMETERS, + ); +} +extern "C" { + #[must_use] + pub fn WdfRequestRetrieveInputMemory( + Request: WDFREQUEST, + Memory: *mut WDFMEMORY, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRequestRetrieveOutputMemory( + Request: WDFREQUEST, + Memory: *mut WDFMEMORY, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRequestRetrieveInputBuffer( + Request: WDFREQUEST, + MinimumRequiredLength: usize, + Buffer: *mut PVOID, + Length: *mut usize, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRequestRetrieveOutputBuffer( + Request: WDFREQUEST, + MinimumRequiredSize: usize, + Buffer: *mut PVOID, + Length: *mut usize, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRequestRetrieveInputWdmMdl( + Request: WDFREQUEST, + Mdl: *mut PMDL, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRequestRetrieveOutputWdmMdl( + Request: WDFREQUEST, + Mdl: *mut PMDL, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRequestRetrieveUnsafeUserInputBuffer( + Request: WDFREQUEST, + MinimumRequiredLength: usize, + InputBuffer: *mut PVOID, + Length: *mut usize, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRequestRetrieveUnsafeUserOutputBuffer( + Request: WDFREQUEST, + MinimumRequiredLength: usize, + OutputBuffer: *mut PVOID, + Length: *mut usize, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfRequestSetInformation(Request: WDFREQUEST, Information: ULONG_PTR); +} +extern "C" { + pub fn WdfRequestGetInformation(Request: WDFREQUEST) -> ULONG_PTR; +} +extern "C" { + pub fn WdfRequestGetFileObject(Request: WDFREQUEST) -> WDFFILEOBJECT; +} +extern "C" { + #[must_use] + pub fn WdfRequestProbeAndLockUserBufferForRead( + Request: WDFREQUEST, + Buffer: PVOID, + Length: usize, + MemoryObject: *mut WDFMEMORY, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRequestProbeAndLockUserBufferForWrite( + Request: WDFREQUEST, + Buffer: PVOID, + Length: usize, + MemoryObject: *mut WDFMEMORY, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfRequestGetRequestorMode(Request: WDFREQUEST) -> KPROCESSOR_MODE; +} +extern "C" { + #[must_use] + pub fn WdfRequestForwardToIoQueue( + Request: WDFREQUEST, + DestinationQueue: WDFQUEUE, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfRequestGetIoQueue(Request: WDFREQUEST) -> WDFQUEUE; +} +extern "C" { + #[must_use] + pub fn WdfRequestRequeue(Request: WDFREQUEST) -> NTSTATUS; +} +extern "C" { + pub fn WdfRequestStopAcknowledge(Request: WDFREQUEST, Requeue: BOOLEAN); +} +extern "C" { + pub fn WdfRequestWdmGetIrp(Request: WDFREQUEST) -> PIRP; +} +extern "C" { + pub fn WdfRequestIsReserved(Request: WDFREQUEST) -> BOOLEAN; +} +extern "C" { + #[must_use] + pub fn WdfRequestForwardToParentDeviceIoQueue( + Request: WDFREQUEST, + ParentDeviceQueue: WDFQUEUE, + ForwardOptions: PWDF_REQUEST_FORWARD_OPTIONS, + ) -> NTSTATUS; +} +extern "C" { + pub fn WDF_IO_TARGET_OPEN_PARAMS_INIT_EXISTING_DEVICE( + Params: PWDF_IO_TARGET_OPEN_PARAMS, + DeviceObject: PDEVICE_OBJECT, + ); +} +extern "C" { + pub fn WDF_IO_TARGET_OPEN_PARAMS_INIT_CREATE_BY_NAME( + Params: PWDF_IO_TARGET_OPEN_PARAMS, + TargetDeviceName: PCUNICODE_STRING, + DesiredAccess: ACCESS_MASK, + ); +} +extern "C" { + pub fn WDF_IO_TARGET_OPEN_PARAMS_INIT_OPEN_BY_NAME( + Params: PWDF_IO_TARGET_OPEN_PARAMS, + TargetDeviceName: PCUNICODE_STRING, + DesiredAccess: ACCESS_MASK, + ); +} +extern "C" { + pub fn WDF_IO_TARGET_OPEN_PARAMS_INIT_REOPEN(Params: PWDF_IO_TARGET_OPEN_PARAMS); +} +extern "C" { + #[must_use] + pub fn WdfIoTargetCreate( + Device: WDFDEVICE, + IoTargetAttributes: PWDF_OBJECT_ATTRIBUTES, + IoTarget: *mut WDFIOTARGET, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfIoTargetOpen( + IoTarget: WDFIOTARGET, + OpenParams: PWDF_IO_TARGET_OPEN_PARAMS, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfIoTargetCloseForQueryRemove(IoTarget: WDFIOTARGET); +} +extern "C" { + pub fn WdfIoTargetClose(IoTarget: WDFIOTARGET); +} +extern "C" { + #[must_use] + pub fn WdfIoTargetStart(IoTarget: WDFIOTARGET) -> NTSTATUS; +} +extern "C" { + pub fn WdfIoTargetStop(IoTarget: WDFIOTARGET, Action: WDF_IO_TARGET_SENT_IO_ACTION); +} +extern "C" { + pub fn WdfIoTargetPurge( + IoTarget: WDFIOTARGET, + Action: WDF_IO_TARGET_PURGE_IO_ACTION, + ); +} +extern "C" { + pub fn WdfIoTargetGetState(IoTarget: WDFIOTARGET) -> WDF_IO_TARGET_STATE; +} +extern "C" { + pub fn WdfIoTargetGetDevice(IoTarget: WDFIOTARGET) -> WDFDEVICE; +} +extern "C" { + #[must_use] + pub fn WdfIoTargetQueryTargetProperty( + IoTarget: WDFIOTARGET, + DeviceProperty: DEVICE_REGISTRY_PROPERTY::Type, + BufferLength: ULONG, + PropertyBuffer: PVOID, + ResultLength: PULONG, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfIoTargetAllocAndQueryTargetProperty( + IoTarget: WDFIOTARGET, + DeviceProperty: DEVICE_REGISTRY_PROPERTY::Type, + PoolType: POOL_TYPE, + PropertyMemoryAttributes: PWDF_OBJECT_ATTRIBUTES, + PropertyMemory: *mut WDFMEMORY, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfIoTargetQueryForInterface( + IoTarget: WDFIOTARGET, + InterfaceType: LPCGUID, + Interface: PINTERFACE, + Size: USHORT, + Version: USHORT, + InterfaceSpecificData: PVOID, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfIoTargetWdmGetTargetDeviceObject(IoTarget: WDFIOTARGET) -> PDEVICE_OBJECT; +} +extern "C" { + pub fn WdfIoTargetWdmGetTargetPhysicalDevice( + IoTarget: WDFIOTARGET, + ) -> PDEVICE_OBJECT; +} +extern "C" { + pub fn WdfIoTargetWdmGetTargetFileObject(IoTarget: WDFIOTARGET) -> PFILE_OBJECT; +} +extern "C" { + pub fn WdfIoTargetWdmGetTargetFileHandle(IoTarget: WDFIOTARGET) -> HANDLE; +} +extern "C" { + #[must_use] + pub fn WdfIoTargetSendReadSynchronously( + IoTarget: WDFIOTARGET, + Request: WDFREQUEST, + OutputBuffer: PWDF_MEMORY_DESCRIPTOR, + DeviceOffset: PLONGLONG, + RequestOptions: PWDF_REQUEST_SEND_OPTIONS, + BytesRead: PULONG_PTR, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfIoTargetFormatRequestForRead( + IoTarget: WDFIOTARGET, + Request: WDFREQUEST, + OutputBuffer: WDFMEMORY, + OutputBufferOffset: PWDFMEMORY_OFFSET, + DeviceOffset: PLONGLONG, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfIoTargetSendWriteSynchronously( + IoTarget: WDFIOTARGET, + Request: WDFREQUEST, + InputBuffer: PWDF_MEMORY_DESCRIPTOR, + DeviceOffset: PLONGLONG, + RequestOptions: PWDF_REQUEST_SEND_OPTIONS, + BytesWritten: PULONG_PTR, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfIoTargetFormatRequestForWrite( + IoTarget: WDFIOTARGET, + Request: WDFREQUEST, + InputBuffer: WDFMEMORY, + InputBufferOffset: PWDFMEMORY_OFFSET, + DeviceOffset: PLONGLONG, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfIoTargetSendIoctlSynchronously( + IoTarget: WDFIOTARGET, + Request: WDFREQUEST, + IoctlCode: ULONG, + InputBuffer: PWDF_MEMORY_DESCRIPTOR, + OutputBuffer: PWDF_MEMORY_DESCRIPTOR, + RequestOptions: PWDF_REQUEST_SEND_OPTIONS, + BytesReturned: PULONG_PTR, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfIoTargetFormatRequestForIoctl( + IoTarget: WDFIOTARGET, + Request: WDFREQUEST, + IoctlCode: ULONG, + InputBuffer: WDFMEMORY, + InputBufferOffset: PWDFMEMORY_OFFSET, + OutputBuffer: WDFMEMORY, + OutputBufferOffset: PWDFMEMORY_OFFSET, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfIoTargetSendInternalIoctlSynchronously( + IoTarget: WDFIOTARGET, + Request: WDFREQUEST, + IoctlCode: ULONG, + InputBuffer: PWDF_MEMORY_DESCRIPTOR, + OutputBuffer: PWDF_MEMORY_DESCRIPTOR, + RequestOptions: PWDF_REQUEST_SEND_OPTIONS, + BytesReturned: PULONG_PTR, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfIoTargetFormatRequestForInternalIoctl( + IoTarget: WDFIOTARGET, + Request: WDFREQUEST, + IoctlCode: ULONG, + InputBuffer: WDFMEMORY, + InputBufferOffset: PWDFMEMORY_OFFSET, + OutputBuffer: WDFMEMORY, + OutputBufferOffset: PWDFMEMORY_OFFSET, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfIoTargetSendInternalIoctlOthersSynchronously( + IoTarget: WDFIOTARGET, + Request: WDFREQUEST, + IoctlCode: ULONG, + OtherArg1: PWDF_MEMORY_DESCRIPTOR, + OtherArg2: PWDF_MEMORY_DESCRIPTOR, + OtherArg4: PWDF_MEMORY_DESCRIPTOR, + RequestOptions: PWDF_REQUEST_SEND_OPTIONS, + BytesReturned: PULONG_PTR, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfIoTargetFormatRequestForInternalIoctlOthers( + IoTarget: WDFIOTARGET, + Request: WDFREQUEST, + IoctlCode: ULONG, + OtherArg1: WDFMEMORY, + OtherArg1Offset: PWDFMEMORY_OFFSET, + OtherArg2: WDFMEMORY, + OtherArg2Offset: PWDFMEMORY_OFFSET, + OtherArg4: WDFMEMORY, + OtherArg4Offset: PWDFMEMORY_OFFSET, + ) -> NTSTATUS; +} +extern "C" { + pub fn WDF_IO_QUEUE_IDLE(State: WDF_IO_QUEUE_STATE) -> BOOLEAN; +} +extern "C" { + pub fn WDF_IO_QUEUE_READY(State: WDF_IO_QUEUE_STATE) -> BOOLEAN; +} +extern "C" { + pub fn WDF_IO_QUEUE_STOPPED(State: WDF_IO_QUEUE_STATE) -> BOOLEAN; +} +extern "C" { + pub fn WDF_IO_QUEUE_DRAINED(State: WDF_IO_QUEUE_STATE) -> BOOLEAN; +} +extern "C" { + pub fn WDF_IO_QUEUE_PURGED(State: WDF_IO_QUEUE_STATE) -> BOOLEAN; +} +extern "C" { + pub fn WDF_IO_QUEUE_CONFIG_INIT( + Config: PWDF_IO_QUEUE_CONFIG, + DispatchType: WDF_IO_QUEUE_DISPATCH_TYPE, + ); +} +extern "C" { + pub fn WDF_IO_QUEUE_CONFIG_INIT_DEFAULT_QUEUE( + Config: PWDF_IO_QUEUE_CONFIG, + DispatchType: WDF_IO_QUEUE_DISPATCH_TYPE, + ); +} +extern "C" { + pub fn WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_DEFAULT_INIT( + Policy: PWDF_IO_QUEUE_FORWARD_PROGRESS_POLICY, + TotalForwardProgressRequests: ULONG, + ); +} +extern "C" { + pub fn WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_EXAMINE_INIT( + Policy: PWDF_IO_QUEUE_FORWARD_PROGRESS_POLICY, + TotalForwardProgressRequests: ULONG, + EvtIoWdmIrpForForwardProgress: PFN_WDF_IO_WDM_IRP_FOR_FORWARD_PROGRESS, + ); +} +extern "C" { + pub fn WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_PAGINGIO_INIT( + Policy: PWDF_IO_QUEUE_FORWARD_PROGRESS_POLICY, + TotalForwardProgressRequests: ULONG, + ); +} +extern "C" { + #[must_use] + pub fn WdfIoQueueCreate( + Device: WDFDEVICE, + Config: PWDF_IO_QUEUE_CONFIG, + QueueAttributes: PWDF_OBJECT_ATTRIBUTES, + Queue: *mut WDFQUEUE, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfIoQueueGetState( + Queue: WDFQUEUE, + QueueRequests: PULONG, + DriverRequests: PULONG, + ) -> WDF_IO_QUEUE_STATE; +} +extern "C" { + pub fn WdfIoQueueStart(Queue: WDFQUEUE); +} +extern "C" { + pub fn WdfIoQueueStop( + Queue: WDFQUEUE, + StopComplete: PFN_WDF_IO_QUEUE_STATE, + Context: WDFCONTEXT, + ); +} +extern "C" { + pub fn WdfIoQueueStopSynchronously(Queue: WDFQUEUE); +} +extern "C" { + pub fn WdfIoQueueGetDevice(Queue: WDFQUEUE) -> WDFDEVICE; +} +extern "C" { + #[must_use] + pub fn WdfIoQueueRetrieveNextRequest( + Queue: WDFQUEUE, + OutRequest: *mut WDFREQUEST, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfIoQueueRetrieveRequestByFileObject( + Queue: WDFQUEUE, + FileObject: WDFFILEOBJECT, + OutRequest: *mut WDFREQUEST, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfIoQueueFindRequest( + Queue: WDFQUEUE, + FoundRequest: WDFREQUEST, + FileObject: WDFFILEOBJECT, + Parameters: PWDF_REQUEST_PARAMETERS, + OutRequest: *mut WDFREQUEST, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfIoQueueRetrieveFoundRequest( + Queue: WDFQUEUE, + FoundRequest: WDFREQUEST, + OutRequest: *mut WDFREQUEST, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfIoQueueDrainSynchronously(Queue: WDFQUEUE); +} +extern "C" { + pub fn WdfIoQueueDrain( + Queue: WDFQUEUE, + DrainComplete: PFN_WDF_IO_QUEUE_STATE, + Context: WDFCONTEXT, + ); +} +extern "C" { + pub fn WdfIoQueuePurgeSynchronously(Queue: WDFQUEUE); +} +extern "C" { + pub fn WdfIoQueuePurge( + Queue: WDFQUEUE, + PurgeComplete: PFN_WDF_IO_QUEUE_STATE, + Context: WDFCONTEXT, + ); +} +extern "C" { + #[must_use] + pub fn WdfIoQueueReadyNotify( + Queue: WDFQUEUE, + QueueReady: PFN_WDF_IO_QUEUE_STATE, + Context: WDFCONTEXT, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfIoQueueAssignForwardProgressPolicy( + Queue: WDFQUEUE, + ForwardProgressPolicy: PWDF_IO_QUEUE_FORWARD_PROGRESS_POLICY, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfIoQueueStopAndPurge( + Queue: WDFQUEUE, + StopAndPurgeComplete: PFN_WDF_IO_QUEUE_STATE, + Context: WDFCONTEXT, + ); +} +extern "C" { + pub fn WdfIoQueueStopAndPurgeSynchronously(Queue: WDFQUEUE); +} +extern "C" { + pub fn WDF_FDO_EVENT_CALLBACKS_INIT(Callbacks: PWDF_FDO_EVENT_CALLBACKS); +} +extern "C" { + pub fn WdfFdoInitWdmGetPhysicalDevice(DeviceInit: PWDFDEVICE_INIT) -> PDEVICE_OBJECT; +} +extern "C" { + #[must_use] + pub fn WdfFdoInitOpenRegistryKey( + DeviceInit: PWDFDEVICE_INIT, + DeviceInstanceKeyType: ULONG, + DesiredAccess: ACCESS_MASK, + KeyAttributes: PWDF_OBJECT_ATTRIBUTES, + Key: *mut WDFKEY, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfFdoInitQueryProperty( + DeviceInit: PWDFDEVICE_INIT, + DeviceProperty: DEVICE_REGISTRY_PROPERTY::Type, + BufferLength: ULONG, + PropertyBuffer: PVOID, + ResultLength: PULONG, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfFdoInitAllocAndQueryProperty( + DeviceInit: PWDFDEVICE_INIT, + DeviceProperty: DEVICE_REGISTRY_PROPERTY::Type, + PoolType: POOL_TYPE, + PropertyMemoryAttributes: PWDF_OBJECT_ATTRIBUTES, + PropertyMemory: *mut WDFMEMORY, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfFdoInitQueryPropertyEx( + DeviceInit: PWDFDEVICE_INIT, + DeviceProperty: PWDF_DEVICE_PROPERTY_DATA, + BufferLength: ULONG, + PropertyBuffer: PVOID, + ResultLength: PULONG, + Type: PDEVPROPTYPE, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfFdoInitAllocAndQueryPropertyEx( + DeviceInit: PWDFDEVICE_INIT, + DeviceProperty: PWDF_DEVICE_PROPERTY_DATA, + PoolType: POOL_TYPE, + PropertyMemoryAttributes: PWDF_OBJECT_ATTRIBUTES, + PropertyMemory: *mut WDFMEMORY, + Type: PDEVPROPTYPE, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfFdoInitSetEventCallbacks( + DeviceInit: PWDFDEVICE_INIT, + FdoEventCallbacks: PWDF_FDO_EVENT_CALLBACKS, + ); +} +extern "C" { + pub fn WdfFdoInitSetFilter(DeviceInit: PWDFDEVICE_INIT); +} +extern "C" { + pub fn WdfFdoInitSetDefaultChildListConfig( + DeviceInit: PWDFDEVICE_INIT, + Config: PWDF_CHILD_LIST_CONFIG, + DefaultChildListAttributes: PWDF_OBJECT_ATTRIBUTES, + ); +} +extern "C" { + #[must_use] + pub fn WdfFdoQueryForInterface( + Fdo: WDFDEVICE, + InterfaceType: LPCGUID, + Interface: PINTERFACE, + Size: USHORT, + Version: USHORT, + InterfaceSpecificData: PVOID, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfFdoGetDefaultChildList(Fdo: WDFDEVICE) -> WDFCHILDLIST; +} +extern "C" { + #[must_use] + pub fn WdfFdoAddStaticChild(Fdo: WDFDEVICE, Child: WDFDEVICE) -> NTSTATUS; +} +extern "C" { + pub fn WdfFdoLockStaticChildListForIteration(Fdo: WDFDEVICE); +} +extern "C" { + pub fn WdfFdoRetrieveNextStaticChild( + Fdo: WDFDEVICE, + PreviousChild: WDFDEVICE, + Flags: ULONG, + ) -> WDFDEVICE; +} +extern "C" { + pub fn WdfFdoUnlockStaticChildListFromIteration(Fdo: WDFDEVICE); +} +extern "C" { + pub fn WDF_PDO_EVENT_CALLBACKS_INIT(Callbacks: PWDF_PDO_EVENT_CALLBACKS); +} +extern "C" { + pub fn WdfPdoInitAllocate(ParentDevice: WDFDEVICE) -> PWDFDEVICE_INIT; +} +extern "C" { + pub fn WdfPdoInitSetEventCallbacks( + DeviceInit: PWDFDEVICE_INIT, + DispatchTable: PWDF_PDO_EVENT_CALLBACKS, + ); +} +extern "C" { + #[must_use] + pub fn WdfPdoInitAssignDeviceID( + DeviceInit: PWDFDEVICE_INIT, + DeviceID: PCUNICODE_STRING, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfPdoInitAssignInstanceID( + DeviceInit: PWDFDEVICE_INIT, + InstanceID: PCUNICODE_STRING, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfPdoInitAddHardwareID( + DeviceInit: PWDFDEVICE_INIT, + HardwareID: PCUNICODE_STRING, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfPdoInitAddCompatibleID( + DeviceInit: PWDFDEVICE_INIT, + CompatibleID: PCUNICODE_STRING, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfPdoInitAssignContainerID( + DeviceInit: PWDFDEVICE_INIT, + ContainerID: PCUNICODE_STRING, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfPdoInitAddDeviceText( + DeviceInit: PWDFDEVICE_INIT, + DeviceDescription: PCUNICODE_STRING, + DeviceLocation: PCUNICODE_STRING, + LocaleId: LCID, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfPdoInitSetDefaultLocale(DeviceInit: PWDFDEVICE_INIT, LocaleId: LCID); +} +extern "C" { + #[must_use] + pub fn WdfPdoInitAssignRawDevice( + DeviceInit: PWDFDEVICE_INIT, + DeviceClassGuid: *const GUID, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfPdoInitAllowForwardingRequestToParent(DeviceInit: PWDFDEVICE_INIT); +} +extern "C" { + #[must_use] + pub fn WdfPdoMarkMissing(Device: WDFDEVICE) -> NTSTATUS; +} +extern "C" { + pub fn WdfPdoRequestEject(Device: WDFDEVICE); +} +extern "C" { + pub fn WdfPdoGetParent(Device: WDFDEVICE) -> WDFDEVICE; +} +extern "C" { + #[must_use] + pub fn WdfPdoRetrieveIdentificationDescription( + Device: WDFDEVICE, + IdentificationDescription: PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfPdoRetrieveAddressDescription( + Device: WDFDEVICE, + AddressDescription: PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfPdoUpdateAddressDescription( + Device: WDFDEVICE, + AddressDescription: PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfPdoAddEjectionRelationsPhysicalDevice( + Device: WDFDEVICE, + PhysicalDevice: PDEVICE_OBJECT, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfPdoRemoveEjectionRelationsPhysicalDevice( + Device: WDFDEVICE, + PhysicalDevice: PDEVICE_OBJECT, + ); +} +extern "C" { + pub fn WdfPdoClearEjectionRelationsDevices(Device: WDFDEVICE); +} +extern "C" { + pub fn WdfPdoInitRemovePowerDependencyOnParent(DeviceInit: PWDFDEVICE_INIT); +} +extern "C" { + pub fn WdfControlDeviceInitAllocate( + Driver: WDFDRIVER, + SDDLString: *const UNICODE_STRING, + ) -> PWDFDEVICE_INIT; +} +extern "C" { + pub fn WdfControlDeviceInitSetShutdownNotification( + DeviceInit: PWDFDEVICE_INIT, + Notification: PFN_WDF_DEVICE_SHUTDOWN_NOTIFICATION, + Flags: UCHAR, + ); +} +extern "C" { + pub fn WdfControlFinishInitializing(Device: WDFDEVICE); +} +extern "C" { + pub fn WDF_WMI_PROVIDER_CONFIG_INIT( + Config: PWDF_WMI_PROVIDER_CONFIG, + Guid: *const GUID, + ); +} +extern "C" { + pub fn WDF_WMI_INSTANCE_CONFIG_INIT_PROVIDER( + Config: PWDF_WMI_INSTANCE_CONFIG, + Provider: WDFWMIPROVIDER, + ); +} +extern "C" { + pub fn WDF_WMI_INSTANCE_CONFIG_INIT_PROVIDER_CONFIG( + Config: PWDF_WMI_INSTANCE_CONFIG, + ProviderConfig: PWDF_WMI_PROVIDER_CONFIG, + ); +} +extern "C" { + #[must_use] + pub fn WDF_WMI_BUFFER_APPEND_STRING( + Buffer: PVOID, + BufferLength: ULONG, + String: PCUNICODE_STRING, + RequiredSize: PULONG, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfWmiProviderCreate( + Device: WDFDEVICE, + WmiProviderConfig: PWDF_WMI_PROVIDER_CONFIG, + ProviderAttributes: PWDF_OBJECT_ATTRIBUTES, + WmiProvider: *mut WDFWMIPROVIDER, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfWmiProviderGetDevice(WmiProvider: WDFWMIPROVIDER) -> WDFDEVICE; +} +extern "C" { + pub fn WdfWmiProviderIsEnabled( + WmiProvider: WDFWMIPROVIDER, + ProviderControl: WDF_WMI_PROVIDER_CONTROL, + ) -> BOOLEAN; +} +extern "C" { + pub fn WdfWmiProviderGetTracingHandle(WmiProvider: WDFWMIPROVIDER) -> ULONGLONG; +} +extern "C" { + #[must_use] + pub fn WdfWmiInstanceCreate( + Device: WDFDEVICE, + InstanceConfig: PWDF_WMI_INSTANCE_CONFIG, + InstanceAttributes: PWDF_OBJECT_ATTRIBUTES, + Instance: *mut WDFWMIINSTANCE, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfWmiInstanceRegister(WmiInstance: WDFWMIINSTANCE) -> NTSTATUS; +} +extern "C" { + pub fn WdfWmiInstanceDeregister(WmiInstance: WDFWMIINSTANCE); +} +extern "C" { + pub fn WdfWmiInstanceGetDevice(WmiInstance: WDFWMIINSTANCE) -> WDFDEVICE; +} +extern "C" { + pub fn WdfWmiInstanceGetProvider(WmiInstance: WDFWMIINSTANCE) -> WDFWMIPROVIDER; +} +extern "C" { + #[must_use] + pub fn WdfWmiInstanceFireEvent( + WmiInstance: WDFWMIINSTANCE, + EventDataSize: ULONG, + EventData: PVOID, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfStringCreate( + UnicodeString: PCUNICODE_STRING, + StringAttributes: PWDF_OBJECT_ATTRIBUTES, + String: *mut WDFSTRING, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfStringGetUnicodeString(String: WDFSTRING, UnicodeString: PUNICODE_STRING); +} +extern "C" { + #[must_use] + pub fn WdfRegistryOpenKey( + ParentKey: WDFKEY, + KeyName: PCUNICODE_STRING, + DesiredAccess: ACCESS_MASK, + KeyAttributes: PWDF_OBJECT_ATTRIBUTES, + Key: *mut WDFKEY, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRegistryCreateKey( + ParentKey: WDFKEY, + KeyName: PCUNICODE_STRING, + DesiredAccess: ACCESS_MASK, + CreateOptions: ULONG, + CreateDisposition: PULONG, + KeyAttributes: PWDF_OBJECT_ATTRIBUTES, + Key: *mut WDFKEY, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfRegistryClose(Key: WDFKEY); +} +extern "C" { + pub fn WdfRegistryWdmGetHandle(Key: WDFKEY) -> HANDLE; +} +extern "C" { + #[must_use] + pub fn WdfRegistryRemoveKey(Key: WDFKEY) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRegistryRemoveValue(Key: WDFKEY, ValueName: PCUNICODE_STRING) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRegistryQueryValue( + Key: WDFKEY, + ValueName: PCUNICODE_STRING, + ValueLength: ULONG, + Value: PVOID, + ValueLengthQueried: PULONG, + ValueType: PULONG, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRegistryQueryMemory( + Key: WDFKEY, + ValueName: PCUNICODE_STRING, + PoolType: POOL_TYPE, + MemoryAttributes: PWDF_OBJECT_ATTRIBUTES, + Memory: *mut WDFMEMORY, + ValueType: PULONG, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRegistryQueryMultiString( + Key: WDFKEY, + ValueName: PCUNICODE_STRING, + StringsAttributes: PWDF_OBJECT_ATTRIBUTES, + Collection: WDFCOLLECTION, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRegistryQueryUnicodeString( + Key: WDFKEY, + ValueName: PCUNICODE_STRING, + ValueByteLength: PUSHORT, + Value: PUNICODE_STRING, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRegistryQueryString( + Key: WDFKEY, + ValueName: PCUNICODE_STRING, + String: WDFSTRING, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRegistryQueryULong( + Key: WDFKEY, + ValueName: PCUNICODE_STRING, + Value: PULONG, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRegistryAssignValue( + Key: WDFKEY, + ValueName: PCUNICODE_STRING, + ValueType: ULONG, + ValueLength: ULONG, + Value: PVOID, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRegistryAssignMemory( + Key: WDFKEY, + ValueName: PCUNICODE_STRING, + ValueType: ULONG, + Memory: WDFMEMORY, + MemoryOffsets: PWDFMEMORY_OFFSET, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRegistryAssignMultiString( + Key: WDFKEY, + ValueName: PCUNICODE_STRING, + StringsCollection: WDFCOLLECTION, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRegistryAssignUnicodeString( + Key: WDFKEY, + ValueName: PCUNICODE_STRING, + Value: PCUNICODE_STRING, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRegistryAssignString( + Key: WDFKEY, + ValueName: PCUNICODE_STRING, + String: WDFSTRING, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfRegistryAssignULong( + Key: WDFKEY, + ValueName: PCUNICODE_STRING, + Value: ULONG, + ) -> NTSTATUS; +} +extern "C" { + pub fn WDF_DMA_ENABLER_CONFIG_INIT( + Config: PWDF_DMA_ENABLER_CONFIG, + Profile: WDF_DMA_PROFILE, + MaximumLength: usize, + ); +} +extern "C" { + pub fn WDF_DMA_SYSTEM_PROFILE_CONFIG_INIT( + DmaConfig: PWDF_DMA_SYSTEM_PROFILE_CONFIG, + Address: PHYSICAL_ADDRESS, + DmaWidth: DMA_WIDTH, + DmaDescriptor: PCM_PARTIAL_RESOURCE_DESCRIPTOR, + ); +} +extern "C" { + #[must_use] + pub fn WdfDmaEnablerCreate( + Device: WDFDEVICE, + Config: PWDF_DMA_ENABLER_CONFIG, + Attributes: PWDF_OBJECT_ATTRIBUTES, + DmaEnablerHandle: *mut WDFDMAENABLER, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDmaEnablerConfigureSystemProfile( + DmaEnabler: WDFDMAENABLER, + ProfileConfig: PWDF_DMA_SYSTEM_PROFILE_CONFIG, + ConfigDirection: WDF_DMA_DIRECTION, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfDmaEnablerGetMaximumLength(DmaEnabler: WDFDMAENABLER) -> usize; +} +extern "C" { + pub fn WdfDmaEnablerGetMaximumScatterGatherElements( + DmaEnabler: WDFDMAENABLER, + ) -> usize; +} +extern "C" { + pub fn WdfDmaEnablerSetMaximumScatterGatherElements( + DmaEnabler: WDFDMAENABLER, + MaximumFragments: usize, + ); +} +extern "C" { + pub fn WdfDmaEnablerGetFragmentLength( + DmaEnabler: WDFDMAENABLER, + DmaDirection: WDF_DMA_DIRECTION, + ) -> usize; +} +extern "C" { + pub fn WdfDmaEnablerWdmGetDmaAdapter( + DmaEnabler: WDFDMAENABLER, + DmaDirection: WDF_DMA_DIRECTION, + ) -> PDMA_ADAPTER; +} +extern "C" { + #[must_use] + pub fn WdfDmaTransactionCreate( + DmaEnabler: WDFDMAENABLER, + Attributes: PWDF_OBJECT_ATTRIBUTES, + DmaTransaction: *mut WDFDMATRANSACTION, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDmaTransactionInitialize( + DmaTransaction: WDFDMATRANSACTION, + EvtProgramDmaFunction: PFN_WDF_PROGRAM_DMA, + DmaDirection: WDF_DMA_DIRECTION, + Mdl: PMDL, + VirtualAddress: PVOID, + Length: usize, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDmaTransactionInitializeUsingOffset( + DmaTransaction: WDFDMATRANSACTION, + EvtProgramDmaFunction: PFN_WDF_PROGRAM_DMA, + DmaDirection: WDF_DMA_DIRECTION, + Mdl: PMDL, + Offset: usize, + Length: usize, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDmaTransactionInitializeUsingRequest( + DmaTransaction: WDFDMATRANSACTION, + Request: WDFREQUEST, + EvtProgramDmaFunction: PFN_WDF_PROGRAM_DMA, + DmaDirection: WDF_DMA_DIRECTION, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDmaTransactionExecute( + DmaTransaction: WDFDMATRANSACTION, + Context: WDFCONTEXT, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfDmaTransactionRelease(DmaTransaction: WDFDMATRANSACTION) -> NTSTATUS; +} +extern "C" { + pub fn WdfDmaTransactionDmaCompleted( + DmaTransaction: WDFDMATRANSACTION, + Status: *mut NTSTATUS, + ) -> BOOLEAN; +} +extern "C" { + pub fn WdfDmaTransactionDmaCompletedWithLength( + DmaTransaction: WDFDMATRANSACTION, + TransferredLength: usize, + Status: *mut NTSTATUS, + ) -> BOOLEAN; +} +extern "C" { + pub fn WdfDmaTransactionDmaCompletedFinal( + DmaTransaction: WDFDMATRANSACTION, + FinalTransferredLength: usize, + Status: *mut NTSTATUS, + ) -> BOOLEAN; +} +extern "C" { + pub fn WdfDmaTransactionGetBytesTransferred( + DmaTransaction: WDFDMATRANSACTION, + ) -> usize; +} +extern "C" { + pub fn WdfDmaTransactionSetMaximumLength( + DmaTransaction: WDFDMATRANSACTION, + MaximumLength: usize, + ); +} +extern "C" { + pub fn WdfDmaTransactionSetSingleTransferRequirement( + DmaTransaction: WDFDMATRANSACTION, + RequireSingleTransfer: BOOLEAN, + ); +} +extern "C" { + pub fn WdfDmaTransactionGetRequest(DmaTransaction: WDFDMATRANSACTION) -> WDFREQUEST; +} +extern "C" { + pub fn WdfDmaTransactionGetCurrentDmaTransferLength( + DmaTransaction: WDFDMATRANSACTION, + ) -> usize; +} +extern "C" { + pub fn WdfDmaTransactionGetDevice(DmaTransaction: WDFDMATRANSACTION) -> WDFDEVICE; +} +extern "C" { + pub fn WdfDmaTransactionGetTransferInfo( + DmaTransaction: WDFDMATRANSACTION, + MapRegisterCount: *mut ULONG, + ScatterGatherElementCount: *mut ULONG, + ); +} +extern "C" { + pub fn WdfDmaTransactionSetChannelConfigurationCallback( + DmaTransaction: WDFDMATRANSACTION, + ConfigureRoutine: PFN_WDF_DMA_TRANSACTION_CONFIGURE_DMA_CHANNEL, + ConfigureContext: PVOID, + ); +} +extern "C" { + pub fn WdfDmaTransactionSetTransferCompleteCallback( + DmaTransaction: WDFDMATRANSACTION, + DmaCompletionRoutine: PFN_WDF_DMA_TRANSACTION_DMA_TRANSFER_COMPLETE, + DmaCompletionContext: PVOID, + ); +} +extern "C" { + pub fn WdfDmaTransactionSetImmediateExecution( + DmaTransaction: WDFDMATRANSACTION, + UseImmediateExecution: BOOLEAN, + ); +} +extern "C" { + #[must_use] + pub fn WdfDmaTransactionAllocateResources( + DmaTransaction: WDFDMATRANSACTION, + DmaDirection: WDF_DMA_DIRECTION, + RequiredMapRegisters: ULONG, + EvtReserveDmaFunction: PFN_WDF_RESERVE_DMA, + EvtReserveDmaContext: PVOID, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfDmaTransactionSetDeviceAddressOffset( + DmaTransaction: WDFDMATRANSACTION, + Offset: ULONG, + ); +} +extern "C" { + pub fn WdfDmaTransactionFreeResources(DmaTransaction: WDFDMATRANSACTION); +} +extern "C" { + pub fn WdfDmaTransactionCancel(DmaTransaction: WDFDMATRANSACTION) -> BOOLEAN; +} +extern "C" { + pub fn WdfDmaTransactionWdmGetTransferContext( + DmaTransaction: WDFDMATRANSACTION, + ) -> PVOID; +} +extern "C" { + pub fn WdfDmaTransactionStopSystemTransfer(DmaTransaction: WDFDMATRANSACTION); +} +extern "C" { + pub fn WDF_COMMON_BUFFER_CONFIG_INIT( + Config: PWDF_COMMON_BUFFER_CONFIG, + AlignmentRequirement: ULONG, + ); +} +extern "C" { + #[must_use] + pub fn WdfCommonBufferCreate( + DmaEnabler: WDFDMAENABLER, + Length: usize, + Attributes: PWDF_OBJECT_ATTRIBUTES, + CommonBuffer: *mut WDFCOMMONBUFFER, + ) -> NTSTATUS; +} +extern "C" { + #[must_use] + pub fn WdfCommonBufferCreateWithConfig( + DmaEnabler: WDFDMAENABLER, + Length: usize, + Config: PWDF_COMMON_BUFFER_CONFIG, + Attributes: PWDF_OBJECT_ATTRIBUTES, + CommonBuffer: *mut WDFCOMMONBUFFER, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfCommonBufferGetAlignedVirtualAddress( + CommonBuffer: WDFCOMMONBUFFER, + ) -> PVOID; +} +extern "C" { + pub fn WdfCommonBufferGetAlignedLogicalAddress( + CommonBuffer: WDFCOMMONBUFFER, + ) -> PHYSICAL_ADDRESS; +} +extern "C" { + pub fn WdfCommonBufferGetLength(CommonBuffer: WDFCOMMONBUFFER) -> usize; +} +extern "C" { + pub fn WDF_TASK_SEND_OPTIONS_INIT(Options: PWDF_TASK_SEND_OPTIONS, Flags: ULONG); +} +extern "C" { + #[must_use] + pub fn WdfCompanionTargetSendTaskSynchronously( + CompanionTarget: WDFCOMPANIONTARGET, + TaskQueueIdentifier: USHORT, + TaskOperationCode: ULONG, + InputBuffer: PWDF_MEMORY_DESCRIPTOR, + OutputBuffer: PWDF_MEMORY_DESCRIPTOR, + TaskOptions: PWDF_TASK_SEND_OPTIONS, + BytesReturned: PULONG_PTR, + ) -> NTSTATUS; +} +extern "C" { + pub fn WdfCompanionTargetWdmGetCompanionProcess( + CompanionTarget: WDFCOMPANIONTARGET, + ) -> PEPROCESS; +} diff --git a/crates/wdk-sys/src/wdf.c b/crates/wdk-sys/src/wdf.c new file mode 100644 index 000000000..593368b8d --- /dev/null +++ b/crates/wdk-sys/src/wdf.c @@ -0,0 +1,9 @@ +#include "ntifs.h" +#include "ntddk.h" + +// Instruct the compiler to keep all the Wdf* functions. +#undef FORCEINLINE +#define FORCEINLINE + +#define WDF_STUB // Disable `WdfMinimumVersionRequired` +#include "wdf.h" diff --git a/crates/wdk/src/wdf/spinlock.rs b/crates/wdk/src/wdf/spinlock.rs index c047db086..c44ec9963 100644 --- a/crates/wdk/src/wdf/spinlock.rs +++ b/crates/wdk/src/wdf/spinlock.rs @@ -1,4 +1,4 @@ -use wdk_sys::{macros, NTSTATUS, WDFSPINLOCK, WDF_OBJECT_ATTRIBUTES}; +use wdk_sys::{wdf::*, NTSTATUS, WDFSPINLOCK, WDF_OBJECT_ATTRIBUTES}; use crate::nt_success; @@ -31,15 +31,10 @@ impl SpinLock { let mut spin_lock = Self { wdf_spin_lock: core::ptr::null_mut(), }; - let nt_status = - // SAFETY: The resulting ffi object is stored in a private member and not accessible outside of this module, and this module guarantees that it is always in a valid state. - unsafe { - macros::call_unsafe_wdf_function_binding!( - WdfSpinLockCreate, - attributes, - &mut spin_lock.wdf_spin_lock, - ) - }; + // SAFETY: The resulting ffi object is stored in a private member and not + // accessible outside of this module, and this module guarantees that it is + // always in a valid state. + let nt_status = unsafe { WdfSpinLockCreate(attributes, &mut spin_lock.wdf_spin_lock) }; nt_success(nt_status).then_some(spin_lock).ok_or(nt_status) } @@ -55,25 +50,15 @@ impl SpinLock { /// Acquire the spinlock pub fn acquire(&self) { - let [()] = - // SAFETY: `wdf_spin_lock` is a private member of `SpinLock`, originally created by WDF, and this module guarantees that it is always in a valid state. - unsafe { - [macros::call_unsafe_wdf_function_binding!( - WdfSpinLockAcquire, - self.wdf_spin_lock - )] - }; + // SAFETY: `wdf_spin_lock` is a private member of `SpinLock`, originally created + // by WDF, and this module guarantees that it is always in a valid state. + unsafe { WdfSpinLockAcquire(self.wdf_spin_lock) }; } /// Release the spinlock pub fn release(&self) { - let [()] = - // SAFETY: `wdf_spin_lock` is a private member of `SpinLock`, originally created by WDF, and this module guarantees that it is always in a valid state. - unsafe { - [macros::call_unsafe_wdf_function_binding!( - WdfSpinLockRelease, - self.wdf_spin_lock - )] - }; + // SAFETY: `wdf_spin_lock` is a private member of `SpinLock`, originally created + // by WDF, and this module guarantees that it is always in a valid state. + unsafe { WdfSpinLockRelease(self.wdf_spin_lock) }; } } diff --git a/crates/wdk/src/wdf/timer.rs b/crates/wdk/src/wdf/timer.rs index 237e8ebb0..2e3205bc2 100644 --- a/crates/wdk/src/wdf/timer.rs +++ b/crates/wdk/src/wdf/timer.rs @@ -1,4 +1,4 @@ -use wdk_sys::{macros, NTSTATUS, WDFTIMER, WDF_OBJECT_ATTRIBUTES, WDF_TIMER_CONFIG}; +use wdk_sys::{wdf::*, NTSTATUS, WDFTIMER, WDF_OBJECT_ATTRIBUTES, WDF_TIMER_CONFIG}; use crate::nt_success; @@ -22,16 +22,11 @@ impl Timer { let mut timer = Self { wdf_timer: core::ptr::null_mut(), }; - let nt_status = - // SAFETY: The resulting ffi object is stored in a private member and not accessible outside of this module, and this module guarantees that it is always in a valid state. - unsafe { - macros::call_unsafe_wdf_function_binding!( - WdfTimerCreate, - timer_config, - attributes, - &mut timer.wdf_timer, - ) - }; + + // SAFETY: The resulting ffi object is stored in a private member and not + // accessible outside of this module, and this module guarantees that it is + // always in a valid state. + let nt_status = unsafe { WdfTimerCreate(timer_config, attributes, &mut timer.wdf_timer) }; nt_success(nt_status).then_some(timer).ok_or(nt_status) } @@ -49,21 +44,17 @@ impl Timer { /// Start the [`Timer`]'s clock pub fn start(&self, due_time: i64) -> bool { - let result = - // SAFETY: `wdf_timer` is a private member of `Timer`, originally created by WDF, and this module guarantees that it is always in a valid state. - unsafe { - macros::call_unsafe_wdf_function_binding!(WdfTimerStart, self.wdf_timer, due_time) - }; + // SAFETY: `wdf_timer` is a private member of `Timer`, originally created by + // WDF, and this module guarantees that it is always in a valid state. + let result = unsafe { WdfTimerStart(self.wdf_timer, due_time) }; result != 0 } /// Stop the [`Timer`]'s clock pub fn stop(&self, wait: bool) -> bool { - let result = - // SAFETY: `wdf_timer` is a private member of `Timer`, originally created by WDF, and this module guarantees that it is always in a valid state. - unsafe { - macros::call_unsafe_wdf_function_binding!(WdfTimerStop, self.wdf_timer, u8::from(wait)) - }; + // SAFETY: `wdf_timer` is a private member of `Timer`, originally created by + // WDF, and this module guarantees that it is always in a valid state. + let result = unsafe { WdfTimerStop(self.wdf_timer, u8::from(wait)) }; result != 0 } }