//! NOTE: this file is autogenerated, DO NOT MODIFY
//--------------------------------------------------------------------------------
// Section: Constants (1009)
//--------------------------------------------------------------------------------
pub const IOCTL_STORAGE_BASE = @as(u32, 45);
pub const IOCTL_SCMBUS_BASE = @as(u32, 89);
pub const IOCTL_DISK_BASE = @as(u32, 7);
pub const IOCTL_CHANGER_BASE = @as(u32, 48);
pub const FILE_SPECIAL_ACCESS = @as(u32, 0);
pub const FILE_DEVICE_UNKNOWN = @as(u32, 34);
pub const GUID_DEVINTERFACE_DISK = Guid.initString("53f56307-b6bf-11d0-94f2-00a0c91efb8b");
pub const GUID_DEVINTERFACE_CDROM = Guid.initString("53f56308-b6bf-11d0-94f2-00a0c91efb8b");
pub const GUID_DEVINTERFACE_PARTITION = Guid.initString("53f5630a-b6bf-11d0-94f2-00a0c91efb8b");
pub const GUID_DEVINTERFACE_TAPE = Guid.initString("53f5630b-b6bf-11d0-94f2-00a0c91efb8b");
pub const GUID_DEVINTERFACE_WRITEONCEDISK = Guid.initString("53f5630c-b6bf-11d0-94f2-00a0c91efb8b");
pub const GUID_DEVINTERFACE_VOLUME = Guid.initString("53f5630d-b6bf-11d0-94f2-00a0c91efb8b");
pub const GUID_DEVINTERFACE_MEDIUMCHANGER = Guid.initString("53f56310-b6bf-11d0-94f2-00a0c91efb8b");
pub const GUID_DEVINTERFACE_FLOPPY = Guid.initString("53f56311-b6bf-11d0-94f2-00a0c91efb8b");
pub const GUID_DEVINTERFACE_CDCHANGER = Guid.initString("53f56312-b6bf-11d0-94f2-00a0c91efb8b");
pub const GUID_DEVINTERFACE_STORAGEPORT = Guid.initString("2accfe60-c130-11d2-b082-00a0c91efb8b");
pub const GUID_DEVINTERFACE_VMLUN = Guid.initString("6f416619-9f29-42a5-b20b-37e219ca02b0");
pub const GUID_DEVINTERFACE_SES = Guid.initString("1790c9ec-47d5-4df3-b5af-9adf3cf23e48");
pub const GUID_DEVINTERFACE_ZNSDISK = Guid.initString("b87941c5-ffdb-43c7-b6b1-20b632f0b109");
pub const GUID_DEVINTERFACE_SERVICE_VOLUME = Guid.initString("6ead3d82-25ec-46bc-b7fd-c1f0df8f5037");
pub const GUID_DEVINTERFACE_HIDDEN_VOLUME = Guid.initString("7f108a28-9833-4b3b-b780-2c6b5fa5c062");
pub const GUID_DEVINTERFACE_UNIFIED_ACCESS_RPMB = Guid.initString("27447c21-bcc3-4d07-a05b-a3395bb4eee7");
pub const GUID_DEVICEDUMP_STORAGE_DEVICE = Guid.initString("d8e2592f-1aab-4d56-a746-1f7585df40f4");
pub const GUID_DEVICEDUMP_DRIVER_STORAGE_PORT = Guid.initString("da82441d-7142-4bc1-b844-0807c5a4b67f");
pub const DEVPKEY_Storage_Portable = PROPERTYKEY{ .fmtid = Guid.initString("4d1ebee8-0803-4774-9842-b77db50265e9"), .pid = 2 };
pub const DEVPKEY_Storage_Removable_Media = PROPERTYKEY{ .fmtid = Guid.initString("4d1ebee8-0803-4774-9842-b77db50265e9"), .pid = 3 };
pub const DEVPKEY_Storage_System_Critical = PROPERTYKEY{ .fmtid = Guid.initString("4d1ebee8-0803-4774-9842-b77db50265e9"), .pid = 4 };
pub const DEVPKEY_Storage_Disk_Number = PROPERTYKEY{ .fmtid = Guid.initString("4d1ebee8-0803-4774-9842-b77db50265e9"), .pid = 5 };
pub const DEVPKEY_Storage_Partition_Number = PROPERTYKEY{ .fmtid = Guid.initString("4d1ebee8-0803-4774-9842-b77db50265e9"), .pid = 6 };
pub const DEVPKEY_Storage_Mbr_Type = PROPERTYKEY{ .fmtid = Guid.initString("4d1ebee8-0803-4774-9842-b77db50265e9"), .pid = 7 };
pub const DEVPKEY_Storage_Gpt_Type = PROPERTYKEY{ .fmtid = Guid.initString("4d1ebee8-0803-4774-9842-b77db50265e9"), .pid = 8 };
pub const DEVPKEY_Storage_Gpt_Name = PROPERTYKEY{ .fmtid = Guid.initString("4d1ebee8-0803-4774-9842-b77db50265e9"), .pid = 9 };
pub const IOCTL_STORAGE_CHECK_VERIFY = @as(u32, 2967552);
pub const IOCTL_STORAGE_CHECK_VERIFY2 = @as(u32, 2951168);
pub const IOCTL_STORAGE_MEDIA_REMOVAL = @as(u32, 2967556);
pub const IOCTL_STORAGE_EJECT_MEDIA = @as(u32, 2967560);
pub const IOCTL_STORAGE_LOAD_MEDIA = @as(u32, 2967564);
pub const IOCTL_STORAGE_LOAD_MEDIA2 = @as(u32, 2951180);
pub const IOCTL_STORAGE_RESERVE = @as(u32, 2967568);
pub const IOCTL_STORAGE_RELEASE = @as(u32, 2967572);
pub const IOCTL_STORAGE_FIND_NEW_DEVICES = @as(u32, 2967576);
pub const IOCTL_STORAGE_MANAGE_BYPASS_IO = @as(u32, 2951360);
pub const IOCTL_STORAGE_EJECTION_CONTROL = @as(u32, 2951488);
pub const IOCTL_STORAGE_MCN_CONTROL = @as(u32, 2951492);
pub const IOCTL_STORAGE_GET_MEDIA_TYPES = @as(u32, 2952192);
pub const IOCTL_STORAGE_GET_MEDIA_TYPES_EX = @as(u32, 2952196);
pub const IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER = @as(u32, 2952208);
pub const IOCTL_STORAGE_GET_HOTPLUG_INFO = @as(u32, 2952212);
pub const IOCTL_STORAGE_SET_HOTPLUG_INFO = @as(u32, 3001368);
pub const IOCTL_STORAGE_RESET_BUS = @as(u32, 2969600);
pub const IOCTL_STORAGE_RESET_DEVICE = @as(u32, 2969604);
pub const IOCTL_STORAGE_BREAK_RESERVATION = @as(u32, 2969620);
pub const IOCTL_STORAGE_PERSISTENT_RESERVE_IN = @as(u32, 2969624);
pub const IOCTL_STORAGE_PERSISTENT_RESERVE_OUT = @as(u32, 3002396);
pub const IOCTL_STORAGE_GET_DEVICE_NUMBER = @as(u32, 2953344);
pub const IOCTL_STORAGE_GET_DEVICE_NUMBER_EX = @as(u32, 2953348);
pub const IOCTL_STORAGE_PREDICT_FAILURE = @as(u32, 2953472);
pub const IOCTL_STORAGE_FAILURE_PREDICTION_CONFIG = @as(u32, 2953476);
pub const IOCTL_STORAGE_GET_COUNTERS = @as(u32, 2953480);
pub const IOCTL_STORAGE_READ_CAPACITY = @as(u32, 2969920);
pub const IOCTL_STORAGE_GET_DEVICE_TELEMETRY = @as(u32, 3002816);
pub const IOCTL_STORAGE_DEVICE_TELEMETRY_NOTIFY = @as(u32, 3002820);
pub const IOCTL_STORAGE_DEVICE_TELEMETRY_QUERY_CAPS = @as(u32, 3002824);
pub const IOCTL_STORAGE_GET_DEVICE_TELEMETRY_RAW = @as(u32, 3002828);
pub const IOCTL_STORAGE_SET_TEMPERATURE_THRESHOLD = @as(u32, 3002880);
pub const IOCTL_STORAGE_PROTOCOL_COMMAND = @as(u32, 3003328);
pub const IOCTL_STORAGE_SET_PROPERTY = @as(u32, 2987004);
pub const IOCTL_STORAGE_QUERY_PROPERTY = @as(u32, 2954240);
pub const IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES = @as(u32, 2987012);
pub const IOCTL_STORAGE_GET_LB_PROVISIONING_MAP_RESOURCES = @as(u32, 2970632);
pub const IOCTL_STORAGE_REINITIALIZE_MEDIA = @as(u32, 2987584);
pub const IOCTL_STORAGE_GET_BC_PROPERTIES = @as(u32, 2971648);
pub const IOCTL_STORAGE_ALLOCATE_BC_STREAM = @as(u32, 3004420);
pub const IOCTL_STORAGE_FREE_BC_STREAM = @as(u32, 3004424);
pub const IOCTL_STORAGE_CHECK_PRIORITY_HINT_SUPPORT = @as(u32, 2955392);
pub const IOCTL_STORAGE_START_DATA_INTEGRITY_CHECK = @as(u32, 3004548);
pub const IOCTL_STORAGE_STOP_DATA_INTEGRITY_CHECK = @as(u32, 3004552);
pub const OBSOLETE_IOCTL_STORAGE_RESET_BUS = @as(u32, 3002368);
pub const OBSOLETE_IOCTL_STORAGE_RESET_DEVICE = @as(u32, 3002372);
pub const IOCTL_STORAGE_FIRMWARE_GET_INFO = @as(u32, 2956288);
pub const IOCTL_STORAGE_FIRMWARE_DOWNLOAD = @as(u32, 3005444);
pub const IOCTL_STORAGE_FIRMWARE_ACTIVATE = @as(u32, 3005448);
pub const IOCTL_STORAGE_ENABLE_IDLE_POWER = @as(u32, 2956416);
pub const IOCTL_STORAGE_GET_IDLE_POWERUP_REASON = @as(u32, 2956420);
pub const IOCTL_STORAGE_POWER_ACTIVE = @as(u32, 2956424);
pub const IOCTL_STORAGE_POWER_IDLE = @as(u32, 2956428);
pub const IOCTL_STORAGE_EVENT_NOTIFICATION = @as(u32, 2956432);
pub const IOCTL_STORAGE_DEVICE_POWER_CAP = @as(u32, 2956436);
pub const IOCTL_STORAGE_RPMB_COMMAND = @as(u32, 2956440);
pub const IOCTL_STORAGE_ATTRIBUTE_MANAGEMENT = @as(u32, 3005596);
pub const IOCTL_STORAGE_DIAGNOSTIC = @as(u32, 2956448);
pub const IOCTL_STORAGE_GET_PHYSICAL_ELEMENT_STATUS = @as(u32, 2956452);
pub const IOCTL_STORAGE_REMOVE_ELEMENT_AND_TRUNCATE = @as(u32, 2956480);
pub const IOCTL_STORAGE_GET_DEVICE_INTERNAL_LOG = @as(u32, 2956484);
pub const STORAGE_DEVICE_FLAGS_RANDOM_DEVICEGUID_REASON_CONFLICT = @as(u32, 1);
pub const STORAGE_DEVICE_FLAGS_RANDOM_DEVICEGUID_REASON_NOHWID = @as(u32, 2);
pub const STORAGE_DEVICE_FLAGS_PAGE_83_DEVICEGUID = @as(u32, 4);
pub const RECOVERED_WRITES_VALID = @as(u32, 1);
pub const UNRECOVERED_WRITES_VALID = @as(u32, 2);
pub const RECOVERED_READS_VALID = @as(u32, 4);
pub const UNRECOVERED_READS_VALID = @as(u32, 8);
pub const WRITE_COMPRESSION_INFO_VALID = @as(u32, 16);
pub const READ_COMPRESSION_INFO_VALID = @as(u32, 32);
pub const TAPE_RETURN_STATISTICS = @as(i32, 0);
pub const TAPE_RETURN_ENV_INFO = @as(i32, 1);
pub const TAPE_RESET_STATISTICS = @as(i32, 2);
pub const MEDIA_ERASEABLE = @as(u32, 1);
pub const MEDIA_WRITE_ONCE = @as(u32, 2);
pub const MEDIA_READ_ONLY = @as(u32, 4);
pub const MEDIA_READ_WRITE = @as(u32, 8);
pub const MEDIA_WRITE_PROTECTED = @as(u32, 256);
pub const MEDIA_CURRENTLY_MOUNTED = @as(u32, 2147483648);
pub const STORAGE_FAILURE_PREDICTION_CONFIG_V1 = @as(u32, 1);
pub const SRB_TYPE_SCSI_REQUEST_BLOCK = @as(u32, 0);
pub const SRB_TYPE_STORAGE_REQUEST_BLOCK = @as(u32, 1);
pub const STORAGE_ADDRESS_TYPE_BTL8 = @as(u32, 0);
pub const STORAGE_RPMB_DESCRIPTOR_VERSION_1 = @as(u32, 1);
pub const STORAGE_RPMB_MINIMUM_RELIABLE_WRITE_SIZE = @as(u32, 512);
pub const STORAGE_CRYPTO_CAPABILITY_VERSION_1 = @as(u32, 1);
pub const STORAGE_CRYPTO_DESCRIPTOR_VERSION_1 = @as(u32, 1);
pub const STORAGE_TIER_NAME_LENGTH = @as(u32, 256);
pub const STORAGE_TIER_DESCRIPTION_LENGTH = @as(u32, 512);
pub const STORAGE_TIER_FLAG_NO_SEEK_PENALTY = @as(u32, 131072);
pub const STORAGE_TIER_FLAG_WRITE_BACK_CACHE = @as(u32, 2097152);
pub const STORAGE_TIER_FLAG_READ_CACHE = @as(u32, 4194304);
pub const STORAGE_TIER_FLAG_PARITY = @as(u32, 8388608);
pub const STORAGE_TIER_FLAG_SMR = @as(u32, 16777216);
pub const STORAGE_TEMPERATURE_VALUE_NOT_REPORTED = @as(u32, 32768);
pub const STORAGE_TEMPERATURE_THRESHOLD_FLAG_ADAPTER_REQUEST = @as(u32, 1);
pub const STORAGE_COMPONENT_ROLE_CACHE = @as(u32, 1);
pub const STORAGE_COMPONENT_ROLE_TIERING = @as(u32, 2);
pub const STORAGE_COMPONENT_ROLE_DATA = @as(u32, 4);
pub const STORAGE_ATTRIBUTE_BYTE_ADDRESSABLE_IO = @as(u32, 1);
pub const STORAGE_ATTRIBUTE_BLOCK_IO = @as(u32, 2);
pub const STORAGE_ATTRIBUTE_DYNAMIC_PERSISTENCE = @as(u32, 4);
pub const STORAGE_ATTRIBUTE_VOLATILE = @as(u32, 8);
pub const STORAGE_ATTRIBUTE_ASYNC_EVENT_NOTIFICATION = @as(u32, 16);
pub const STORAGE_ATTRIBUTE_PERF_SIZE_INDEPENDENT = @as(u32, 32);
pub const STORAGE_DEVICE_MAX_OPERATIONAL_STATUS = @as(u32, 16);
pub const STORAGE_ADAPTER_SERIAL_NUMBER_V1_MAX_LENGTH = @as(u32, 128);
pub const DeviceDsmActionFlag_NonDestructive = @as(u32, 2147483648);
pub const DEVICE_DSM_FLAG_ENTIRE_DATA_SET_RANGE = @as(u32, 1);
pub const DEVICE_DSM_FLAG_TRIM_NOT_FS_ALLOCATED = @as(u32, 2147483648);
pub const DEVICE_DSM_FLAG_TRIM_BYPASS_RZAT = @as(u32, 1073741824);
pub const DEVICE_DSM_NOTIFY_FLAG_BEGIN = @as(u32, 1);
pub const DEVICE_DSM_NOTIFY_FLAG_END = @as(u32, 2);
pub const STORAGE_OFFLOAD_MAX_TOKEN_LENGTH = @as(u32, 512);
pub const STORAGE_OFFLOAD_TOKEN_ID_LENGTH = @as(u32, 504);
pub const STORAGE_OFFLOAD_TOKEN_TYPE_ZERO_DATA = @as(u32, 4294901761);
pub const STORAGE_OFFLOAD_READ_RANGE_TRUNCATED = @as(u32, 1);
pub const STORAGE_OFFLOAD_WRITE_RANGE_TRUNCATED = @as(u32, 1);
pub const STORAGE_OFFLOAD_TOKEN_INVALID = @as(u32, 2);
pub const DEVICE_DSM_FLAG_ALLOCATION_CONSOLIDATEABLE_ONLY = @as(u32, 1073741824);
pub const DEVICE_DSM_PARAMETERS_V1 = @as(u32, 1);
pub const DEVICE_DATA_SET_LBP_STATE_PARAMETERS_VERSION_V1 = @as(u32, 1);
pub const DEVICE_DSM_FLAG_REPAIR_INPUT_TOPOLOGY_ID_PRESENT = @as(u32, 1073741824);
pub const DEVICE_DSM_FLAG_REPAIR_OUTPUT_PARITY_EXTENT = @as(u32, 536870912);
pub const DEVICE_DSM_FLAG_SCRUB_SKIP_IN_SYNC = @as(u32, 268435456);
pub const DEVICE_DSM_FLAG_SCRUB_OUTPUT_PARITY_EXTENT = @as(u32, 536870912);
pub const DEVICE_DSM_FLAG_PHYSICAL_ADDRESSES_OMIT_TOTAL_RANGES = @as(u32, 268435456);
pub const DEVICE_DSM_PHYSICAL_ADDRESSES_OUTPUT_V1 = @as(u32, 1);
pub const DEVICE_DSM_PHYSICAL_ADDRESSES_OUTPUT_VERSION_V1 = @as(u32, 1);
pub const DEVICE_STORAGE_NO_ERRORS = @as(u32, 1);
pub const DEVICE_DSM_RANGE_ERROR_OUTPUT_V1 = @as(u32, 1);
pub const DEVICE_DSM_RANGE_ERROR_INFO_VERSION_V1 = @as(u32, 1);
pub const IOCTL_STORAGE_BC_VERSION = @as(u32, 1);
pub const STORAGE_PRIORITY_HINT_SUPPORTED = @as(u32, 1);
pub const STORAGE_DIAGNOSTIC_FLAG_ADAPTER_REQUEST = @as(u32, 1);
pub const ERROR_HISTORY_DIRECTORY_ENTRY_DEFAULT_COUNT = @as(u32, 8);
pub const DEVICEDUMP_STRUCTURE_VERSION_V1 = @as(u32, 1);
pub const DEVICEDUMP_MAX_IDSTRING = @as(u32, 32);
pub const MAX_FW_BUCKET_ID_LENGTH = @as(u32, 132);
pub const DDUMP_FLAG_DATA_READ_FROM_DEVICE = @as(u32, 1);
pub const FW_ISSUEID_NO_ISSUE = @as(u32, 0);
pub const FW_ISSUEID_UNKNOWN = @as(u32, 4294967295);
pub const TC_PUBLIC_DEVICEDUMP_CONTENT_SMART = @as(u32, 1);
pub const TC_PUBLIC_DEVICEDUMP_CONTENT_GPLOG = @as(u32, 2);
pub const TC_PUBLIC_DEVICEDUMP_CONTENT_GPLOG_MAX = @as(u32, 16);
pub const TC_DEVICEDUMP_SUBSECTION_DESC_LENGTH = @as(u32, 16);
pub const CDB_SIZE = @as(u32, 16);
pub const TELEMETRY_COMMAND_SIZE = @as(u32, 16);
pub const DEVICEDUMP_CAP_PRIVATE_SECTION = @as(u32, 1);
pub const DEVICEDUMP_CAP_RESTRICTED_SECTION = @as(u32, 2);
pub const STORAGE_IDLE_POWERUP_REASON_VERSION_V1 = @as(u32, 1);
pub const STORAGE_DEVICE_POWER_CAP_VERSION_V1 = @as(u32, 1);
pub const STORAGE_EVENT_NOTIFICATION_VERSION_V1 = @as(u32, 1);
pub const STORAGE_EVENT_MEDIA_STATUS = @as(u64, 1);
pub const STORAGE_EVENT_DEVICE_STATUS = @as(u64, 2);
pub const STORAGE_EVENT_DEVICE_OPERATION = @as(u64, 4);
pub const READ_COPY_NUMBER_KEY = @as(u32, 1380142592);
pub const READ_COPY_NUMBER_BYPASS_CACHE_FLAG = @as(u32, 256);
pub const STORAGE_HW_FIRMWARE_REQUEST_FLAG_CONTROLLER = @as(u32, 1);
pub const STORAGE_HW_FIRMWARE_REQUEST_FLAG_LAST_SEGMENT = @as(u32, 2);
pub const STORAGE_HW_FIRMWARE_REQUEST_FLAG_FIRST_SEGMENT = @as(u32, 4);
pub const STORAGE_HW_FIRMWARE_REQUEST_FLAG_SWITCH_TO_EXISTING_FIRMWARE = @as(u32, 2147483648);
pub const STORAGE_HW_FIRMWARE_INVALID_SLOT = @as(u32, 255);
pub const STORAGE_HW_FIRMWARE_REVISION_LENGTH = @as(u32, 16);
pub const STORAGE_PROTOCOL_STRUCTURE_VERSION = @as(u32, 1);
pub const STORAGE_PROTOCOL_COMMAND_FLAG_ADAPTER_REQUEST = @as(u32, 2147483648);
pub const STORAGE_PROTOCOL_STATUS_PENDING = @as(u32, 0);
pub const STORAGE_PROTOCOL_STATUS_SUCCESS = @as(u32, 1);
pub const STORAGE_PROTOCOL_STATUS_ERROR = @as(u32, 2);
pub const STORAGE_PROTOCOL_STATUS_INVALID_REQUEST = @as(u32, 3);
pub const STORAGE_PROTOCOL_STATUS_NO_DEVICE = @as(u32, 4);
pub const STORAGE_PROTOCOL_STATUS_BUSY = @as(u32, 5);
pub const STORAGE_PROTOCOL_STATUS_DATA_OVERRUN = @as(u32, 6);
pub const STORAGE_PROTOCOL_STATUS_INSUFFICIENT_RESOURCES = @as(u32, 7);
pub const STORAGE_PROTOCOL_STATUS_THROTTLED_REQUEST = @as(u32, 8);
pub const STORAGE_PROTOCOL_STATUS_NOT_SUPPORTED = @as(u32, 255);
pub const STORAGE_PROTOCOL_COMMAND_LENGTH_NVME = @as(u32, 64);
pub const STORAGE_PROTOCOL_SPECIFIC_NVME_ADMIN_COMMAND = @as(u32, 1);
pub const STORAGE_PROTOCOL_SPECIFIC_NVME_NVM_COMMAND = @as(u32, 2);
pub const STORATTRIBUTE_NONE = @as(u32, 0);
pub const STORATTRIBUTE_MANAGEMENT_STATE = @as(u32, 1);
pub const STORAGE_SUPPORTED_FEATURES_BYPASS_IO = @as(u32, 1);
pub const STORAGE_SUPPORTED_FEATURES_MASK = @as(u32, 1);
pub const GUID_DEVINTERFACE_SCM_PHYSICAL_DEVICE = Guid.initString("4283609d-4dc2-43be-bbb4-4f15dfce2c61");
pub const GUID_SCM_PD_HEALTH_NOTIFICATION = Guid.initString("9da2d386-72f5-4ee3-8155-eca0678e3b06");
pub const GUID_SCM_PD_PASSTHROUGH_INVDIMM = Guid.initString("4309ac30-0d11-11e4-9191-0800200c9a66");
pub const GUID_DEVINTERFACE_COMPORT = Guid.initString("86e0d1e0-8089-11d0-9ce4-08003e301f73");
pub const GUID_DEVINTERFACE_SERENUM_BUS_ENUMERATOR = Guid.initString("4d36e978-e325-11ce-bfc1-08002be10318");
pub const FILE_DEVICE_BEEP = @as(u32, 1);
pub const FILE_DEVICE_CD_ROM_FILE_SYSTEM = @as(u32, 3);
pub const FILE_DEVICE_CONTROLLER = @as(u32, 4);
pub const FILE_DEVICE_DATALINK = @as(u32, 5);
pub const FILE_DEVICE_DFS = @as(u32, 6);
pub const FILE_DEVICE_DISK_FILE_SYSTEM = @as(u32, 8);
pub const FILE_DEVICE_FILE_SYSTEM = @as(u32, 9);
pub const FILE_DEVICE_INPORT_PORT = @as(u32, 10);
pub const FILE_DEVICE_KEYBOARD = @as(u32, 11);
pub const FILE_DEVICE_MAILSLOT = @as(u32, 12);
pub const FILE_DEVICE_MIDI_IN = @as(u32, 13);
pub const FILE_DEVICE_MIDI_OUT = @as(u32, 14);
pub const FILE_DEVICE_MOUSE = @as(u32, 15);
pub const FILE_DEVICE_MULTI_UNC_PROVIDER = @as(u32, 16);
pub const FILE_DEVICE_NAMED_PIPE = @as(u32, 17);
pub const FILE_DEVICE_NETWORK = @as(u32, 18);
pub const FILE_DEVICE_NETWORK_BROWSER = @as(u32, 19);
pub const FILE_DEVICE_NETWORK_FILE_SYSTEM = @as(u32, 20);
pub const FILE_DEVICE_NULL = @as(u32, 21);
pub const FILE_DEVICE_PARALLEL_PORT = @as(u32, 22);
pub const FILE_DEVICE_PHYSICAL_NETCARD = @as(u32, 23);
pub const FILE_DEVICE_PRINTER = @as(u32, 24);
pub const FILE_DEVICE_SCANNER = @as(u32, 25);
pub const FILE_DEVICE_SERIAL_MOUSE_PORT = @as(u32, 26);
pub const FILE_DEVICE_SERIAL_PORT = @as(u32, 27);
pub const FILE_DEVICE_SCREEN = @as(u32, 28);
pub const FILE_DEVICE_SOUND = @as(u32, 29);
pub const FILE_DEVICE_STREAMS = @as(u32, 30);
pub const FILE_DEVICE_TAPE_FILE_SYSTEM = @as(u32, 32);
pub const FILE_DEVICE_TRANSPORT = @as(u32, 33);
pub const FILE_DEVICE_VIDEO = @as(u32, 35);
pub const FILE_DEVICE_VIRTUAL_DISK = @as(u32, 36);
pub const FILE_DEVICE_WAVE_IN = @as(u32, 37);
pub const FILE_DEVICE_WAVE_OUT = @as(u32, 38);
pub const FILE_DEVICE_8042_PORT = @as(u32, 39);
pub const FILE_DEVICE_NETWORK_REDIRECTOR = @as(u32, 40);
pub const FILE_DEVICE_BATTERY = @as(u32, 41);
pub const FILE_DEVICE_BUS_EXTENDER = @as(u32, 42);
pub const FILE_DEVICE_MODEM = @as(u32, 43);
pub const FILE_DEVICE_VDM = @as(u32, 44);
pub const FILE_DEVICE_MASS_STORAGE = @as(u32, 45);
pub const FILE_DEVICE_SMB = @as(u32, 46);
pub const FILE_DEVICE_KS = @as(u32, 47);
pub const FILE_DEVICE_CHANGER = @as(u32, 48);
pub const FILE_DEVICE_ACPI = @as(u32, 50);
pub const FILE_DEVICE_FULLSCREEN_VIDEO = @as(u32, 52);
pub const FILE_DEVICE_DFS_FILE_SYSTEM = @as(u32, 53);
pub const FILE_DEVICE_DFS_VOLUME = @as(u32, 54);
pub const FILE_DEVICE_SERENUM = @as(u32, 55);
pub const FILE_DEVICE_TERMSRV = @as(u32, 56);
pub const FILE_DEVICE_KSEC = @as(u32, 57);
pub const FILE_DEVICE_FIPS = @as(u32, 58);
pub const FILE_DEVICE_INFINIBAND = @as(u32, 59);
pub const FILE_DEVICE_VMBUS = @as(u32, 62);
pub const FILE_DEVICE_CRYPT_PROVIDER = @as(u32, 63);
pub const FILE_DEVICE_WPD = @as(u32, 64);
pub const FILE_DEVICE_BLUETOOTH = @as(u32, 65);
pub const FILE_DEVICE_MT_COMPOSITE = @as(u32, 66);
pub const FILE_DEVICE_MT_TRANSPORT = @as(u32, 67);
pub const FILE_DEVICE_BIOMETRIC = @as(u32, 68);
pub const FILE_DEVICE_PMI = @as(u32, 69);
pub const FILE_DEVICE_EHSTOR = @as(u32, 70);
pub const FILE_DEVICE_DEVAPI = @as(u32, 71);
pub const FILE_DEVICE_GPIO = @as(u32, 72);
pub const FILE_DEVICE_USBEX = @as(u32, 73);
pub const FILE_DEVICE_CONSOLE = @as(u32, 80);
pub const FILE_DEVICE_NFP = @as(u32, 81);
pub const FILE_DEVICE_SYSENV = @as(u32, 82);
pub const FILE_DEVICE_VIRTUAL_BLOCK = @as(u32, 83);
pub const FILE_DEVICE_POINT_OF_SERVICE = @as(u32, 84);
pub const FILE_DEVICE_STORAGE_REPLICATION = @as(u32, 85);
pub const FILE_DEVICE_TRUST_ENV = @as(u32, 86);
pub const FILE_DEVICE_UCM = @as(u32, 87);
pub const FILE_DEVICE_UCMTCPCI = @as(u32, 88);
pub const FILE_DEVICE_PERSISTENT_MEMORY = @as(u32, 89);
pub const FILE_DEVICE_NVDIMM = @as(u32, 90);
pub const FILE_DEVICE_HOLOGRAPHIC = @as(u32, 91);
pub const FILE_DEVICE_SDFXHCI = @as(u32, 92);
pub const FILE_DEVICE_UCMUCSI = @as(u32, 93);
pub const FILE_DEVICE_PRM = @as(u32, 94);
pub const FILE_DEVICE_EVENT_COLLECTOR = @as(u32, 95);
pub const FILE_DEVICE_USB4 = @as(u32, 96);
pub const FILE_DEVICE_SOUNDWIRE = @as(u32, 97);
pub const METHOD_BUFFERED = @as(u32, 0);
pub const METHOD_IN_DIRECT = @as(u32, 1);
pub const METHOD_OUT_DIRECT = @as(u32, 2);
pub const METHOD_NEITHER = @as(u32, 3);
pub const METHOD_DIRECT_TO_HARDWARE = @as(u32, 1);
pub const METHOD_DIRECT_FROM_HARDWARE = @as(u32, 2);
pub const FILE_ANY_ACCESS = @as(u32, 0);
pub const FILE_READ_ACCESS = @as(u32, 1);
pub const FILE_WRITE_ACCESS = @as(u32, 2);
pub const STORAGE_DEVICE_NUMA_NODE_UNKNOWN = @as(u32, 4294967295);
pub const IOCTL_SCMBUS_DEVICE_FUNCTION_BASE = @as(u32, 0);
pub const IOCTL_SCM_LOGICAL_DEVICE_FUNCTION_BASE = @as(u32, 768);
pub const IOCTL_SCM_PHYSICAL_DEVICE_FUNCTION_BASE = @as(u32, 1536);
pub const IOCTL_SCM_BUS_GET_LOGICAL_DEVICES = @as(u32, 5832704);
pub const IOCTL_SCM_BUS_GET_PHYSICAL_DEVICES = @as(u32, 5832708);
pub const IOCTL_SCM_BUS_GET_REGIONS = @as(u32, 5832712);
pub const IOCTL_SCM_BUS_QUERY_PROPERTY = @as(u32, 5832716);
pub const IOCTL_SCM_BUS_SET_PROPERTY = @as(u32, 5865492);
pub const IOCTL_SCM_BUS_RUNTIME_FW_ACTIVATE = @as(u32, 5865488);
pub const IOCTL_SCM_LD_GET_INTERLEAVE_SET = @as(u32, 5835776);
pub const IOCTL_SCM_PD_QUERY_PROPERTY = @as(u32, 5838848);
pub const IOCTL_SCM_PD_FIRMWARE_DOWNLOAD = @as(u32, 5871620);
pub const IOCTL_SCM_PD_FIRMWARE_ACTIVATE = @as(u32, 5871624);
pub const IOCTL_SCM_PD_PASSTHROUGH = @as(u32, 5888012);
pub const IOCTL_SCM_PD_UPDATE_MANAGEMENT_STATUS = @as(u32, 5838864);
pub const IOCTL_SCM_PD_REINITIALIZE_MEDIA = @as(u32, 5871636);
pub const IOCTL_SCM_PD_SET_PROPERTY = @as(u32, 5871640);
pub const SCM_MAX_SYMLINK_LEN_IN_CHARS = @as(u32, 256);
pub const MAX_INTERFACE_CODES = @as(u32, 8);
pub const SCM_PD_FIRMWARE_REVISION_LENGTH_BYTES = @as(u32, 32);
pub const SCM_PD_PROPERTY_NAME_LENGTH_IN_CHARS = @as(u32, 128);
pub const SCM_PD_MAX_OPERATIONAL_STATUS = @as(u32, 16);
pub const SCM_PD_FIRMWARE_LAST_DOWNLOAD = @as(u32, 1);
pub const IOCTL_DISK_GET_DRIVE_GEOMETRY = @as(u32, 458752);
pub const IOCTL_DISK_GET_PARTITION_INFO = @as(u32, 475140);
pub const IOCTL_DISK_SET_PARTITION_INFO = @as(u32, 507912);
pub const IOCTL_DISK_GET_DRIVE_LAYOUT = @as(u32, 475148);
pub const IOCTL_DISK_SET_DRIVE_LAYOUT = @as(u32, 507920);
pub const IOCTL_DISK_VERIFY = @as(u32, 458772);
pub const IOCTL_DISK_FORMAT_TRACKS = @as(u32, 507928);
pub const IOCTL_DISK_REASSIGN_BLOCKS = @as(u32, 507932);
pub const IOCTL_DISK_PERFORMANCE = @as(u32, 458784);
pub const IOCTL_DISK_IS_WRITABLE = @as(u32, 458788);
pub const IOCTL_DISK_LOGGING = @as(u32, 458792);
pub const IOCTL_DISK_FORMAT_TRACKS_EX = @as(u32, 507948);
pub const IOCTL_DISK_HISTOGRAM_STRUCTURE = @as(u32, 458800);
pub const IOCTL_DISK_HISTOGRAM_DATA = @as(u32, 458804);
pub const IOCTL_DISK_HISTOGRAM_RESET = @as(u32, 458808);
pub const IOCTL_DISK_REQUEST_STRUCTURE = @as(u32, 458812);
pub const IOCTL_DISK_REQUEST_DATA = @as(u32, 458816);
pub const IOCTL_DISK_PERFORMANCE_OFF = @as(u32, 458848);
pub const IOCTL_DISK_CONTROLLER_NUMBER = @as(u32, 458820);
pub const SMART_GET_VERSION = @as(u32, 475264);
pub const SMART_SEND_DRIVE_COMMAND = @as(u32, 508036);
pub const SMART_RCV_DRIVE_DATA = @as(u32, 508040);
pub const SMART_RCV_DRIVE_DATA_EX = @as(u32, 458892);
pub const IOCTL_DISK_GET_PARTITION_INFO_EX = @as(u32, 458824);
pub const IOCTL_DISK_SET_PARTITION_INFO_EX = @as(u32, 507980);
pub const IOCTL_DISK_GET_DRIVE_LAYOUT_EX = @as(u32, 458832);
pub const IOCTL_DISK_SET_DRIVE_LAYOUT_EX = @as(u32, 507988);
pub const IOCTL_DISK_CREATE_DISK = @as(u32, 507992);
pub const IOCTL_DISK_GET_LENGTH_INFO = @as(u32, 475228);
pub const IOCTL_DISK_GET_DRIVE_GEOMETRY_EX = @as(u32, 458912);
pub const IOCTL_DISK_REASSIGN_BLOCKS_EX = @as(u32, 508068);
pub const IOCTL_DISK_UPDATE_DRIVE_SIZE = @as(u32, 508104);
pub const IOCTL_DISK_GROW_PARTITION = @as(u32, 508112);
pub const IOCTL_DISK_GET_CACHE_INFORMATION = @as(u32, 475348);
pub const IOCTL_DISK_SET_CACHE_INFORMATION = @as(u32, 508120);
pub const IOCTL_DISK_GET_WRITE_CACHE_STATE = @as(u32, 475356);
pub const OBSOLETE_DISK_GET_WRITE_CACHE_STATE = @as(u32, 475356);
pub const IOCTL_DISK_DELETE_DRIVE_LAYOUT = @as(u32, 508160);
pub const IOCTL_DISK_UPDATE_PROPERTIES = @as(u32, 459072);
pub const IOCTL_DISK_FORMAT_DRIVE = @as(u32, 508876);
pub const IOCTL_DISK_SENSE_DEVICE = @as(u32, 459744);
pub const IOCTL_DISK_CHECK_VERIFY = @as(u32, 477184);
pub const IOCTL_DISK_MEDIA_REMOVAL = @as(u32, 477188);
pub const IOCTL_DISK_EJECT_MEDIA = @as(u32, 477192);
pub const IOCTL_DISK_LOAD_MEDIA = @as(u32, 477196);
pub const IOCTL_DISK_RESERVE = @as(u32, 477200);
pub const IOCTL_DISK_RELEASE = @as(u32, 477204);
pub const IOCTL_DISK_FIND_NEW_DEVICES = @as(u32, 477208);
pub const IOCTL_DISK_GET_MEDIA_TYPES = @as(u32, 461824);
pub const PARTITION_ENTRY_UNUSED = @as(u32, 0);
pub const PARTITION_FAT_12 = @as(u32, 1);
pub const PARTITION_XENIX_1 = @as(u32, 2);
pub const PARTITION_XENIX_2 = @as(u32, 3);
pub const PARTITION_FAT_16 = @as(u32, 4);
pub const PARTITION_EXTENDED = @as(u32, 5);
pub const PARTITION_HUGE = @as(u32, 6);
pub const PARTITION_IFS = @as(u32, 7);
pub const PARTITION_OS2BOOTMGR = @as(u32, 10);
pub const PARTITION_FAT32 = @as(u32, 11);
pub const PARTITION_FAT32_XINT13 = @as(u32, 12);
pub const PARTITION_XINT13 = @as(u32, 14);
pub const PARTITION_XINT13_EXTENDED = @as(u32, 15);
pub const PARTITION_MSFT_RECOVERY = @as(u32, 39);
pub const PARTITION_MAIN_OS = @as(u32, 40);
pub const PARTIITON_OS_DATA = @as(u32, 41);
pub const PARTITION_PRE_INSTALLED = @as(u32, 42);
pub const PARTITION_BSP = @as(u32, 43);
pub const PARTITION_DPP = @as(u32, 44);
pub const PARTITION_WINDOWS_SYSTEM = @as(u32, 45);
pub const PARTITION_PREP = @as(u32, 65);
pub const PARTITION_LDM = @as(u32, 66);
pub const PARTITION_DM = @as(u32, 84);
pub const PARTITION_EZDRIVE = @as(u32, 85);
pub const PARTITION_UNIX = @as(u32, 99);
pub const PARTITION_SPACES_DATA = @as(u32, 215);
pub const PARTITION_SPACES = @as(u32, 231);
pub const PARTITION_GPT = @as(u32, 238);
pub const PARTITION_SYSTEM = @as(u32, 239);
pub const VALID_NTFT = @as(u32, 192);
pub const PARTITION_NTFT = @as(u32, 128);
pub const GPT_ATTRIBUTE_NO_BLOCK_IO_PROTOCOL = @as(u64, 2);
pub const GPT_ATTRIBUTE_LEGACY_BIOS_BOOTABLE = @as(u64, 4);
pub const GPT_BASIC_DATA_ATTRIBUTE_OFFLINE = @as(u64, 576460752303423488);
pub const GPT_BASIC_DATA_ATTRIBUTE_DAX = @as(u64, 288230376151711744);
pub const GPT_BASIC_DATA_ATTRIBUTE_SERVICE = @as(u64, 144115188075855872);
pub const GPT_SPACES_ATTRIBUTE_NO_METADATA = @as(u64, 9223372036854775808);
pub const HIST_NO_OF_BUCKETS = @as(u32, 24);
pub const DISK_LOGGING_START = @as(u32, 0);
pub const DISK_LOGGING_STOP = @as(u32, 1);
pub const DISK_LOGGING_DUMP = @as(u32, 2);
pub const DISK_BINNING = @as(u32, 3);
pub const CAP_ATA_ID_CMD = @as(u32, 1);
pub const CAP_ATAPI_ID_CMD = @as(u32, 2);
pub const CAP_SMART_CMD = @as(u32, 4);
pub const ATAPI_ID_CMD = @as(u32, 161);
pub const ID_CMD = @as(u32, 236);
pub const SMART_CMD = @as(u32, 176);
pub const SMART_CYL_LOW = @as(u32, 79);
pub const SMART_CYL_HI = @as(u32, 194);
pub const SMART_NO_ERROR = @as(u32, 0);
pub const SMART_IDE_ERROR = @as(u32, 1);
pub const SMART_INVALID_FLAG = @as(u32, 2);
pub const SMART_INVALID_COMMAND = @as(u32, 3);
pub const SMART_INVALID_BUFFER = @as(u32, 4);
pub const SMART_INVALID_DRIVE = @as(u32, 5);
pub const SMART_INVALID_IOCTL = @as(u32, 6);
pub const SMART_ERROR_NO_MEM = @as(u32, 7);
pub const SMART_INVALID_REGISTER = @as(u32, 8);
pub const SMART_NOT_SUPPORTED = @as(u32, 9);
pub const SMART_NO_IDE_DEVICE = @as(u32, 10);
pub const SMART_OFFLINE_ROUTINE_OFFLINE = @as(u32, 0);
pub const SMART_SHORT_SELFTEST_OFFLINE = @as(u32, 1);
pub const SMART_EXTENDED_SELFTEST_OFFLINE = @as(u32, 2);
pub const SMART_ABORT_OFFLINE_SELFTEST = @as(u32, 127);
pub const SMART_SHORT_SELFTEST_CAPTIVE = @as(u32, 129);
pub const SMART_EXTENDED_SELFTEST_CAPTIVE = @as(u32, 130);
pub const READ_ATTRIBUTE_BUFFER_SIZE = @as(u32, 512);
pub const IDENTIFY_BUFFER_SIZE = @as(u32, 512);
pub const READ_THRESHOLD_BUFFER_SIZE = @as(u32, 512);
pub const SMART_LOG_SECTOR_SIZE = @as(u32, 512);
pub const READ_ATTRIBUTES = @as(u32, 208);
pub const READ_THRESHOLDS = @as(u32, 209);
pub const ENABLE_DISABLE_AUTOSAVE = @as(u32, 210);
pub const SAVE_ATTRIBUTE_VALUES = @as(u32, 211);
pub const EXECUTE_OFFLINE_DIAGS = @as(u32, 212);
pub const SMART_READ_LOG = @as(u32, 213);
pub const SMART_WRITE_LOG = @as(u32, 214);
pub const ENABLE_SMART = @as(u32, 216);
pub const DISABLE_SMART = @as(u32, 217);
pub const RETURN_SMART_STATUS = @as(u32, 218);
pub const ENABLE_DISABLE_AUTO_OFFLINE = @as(u32, 219);
pub const IOCTL_DISK_GET_DISK_ATTRIBUTES = @as(u32, 458992);
pub const IOCTL_DISK_SET_DISK_ATTRIBUTES = @as(u32, 508148);
pub const DISK_ATTRIBUTE_OFFLINE = @as(u64, 1);
pub const DISK_ATTRIBUTE_READ_ONLY = @as(u64, 2);
pub const IOCTL_DISK_RESET_SNAPSHOT_INFO = @as(u32, 508432);
pub const IOCTL_CHANGER_GET_PARAMETERS = @as(u32, 3162112);
pub const IOCTL_CHANGER_GET_STATUS = @as(u32, 3162116);
pub const IOCTL_CHANGER_GET_PRODUCT_DATA = @as(u32, 3162120);
pub const IOCTL_CHANGER_SET_ACCESS = @as(u32, 3194896);
pub const IOCTL_CHANGER_GET_ELEMENT_STATUS = @as(u32, 3194900);
pub const IOCTL_CHANGER_INITIALIZE_ELEMENT_STATUS = @as(u32, 3162136);
pub const IOCTL_CHANGER_SET_POSITION = @as(u32, 3162140);
pub const IOCTL_CHANGER_EXCHANGE_MEDIUM = @as(u32, 3162144);
pub const IOCTL_CHANGER_MOVE_MEDIUM = @as(u32, 3162148);
pub const IOCTL_CHANGER_REINITIALIZE_TRANSPORT = @as(u32, 3162152);
pub const IOCTL_CHANGER_QUERY_VOLUME_TAGS = @as(u32, 3194924);
pub const MAX_VOLUME_ID_SIZE = @as(u32, 36);
pub const MAX_VOLUME_TEMPLATE_SIZE = @as(u32, 40);
pub const VENDOR_ID_LENGTH = @as(u32, 8);
pub const PRODUCT_ID_LENGTH = @as(u32, 16);
pub const REVISION_LENGTH = @as(u32, 4);
pub const SERIAL_NUMBER_LENGTH = @as(u32, 32);
pub const CHANGER_RESERVED_BIT = @as(u32, 2147483648);
pub const CHANGER_TO_TRANSPORT = @as(u32, 1);
pub const CHANGER_TO_SLOT = @as(u32, 2);
pub const CHANGER_TO_IEPORT = @as(u32, 4);
pub const CHANGER_TO_DRIVE = @as(u32, 8);
pub const LOCK_UNLOCK_IEPORT = @as(u32, 1);
pub const LOCK_UNLOCK_DOOR = @as(u32, 2);
pub const LOCK_UNLOCK_KEYPAD = @as(u32, 4);
pub const LOCK_ELEMENT = @as(u32, 0);
pub const UNLOCK_ELEMENT = @as(u32, 1);
pub const EXTEND_IEPORT = @as(u32, 2);
pub const RETRACT_IEPORT = @as(u32, 3);
pub const ERROR_LABEL_UNREADABLE = @as(u32, 1);
pub const ERROR_LABEL_QUESTIONABLE = @as(u32, 2);
pub const ERROR_SLOT_NOT_PRESENT = @as(u32, 4);
pub const ERROR_DRIVE_NOT_INSTALLED = @as(u32, 8);
pub const ERROR_TRAY_MALFUNCTION = @as(u32, 16);
pub const ERROR_INIT_STATUS_NEEDED = @as(u32, 17);
pub const ERROR_UNHANDLED_ERROR = @as(u32, 4294967295);
pub const SEARCH_ALL = @as(u32, 0);
pub const SEARCH_PRIMARY = @as(u32, 1);
pub const SEARCH_ALTERNATE = @as(u32, 2);
pub const SEARCH_ALL_NO_SEQ = @as(u32, 4);
pub const SEARCH_PRI_NO_SEQ = @as(u32, 5);
pub const SEARCH_ALT_NO_SEQ = @as(u32, 6);
pub const ASSERT_PRIMARY = @as(u32, 8);
pub const ASSERT_ALTERNATE = @as(u32, 9);
pub const REPLACE_PRIMARY = @as(u32, 10);
pub const REPLACE_ALTERNATE = @as(u32, 11);
pub const UNDEFINE_PRIMARY = @as(u32, 12);
pub const UNDEFINE_ALTERNATE = @as(u32, 13);
pub const IOCTL_SERIAL_LSRMST_INSERT = @as(u32, 1769596);
pub const IOCTL_SERENUM_EXPOSE_HARDWARE = @as(u32, 3604992);
pub const IOCTL_SERENUM_REMOVE_HARDWARE = @as(u32, 3604996);
pub const IOCTL_SERENUM_PORT_DESC = @as(u32, 3605000);
pub const IOCTL_SERENUM_GET_PORT_NAME = @as(u32, 3605004);
pub const FSCTL_REQUEST_OPLOCK_LEVEL_1 = @as(u32, 589824);
pub const FSCTL_REQUEST_OPLOCK_LEVEL_2 = @as(u32, 589828);
pub const FSCTL_REQUEST_BATCH_OPLOCK = @as(u32, 589832);
pub const FSCTL_OPLOCK_BREAK_ACKNOWLEDGE = @as(u32, 589836);
pub const FSCTL_OPBATCH_ACK_CLOSE_PENDING = @as(u32, 589840);
pub const FSCTL_OPLOCK_BREAK_NOTIFY = @as(u32, 589844);
pub const FSCTL_LOCK_VOLUME = @as(u32, 589848);
pub const FSCTL_UNLOCK_VOLUME = @as(u32, 589852);
pub const FSCTL_DISMOUNT_VOLUME = @as(u32, 589856);
pub const FSCTL_IS_VOLUME_MOUNTED = @as(u32, 589864);
pub const FSCTL_IS_PATHNAME_VALID = @as(u32, 589868);
pub const FSCTL_MARK_VOLUME_DIRTY = @as(u32, 589872);
pub const FSCTL_QUERY_RETRIEVAL_POINTERS = @as(u32, 589883);
pub const FSCTL_GET_COMPRESSION = @as(u32, 589884);
pub const FSCTL_SET_COMPRESSION = @as(u32, 639040);
pub const FSCTL_SET_BOOTLOADER_ACCESSED = @as(u32, 589903);
pub const FSCTL_MARK_AS_SYSTEM_HIVE = @as(u32, 589903);
pub const FSCTL_OPLOCK_BREAK_ACK_NO_2 = @as(u32, 589904);
pub const FSCTL_INVALIDATE_VOLUMES = @as(u32, 589908);
pub const FSCTL_QUERY_FAT_BPB = @as(u32, 589912);
pub const FSCTL_REQUEST_FILTER_OPLOCK = @as(u32, 589916);
pub const FSCTL_FILESYSTEM_GET_STATISTICS = @as(u32, 589920);
pub const FSCTL_GET_NTFS_VOLUME_DATA = @as(u32, 589924);
pub const FSCTL_GET_NTFS_FILE_RECORD = @as(u32, 589928);
pub const FSCTL_GET_VOLUME_BITMAP = @as(u32, 589935);
pub const FSCTL_GET_RETRIEVAL_POINTERS = @as(u32, 589939);
pub const FSCTL_MOVE_FILE = @as(u32, 589940);
pub const FSCTL_IS_VOLUME_DIRTY = @as(u32, 589944);
pub const FSCTL_ALLOW_EXTENDED_DASD_IO = @as(u32, 589955);
pub const FSCTL_FIND_FILES_BY_SID = @as(u32, 589967);
pub const FSCTL_SET_OBJECT_ID = @as(u32, 589976);
pub const FSCTL_GET_OBJECT_ID = @as(u32, 589980);
pub const FSCTL_DELETE_OBJECT_ID = @as(u32, 589984);
pub const FSCTL_SET_REPARSE_POINT = @as(u32, 589988);
pub const FSCTL_GET_REPARSE_POINT = @as(u32, 589992);
pub const FSCTL_DELETE_REPARSE_POINT = @as(u32, 589996);
pub const FSCTL_ENUM_USN_DATA = @as(u32, 590003);
pub const FSCTL_SECURITY_ID_CHECK = @as(u32, 606391);
pub const FSCTL_READ_USN_JOURNAL = @as(u32, 590011);
pub const FSCTL_SET_OBJECT_ID_EXTENDED = @as(u32, 590012);
pub const FSCTL_CREATE_OR_GET_OBJECT_ID = @as(u32, 590016);
pub const FSCTL_SET_SPARSE = @as(u32, 590020);
pub const FSCTL_SET_ZERO_DATA = @as(u32, 622792);
pub const FSCTL_QUERY_ALLOCATED_RANGES = @as(u32, 606415);
pub const FSCTL_ENABLE_UPGRADE = @as(u32, 622800);
pub const FSCTL_SET_ENCRYPTION = @as(u32, 590039);
pub const FSCTL_ENCRYPTION_FSCTL_IO = @as(u32, 590043);
pub const FSCTL_WRITE_RAW_ENCRYPTED = @as(u32, 590047);
pub const FSCTL_READ_RAW_ENCRYPTED = @as(u32, 590051);
pub const FSCTL_CREATE_USN_JOURNAL = @as(u32, 590055);
pub const FSCTL_READ_FILE_USN_DATA = @as(u32, 590059);
pub const FSCTL_WRITE_USN_CLOSE_RECORD = @as(u32, 590063);
pub const FSCTL_EXTEND_VOLUME = @as(u32, 590064);
pub const FSCTL_QUERY_USN_JOURNAL = @as(u32, 590068);
pub const FSCTL_DELETE_USN_JOURNAL = @as(u32, 590072);
pub const FSCTL_MARK_HANDLE = @as(u32, 590076);
pub const FSCTL_SIS_COPYFILE = @as(u32, 590080);
pub const FSCTL_SIS_LINK_FILES = @as(u32, 639236);
pub const FSCTL_RECALL_FILE = @as(u32, 590103);
pub const FSCTL_READ_FROM_PLEX = @as(u32, 606494);
pub const FSCTL_FILE_PREFETCH = @as(u32, 590112);
pub const FSCTL_MAKE_MEDIA_COMPATIBLE = @as(u32, 622896);
pub const FSCTL_SET_DEFECT_MANAGEMENT = @as(u32, 622900);
pub const FSCTL_QUERY_SPARING_INFO = @as(u32, 590136);
pub const FSCTL_QUERY_ON_DISK_VOLUME_INFO = @as(u32, 590140);
pub const FSCTL_SET_VOLUME_COMPRESSION_STATE = @as(u32, 590144);
pub const FSCTL_TXFS_MODIFY_RM = @as(u32, 622916);
pub const FSCTL_TXFS_QUERY_RM_INFORMATION = @as(u32, 606536);
pub const FSCTL_TXFS_ROLLFORWARD_REDO = @as(u32, 622928);
pub const FSCTL_TXFS_ROLLFORWARD_UNDO = @as(u32, 622932);
pub const FSCTL_TXFS_START_RM = @as(u32, 622936);
pub const FSCTL_TXFS_SHUTDOWN_RM = @as(u32, 622940);
pub const FSCTL_TXFS_READ_BACKUP_INFORMATION = @as(u32, 606560);
pub const FSCTL_TXFS_WRITE_BACKUP_INFORMATION = @as(u32, 622948);
pub const FSCTL_TXFS_CREATE_SECONDARY_RM = @as(u32, 622952);
pub const FSCTL_TXFS_GET_METADATA_INFO = @as(u32, 606572);
pub const FSCTL_TXFS_GET_TRANSACTED_VERSION = @as(u32, 606576);
pub const FSCTL_TXFS_SAVEPOINT_INFORMATION = @as(u32, 622968);
pub const FSCTL_TXFS_CREATE_MINIVERSION = @as(u32, 622972);
pub const FSCTL_TXFS_TRANSACTION_ACTIVE = @as(u32, 606604);
pub const FSCTL_SET_ZERO_ON_DEALLOCATION = @as(u32, 590228);
pub const FSCTL_SET_REPAIR = @as(u32, 590232);
pub const FSCTL_GET_REPAIR = @as(u32, 590236);
pub const FSCTL_WAIT_FOR_REPAIR = @as(u32, 590240);
pub const FSCTL_INITIATE_REPAIR = @as(u32, 590248);
pub const FSCTL_CSC_INTERNAL = @as(u32, 590255);
pub const FSCTL_SHRINK_VOLUME = @as(u32, 590256);
pub const FSCTL_SET_SHORT_NAME_BEHAVIOR = @as(u32, 590260);
pub const FSCTL_DFSR_SET_GHOST_HANDLE_STATE = @as(u32, 590264);
pub const FSCTL_TXFS_LIST_TRANSACTION_LOCKED_FILES = @as(u32, 606688);
pub const FSCTL_TXFS_LIST_TRANSACTIONS = @as(u32, 606692);
pub const FSCTL_QUERY_PAGEFILE_ENCRYPTION = @as(u32, 590312);
pub const FSCTL_RESET_VOLUME_ALLOCATION_HINTS = @as(u32, 590316);
pub const FSCTL_QUERY_DEPENDENT_VOLUME = @as(u32, 590320);
pub const FSCTL_SD_GLOBAL_CHANGE = @as(u32, 590324);
pub const FSCTL_TXFS_READ_BACKUP_INFORMATION2 = @as(u32, 590328);
pub const FSCTL_LOOKUP_STREAM_FROM_CLUSTER = @as(u32, 590332);
pub const FSCTL_TXFS_WRITE_BACKUP_INFORMATION2 = @as(u32, 590336);
pub const FSCTL_FILE_TYPE_NOTIFICATION = @as(u32, 590340);
pub const FSCTL_FILE_LEVEL_TRIM = @as(u32, 623112);
pub const FSCTL_GET_BOOT_AREA_INFO = @as(u32, 590384);
pub const FSCTL_GET_RETRIEVAL_POINTER_BASE = @as(u32, 590388);
pub const FSCTL_SET_PERSISTENT_VOLUME_STATE = @as(u32, 590392);
pub const FSCTL_QUERY_PERSISTENT_VOLUME_STATE = @as(u32, 590396);
pub const FSCTL_REQUEST_OPLOCK = @as(u32, 590400);
pub const FSCTL_CSV_TUNNEL_REQUEST = @as(u32, 590404);
pub const FSCTL_IS_CSV_FILE = @as(u32, 590408);
pub const FSCTL_QUERY_FILE_SYSTEM_RECOGNITION = @as(u32, 590412);
pub const FSCTL_CSV_GET_VOLUME_PATH_NAME = @as(u32, 590416);
pub const FSCTL_CSV_GET_VOLUME_NAME_FOR_VOLUME_MOUNT_POINT = @as(u32, 590420);
pub const FSCTL_CSV_GET_VOLUME_PATH_NAMES_FOR_VOLUME_NAME = @as(u32, 590424);
pub const FSCTL_IS_FILE_ON_CSV_VOLUME = @as(u32, 590428);
pub const FSCTL_CORRUPTION_HANDLING = @as(u32, 590432);
pub const FSCTL_OFFLOAD_READ = @as(u32, 606820);
pub const FSCTL_OFFLOAD_WRITE = @as(u32, 623208);
pub const FSCTL_CSV_INTERNAL = @as(u32, 590444);
pub const FSCTL_SET_PURGE_FAILURE_MODE = @as(u32, 590448);
pub const FSCTL_QUERY_FILE_LAYOUT = @as(u32, 590455);
pub const FSCTL_IS_VOLUME_OWNED_BYCSVFS = @as(u32, 590456);
pub const FSCTL_GET_INTEGRITY_INFORMATION = @as(u32, 590460);
pub const FSCTL_SET_INTEGRITY_INFORMATION = @as(u32, 639616);
pub const FSCTL_QUERY_FILE_REGIONS = @as(u32, 590468);
pub const FSCTL_RKF_INTERNAL = @as(u32, 590511);
pub const FSCTL_SCRUB_DATA = @as(u32, 590512);
pub const FSCTL_REPAIR_COPIES = @as(u32, 639668);
pub const FSCTL_DISABLE_LOCAL_BUFFERING = @as(u32, 590520);
pub const FSCTL_CSV_MGMT_LOCK = @as(u32, 590524);
pub const FSCTL_CSV_QUERY_DOWN_LEVEL_FILE_SYSTEM_CHARACTERISTICS = @as(u32, 590528);
pub const FSCTL_ADVANCE_FILE_ID = @as(u32, 590532);
pub const FSCTL_CSV_SYNC_TUNNEL_REQUEST = @as(u32, 590536);
pub const FSCTL_CSV_QUERY_VETO_FILE_DIRECT_IO = @as(u32, 590540);
pub const FSCTL_WRITE_USN_REASON = @as(u32, 590544);
pub const FSCTL_CSV_CONTROL = @as(u32, 590548);
pub const FSCTL_GET_REFS_VOLUME_DATA = @as(u32, 590552);
pub const FSCTL_CSV_H_BREAKING_SYNC_TUNNEL_REQUEST = @as(u32, 590564);
pub const FSCTL_QUERY_STORAGE_CLASSES = @as(u32, 590572);
pub const FSCTL_QUERY_REGION_INFO = @as(u32, 590576);
pub const FSCTL_USN_TRACK_MODIFIED_RANGES = @as(u32, 590580);
pub const FSCTL_QUERY_SHARED_VIRTUAL_DISK_SUPPORT = @as(u32, 590592);
pub const FSCTL_SVHDX_SYNC_TUNNEL_REQUEST = @as(u32, 590596);
pub const FSCTL_SVHDX_SET_INITIATOR_INFORMATION = @as(u32, 590600);
pub const FSCTL_SET_EXTERNAL_BACKING = @as(u32, 590604);
pub const FSCTL_GET_EXTERNAL_BACKING = @as(u32, 590608);
pub const FSCTL_DELETE_EXTERNAL_BACKING = @as(u32, 590612);
pub const FSCTL_ENUM_EXTERNAL_BACKING = @as(u32, 590616);
pub const FSCTL_ENUM_OVERLAY = @as(u32, 590623);
pub const FSCTL_ADD_OVERLAY = @as(u32, 623408);
pub const FSCTL_REMOVE_OVERLAY = @as(u32, 623412);
pub const FSCTL_UPDATE_OVERLAY = @as(u32, 623416);
pub const FSCTL_SHUFFLE_FILE = @as(u32, 639808);
pub const FSCTL_DUPLICATE_EXTENTS_TO_FILE = @as(u32, 623428);
pub const FSCTL_SPARSE_OVERALLOCATE = @as(u32, 590668);
pub const FSCTL_STORAGE_QOS_CONTROL = @as(u32, 590672);
pub const FSCTL_INITIATE_FILE_METADATA_OPTIMIZATION = @as(u32, 590684);
pub const FSCTL_QUERY_FILE_METADATA_OPTIMIZATION = @as(u32, 590688);
pub const FSCTL_SVHDX_ASYNC_TUNNEL_REQUEST = @as(u32, 590692);
pub const FSCTL_GET_WOF_VERSION = @as(u32, 590696);
pub const FSCTL_HCS_SYNC_TUNNEL_REQUEST = @as(u32, 590700);
pub const FSCTL_HCS_ASYNC_TUNNEL_REQUEST = @as(u32, 590704);
pub const FSCTL_QUERY_EXTENT_READ_CACHE_INFO = @as(u32, 590711);
pub const FSCTL_QUERY_REFS_VOLUME_COUNTER_INFO = @as(u32, 590715);
pub const FSCTL_CLEAN_VOLUME_METADATA = @as(u32, 590716);
pub const FSCTL_SET_INTEGRITY_INFORMATION_EX = @as(u32, 590720);
pub const FSCTL_SUSPEND_OVERLAY = @as(u32, 590724);
pub const FSCTL_VIRTUAL_STORAGE_QUERY_PROPERTY = @as(u32, 590728);
pub const FSCTL_FILESYSTEM_GET_STATISTICS_EX = @as(u32, 590732);
pub const FSCTL_QUERY_VOLUME_CONTAINER_STATE = @as(u32, 590736);
pub const FSCTL_SET_LAYER_ROOT = @as(u32, 590740);
pub const FSCTL_QUERY_DIRECT_ACCESS_EXTENTS = @as(u32, 590747);
pub const FSCTL_NOTIFY_STORAGE_SPACE_ALLOCATION = @as(u32, 590748);
pub const FSCTL_SSDI_STORAGE_REQUEST = @as(u32, 590752);
pub const FSCTL_QUERY_DIRECT_IMAGE_ORIGINAL_BASE = @as(u32, 590756);
pub const FSCTL_READ_UNPRIVILEGED_USN_JOURNAL = @as(u32, 590763);
pub const FSCTL_GHOST_FILE_EXTENTS = @as(u32, 623532);
pub const FSCTL_QUERY_GHOSTED_FILE_EXTENTS = @as(u32, 590768);
pub const FSCTL_UNMAP_SPACE = @as(u32, 590772);
pub const FSCTL_HCS_SYNC_NO_WRITE_TUNNEL_REQUEST = @as(u32, 590776);
pub const FSCTL_START_VIRTUALIZATION_INSTANCE = @as(u32, 590784);
pub const FSCTL_GET_FILTER_FILE_IDENTIFIER = @as(u32, 590788);
pub const FSCTL_STREAMS_QUERY_PARAMETERS = @as(u32, 590788);
pub const FSCTL_STREAMS_ASSOCIATE_ID = @as(u32, 590792);
pub const FSCTL_STREAMS_QUERY_ID = @as(u32, 590796);
pub const FSCTL_GET_RETRIEVAL_POINTERS_AND_REFCOUNT = @as(u32, 590803);
pub const FSCTL_QUERY_VOLUME_NUMA_INFO = @as(u32, 590804);
pub const FSCTL_REFS_DEALLOCATE_RANGES = @as(u32, 590808);
pub const FSCTL_QUERY_REFS_SMR_VOLUME_INFO = @as(u32, 590812);
pub const FSCTL_SET_REFS_SMR_VOLUME_GC_PARAMETERS = @as(u32, 590816);
pub const FSCTL_SET_REFS_FILE_STRICTLY_SEQUENTIAL = @as(u32, 590820);
pub const FSCTL_DUPLICATE_EXTENTS_TO_FILE_EX = @as(u32, 623592);
pub const FSCTL_QUERY_BAD_RANGES = @as(u32, 590828);
pub const FSCTL_SET_DAX_ALLOC_ALIGNMENT_HINT = @as(u32, 590832);
pub const FSCTL_DELETE_CORRUPTED_REFS_CONTAINER = @as(u32, 590836);
pub const FSCTL_SCRUB_UNDISCOVERABLE_ID = @as(u32, 590840);
pub const FSCTL_NOTIFY_DATA_CHANGE = @as(u32, 590844);
pub const FSCTL_START_VIRTUALIZATION_INSTANCE_EX = @as(u32, 590848);
pub const FSCTL_ENCRYPTION_KEY_CONTROL = @as(u32, 590852);
pub const FSCTL_VIRTUAL_STORAGE_SET_BEHAVIOR = @as(u32, 590856);
pub const FSCTL_SET_REPARSE_POINT_EX = @as(u32, 590860);
pub const FSCTL_REARRANGE_FILE = @as(u32, 640032);
pub const FSCTL_VIRTUAL_STORAGE_PASSTHROUGH = @as(u32, 590884);
pub const FSCTL_GET_RETRIEVAL_POINTER_COUNT = @as(u32, 590891);
pub const FSCTL_ENABLE_PER_IO_FLAGS = @as(u32, 590892);
pub const FSCTL_QUERY_ASYNC_DUPLICATE_EXTENTS_STATUS = @as(u32, 590896);
pub const FSCTL_SMB_SHARE_FLUSH_AND_PURGE = @as(u32, 590908);
pub const FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT = @as(u32, 590912);
pub const FSCTL_MANAGE_BYPASS_IO = @as(u32, 590920);
pub const GET_VOLUME_BITMAP_FLAG_MASK_METADATA = @as(u32, 1);
pub const FLAG_USN_TRACK_MODIFIED_RANGES_ENABLE = @as(u32, 1);
pub const USN_PAGE_SIZE = @as(u32, 4096);
pub const USN_REASON_DATA_OVERWRITE = @as(u32, 1);
pub const USN_REASON_DATA_EXTEND = @as(u32, 2);
pub const USN_REASON_DATA_TRUNCATION = @as(u32, 4);
pub const USN_REASON_NAMED_DATA_OVERWRITE = @as(u32, 16);
pub const USN_REASON_NAMED_DATA_EXTEND = @as(u32, 32);
pub const USN_REASON_NAMED_DATA_TRUNCATION = @as(u32, 64);
pub const USN_REASON_FILE_CREATE = @as(u32, 256);
pub const USN_REASON_FILE_DELETE = @as(u32, 512);
pub const USN_REASON_EA_CHANGE = @as(u32, 1024);
pub const USN_REASON_SECURITY_CHANGE = @as(u32, 2048);
pub const USN_REASON_RENAME_OLD_NAME = @as(u32, 4096);
pub const USN_REASON_RENAME_NEW_NAME = @as(u32, 8192);
pub const USN_REASON_INDEXABLE_CHANGE = @as(u32, 16384);
pub const USN_REASON_BASIC_INFO_CHANGE = @as(u32, 32768);
pub const USN_REASON_HARD_LINK_CHANGE = @as(u32, 65536);
pub const USN_REASON_COMPRESSION_CHANGE = @as(u32, 131072);
pub const USN_REASON_ENCRYPTION_CHANGE = @as(u32, 262144);
pub const USN_REASON_OBJECT_ID_CHANGE = @as(u32, 524288);
pub const USN_REASON_REPARSE_POINT_CHANGE = @as(u32, 1048576);
pub const USN_REASON_STREAM_CHANGE = @as(u32, 2097152);
pub const USN_REASON_TRANSACTED_CHANGE = @as(u32, 4194304);
pub const USN_REASON_INTEGRITY_CHANGE = @as(u32, 8388608);
pub const USN_REASON_DESIRED_STORAGE_CLASS_CHANGE = @as(u32, 16777216);
pub const USN_REASON_CLOSE = @as(u32, 2147483648);
pub const USN_DELETE_VALID_FLAGS = @as(u32, 3);
pub const MARK_HANDLE_PROTECT_CLUSTERS = @as(u32, 1);
pub const MARK_HANDLE_TXF_SYSTEM_LOG = @as(u32, 4);
pub const MARK_HANDLE_NOT_TXF_SYSTEM_LOG = @as(u32, 8);
pub const MARK_HANDLE_REALTIME = @as(u32, 32);
pub const MARK_HANDLE_NOT_REALTIME = @as(u32, 64);
pub const MARK_HANDLE_CLOUD_SYNC = @as(u32, 2048);
pub const MARK_HANDLE_READ_COPY = @as(u32, 128);
pub const MARK_HANDLE_NOT_READ_COPY = @as(u32, 256);
pub const MARK_HANDLE_FILTER_METADATA = @as(u32, 512);
pub const MARK_HANDLE_RETURN_PURGE_FAILURE = @as(u32, 1024);
pub const MARK_HANDLE_DISABLE_FILE_METADATA_OPTIMIZATION = @as(u32, 4096);
pub const MARK_HANDLE_ENABLE_USN_SOURCE_ON_PAGING_IO = @as(u32, 8192);
pub const MARK_HANDLE_SKIP_COHERENCY_SYNC_DISALLOW_WRITES = @as(u32, 16384);
pub const MARK_HANDLE_SUPPRESS_VOLUME_OPEN_FLUSH = @as(u32, 32768);
pub const MARK_HANDLE_ENABLE_CPU_CACHE = @as(u32, 268435456);
pub const VOLUME_IS_DIRTY = @as(u32, 1);
pub const VOLUME_UPGRADE_SCHEDULED = @as(u32, 2);
pub const VOLUME_SESSION_OPEN = @as(u32, 4);
pub const FILE_PREFETCH_TYPE_FOR_CREATE = @as(u32, 1);
pub const FILE_PREFETCH_TYPE_FOR_DIRENUM = @as(u32, 2);
pub const FILE_PREFETCH_TYPE_FOR_CREATE_EX = @as(u32, 3);
pub const FILE_PREFETCH_TYPE_FOR_DIRENUM_EX = @as(u32, 4);
pub const FILE_PREFETCH_TYPE_MAX = @as(u32, 4);
pub const FILESYSTEM_STATISTICS_TYPE_REFS = @as(u32, 4);
pub const FILE_ZERO_DATA_INFORMATION_FLAG_PRESERVE_CACHED_DATA = @as(u32, 1);
pub const FILE_SET_ENCRYPTION = @as(u32, 1);
pub const FILE_CLEAR_ENCRYPTION = @as(u32, 2);
pub const STREAM_SET_ENCRYPTION = @as(u32, 3);
pub const STREAM_CLEAR_ENCRYPTION = @as(u32, 4);
pub const MAXIMUM_ENCRYPTION_VALUE = @as(u32, 4);
pub const ENCRYPTION_FORMAT_DEFAULT = @as(u32, 1);
pub const ENCRYPTED_DATA_INFO_SPARSE_FILE = @as(u32, 1);
pub const COPYFILE_SIS_LINK = @as(u32, 1);
pub const COPYFILE_SIS_REPLACE = @as(u32, 2);
pub const COPYFILE_SIS_FLAGS = @as(u32, 3);
pub const SET_REPAIR_ENABLED = @as(u32, 1);
pub const SET_REPAIR_WARN_ABOUT_DATA_LOSS = @as(u32, 8);
pub const SET_REPAIR_DISABLED_AND_BUGCHECK_ON_CORRUPT = @as(u32, 16);
pub const SET_REPAIR_VALID_MASK = @as(u32, 25);
pub const FILE_INITIATE_REPAIR_HINT1_FILE_RECORD_NOT_IN_USE = @as(u64, 1);
pub const FILE_INITIATE_REPAIR_HINT1_FILE_RECORD_REUSED = @as(u64, 2);
pub const FILE_INITIATE_REPAIR_HINT1_FILE_RECORD_NOT_EXIST = @as(u64, 4);
pub const FILE_INITIATE_REPAIR_HINT1_FILE_RECORD_NOT_BASE_RECORD = @as(u64, 8);
pub const FILE_INITIATE_REPAIR_HINT1_SYSTEM_FILE = @as(u64, 16);
pub const FILE_INITIATE_REPAIR_HINT1_NOT_IMPLEMENTED = @as(u64, 32);
pub const FILE_INITIATE_REPAIR_HINT1_UNABLE_TO_REPAIR = @as(u64, 64);
pub const FILE_INITIATE_REPAIR_HINT1_REPAIR_DISABLED = @as(u64, 128);
pub const FILE_INITIATE_REPAIR_HINT1_RECURSIVELY_CORRUPTED = @as(u64, 256);
pub const FILE_INITIATE_REPAIR_HINT1_ORPHAN_GENERATED = @as(u64, 512);
pub const FILE_INITIATE_REPAIR_HINT1_REPAIRED = @as(u64, 1024);
pub const FILE_INITIATE_REPAIR_HINT1_NOTHING_WRONG = @as(u64, 2048);
pub const FILE_INITIATE_REPAIR_HINT1_ATTRIBUTE_NOT_FOUND = @as(u64, 4096);
pub const FILE_INITIATE_REPAIR_HINT1_POTENTIAL_CROSSLINK = @as(u64, 8192);
pub const FILE_INITIATE_REPAIR_HINT1_STALE_INFORMATION = @as(u64, 16384);
pub const FILE_INITIATE_REPAIR_HINT1_CLUSTERS_ALREADY_IN_USE = @as(u64, 32768);
pub const FILE_INITIATE_REPAIR_HINT1_LCN_NOT_EXIST = @as(u64, 65536);
pub const FILE_INITIATE_REPAIR_HINT1_INVALID_RUN_LENGTH = @as(u64, 131072);
pub const FILE_INITIATE_REPAIR_HINT1_FILE_RECORD_NOT_ORPHAN = @as(u64, 262144);
pub const FILE_INITIATE_REPAIR_HINT1_FILE_RECORD_IS_BASE_RECORD = @as(u64, 524288);
pub const FILE_INITIATE_REPAIR_HINT1_INVALID_ARRAY_LENGTH_COUNT = @as(u64, 1048576);
pub const FILE_INITIATE_REPAIR_HINT1_SID_VALID = @as(u64, 2097152);
pub const FILE_INITIATE_REPAIR_HINT1_SID_MISMATCH = @as(u64, 4194304);
pub const FILE_INITIATE_REPAIR_HINT1_INVALID_PARENT = @as(u64, 8388608);
pub const FILE_INITIATE_REPAIR_HINT1_PARENT_FILE_RECORD_NOT_IN_USE = @as(u64, 16777216);
pub const FILE_INITIATE_REPAIR_HINT1_PARENT_FILE_RECORD_REUSED = @as(u64, 33554432);
pub const FILE_INITIATE_REPAIR_HINT1_PARENT_FILE_RECORD_NOT_EXIST = @as(u64, 67108864);
pub const FILE_INITIATE_REPAIR_HINT1_PARENT_FILE_RECORD_NOT_BASE_RECORD = @as(u64, 134217728);
pub const FILE_INITIATE_REPAIR_HINT1_PARENT_FILE_RECORD_NOT_INDEX = @as(u64, 268435456);
pub const FILE_INITIATE_REPAIR_HINT1_VALID_INDEX_ENTRY = @as(u64, 536870912);
pub const FILE_INITIATE_REPAIR_HINT1_OUT_OF_GENERIC_NAMES = @as(u64, 1073741824);
pub const FILE_INITIATE_REPAIR_HINT1_OUT_OF_RESOURCE = @as(u64, 2147483648);
pub const FILE_INITIATE_REPAIR_HINT1_INVALID_LCN = @as(u64, 4294967296);
pub const FILE_INITIATE_REPAIR_HINT1_INVALID_VCN = @as(u64, 8589934592);
pub const FILE_INITIATE_REPAIR_HINT1_NAME_CONFLICT = @as(u64, 17179869184);
pub const FILE_INITIATE_REPAIR_HINT1_ORPHAN = @as(u64, 34359738368);
pub const FILE_INITIATE_REPAIR_HINT1_ATTRIBUTE_TOO_SMALL = @as(u64, 68719476736);
pub const FILE_INITIATE_REPAIR_HINT1_ATTRIBUTE_NON_RESIDENT = @as(u64, 137438953472);
pub const FILE_INITIATE_REPAIR_HINT1_DENY_DEFRAG = @as(u64, 274877906944);
pub const FILE_INITIATE_REPAIR_HINT1_PREVIOUS_PARENT_STILL_VALID = @as(u64, 549755813888);
pub const FILE_INITIATE_REPAIR_HINT1_INDEX_ENTRY_MISMATCH = @as(u64, 1099511627776);
pub const FILE_INITIATE_REPAIR_HINT1_INVALID_ORPHAN_RECOVERY_NAME = @as(u64, 2199023255552);
pub const FILE_INITIATE_REPAIR_HINT1_MULTIPLE_FILE_NAME_ATTRIBUTES = @as(u64, 4398046511104);
pub const TXFS_LOGGING_MODE_SIMPLE = @as(u32, 1);
pub const TXFS_LOGGING_MODE_FULL = @as(u32, 2);
pub const TXFS_TRANSACTION_STATE_NONE = @as(u32, 0);
pub const TXFS_TRANSACTION_STATE_ACTIVE = @as(u32, 1);
pub const TXFS_TRANSACTION_STATE_PREPARED = @as(u32, 2);
pub const TXFS_TRANSACTION_STATE_NOTACTIVE = @as(u32, 3);
pub const TXFS_RM_STATE_NOT_STARTED = @as(u32, 0);
pub const TXFS_RM_STATE_STARTING = @as(u32, 1);
pub const TXFS_RM_STATE_ACTIVE = @as(u32, 2);
pub const TXFS_RM_STATE_SHUTTING_DOWN = @as(u32, 3);
pub const TXFS_ROLLFORWARD_REDO_FLAG_USE_LAST_REDO_LSN = @as(u32, 1);
pub const TXFS_ROLLFORWARD_REDO_FLAG_USE_LAST_VIRTUAL_CLOCK = @as(u32, 2);
pub const TXFS_START_RM_FLAG_LOG_CONTAINER_COUNT_MAX = @as(u32, 1);
pub const TXFS_START_RM_FLAG_LOG_CONTAINER_COUNT_MIN = @as(u32, 2);
pub const TXFS_START_RM_FLAG_LOG_CONTAINER_SIZE = @as(u32, 4);
pub const TXFS_START_RM_FLAG_LOG_GROWTH_INCREMENT_NUM_CONTAINERS = @as(u32, 8);
pub const TXFS_START_RM_FLAG_LOG_GROWTH_INCREMENT_PERCENT = @as(u32, 16);
pub const TXFS_START_RM_FLAG_LOG_AUTO_SHRINK_PERCENTAGE = @as(u32, 32);
pub const TXFS_START_RM_FLAG_LOG_NO_CONTAINER_COUNT_MAX = @as(u32, 64);
pub const TXFS_START_RM_FLAG_LOG_NO_CONTAINER_COUNT_MIN = @as(u32, 128);
pub const TXFS_START_RM_FLAG_RECOVER_BEST_EFFORT = @as(u32, 512);
pub const TXFS_START_RM_FLAG_LOGGING_MODE = @as(u32, 1024);
pub const TXFS_START_RM_FLAG_PRESERVE_CHANGES = @as(u32, 2048);
pub const TXFS_START_RM_FLAG_PREFER_CONSISTENCY = @as(u32, 4096);
pub const TXFS_START_RM_FLAG_PREFER_AVAILABILITY = @as(u32, 8192);
pub const TXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY_FLAG_CREATED = @as(u32, 1);
pub const TXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY_FLAG_DELETED = @as(u32, 2);
pub const TXFS_TRANSACTED_VERSION_NONTRANSACTED = @as(u32, 4294967294);
pub const TXFS_TRANSACTED_VERSION_UNCOMMITTED = @as(u32, 4294967295);
pub const TXFS_SAVEPOINT_SET = @as(u32, 1);
pub const TXFS_SAVEPOINT_ROLLBACK = @as(u32, 2);
pub const TXFS_SAVEPOINT_CLEAR = @as(u32, 4);
pub const TXFS_SAVEPOINT_CLEAR_ALL = @as(u32, 16);
pub const PERSISTENT_VOLUME_STATE_SHORT_NAME_CREATION_DISABLED = @as(u32, 1);
pub const PERSISTENT_VOLUME_STATE_VOLUME_SCRUB_DISABLED = @as(u32, 2);
pub const PERSISTENT_VOLUME_STATE_GLOBAL_METADATA_NO_SEEK_PENALTY = @as(u32, 4);
pub const PERSISTENT_VOLUME_STATE_LOCAL_METADATA_NO_SEEK_PENALTY = @as(u32, 8);
pub const PERSISTENT_VOLUME_STATE_NO_HEAT_GATHERING = @as(u32, 16);
pub const PERSISTENT_VOLUME_STATE_CONTAINS_BACKING_WIM = @as(u32, 32);
pub const PERSISTENT_VOLUME_STATE_BACKED_BY_WIM = @as(u32, 64);
pub const PERSISTENT_VOLUME_STATE_NO_WRITE_AUTO_TIERING = @as(u32, 128);
pub const PERSISTENT_VOLUME_STATE_TXF_DISABLED = @as(u32, 256);
pub const PERSISTENT_VOLUME_STATE_REALLOCATE_ALL_DATA_WRITES = @as(u32, 512);
pub const PERSISTENT_VOLUME_STATE_CHKDSK_RAN_ONCE = @as(u32, 1024);
pub const PERSISTENT_VOLUME_STATE_MODIFIED_BY_CHKDSK = @as(u32, 2048);
pub const PERSISTENT_VOLUME_STATE_DAX_FORMATTED = @as(u32, 4096);
pub const OPLOCK_LEVEL_CACHE_READ = @as(u32, 1);
pub const OPLOCK_LEVEL_CACHE_HANDLE = @as(u32, 2);
pub const OPLOCK_LEVEL_CACHE_WRITE = @as(u32, 4);
pub const REQUEST_OPLOCK_INPUT_FLAG_REQUEST = @as(u32, 1);
pub const REQUEST_OPLOCK_INPUT_FLAG_ACK = @as(u32, 2);
pub const REQUEST_OPLOCK_INPUT_FLAG_COMPLETE_ACK_ON_CLOSE = @as(u32, 4);
pub const REQUEST_OPLOCK_CURRENT_VERSION = @as(u32, 1);
pub const REQUEST_OPLOCK_OUTPUT_FLAG_ACK_REQUIRED = @as(u32, 1);
pub const REQUEST_OPLOCK_OUTPUT_FLAG_MODES_PROVIDED = @as(u32, 2);
pub const QUERY_DEPENDENT_VOLUME_REQUEST_FLAG_HOST_VOLUMES = @as(u32, 1);
pub const QUERY_DEPENDENT_VOLUME_REQUEST_FLAG_GUEST_VOLUMES = @as(u32, 2);
pub const SD_GLOBAL_CHANGE_TYPE_MACHINE_SID = @as(u32, 1);
pub const SD_GLOBAL_CHANGE_TYPE_QUERY_STATS = @as(u32, 65536);
pub const SD_GLOBAL_CHANGE_TYPE_ENUM_SDS = @as(u32, 131072);
pub const LOOKUP_STREAM_FROM_CLUSTER_ENTRY_FLAG_PAGE_FILE = @as(u32, 1);
pub const LOOKUP_STREAM_FROM_CLUSTER_ENTRY_FLAG_DENY_DEFRAG_SET = @as(u32, 2);
pub const LOOKUP_STREAM_FROM_CLUSTER_ENTRY_FLAG_FS_SYSTEM_FILE = @as(u32, 4);
pub const LOOKUP_STREAM_FROM_CLUSTER_ENTRY_FLAG_TXF_SYSTEM_FILE = @as(u32, 8);
pub const LOOKUP_STREAM_FROM_CLUSTER_ENTRY_ATTRIBUTE_MASK = @as(u32, 4278190080);
pub const LOOKUP_STREAM_FROM_CLUSTER_ENTRY_ATTRIBUTE_DATA = @as(u32, 16777216);
pub const LOOKUP_STREAM_FROM_CLUSTER_ENTRY_ATTRIBUTE_INDEX = @as(u32, 33554432);
pub const LOOKUP_STREAM_FROM_CLUSTER_ENTRY_ATTRIBUTE_SYSTEM = @as(u32, 50331648);
pub const FILE_TYPE_NOTIFICATION_FLAG_USAGE_BEGIN = @as(u32, 1);
pub const FILE_TYPE_NOTIFICATION_FLAG_USAGE_END = @as(u32, 2);
pub const FILE_TYPE_NOTIFICATION_GUID_PAGE_FILE = Guid.initString("0d0a64a1-38fc-4db8-9fe7-3f4352cd7c5c");
pub const FILE_TYPE_NOTIFICATION_GUID_HIBERNATION_FILE = Guid.initString("b7624d64-b9a3-4cf8-8011-5b86c940e7b7");
pub const FILE_TYPE_NOTIFICATION_GUID_CRASHDUMP_FILE = Guid.initString("9d453eb7-d2a6-4dbd-a2e3-fbd0ed9109a9");
pub const CSV_MGMTLOCK_CHECK_VOLUME_REDIRECTED = @as(u32, 1);
pub const CSV_INVALID_DEVICE_NUMBER = @as(u32, 4294967295);
pub const CSV_QUERY_MDS_PATH_V2_VERSION_1 = @as(u32, 1);
pub const CSV_QUERY_MDS_PATH_FLAG_STORAGE_ON_THIS_NODE_IS_CONNECTED = @as(u32, 1);
pub const CSV_QUERY_MDS_PATH_FLAG_CSV_DIRECT_IO_ENABLED = @as(u32, 2);
pub const CSV_QUERY_MDS_PATH_FLAG_SMB_BYPASS_CSV_ENABLED = @as(u32, 4);
pub const QUERY_FILE_LAYOUT_RESTART = @as(u32, 1);
pub const QUERY_FILE_LAYOUT_INCLUDE_NAMES = @as(u32, 2);
pub const QUERY_FILE_LAYOUT_INCLUDE_STREAMS = @as(u32, 4);
pub const QUERY_FILE_LAYOUT_INCLUDE_EXTENTS = @as(u32, 8);
pub const QUERY_FILE_LAYOUT_INCLUDE_EXTRA_INFO = @as(u32, 16);
pub const QUERY_FILE_LAYOUT_INCLUDE_STREAMS_WITH_NO_CLUSTERS_ALLOCATED = @as(u32, 32);
pub const QUERY_FILE_LAYOUT_INCLUDE_FULL_PATH_IN_NAMES = @as(u32, 64);
pub const QUERY_FILE_LAYOUT_INCLUDE_STREAM_INFORMATION = @as(u32, 128);
pub const QUERY_FILE_LAYOUT_INCLUDE_STREAM_INFORMATION_FOR_DSC_ATTRIBUTE = @as(u32, 256);
pub const QUERY_FILE_LAYOUT_INCLUDE_STREAM_INFORMATION_FOR_TXF_ATTRIBUTE = @as(u32, 512);
pub const QUERY_FILE_LAYOUT_INCLUDE_STREAM_INFORMATION_FOR_EFS_ATTRIBUTE = @as(u32, 1024);
pub const QUERY_FILE_LAYOUT_INCLUDE_ONLY_FILES_WITH_SPECIFIC_ATTRIBUTES = @as(u32, 2048);
pub const QUERY_FILE_LAYOUT_INCLUDE_FILES_WITH_DSC_ATTRIBUTE = @as(u32, 4096);
pub const QUERY_FILE_LAYOUT_INCLUDE_STREAM_INFORMATION_FOR_DATA_ATTRIBUTE = @as(u32, 8192);
pub const QUERY_FILE_LAYOUT_INCLUDE_STREAM_INFORMATION_FOR_REPARSE_ATTRIBUTE = @as(u32, 16384);
pub const QUERY_FILE_LAYOUT_INCLUDE_STREAM_INFORMATION_FOR_EA_ATTRIBUTE = @as(u32, 32768);
pub const QUERY_FILE_LAYOUT_SINGLE_INSTANCED = @as(u32, 1);
pub const FILE_LAYOUT_NAME_ENTRY_PRIMARY = @as(u32, 1);
pub const FILE_LAYOUT_NAME_ENTRY_DOS = @as(u32, 2);
pub const STREAM_LAYOUT_ENTRY_IMMOVABLE = @as(u32, 1);
pub const STREAM_LAYOUT_ENTRY_PINNED = @as(u32, 2);
pub const STREAM_LAYOUT_ENTRY_RESIDENT = @as(u32, 4);
pub const STREAM_LAYOUT_ENTRY_NO_CLUSTERS_ALLOCATED = @as(u32, 8);
pub const STREAM_LAYOUT_ENTRY_HAS_INFORMATION = @as(u32, 16);
pub const STREAM_EXTENT_ENTRY_AS_RETRIEVAL_POINTERS = @as(u32, 1);
pub const STREAM_EXTENT_ENTRY_ALL_EXTENTS = @as(u32, 2);
pub const CHECKSUM_TYPE_UNCHANGED = @as(i32, -1);
pub const CHECKSUM_TYPE_NONE = @as(u32, 0);
pub const CHECKSUM_TYPE_CRC32 = @as(u32, 1);
pub const CHECKSUM_TYPE_CRC64 = @as(u32, 2);
pub const CHECKSUM_TYPE_ECC = @as(u32, 3);
pub const CHECKSUM_TYPE_FIRST_UNUSED_TYPE = @as(u32, 4);
pub const FSCTL_INTEGRITY_FLAG_CHECKSUM_ENFORCEMENT_OFF = @as(u32, 1);
pub const OFFLOAD_READ_FLAG_ALL_ZERO_BEYOND_CURRENT_RANGE = @as(u32, 1);
pub const SET_PURGE_FAILURE_MODE_ENABLED = @as(u32, 1);
pub const SET_PURGE_FAILURE_MODE_DISABLED = @as(u32, 2);
pub const FILE_REGION_USAGE_VALID_CACHED_DATA = @as(u32, 1);
pub const FILE_REGION_USAGE_VALID_NONCACHED_DATA = @as(u32, 2);
pub const FILE_REGION_USAGE_OTHER_PAGE_ALIGNMENT = @as(u32, 4);
pub const FILE_REGION_USAGE_LARGE_PAGE_ALIGNMENT = @as(u32, 8);
pub const FILE_REGION_USAGE_HUGE_PAGE_ALIGNMENT = @as(u32, 16);
pub const FILE_REGION_USAGE_QUERY_ALIGNMENT = @as(u32, 8);
pub const FILE_STORAGE_TIER_NAME_LENGTH = @as(u32, 256);
pub const FILE_STORAGE_TIER_DESCRIPTION_LENGTH = @as(u32, 512);
pub const FILE_STORAGE_TIER_FLAG_WRITE_BACK_CACHE = @as(u32, 2097152);
pub const FILE_STORAGE_TIER_FLAG_READ_CACHE = @as(u32, 4194304);
pub const FILE_STORAGE_TIER_FLAG_PARITY = @as(u32, 8388608);
pub const FILE_STORAGE_TIER_FLAG_SMR = @as(u32, 16777216);
pub const QUERY_STORAGE_CLASSES_FLAGS_MEASURE_WRITE = @as(u32, 2147483648);
pub const QUERY_STORAGE_CLASSES_FLAGS_MEASURE_READ = @as(u32, 1073741824);
pub const QUERY_STORAGE_CLASSES_FLAGS_NO_DEFRAG_VOLUME = @as(u32, 536870912);
pub const QUERY_FILE_LAYOUT_REPARSE_DATA_INVALID = @as(u32, 1);
pub const QUERY_FILE_LAYOUT_REPARSE_TAG_INVALID = @as(u32, 2);
pub const DUPLICATE_EXTENTS_DATA_EX_SOURCE_ATOMIC = @as(u32, 1);
pub const DUPLICATE_EXTENTS_DATA_EX_ASYNC = @as(u32, 2);
pub const REFS_SMR_VOLUME_INFO_OUTPUT_VERSION_V0 = @as(u32, 0);
pub const REFS_SMR_VOLUME_INFO_OUTPUT_VERSION_V1 = @as(u32, 1);
pub const REFS_SMR_VOLUME_GC_PARAMETERS_VERSION_V1 = @as(u32, 1);
pub const STREAMS_INVALID_ID = @as(u32, 0);
pub const STREAMS_MAX_ID = @as(u32, 65535);
pub const STREAMS_ASSOCIATE_ID_CLEAR = @as(u32, 1);
pub const STREAMS_ASSOCIATE_ID_SET = @as(u32, 2);
pub const DAX_ALLOC_ALIGNMENT_FLAG_MANDATORY = @as(u32, 1);
pub const DAX_ALLOC_ALIGNMENT_FLAG_FALLBACK_SPECIFIED = @as(u32, 2);
pub const WOF_CURRENT_VERSION = @as(u32, 1);
pub const WOF_PROVIDER_CLOUD = @as(u32, 3);
pub const WIM_PROVIDER_CURRENT_VERSION = @as(u32, 1);
pub const WIM_PROVIDER_EXTERNAL_FLAG_NOT_ACTIVE = @as(u32, 1);
pub const WIM_PROVIDER_EXTERNAL_FLAG_SUSPENDED = @as(u32, 2);
pub const FILE_PROVIDER_CURRENT_VERSION = @as(u32, 1);
pub const FILE_PROVIDER_SINGLE_FILE = @as(u32, 1);
pub const FILE_PROVIDER_COMPRESSION_MAXIMUM = @as(u32, 4);
pub const FILE_PROVIDER_FLAG_COMPRESS_ON_WRITE = @as(u32, 1);
pub const CONTAINER_VOLUME_STATE_HOSTING_CONTAINER = @as(u32, 1);
pub const CONTAINER_ROOT_INFO_FLAG_SCRATCH_ROOT = @as(u32, 1);
pub const CONTAINER_ROOT_INFO_FLAG_LAYER_ROOT = @as(u32, 2);
pub const CONTAINER_ROOT_INFO_FLAG_VIRTUALIZATION_ROOT = @as(u32, 4);
pub const CONTAINER_ROOT_INFO_FLAG_VIRTUALIZATION_TARGET_ROOT = @as(u32, 8);
pub const CONTAINER_ROOT_INFO_FLAG_VIRTUALIZATION_EXCEPTION_ROOT = @as(u32, 16);
pub const CONTAINER_ROOT_INFO_FLAG_BIND_ROOT = @as(u32, 32);
pub const CONTAINER_ROOT_INFO_FLAG_BIND_TARGET_ROOT = @as(u32, 64);
pub const CONTAINER_ROOT_INFO_FLAG_BIND_EXCEPTION_ROOT = @as(u32, 128);
pub const CONTAINER_ROOT_INFO_FLAG_BIND_DO_NOT_MAP_NAME = @as(u32, 256);
pub const CONTAINER_ROOT_INFO_FLAG_UNION_LAYER_ROOT = @as(u32, 512);
pub const CONTAINER_ROOT_INFO_VALID_FLAGS = @as(u32, 1023);
pub const PROJFS_PROTOCOL_VERSION = @as(u32, 3);
pub const EFS_TRACKED_OFFSET_HEADER_FLAG = @as(u32, 1);
pub const SPACES_TRACKED_OFFSET_HEADER_FLAG = @as(u32, 2);

//--------------------------------------------------------------------------------
// Section: Types (521)
//--------------------------------------------------------------------------------
pub const GPT_ATTRIBUTES = enum(u64) {
    ATTRIBUTE_PLATFORM_REQUIRED = 1,
    BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER = 9223372036854775808,
    BASIC_DATA_ATTRIBUTE_HIDDEN = 4611686018427387904,
    BASIC_DATA_ATTRIBUTE_SHADOW_COPY = 2305843009213693952,
    BASIC_DATA_ATTRIBUTE_READ_ONLY = 1152921504606846976,
    _,
    pub fn initFlags(o: struct {
        ATTRIBUTE_PLATFORM_REQUIRED: u1 = 0,
        BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER: u1 = 0,
        BASIC_DATA_ATTRIBUTE_HIDDEN: u1 = 0,
        BASIC_DATA_ATTRIBUTE_SHADOW_COPY: u1 = 0,
        BASIC_DATA_ATTRIBUTE_READ_ONLY: u1 = 0,
    }) GPT_ATTRIBUTES {
        return @as(GPT_ATTRIBUTES, @enumFromInt((if (o.ATTRIBUTE_PLATFORM_REQUIRED == 1) @intFromEnum(GPT_ATTRIBUTES.ATTRIBUTE_PLATFORM_REQUIRED) else 0) | (if (o.BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER == 1) @intFromEnum(GPT_ATTRIBUTES.BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER) else 0) | (if (o.BASIC_DATA_ATTRIBUTE_HIDDEN == 1) @intFromEnum(GPT_ATTRIBUTES.BASIC_DATA_ATTRIBUTE_HIDDEN) else 0) | (if (o.BASIC_DATA_ATTRIBUTE_SHADOW_COPY == 1) @intFromEnum(GPT_ATTRIBUTES.BASIC_DATA_ATTRIBUTE_SHADOW_COPY) else 0) | (if (o.BASIC_DATA_ATTRIBUTE_READ_ONLY == 1) @intFromEnum(GPT_ATTRIBUTES.BASIC_DATA_ATTRIBUTE_READ_ONLY) else 0)));
    }
};
pub const GPT_ATTRIBUTE_PLATFORM_REQUIRED = GPT_ATTRIBUTES.ATTRIBUTE_PLATFORM_REQUIRED;
pub const GPT_BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER = GPT_ATTRIBUTES.BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER;
pub const GPT_BASIC_DATA_ATTRIBUTE_HIDDEN = GPT_ATTRIBUTES.BASIC_DATA_ATTRIBUTE_HIDDEN;
pub const GPT_BASIC_DATA_ATTRIBUTE_SHADOW_COPY = GPT_ATTRIBUTES.BASIC_DATA_ATTRIBUTE_SHADOW_COPY;
pub const GPT_BASIC_DATA_ATTRIBUTE_READ_ONLY = GPT_ATTRIBUTES.BASIC_DATA_ATTRIBUTE_READ_ONLY;

pub const USN_DELETE_FLAGS = enum(u32) {
    DELETE = 1,
    NOTIFY = 2,
    _,
    pub fn initFlags(o: struct {
        DELETE: u1 = 0,
        NOTIFY: u1 = 0,
    }) USN_DELETE_FLAGS {
        return @as(USN_DELETE_FLAGS, @enumFromInt((if (o.DELETE == 1) @intFromEnum(USN_DELETE_FLAGS.DELETE) else 0) | (if (o.NOTIFY == 1) @intFromEnum(USN_DELETE_FLAGS.NOTIFY) else 0)));
    }
};
pub const USN_DELETE_FLAG_DELETE = USN_DELETE_FLAGS.DELETE;
pub const USN_DELETE_FLAG_NOTIFY = USN_DELETE_FLAGS.NOTIFY;

pub const CHANGER_FEATURES = enum(u32) {
    BAR_CODE_SCANNER_INSTALLED = 1,
    CARTRIDGE_MAGAZINE = 256,
    CLEANER_ACCESS_NOT_VALID = 262144,
    CLEANER_SLOT = 64,
    CLOSE_IEPORT = 4,
    DEVICE_REINITIALIZE_CAPABLE = 134217728,
    DRIVE_CLEANING_REQUIRED = 65536,
    DRIVE_EMPTY_ON_DOOR_ACCESS = 536870912,
    EXCHANGE_MEDIA = 32,
    INIT_ELEM_STAT_WITH_RANGE = 2,
    KEYPAD_ENABLE_DISABLE = 268435456,
    LOCK_UNLOCK = 128,
    MEDIUM_FLIP = 512,
    OPEN_IEPORT = 8,
    POSITION_TO_ELEMENT = 1024,
    PREDISMOUNT_EJECT_REQUIRED = 131072,
    PREMOUNT_EJECT_REQUIRED = 524288,
    REPORT_IEPORT_STATE = 2048,
    SERIAL_NUMBER_VALID = 67108864,
    STATUS_NON_VOLATILE = 16,
    STORAGE_DRIVE = 4096,
    STORAGE_IEPORT = 8192,
    STORAGE_SLOT = 16384,
    STORAGE_TRANSPORT = 32768,
    VOLUME_ASSERT = 4194304,
    VOLUME_IDENTIFICATION = 1048576,
    VOLUME_REPLACE = 8388608,
    VOLUME_SEARCH = 2097152,
    VOLUME_UNDEFINE = 16777216,
    _,
    pub fn initFlags(o: struct {
        BAR_CODE_SCANNER_INSTALLED: u1 = 0,
        CARTRIDGE_MAGAZINE: u1 = 0,
        CLEANER_ACCESS_NOT_VALID: u1 = 0,
        CLEANER_SLOT: u1 = 0,
        CLOSE_IEPORT: u1 = 0,
        DEVICE_REINITIALIZE_CAPABLE: u1 = 0,
        DRIVE_CLEANING_REQUIRED: u1 = 0,
        DRIVE_EMPTY_ON_DOOR_ACCESS: u1 = 0,
        EXCHANGE_MEDIA: u1 = 0,
        INIT_ELEM_STAT_WITH_RANGE: u1 = 0,
        KEYPAD_ENABLE_DISABLE: u1 = 0,
        LOCK_UNLOCK: u1 = 0,
        MEDIUM_FLIP: u1 = 0,
        OPEN_IEPORT: u1 = 0,
        POSITION_TO_ELEMENT: u1 = 0,
        PREDISMOUNT_EJECT_REQUIRED: u1 = 0,
        PREMOUNT_EJECT_REQUIRED: u1 = 0,
        REPORT_IEPORT_STATE: u1 = 0,
        SERIAL_NUMBER_VALID: u1 = 0,
        STATUS_NON_VOLATILE: u1 = 0,
        STORAGE_DRIVE: u1 = 0,
        STORAGE_IEPORT: u1 = 0,
        STORAGE_SLOT: u1 = 0,
        STORAGE_TRANSPORT: u1 = 0,
        VOLUME_ASSERT: u1 = 0,
        VOLUME_IDENTIFICATION: u1 = 0,
        VOLUME_REPLACE: u1 = 0,
        VOLUME_SEARCH: u1 = 0,
        VOLUME_UNDEFINE: u1 = 0,
    }) CHANGER_FEATURES {
        return @as(CHANGER_FEATURES, @enumFromInt((if (o.BAR_CODE_SCANNER_INSTALLED == 1) @intFromEnum(CHANGER_FEATURES.BAR_CODE_SCANNER_INSTALLED) else 0) | (if (o.CARTRIDGE_MAGAZINE == 1) @intFromEnum(CHANGER_FEATURES.CARTRIDGE_MAGAZINE) else 0) | (if (o.CLEANER_ACCESS_NOT_VALID == 1) @intFromEnum(CHANGER_FEATURES.CLEANER_ACCESS_NOT_VALID) else 0) | (if (o.CLEANER_SLOT == 1) @intFromEnum(CHANGER_FEATURES.CLEANER_SLOT) else 0) | (if (o.CLOSE_IEPORT == 1) @intFromEnum(CHANGER_FEATURES.CLOSE_IEPORT) else 0) | (if (o.DEVICE_REINITIALIZE_CAPABLE == 1) @intFromEnum(CHANGER_FEATURES.DEVICE_REINITIALIZE_CAPABLE) else 0) | (if (o.DRIVE_CLEANING_REQUIRED == 1) @intFromEnum(CHANGER_FEATURES.DRIVE_CLEANING_REQUIRED) else 0) | (if (o.DRIVE_EMPTY_ON_DOOR_ACCESS == 1) @intFromEnum(CHANGER_FEATURES.DRIVE_EMPTY_ON_DOOR_ACCESS) else 0) | (if (o.EXCHANGE_MEDIA == 1) @intFromEnum(CHANGER_FEATURES.EXCHANGE_MEDIA) else 0) | (if (o.INIT_ELEM_STAT_WITH_RANGE == 1) @intFromEnum(CHANGER_FEATURES.INIT_ELEM_STAT_WITH_RANGE) else 0) | (if (o.KEYPAD_ENABLE_DISABLE == 1) @intFromEnum(CHANGER_FEATURES.KEYPAD_ENABLE_DISABLE) else 0) | (if (o.LOCK_UNLOCK == 1) @intFromEnum(CHANGER_FEATURES.LOCK_UNLOCK) else 0) | (if (o.MEDIUM_FLIP == 1) @intFromEnum(CHANGER_FEATURES.MEDIUM_FLIP) else 0) | (if (o.OPEN_IEPORT == 1) @intFromEnum(CHANGER_FEATURES.OPEN_IEPORT) else 0) | (if (o.POSITION_TO_ELEMENT == 1) @intFromEnum(CHANGER_FEATURES.POSITION_TO_ELEMENT) else 0) | (if (o.PREDISMOUNT_EJECT_REQUIRED == 1) @intFromEnum(CHANGER_FEATURES.PREDISMOUNT_EJECT_REQUIRED) else 0) | (if (o.PREMOUNT_EJECT_REQUIRED == 1) @intFromEnum(CHANGER_FEATURES.PREMOUNT_EJECT_REQUIRED) else 0) | (if (o.REPORT_IEPORT_STATE == 1) @intFromEnum(CHANGER_FEATURES.REPORT_IEPORT_STATE) else 0) | (if (o.SERIAL_NUMBER_VALID == 1) @intFromEnum(CHANGER_FEATURES.SERIAL_NUMBER_VALID) else 0) | (if (o.STATUS_NON_VOLATILE == 1) @intFromEnum(CHANGER_FEATURES.STATUS_NON_VOLATILE) else 0) | (if (o.STORAGE_DRIVE == 1) @intFromEnum(CHANGER_FEATURES.STORAGE_DRIVE) else 0) | (if (o.STORAGE_IEPORT == 1) @intFromEnum(CHANGER_FEATURES.STORAGE_IEPORT) else 0) | (if (o.STORAGE_SLOT == 1) @intFromEnum(CHANGER_FEATURES.STORAGE_SLOT) else 0) | (if (o.STORAGE_TRANSPORT == 1) @intFromEnum(CHANGER_FEATURES.STORAGE_TRANSPORT) else 0) | (if (o.VOLUME_ASSERT == 1) @intFromEnum(CHANGER_FEATURES.VOLUME_ASSERT) else 0) | (if (o.VOLUME_IDENTIFICATION == 1) @intFromEnum(CHANGER_FEATURES.VOLUME_IDENTIFICATION) else 0) | (if (o.VOLUME_REPLACE == 1) @intFromEnum(CHANGER_FEATURES.VOLUME_REPLACE) else 0) | (if (o.VOLUME_SEARCH == 1) @intFromEnum(CHANGER_FEATURES.VOLUME_SEARCH) else 0) | (if (o.VOLUME_UNDEFINE == 1) @intFromEnum(CHANGER_FEATURES.VOLUME_UNDEFINE) else 0)));
    }
};
pub const CHANGER_BAR_CODE_SCANNER_INSTALLED = CHANGER_FEATURES.BAR_CODE_SCANNER_INSTALLED;
pub const CHANGER_CARTRIDGE_MAGAZINE = CHANGER_FEATURES.CARTRIDGE_MAGAZINE;
pub const CHANGER_CLEANER_ACCESS_NOT_VALID = CHANGER_FEATURES.CLEANER_ACCESS_NOT_VALID;
pub const CHANGER_CLEANER_SLOT = CHANGER_FEATURES.CLEANER_SLOT;
pub const CHANGER_CLOSE_IEPORT = CHANGER_FEATURES.CLOSE_IEPORT;
pub const CHANGER_DEVICE_REINITIALIZE_CAPABLE = CHANGER_FEATURES.DEVICE_REINITIALIZE_CAPABLE;
pub const CHANGER_DRIVE_CLEANING_REQUIRED = CHANGER_FEATURES.DRIVE_CLEANING_REQUIRED;
pub const CHANGER_DRIVE_EMPTY_ON_DOOR_ACCESS = CHANGER_FEATURES.DRIVE_EMPTY_ON_DOOR_ACCESS;
pub const CHANGER_EXCHANGE_MEDIA = CHANGER_FEATURES.EXCHANGE_MEDIA;
pub const CHANGER_INIT_ELEM_STAT_WITH_RANGE = CHANGER_FEATURES.INIT_ELEM_STAT_WITH_RANGE;
pub const CHANGER_KEYPAD_ENABLE_DISABLE = CHANGER_FEATURES.KEYPAD_ENABLE_DISABLE;
pub const CHANGER_LOCK_UNLOCK = CHANGER_FEATURES.LOCK_UNLOCK;
pub const CHANGER_MEDIUM_FLIP = CHANGER_FEATURES.MEDIUM_FLIP;
pub const CHANGER_OPEN_IEPORT = CHANGER_FEATURES.OPEN_IEPORT;
pub const CHANGER_POSITION_TO_ELEMENT = CHANGER_FEATURES.POSITION_TO_ELEMENT;
pub const CHANGER_PREDISMOUNT_EJECT_REQUIRED = CHANGER_FEATURES.PREDISMOUNT_EJECT_REQUIRED;
pub const CHANGER_PREMOUNT_EJECT_REQUIRED = CHANGER_FEATURES.PREMOUNT_EJECT_REQUIRED;
pub const CHANGER_REPORT_IEPORT_STATE = CHANGER_FEATURES.REPORT_IEPORT_STATE;
pub const CHANGER_SERIAL_NUMBER_VALID = CHANGER_FEATURES.SERIAL_NUMBER_VALID;
pub const CHANGER_STATUS_NON_VOLATILE = CHANGER_FEATURES.STATUS_NON_VOLATILE;
pub const CHANGER_STORAGE_DRIVE = CHANGER_FEATURES.STORAGE_DRIVE;
pub const CHANGER_STORAGE_IEPORT = CHANGER_FEATURES.STORAGE_IEPORT;
pub const CHANGER_STORAGE_SLOT = CHANGER_FEATURES.STORAGE_SLOT;
pub const CHANGER_STORAGE_TRANSPORT = CHANGER_FEATURES.STORAGE_TRANSPORT;
pub const CHANGER_VOLUME_ASSERT = CHANGER_FEATURES.VOLUME_ASSERT;
pub const CHANGER_VOLUME_IDENTIFICATION = CHANGER_FEATURES.VOLUME_IDENTIFICATION;
pub const CHANGER_VOLUME_REPLACE = CHANGER_FEATURES.VOLUME_REPLACE;
pub const CHANGER_VOLUME_SEARCH = CHANGER_FEATURES.VOLUME_SEARCH;
pub const CHANGER_VOLUME_UNDEFINE = CHANGER_FEATURES.VOLUME_UNDEFINE;

pub const TXFS_RMF_LAGS = enum(u32) {
    LOGGING_MODE = 1,
    RENAME_RM = 2,
    LOG_CONTAINER_COUNT_MAX = 4,
    LOG_CONTAINER_COUNT_MIN = 8,
    LOG_GROWTH_INCREMENT_NUM_CONTAINERS = 16,
    LOG_GROWTH_INCREMENT_PERCENT = 32,
    LOG_AUTO_SHRINK_PERCENTAGE = 64,
    LOG_NO_CONTAINER_COUNT_MAX = 128,
    LOG_NO_CONTAINER_COUNT_MIN = 256,
    GROW_LOG = 1024,
    SHRINK_LOG = 2048,
    ENFORCE_MINIMUM_SIZE = 4096,
    PRESERVE_CHANGES = 8192,
    RESET_RM_AT_NEXT_START = 16384,
    DO_NOT_RESET_RM_AT_NEXT_START = 32768,
    PREFER_CONSISTENCY = 65536,
    PREFER_AVAILABILITY = 131072,
    _,
    pub fn initFlags(o: struct {
        LOGGING_MODE: u1 = 0,
        RENAME_RM: u1 = 0,
        LOG_CONTAINER_COUNT_MAX: u1 = 0,
        LOG_CONTAINER_COUNT_MIN: u1 = 0,
        LOG_GROWTH_INCREMENT_NUM_CONTAINERS: u1 = 0,
        LOG_GROWTH_INCREMENT_PERCENT: u1 = 0,
        LOG_AUTO_SHRINK_PERCENTAGE: u1 = 0,
        LOG_NO_CONTAINER_COUNT_MAX: u1 = 0,
        LOG_NO_CONTAINER_COUNT_MIN: u1 = 0,
        GROW_LOG: u1 = 0,
        SHRINK_LOG: u1 = 0,
        ENFORCE_MINIMUM_SIZE: u1 = 0,
        PRESERVE_CHANGES: u1 = 0,
        RESET_RM_AT_NEXT_START: u1 = 0,
        DO_NOT_RESET_RM_AT_NEXT_START: u1 = 0,
        PREFER_CONSISTENCY: u1 = 0,
        PREFER_AVAILABILITY: u1 = 0,
    }) TXFS_RMF_LAGS {
        return @as(TXFS_RMF_LAGS, @enumFromInt((if (o.LOGGING_MODE == 1) @intFromEnum(TXFS_RMF_LAGS.LOGGING_MODE) else 0) | (if (o.RENAME_RM == 1) @intFromEnum(TXFS_RMF_LAGS.RENAME_RM) else 0) | (if (o.LOG_CONTAINER_COUNT_MAX == 1) @intFromEnum(TXFS_RMF_LAGS.LOG_CONTAINER_COUNT_MAX) else 0) | (if (o.LOG_CONTAINER_COUNT_MIN == 1) @intFromEnum(TXFS_RMF_LAGS.LOG_CONTAINER_COUNT_MIN) else 0) | (if (o.LOG_GROWTH_INCREMENT_NUM_CONTAINERS == 1) @intFromEnum(TXFS_RMF_LAGS.LOG_GROWTH_INCREMENT_NUM_CONTAINERS) else 0) | (if (o.LOG_GROWTH_INCREMENT_PERCENT == 1) @intFromEnum(TXFS_RMF_LAGS.LOG_GROWTH_INCREMENT_PERCENT) else 0) | (if (o.LOG_AUTO_SHRINK_PERCENTAGE == 1) @intFromEnum(TXFS_RMF_LAGS.LOG_AUTO_SHRINK_PERCENTAGE) else 0) | (if (o.LOG_NO_CONTAINER_COUNT_MAX == 1) @intFromEnum(TXFS_RMF_LAGS.LOG_NO_CONTAINER_COUNT_MAX) else 0) | (if (o.LOG_NO_CONTAINER_COUNT_MIN == 1) @intFromEnum(TXFS_RMF_LAGS.LOG_NO_CONTAINER_COUNT_MIN) else 0) | (if (o.GROW_LOG == 1) @intFromEnum(TXFS_RMF_LAGS.GROW_LOG) else 0) | (if (o.SHRINK_LOG == 1) @intFromEnum(TXFS_RMF_LAGS.SHRINK_LOG) else 0) | (if (o.ENFORCE_MINIMUM_SIZE == 1) @intFromEnum(TXFS_RMF_LAGS.ENFORCE_MINIMUM_SIZE) else 0) | (if (o.PRESERVE_CHANGES == 1) @intFromEnum(TXFS_RMF_LAGS.PRESERVE_CHANGES) else 0) | (if (o.RESET_RM_AT_NEXT_START == 1) @intFromEnum(TXFS_RMF_LAGS.RESET_RM_AT_NEXT_START) else 0) | (if (o.DO_NOT_RESET_RM_AT_NEXT_START == 1) @intFromEnum(TXFS_RMF_LAGS.DO_NOT_RESET_RM_AT_NEXT_START) else 0) | (if (o.PREFER_CONSISTENCY == 1) @intFromEnum(TXFS_RMF_LAGS.PREFER_CONSISTENCY) else 0) | (if (o.PREFER_AVAILABILITY == 1) @intFromEnum(TXFS_RMF_LAGS.PREFER_AVAILABILITY) else 0)));
    }
};
pub const TXFS_RM_FLAG_LOGGING_MODE = TXFS_RMF_LAGS.LOGGING_MODE;
pub const TXFS_RM_FLAG_RENAME_RM = TXFS_RMF_LAGS.RENAME_RM;
pub const TXFS_RM_FLAG_LOG_CONTAINER_COUNT_MAX = TXFS_RMF_LAGS.LOG_CONTAINER_COUNT_MAX;
pub const TXFS_RM_FLAG_LOG_CONTAINER_COUNT_MIN = TXFS_RMF_LAGS.LOG_CONTAINER_COUNT_MIN;
pub const TXFS_RM_FLAG_LOG_GROWTH_INCREMENT_NUM_CONTAINERS = TXFS_RMF_LAGS.LOG_GROWTH_INCREMENT_NUM_CONTAINERS;
pub const TXFS_RM_FLAG_LOG_GROWTH_INCREMENT_PERCENT = TXFS_RMF_LAGS.LOG_GROWTH_INCREMENT_PERCENT;
pub const TXFS_RM_FLAG_LOG_AUTO_SHRINK_PERCENTAGE = TXFS_RMF_LAGS.LOG_AUTO_SHRINK_PERCENTAGE;
pub const TXFS_RM_FLAG_LOG_NO_CONTAINER_COUNT_MAX = TXFS_RMF_LAGS.LOG_NO_CONTAINER_COUNT_MAX;
pub const TXFS_RM_FLAG_LOG_NO_CONTAINER_COUNT_MIN = TXFS_RMF_LAGS.LOG_NO_CONTAINER_COUNT_MIN;
pub const TXFS_RM_FLAG_GROW_LOG = TXFS_RMF_LAGS.GROW_LOG;
pub const TXFS_RM_FLAG_SHRINK_LOG = TXFS_RMF_LAGS.SHRINK_LOG;
pub const TXFS_RM_FLAG_ENFORCE_MINIMUM_SIZE = TXFS_RMF_LAGS.ENFORCE_MINIMUM_SIZE;
pub const TXFS_RM_FLAG_PRESERVE_CHANGES = TXFS_RMF_LAGS.PRESERVE_CHANGES;
pub const TXFS_RM_FLAG_RESET_RM_AT_NEXT_START = TXFS_RMF_LAGS.RESET_RM_AT_NEXT_START;
pub const TXFS_RM_FLAG_DO_NOT_RESET_RM_AT_NEXT_START = TXFS_RMF_LAGS.DO_NOT_RESET_RM_AT_NEXT_START;
pub const TXFS_RM_FLAG_PREFER_CONSISTENCY = TXFS_RMF_LAGS.PREFER_CONSISTENCY;
pub const TXFS_RM_FLAG_PREFER_AVAILABILITY = TXFS_RMF_LAGS.PREFER_AVAILABILITY;

pub const FILESYSTEM_STATISTICS_TYPE = enum(u16) {
    EXFAT = 3,
    FAT = 2,
    NTFS = 1,
};
pub const FILESYSTEM_STATISTICS_TYPE_EXFAT = FILESYSTEM_STATISTICS_TYPE.EXFAT;
pub const FILESYSTEM_STATISTICS_TYPE_FAT = FILESYSTEM_STATISTICS_TYPE.FAT;
pub const FILESYSTEM_STATISTICS_TYPE_NTFS = FILESYSTEM_STATISTICS_TYPE.NTFS;

pub const USN_SOURCE_INFO_ID = enum(u32) {
    AUXILIARY_DATA = 2,
    DATA_MANAGEMENT = 1,
    REPLICATION_MANAGEMENT = 4,
    CLIENT_REPLICATION_MANAGEMENT = 8,
};
pub const USN_SOURCE_AUXILIARY_DATA = USN_SOURCE_INFO_ID.AUXILIARY_DATA;
pub const USN_SOURCE_DATA_MANAGEMENT = USN_SOURCE_INFO_ID.DATA_MANAGEMENT;
pub const USN_SOURCE_REPLICATION_MANAGEMENT = USN_SOURCE_INFO_ID.REPLICATION_MANAGEMENT;
pub const USN_SOURCE_CLIENT_REPLICATION_MANAGEMENT = USN_SOURCE_INFO_ID.CLIENT_REPLICATION_MANAGEMENT;

pub const FILE_STORAGE_TIER_FLAGS = enum(u32) {
    Y = 131072,
    _,
    pub fn initFlags(o: struct {
        Y: u1 = 0,
    }) FILE_STORAGE_TIER_FLAGS {
        return @as(FILE_STORAGE_TIER_FLAGS, @enumFromInt((if (o.Y == 1) @intFromEnum(FILE_STORAGE_TIER_FLAGS.Y) else 0)));
    }
};
pub const FILE_STORAGE_TIER_FLAG_NO_SEEK_PENALTY = FILE_STORAGE_TIER_FLAGS.Y;

pub const CHANGER_ELEMENT_STATUS_FLAGS = enum(u32) {
    ACCESS = 8,
    AVOLTAG = 536870912,
    EXCEPT = 4,
    EXENAB = 16,
    FULL = 1,
    ID_VALID = 8192,
    IMPEXP = 2,
    INENAB = 32,
    INVERT = 4194304,
    LUN_VALID = 4096,
    NOT_BUS = 32768,
    PVOLTAG = 268435456,
    SVALID = 8388608,
    PRODUCT_DATA = 64,
    _,
    pub fn initFlags(o: struct {
        ACCESS: u1 = 0,
        AVOLTAG: u1 = 0,
        EXCEPT: u1 = 0,
        EXENAB: u1 = 0,
        FULL: u1 = 0,
        ID_VALID: u1 = 0,
        IMPEXP: u1 = 0,
        INENAB: u1 = 0,
        INVERT: u1 = 0,
        LUN_VALID: u1 = 0,
        NOT_BUS: u1 = 0,
        PVOLTAG: u1 = 0,
        SVALID: u1 = 0,
        PRODUCT_DATA: u1 = 0,
    }) CHANGER_ELEMENT_STATUS_FLAGS {
        return @as(CHANGER_ELEMENT_STATUS_FLAGS, @enumFromInt((if (o.ACCESS == 1) @intFromEnum(CHANGER_ELEMENT_STATUS_FLAGS.ACCESS) else 0) | (if (o.AVOLTAG == 1) @intFromEnum(CHANGER_ELEMENT_STATUS_FLAGS.AVOLTAG) else 0) | (if (o.EXCEPT == 1) @intFromEnum(CHANGER_ELEMENT_STATUS_FLAGS.EXCEPT) else 0) | (if (o.EXENAB == 1) @intFromEnum(CHANGER_ELEMENT_STATUS_FLAGS.EXENAB) else 0) | (if (o.FULL == 1) @intFromEnum(CHANGER_ELEMENT_STATUS_FLAGS.FULL) else 0) | (if (o.ID_VALID == 1) @intFromEnum(CHANGER_ELEMENT_STATUS_FLAGS.ID_VALID) else 0) | (if (o.IMPEXP == 1) @intFromEnum(CHANGER_ELEMENT_STATUS_FLAGS.IMPEXP) else 0) | (if (o.INENAB == 1) @intFromEnum(CHANGER_ELEMENT_STATUS_FLAGS.INENAB) else 0) | (if (o.INVERT == 1) @intFromEnum(CHANGER_ELEMENT_STATUS_FLAGS.INVERT) else 0) | (if (o.LUN_VALID == 1) @intFromEnum(CHANGER_ELEMENT_STATUS_FLAGS.LUN_VALID) else 0) | (if (o.NOT_BUS == 1) @intFromEnum(CHANGER_ELEMENT_STATUS_FLAGS.NOT_BUS) else 0) | (if (o.PVOLTAG == 1) @intFromEnum(CHANGER_ELEMENT_STATUS_FLAGS.PVOLTAG) else 0) | (if (o.SVALID == 1) @intFromEnum(CHANGER_ELEMENT_STATUS_FLAGS.SVALID) else 0) | (if (o.PRODUCT_DATA == 1) @intFromEnum(CHANGER_ELEMENT_STATUS_FLAGS.PRODUCT_DATA) else 0)));
    }
};
pub const ELEMENT_STATUS_ACCESS = CHANGER_ELEMENT_STATUS_FLAGS.ACCESS;
pub const ELEMENT_STATUS_AVOLTAG = CHANGER_ELEMENT_STATUS_FLAGS.AVOLTAG;
pub const ELEMENT_STATUS_EXCEPT = CHANGER_ELEMENT_STATUS_FLAGS.EXCEPT;
pub const ELEMENT_STATUS_EXENAB = CHANGER_ELEMENT_STATUS_FLAGS.EXENAB;
pub const ELEMENT_STATUS_FULL = CHANGER_ELEMENT_STATUS_FLAGS.FULL;
pub const ELEMENT_STATUS_ID_VALID = CHANGER_ELEMENT_STATUS_FLAGS.ID_VALID;
pub const ELEMENT_STATUS_IMPEXP = CHANGER_ELEMENT_STATUS_FLAGS.IMPEXP;
pub const ELEMENT_STATUS_INENAB = CHANGER_ELEMENT_STATUS_FLAGS.INENAB;
pub const ELEMENT_STATUS_INVERT = CHANGER_ELEMENT_STATUS_FLAGS.INVERT;
pub const ELEMENT_STATUS_LUN_VALID = CHANGER_ELEMENT_STATUS_FLAGS.LUN_VALID;
pub const ELEMENT_STATUS_NOT_BUS = CHANGER_ELEMENT_STATUS_FLAGS.NOT_BUS;
pub const ELEMENT_STATUS_PVOLTAG = CHANGER_ELEMENT_STATUS_FLAGS.PVOLTAG;
pub const ELEMENT_STATUS_SVALID = CHANGER_ELEMENT_STATUS_FLAGS.SVALID;
pub const ELEMENT_STATUS_PRODUCT_DATA = CHANGER_ELEMENT_STATUS_FLAGS.PRODUCT_DATA;

pub const GET_CHANGER_PARAMETERS_FEATURES1 = enum(u32) {
    CLEANER_AUTODISMOUNT = 2147483652,
    CLEANER_OPS_NOT_SUPPORTED = 2147483712,
    IEPORT_USER_CONTROL_CLOSE = 2147483904,
    IEPORT_USER_CONTROL_OPEN = 2147483776,
    MOVE_EXTENDS_IEPORT = 2147484160,
    MOVE_RETRACTS_IEPORT = 2147484672,
    PREDISMOUNT_ALIGN_TO_DRIVE = 2147483650,
    PREDISMOUNT_ALIGN_TO_SLOT = 2147483649,
    RTN_MEDIA_TO_ORIGINAL_ADDR = 2147483680,
    SLOTS_USE_TRAYS = 2147483664,
    TRUE_EXCHANGE_CAPABLE = 2147483656,
    _,
    pub fn initFlags(o: struct {
        CLEANER_AUTODISMOUNT: u1 = 0,
        CLEANER_OPS_NOT_SUPPORTED: u1 = 0,
        IEPORT_USER_CONTROL_CLOSE: u1 = 0,
        IEPORT_USER_CONTROL_OPEN: u1 = 0,
        MOVE_EXTENDS_IEPORT: u1 = 0,
        MOVE_RETRACTS_IEPORT: u1 = 0,
        PREDISMOUNT_ALIGN_TO_DRIVE: u1 = 0,
        PREDISMOUNT_ALIGN_TO_SLOT: u1 = 0,
        RTN_MEDIA_TO_ORIGINAL_ADDR: u1 = 0,
        SLOTS_USE_TRAYS: u1 = 0,
        TRUE_EXCHANGE_CAPABLE: u1 = 0,
    }) GET_CHANGER_PARAMETERS_FEATURES1 {
        return @as(GET_CHANGER_PARAMETERS_FEATURES1, @enumFromInt((if (o.CLEANER_AUTODISMOUNT == 1) @intFromEnum(GET_CHANGER_PARAMETERS_FEATURES1.CLEANER_AUTODISMOUNT) else 0) | (if (o.CLEANER_OPS_NOT_SUPPORTED == 1) @intFromEnum(GET_CHANGER_PARAMETERS_FEATURES1.CLEANER_OPS_NOT_SUPPORTED) else 0) | (if (o.IEPORT_USER_CONTROL_CLOSE == 1) @intFromEnum(GET_CHANGER_PARAMETERS_FEATURES1.IEPORT_USER_CONTROL_CLOSE) else 0) | (if (o.IEPORT_USER_CONTROL_OPEN == 1) @intFromEnum(GET_CHANGER_PARAMETERS_FEATURES1.IEPORT_USER_CONTROL_OPEN) else 0) | (if (o.MOVE_EXTENDS_IEPORT == 1) @intFromEnum(GET_CHANGER_PARAMETERS_FEATURES1.MOVE_EXTENDS_IEPORT) else 0) | (if (o.MOVE_RETRACTS_IEPORT == 1) @intFromEnum(GET_CHANGER_PARAMETERS_FEATURES1.MOVE_RETRACTS_IEPORT) else 0) | (if (o.PREDISMOUNT_ALIGN_TO_DRIVE == 1) @intFromEnum(GET_CHANGER_PARAMETERS_FEATURES1.PREDISMOUNT_ALIGN_TO_DRIVE) else 0) | (if (o.PREDISMOUNT_ALIGN_TO_SLOT == 1) @intFromEnum(GET_CHANGER_PARAMETERS_FEATURES1.PREDISMOUNT_ALIGN_TO_SLOT) else 0) | (if (o.RTN_MEDIA_TO_ORIGINAL_ADDR == 1) @intFromEnum(GET_CHANGER_PARAMETERS_FEATURES1.RTN_MEDIA_TO_ORIGINAL_ADDR) else 0) | (if (o.SLOTS_USE_TRAYS == 1) @intFromEnum(GET_CHANGER_PARAMETERS_FEATURES1.SLOTS_USE_TRAYS) else 0) | (if (o.TRUE_EXCHANGE_CAPABLE == 1) @intFromEnum(GET_CHANGER_PARAMETERS_FEATURES1.TRUE_EXCHANGE_CAPABLE) else 0)));
    }
};
pub const CHANGER_CLEANER_AUTODISMOUNT = GET_CHANGER_PARAMETERS_FEATURES1.CLEANER_AUTODISMOUNT;
pub const CHANGER_CLEANER_OPS_NOT_SUPPORTED = GET_CHANGER_PARAMETERS_FEATURES1.CLEANER_OPS_NOT_SUPPORTED;
pub const CHANGER_IEPORT_USER_CONTROL_CLOSE = GET_CHANGER_PARAMETERS_FEATURES1.IEPORT_USER_CONTROL_CLOSE;
pub const CHANGER_IEPORT_USER_CONTROL_OPEN = GET_CHANGER_PARAMETERS_FEATURES1.IEPORT_USER_CONTROL_OPEN;
pub const CHANGER_MOVE_EXTENDS_IEPORT = GET_CHANGER_PARAMETERS_FEATURES1.MOVE_EXTENDS_IEPORT;
pub const CHANGER_MOVE_RETRACTS_IEPORT = GET_CHANGER_PARAMETERS_FEATURES1.MOVE_RETRACTS_IEPORT;
pub const CHANGER_PREDISMOUNT_ALIGN_TO_DRIVE = GET_CHANGER_PARAMETERS_FEATURES1.PREDISMOUNT_ALIGN_TO_DRIVE;
pub const CHANGER_PREDISMOUNT_ALIGN_TO_SLOT = GET_CHANGER_PARAMETERS_FEATURES1.PREDISMOUNT_ALIGN_TO_SLOT;
pub const CHANGER_RTN_MEDIA_TO_ORIGINAL_ADDR = GET_CHANGER_PARAMETERS_FEATURES1.RTN_MEDIA_TO_ORIGINAL_ADDR;
pub const CHANGER_SLOTS_USE_TRAYS = GET_CHANGER_PARAMETERS_FEATURES1.SLOTS_USE_TRAYS;
pub const CHANGER_TRUE_EXCHANGE_CAPABLE = GET_CHANGER_PARAMETERS_FEATURES1.TRUE_EXCHANGE_CAPABLE;

pub const STORAGE_HOTPLUG_INFO = extern struct {
    Size: u32,
    MediaRemovable: BOOLEAN,
    MediaHotplug: BOOLEAN,
    DeviceHotplug: BOOLEAN,
    WriteCacheEnableOverride: BOOLEAN,
};

pub const STORAGE_DEVICE_NUMBER = extern struct {
    DeviceType: u32,
    DeviceNumber: u32,
    PartitionNumber: u32,
};

pub const STORAGE_DEVICE_NUMBERS = extern struct {
    Version: u32,
    Size: u32,
    NumberOfDevices: u32,
    Devices: [1]STORAGE_DEVICE_NUMBER,
};

pub const STORAGE_DEVICE_NUMBER_EX = extern struct {
    Version: u32,
    Size: u32,
    Flags: u32,
    DeviceType: u32,
    DeviceNumber: u32,
    DeviceGuid: Guid,
    PartitionNumber: u32,
};

pub const STORAGE_BUS_RESET_REQUEST = extern struct {
    PathId: u8,
};

pub const STORAGE_BREAK_RESERVATION_REQUEST = extern struct {
    Length: u32,
    _unused: u8,
    PathId: u8,
    TargetId: u8,
    Lun: u8,
};

pub const PREVENT_MEDIA_REMOVAL = extern struct {
    PreventMediaRemoval: BOOLEAN,
};

pub const CLASS_MEDIA_CHANGE_CONTEXT = extern struct {
    MediaChangeCount: u32,
    NewState: u32,
};

pub const TAPE_STATISTICS = extern struct {
    Version: u32,
    Flags: u32,
    RecoveredWrites: LARGE_INTEGER,
    UnrecoveredWrites: LARGE_INTEGER,
    RecoveredReads: LARGE_INTEGER,
    UnrecoveredReads: LARGE_INTEGER,
    CompressionRatioReads: u8,
    CompressionRatioWrites: u8,
};

pub const TAPE_GET_STATISTICS = extern struct {
    Operation: u32,
};

pub const STORAGE_MEDIA_TYPE = enum(i32) {
    DDS_4mm = 32,
    MiniQic = 33,
    Travan = 34,
    QIC = 35,
    MP_8mm = 36,
    AME_8mm = 37,
    AIT1_8mm = 38,
    DLT = 39,
    NCTP = 40,
    IBM_3480 = 41,
    IBM_3490E = 42,
    IBM_Magstar_3590 = 43,
    IBM_Magstar_MP = 44,
    STK_DATA_D3 = 45,
    SONY_DTF = 46,
    DV_6mm = 47,
    DMI = 48,
    SONY_D2 = 49,
    CLEANER_CARTRIDGE = 50,
    CD_ROM = 51,
    CD_R = 52,
    CD_RW = 53,
    DVD_ROM = 54,
    DVD_R = 55,
    DVD_RW = 56,
    MO_3_RW = 57,
    MO_5_WO = 58,
    MO_5_RW = 59,
    MO_5_LIMDOW = 60,
    PC_5_WO = 61,
    PC_5_RW = 62,
    PD_5_RW = 63,
    ABL_5_WO = 64,
    PINNACLE_APEX_5_RW = 65,
    SONY_12_WO = 66,
    PHILIPS_12_WO = 67,
    HITACHI_12_WO = 68,
    CYGNET_12_WO = 69,
    KODAK_14_WO = 70,
    MO_NFR_525 = 71,
    NIKON_12_RW = 72,
    IOMEGA_ZIP = 73,
    IOMEGA_JAZ = 74,
    SYQUEST_EZ135 = 75,
    SYQUEST_EZFLYER = 76,
    SYQUEST_SYJET = 77,
    AVATAR_F2 = 78,
    MP2_8mm = 79,
    DST_S = 80,
    DST_M = 81,
    DST_L = 82,
    VXATape_1 = 83,
    VXATape_2 = 84,
    STK_9840 = 85,
    LTO_Ultrium = 86,
    LTO_Accelis = 87,
    DVD_RAM = 88,
    AIT_8mm = 89,
    ADR_1 = 90,
    ADR_2 = 91,
    STK_9940 = 92,
    SAIT = 93,
    VXATape = 94,
};
pub const DDS_4mm = STORAGE_MEDIA_TYPE.DDS_4mm;
pub const MiniQic = STORAGE_MEDIA_TYPE.MiniQic;
pub const Travan = STORAGE_MEDIA_TYPE.Travan;
pub const QIC = STORAGE_MEDIA_TYPE.QIC;
pub const MP_8mm = STORAGE_MEDIA_TYPE.MP_8mm;
pub const AME_8mm = STORAGE_MEDIA_TYPE.AME_8mm;
pub const AIT1_8mm = STORAGE_MEDIA_TYPE.AIT1_8mm;
pub const DLT = STORAGE_MEDIA_TYPE.DLT;
pub const NCTP = STORAGE_MEDIA_TYPE.NCTP;
pub const IBM_3480 = STORAGE_MEDIA_TYPE.IBM_3480;
pub const IBM_3490E = STORAGE_MEDIA_TYPE.IBM_3490E;
pub const IBM_Magstar_3590 = STORAGE_MEDIA_TYPE.IBM_Magstar_3590;
pub const IBM_Magstar_MP = STORAGE_MEDIA_TYPE.IBM_Magstar_MP;
pub const STK_DATA_D3 = STORAGE_MEDIA_TYPE.STK_DATA_D3;
pub const SONY_DTF = STORAGE_MEDIA_TYPE.SONY_DTF;
pub const DV_6mm = STORAGE_MEDIA_TYPE.DV_6mm;
pub const DMI = STORAGE_MEDIA_TYPE.DMI;
pub const SONY_D2 = STORAGE_MEDIA_TYPE.SONY_D2;
pub const CLEANER_CARTRIDGE = STORAGE_MEDIA_TYPE.CLEANER_CARTRIDGE;
pub const CD_ROM = STORAGE_MEDIA_TYPE.CD_ROM;
pub const CD_R = STORAGE_MEDIA_TYPE.CD_R;
pub const CD_RW = STORAGE_MEDIA_TYPE.CD_RW;
pub const DVD_ROM = STORAGE_MEDIA_TYPE.DVD_ROM;
pub const DVD_R = STORAGE_MEDIA_TYPE.DVD_R;
pub const DVD_RW = STORAGE_MEDIA_TYPE.DVD_RW;
pub const MO_3_RW = STORAGE_MEDIA_TYPE.MO_3_RW;
pub const MO_5_WO = STORAGE_MEDIA_TYPE.MO_5_WO;
pub const MO_5_RW = STORAGE_MEDIA_TYPE.MO_5_RW;
pub const MO_5_LIMDOW = STORAGE_MEDIA_TYPE.MO_5_LIMDOW;
pub const PC_5_WO = STORAGE_MEDIA_TYPE.PC_5_WO;
pub const PC_5_RW = STORAGE_MEDIA_TYPE.PC_5_RW;
pub const PD_5_RW = STORAGE_MEDIA_TYPE.PD_5_RW;
pub const ABL_5_WO = STORAGE_MEDIA_TYPE.ABL_5_WO;
pub const PINNACLE_APEX_5_RW = STORAGE_MEDIA_TYPE.PINNACLE_APEX_5_RW;
pub const SONY_12_WO = STORAGE_MEDIA_TYPE.SONY_12_WO;
pub const PHILIPS_12_WO = STORAGE_MEDIA_TYPE.PHILIPS_12_WO;
pub const HITACHI_12_WO = STORAGE_MEDIA_TYPE.HITACHI_12_WO;
pub const CYGNET_12_WO = STORAGE_MEDIA_TYPE.CYGNET_12_WO;
pub const KODAK_14_WO = STORAGE_MEDIA_TYPE.KODAK_14_WO;
pub const MO_NFR_525 = STORAGE_MEDIA_TYPE.MO_NFR_525;
pub const NIKON_12_RW = STORAGE_MEDIA_TYPE.NIKON_12_RW;
pub const IOMEGA_ZIP = STORAGE_MEDIA_TYPE.IOMEGA_ZIP;
pub const IOMEGA_JAZ = STORAGE_MEDIA_TYPE.IOMEGA_JAZ;
pub const SYQUEST_EZ135 = STORAGE_MEDIA_TYPE.SYQUEST_EZ135;
pub const SYQUEST_EZFLYER = STORAGE_MEDIA_TYPE.SYQUEST_EZFLYER;
pub const SYQUEST_SYJET = STORAGE_MEDIA_TYPE.SYQUEST_SYJET;
pub const AVATAR_F2 = STORAGE_MEDIA_TYPE.AVATAR_F2;
pub const MP2_8mm = STORAGE_MEDIA_TYPE.MP2_8mm;
pub const DST_S = STORAGE_MEDIA_TYPE.DST_S;
pub const DST_M = STORAGE_MEDIA_TYPE.DST_M;
pub const DST_L = STORAGE_MEDIA_TYPE.DST_L;
pub const VXATape_1 = STORAGE_MEDIA_TYPE.VXATape_1;
pub const VXATape_2 = STORAGE_MEDIA_TYPE.VXATape_2;
pub const STK_9840 = STORAGE_MEDIA_TYPE.STK_9840;
pub const LTO_Ultrium = STORAGE_MEDIA_TYPE.LTO_Ultrium;
pub const LTO_Accelis = STORAGE_MEDIA_TYPE.LTO_Accelis;
pub const DVD_RAM = STORAGE_MEDIA_TYPE.DVD_RAM;
pub const AIT_8mm = STORAGE_MEDIA_TYPE.AIT_8mm;
pub const ADR_1 = STORAGE_MEDIA_TYPE.ADR_1;
pub const ADR_2 = STORAGE_MEDIA_TYPE.ADR_2;
pub const STK_9940 = STORAGE_MEDIA_TYPE.STK_9940;
pub const SAIT = STORAGE_MEDIA_TYPE.SAIT;
pub const VXATape = STORAGE_MEDIA_TYPE.VXATape;

pub const DEVICE_MEDIA_INFO = extern struct {
    DeviceSpecific: extern union {
        DiskInfo: extern struct {
            Cylinders: LARGE_INTEGER,
            MediaType: STORAGE_MEDIA_TYPE,
            TracksPerCylinder: u32,
            SectorsPerTrack: u32,
            BytesPerSector: u32,
            NumberMediaSides: u32,
            MediaCharacteristics: u32,
        },
        RemovableDiskInfo: extern struct {
            Cylinders: LARGE_INTEGER,
            MediaType: STORAGE_MEDIA_TYPE,
            TracksPerCylinder: u32,
            SectorsPerTrack: u32,
            BytesPerSector: u32,
            NumberMediaSides: u32,
            MediaCharacteristics: u32,
        },
        TapeInfo: extern struct {
            MediaType: STORAGE_MEDIA_TYPE,
            MediaCharacteristics: u32,
            CurrentBlockSize: u32,
            BusType: STORAGE_BUS_TYPE,
            BusSpecificData: extern union {
                ScsiInformation: extern struct {
                    MediumType: u8,
                    DensityCode: u8,
                },
            },
        },
    },
};

pub const GET_MEDIA_TYPES = extern struct {
    DeviceType: u32,
    MediaInfoCount: u32,
    MediaInfo: [1]DEVICE_MEDIA_INFO,
};

pub const STORAGE_PREDICT_FAILURE = extern struct {
    PredictFailure: u32,
    VendorSpecific: [512]u8,
};

pub const STORAGE_FAILURE_PREDICTION_CONFIG = extern struct {
    Version: u32,
    Size: u32,
    Set: BOOLEAN,
    Enabled: BOOLEAN,
    Reserved: u16,
};

pub const STORAGE_QUERY_TYPE = enum(i32) {
    StandardQuery = 0,
    ExistsQuery = 1,
    MaskQuery = 2,
    QueryMaxDefined = 3,
};
pub const PropertyStandardQuery = STORAGE_QUERY_TYPE.StandardQuery;
pub const PropertyExistsQuery = STORAGE_QUERY_TYPE.ExistsQuery;
pub const PropertyMaskQuery = STORAGE_QUERY_TYPE.MaskQuery;
pub const PropertyQueryMaxDefined = STORAGE_QUERY_TYPE.QueryMaxDefined;

pub const STORAGE_SET_TYPE = enum(i32) {
    StandardSet = 0,
    ExistsSet = 1,
    SetMaxDefined = 2,
};
pub const PropertyStandardSet = STORAGE_SET_TYPE.StandardSet;
pub const PropertyExistsSet = STORAGE_SET_TYPE.ExistsSet;
pub const PropertySetMaxDefined = STORAGE_SET_TYPE.SetMaxDefined;

pub const STORAGE_PROPERTY_ID = enum(i32) {
    DeviceProperty = 0,
    AdapterProperty = 1,
    DeviceIdProperty = 2,
    DeviceUniqueIdProperty = 3,
    DeviceWriteCacheProperty = 4,
    MiniportProperty = 5,
    AccessAlignmentProperty = 6,
    DeviceSeekPenaltyProperty = 7,
    DeviceTrimProperty = 8,
    DeviceWriteAggregationProperty = 9,
    DeviceDeviceTelemetryProperty = 10,
    DeviceLBProvisioningProperty = 11,
    DevicePowerProperty = 12,
    DeviceCopyOffloadProperty = 13,
    DeviceResiliencyProperty = 14,
    DeviceMediumProductType = 15,
    AdapterRpmbProperty = 16,
    AdapterCryptoProperty = 17,
    DeviceIoCapabilityProperty = 48,
    AdapterProtocolSpecificProperty = 49,
    DeviceProtocolSpecificProperty = 50,
    AdapterTemperatureProperty = 51,
    DeviceTemperatureProperty = 52,
    AdapterPhysicalTopologyProperty = 53,
    DevicePhysicalTopologyProperty = 54,
    DeviceAttributesProperty = 55,
    DeviceManagementStatus = 56,
    AdapterSerialNumberProperty = 57,
    DeviceLocationProperty = 58,
    DeviceNumaProperty = 59,
    DeviceZonedDeviceProperty = 60,
    DeviceUnsafeShutdownCount = 61,
    DeviceEnduranceProperty = 62,
    DeviceLedStateProperty = 63,
    DeviceSelfEncryptionProperty = 64,
    FruIdProperty = 65,
};
pub const StorageDeviceProperty = STORAGE_PROPERTY_ID.DeviceProperty;
pub const StorageAdapterProperty = STORAGE_PROPERTY_ID.AdapterProperty;
pub const StorageDeviceIdProperty = STORAGE_PROPERTY_ID.DeviceIdProperty;
pub const StorageDeviceUniqueIdProperty = STORAGE_PROPERTY_ID.DeviceUniqueIdProperty;
pub const StorageDeviceWriteCacheProperty = STORAGE_PROPERTY_ID.DeviceWriteCacheProperty;
pub const StorageMiniportProperty = STORAGE_PROPERTY_ID.MiniportProperty;
pub const StorageAccessAlignmentProperty = STORAGE_PROPERTY_ID.AccessAlignmentProperty;
pub const StorageDeviceSeekPenaltyProperty = STORAGE_PROPERTY_ID.DeviceSeekPenaltyProperty;
pub const StorageDeviceTrimProperty = STORAGE_PROPERTY_ID.DeviceTrimProperty;
pub const StorageDeviceWriteAggregationProperty = STORAGE_PROPERTY_ID.DeviceWriteAggregationProperty;
pub const StorageDeviceDeviceTelemetryProperty = STORAGE_PROPERTY_ID.DeviceDeviceTelemetryProperty;
pub const StorageDeviceLBProvisioningProperty = STORAGE_PROPERTY_ID.DeviceLBProvisioningProperty;
pub const StorageDevicePowerProperty = STORAGE_PROPERTY_ID.DevicePowerProperty;
pub const StorageDeviceCopyOffloadProperty = STORAGE_PROPERTY_ID.DeviceCopyOffloadProperty;
pub const StorageDeviceResiliencyProperty = STORAGE_PROPERTY_ID.DeviceResiliencyProperty;
pub const StorageDeviceMediumProductType = STORAGE_PROPERTY_ID.DeviceMediumProductType;
pub const StorageAdapterRpmbProperty = STORAGE_PROPERTY_ID.AdapterRpmbProperty;
pub const StorageAdapterCryptoProperty = STORAGE_PROPERTY_ID.AdapterCryptoProperty;
pub const StorageDeviceIoCapabilityProperty = STORAGE_PROPERTY_ID.DeviceIoCapabilityProperty;
pub const StorageAdapterProtocolSpecificProperty = STORAGE_PROPERTY_ID.AdapterProtocolSpecificProperty;
pub const StorageDeviceProtocolSpecificProperty = STORAGE_PROPERTY_ID.DeviceProtocolSpecificProperty;
pub const StorageAdapterTemperatureProperty = STORAGE_PROPERTY_ID.AdapterTemperatureProperty;
pub const StorageDeviceTemperatureProperty = STORAGE_PROPERTY_ID.DeviceTemperatureProperty;
pub const StorageAdapterPhysicalTopologyProperty = STORAGE_PROPERTY_ID.AdapterPhysicalTopologyProperty;
pub const StorageDevicePhysicalTopologyProperty = STORAGE_PROPERTY_ID.DevicePhysicalTopologyProperty;
pub const StorageDeviceAttributesProperty = STORAGE_PROPERTY_ID.DeviceAttributesProperty;
pub const StorageDeviceManagementStatus = STORAGE_PROPERTY_ID.DeviceManagementStatus;
pub const StorageAdapterSerialNumberProperty = STORAGE_PROPERTY_ID.AdapterSerialNumberProperty;
pub const StorageDeviceLocationProperty = STORAGE_PROPERTY_ID.DeviceLocationProperty;
pub const StorageDeviceNumaProperty = STORAGE_PROPERTY_ID.DeviceNumaProperty;
pub const StorageDeviceZonedDeviceProperty = STORAGE_PROPERTY_ID.DeviceZonedDeviceProperty;
pub const StorageDeviceUnsafeShutdownCount = STORAGE_PROPERTY_ID.DeviceUnsafeShutdownCount;
pub const StorageDeviceEnduranceProperty = STORAGE_PROPERTY_ID.DeviceEnduranceProperty;
pub const StorageDeviceLedStateProperty = STORAGE_PROPERTY_ID.DeviceLedStateProperty;
pub const StorageDeviceSelfEncryptionProperty = STORAGE_PROPERTY_ID.DeviceSelfEncryptionProperty;
pub const StorageFruIdProperty = STORAGE_PROPERTY_ID.FruIdProperty;

pub const STORAGE_PROPERTY_QUERY = extern struct {
    PropertyId: STORAGE_PROPERTY_ID,
    QueryType: STORAGE_QUERY_TYPE,
    AdditionalParameters: [1]u8,
};

pub const STORAGE_PROPERTY_SET = extern struct {
    PropertyId: STORAGE_PROPERTY_ID,
    SetType: STORAGE_SET_TYPE,
    AdditionalParameters: [1]u8,
};

pub const STORAGE_DESCRIPTOR_HEADER = extern struct {
    Version: u32,
    Size: u32,
};

pub const STORAGE_DEVICE_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    DeviceType: u8,
    DeviceTypeModifier: u8,
    RemovableMedia: BOOLEAN,
    CommandQueueing: BOOLEAN,
    VendorIdOffset: u32,
    ProductIdOffset: u32,
    ProductRevisionOffset: u32,
    SerialNumberOffset: u32,
    BusType: STORAGE_BUS_TYPE,
    RawPropertiesLength: u32,
    RawDeviceProperties: [1]u8,
};

pub const STORAGE_ADAPTER_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    MaximumTransferLength: u32,
    MaximumPhysicalPages: u32,
    AlignmentMask: u32,
    AdapterUsesPio: BOOLEAN,
    AdapterScansDown: BOOLEAN,
    CommandQueueing: BOOLEAN,
    AcceleratedTransfer: BOOLEAN,
    BusType: u8,
    BusMajorVersion: u16,
    BusMinorVersion: u16,
    SrbType: u8,
    AddressType: u8,
};

pub const STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    BytesPerCacheLine: u32,
    BytesOffsetForCacheAlignment: u32,
    BytesPerLogicalSector: u32,
    BytesPerPhysicalSector: u32,
    BytesOffsetForSectorAlignment: u32,
};

pub const STORAGE_MEDIUM_PRODUCT_TYPE_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    MediumProductType: u32,
};

pub const STORAGE_PORT_CODE_SET = enum(i32) {
    Reserved = 0,
    Storport = 1,
    SCSIport = 2,
    Spaceport = 3,
    ATAport = 4,
    USBport = 5,
    SBP2port = 6,
    SDport = 7,
};
pub const StoragePortCodeSetReserved = STORAGE_PORT_CODE_SET.Reserved;
pub const StoragePortCodeSetStorport = STORAGE_PORT_CODE_SET.Storport;
pub const StoragePortCodeSetSCSIport = STORAGE_PORT_CODE_SET.SCSIport;
pub const StoragePortCodeSetSpaceport = STORAGE_PORT_CODE_SET.Spaceport;
pub const StoragePortCodeSetATAport = STORAGE_PORT_CODE_SET.ATAport;
pub const StoragePortCodeSetUSBport = STORAGE_PORT_CODE_SET.USBport;
pub const StoragePortCodeSetSBP2port = STORAGE_PORT_CODE_SET.SBP2port;
pub const StoragePortCodeSetSDport = STORAGE_PORT_CODE_SET.SDport;

pub const STORAGE_MINIPORT_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    Portdriver: STORAGE_PORT_CODE_SET,
    LUNResetSupported: BOOLEAN,
    TargetResetSupported: BOOLEAN,
    IoTimeoutValue: u16,
    ExtraIoInfoSupported: BOOLEAN,
    Flags: extern union {
        Anonymous: extern struct {
            _bitfield: u8,
        },
        AsBYTE: u8,
    },
    Reserved0: [2]u8,
    Reserved1: u32,
};

pub const STORAGE_IDENTIFIER_CODE_SET = enum(i32) {
    Reserved = 0,
    Binary = 1,
    Ascii = 2,
    Utf8 = 3,
};
pub const StorageIdCodeSetReserved = STORAGE_IDENTIFIER_CODE_SET.Reserved;
pub const StorageIdCodeSetBinary = STORAGE_IDENTIFIER_CODE_SET.Binary;
pub const StorageIdCodeSetAscii = STORAGE_IDENTIFIER_CODE_SET.Ascii;
pub const StorageIdCodeSetUtf8 = STORAGE_IDENTIFIER_CODE_SET.Utf8;

pub const STORAGE_IDENTIFIER_TYPE = enum(i32) {
    VendorSpecific = 0,
    VendorId = 1,
    EUI64 = 2,
    FCPHName = 3,
    PortRelative = 4,
    TargetPortGroup = 5,
    LogicalUnitGroup = 6,
    MD5LogicalUnitIdentifier = 7,
    ScsiNameString = 8,
};
pub const StorageIdTypeVendorSpecific = STORAGE_IDENTIFIER_TYPE.VendorSpecific;
pub const StorageIdTypeVendorId = STORAGE_IDENTIFIER_TYPE.VendorId;
pub const StorageIdTypeEUI64 = STORAGE_IDENTIFIER_TYPE.EUI64;
pub const StorageIdTypeFCPHName = STORAGE_IDENTIFIER_TYPE.FCPHName;
pub const StorageIdTypePortRelative = STORAGE_IDENTIFIER_TYPE.PortRelative;
pub const StorageIdTypeTargetPortGroup = STORAGE_IDENTIFIER_TYPE.TargetPortGroup;
pub const StorageIdTypeLogicalUnitGroup = STORAGE_IDENTIFIER_TYPE.LogicalUnitGroup;
pub const StorageIdTypeMD5LogicalUnitIdentifier = STORAGE_IDENTIFIER_TYPE.MD5LogicalUnitIdentifier;
pub const StorageIdTypeScsiNameString = STORAGE_IDENTIFIER_TYPE.ScsiNameString;

pub const STORAGE_ID_NAA_FORMAT = enum(i32) {
    Extended = 2,
    Registered = 3,
    ERegisteredExtended = 5,
};
pub const StorageIdNAAFormatIEEEExtended = STORAGE_ID_NAA_FORMAT.Extended;
pub const StorageIdNAAFormatIEEERegistered = STORAGE_ID_NAA_FORMAT.Registered;
pub const StorageIdNAAFormatIEEEERegisteredExtended = STORAGE_ID_NAA_FORMAT.ERegisteredExtended;

pub const STORAGE_ASSOCIATION_TYPE = enum(i32) {
    Device = 0,
    Port = 1,
    Target = 2,
};
pub const StorageIdAssocDevice = STORAGE_ASSOCIATION_TYPE.Device;
pub const StorageIdAssocPort = STORAGE_ASSOCIATION_TYPE.Port;
pub const StorageIdAssocTarget = STORAGE_ASSOCIATION_TYPE.Target;

pub const STORAGE_IDENTIFIER = extern struct {
    CodeSet: STORAGE_IDENTIFIER_CODE_SET,
    Type: STORAGE_IDENTIFIER_TYPE,
    IdentifierSize: u16,
    NextOffset: u16,
    Association: STORAGE_ASSOCIATION_TYPE,
    Identifier: [1]u8,
};

pub const STORAGE_DEVICE_ID_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    NumberOfIdentifiers: u32,
    Identifiers: [1]u8,
};

pub const DEVICE_SEEK_PENALTY_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    IncursSeekPenalty: BOOLEAN,
};

pub const DEVICE_WRITE_AGGREGATION_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    BenefitsFromWriteAggregation: BOOLEAN,
};

pub const DEVICE_TRIM_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    TrimEnabled: BOOLEAN,
};

pub const DEVICE_LB_PROVISIONING_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    _bitfield: u8,
    Reserved1: [7]u8,
    OptimalUnmapGranularity: u64,
    UnmapGranularityAlignment: u64,
    MaxUnmapLbaCount: u32,
    MaxUnmapBlockDescriptorCount: u32,
};

pub const STORAGE_LB_PROVISIONING_MAP_RESOURCES = extern struct {
    Size: u32,
    Version: u32,
    _bitfield1: u8,
    Reserved1: [3]u8,
    _bitfield2: u8,
    Reserved3: [3]u8,
    AvailableMappingResources: u64,
    UsedMappingResources: u64,
};

pub const DEVICE_POWER_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    DeviceAttentionSupported: BOOLEAN,
    AsynchronousNotificationSupported: BOOLEAN,
    IdlePowerManagementEnabled: BOOLEAN,
    D3ColdEnabled: BOOLEAN,
    D3ColdSupported: BOOLEAN,
    NoVerifyDuringIdlePower: BOOLEAN,
    Reserved: [2]u8,
    IdleTimeoutInMS: u32,
};

pub const DEVICE_COPY_OFFLOAD_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    MaximumTokenLifetime: u32,
    DefaultTokenLifetime: u32,
    MaximumTransferSize: u64,
    OptimalTransferCount: u64,
    MaximumDataDescriptors: u32,
    MaximumTransferLengthPerDescriptor: u32,
    OptimalTransferLengthPerDescriptor: u32,
    OptimalTransferLengthGranularity: u16,
    Reserved: [2]u8,
};

pub const STORAGE_DEVICE_RESILIENCY_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    NameOffset: u32,
    NumberOfLogicalCopies: u32,
    NumberOfPhysicalCopies: u32,
    PhysicalDiskRedundancy: u32,
    NumberOfColumns: u32,
    Interleave: u32,
};

pub const STORAGE_RPMB_FRAME_TYPE = enum(i32) {
    Unknown = 0,
    Standard = 1,
    Max = 2,
};
pub const StorageRpmbFrameTypeUnknown = STORAGE_RPMB_FRAME_TYPE.Unknown;
pub const StorageRpmbFrameTypeStandard = STORAGE_RPMB_FRAME_TYPE.Standard;
pub const StorageRpmbFrameTypeMax = STORAGE_RPMB_FRAME_TYPE.Max;

pub const STORAGE_RPMB_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    SizeInBytes: u32,
    MaxReliableWriteSizeInBytes: u32,
    FrameFormat: STORAGE_RPMB_FRAME_TYPE,
};

pub const STORAGE_CRYPTO_ALGORITHM_ID = enum(i32) {
    Unknown = 0,
    XTSAES = 1,
    BitlockerAESCBC = 2,
    AESECB = 3,
    ESSIVAESCBC = 4,
    Max = 5,
};
pub const StorageCryptoAlgorithmUnknown = STORAGE_CRYPTO_ALGORITHM_ID.Unknown;
pub const StorageCryptoAlgorithmXTSAES = STORAGE_CRYPTO_ALGORITHM_ID.XTSAES;
pub const StorageCryptoAlgorithmBitlockerAESCBC = STORAGE_CRYPTO_ALGORITHM_ID.BitlockerAESCBC;
pub const StorageCryptoAlgorithmAESECB = STORAGE_CRYPTO_ALGORITHM_ID.AESECB;
pub const StorageCryptoAlgorithmESSIVAESCBC = STORAGE_CRYPTO_ALGORITHM_ID.ESSIVAESCBC;
pub const StorageCryptoAlgorithmMax = STORAGE_CRYPTO_ALGORITHM_ID.Max;

pub const STORAGE_CRYPTO_KEY_SIZE = enum(i32) {
    Unknown = 0,
    @"128Bits" = 1,
    @"192Bits" = 2,
    @"256Bits" = 3,
    @"512Bits" = 4,
};
pub const StorageCryptoKeySizeUnknown = STORAGE_CRYPTO_KEY_SIZE.Unknown;
pub const StorageCryptoKeySize128Bits = STORAGE_CRYPTO_KEY_SIZE.@"128Bits";
pub const StorageCryptoKeySize192Bits = STORAGE_CRYPTO_KEY_SIZE.@"192Bits";
pub const StorageCryptoKeySize256Bits = STORAGE_CRYPTO_KEY_SIZE.@"256Bits";
pub const StorageCryptoKeySize512Bits = STORAGE_CRYPTO_KEY_SIZE.@"512Bits";

pub const STORAGE_CRYPTO_CAPABILITY = extern struct {
    Version: u32,
    Size: u32,
    CryptoCapabilityIndex: u32,
    AlgorithmId: STORAGE_CRYPTO_ALGORITHM_ID,
    KeySize: STORAGE_CRYPTO_KEY_SIZE,
    DataUnitSizeBitmask: u32,
};

pub const STORAGE_CRYPTO_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    NumKeysSupported: u32,
    NumCryptoCapabilities: u32,
    CryptoCapabilities: [1]STORAGE_CRYPTO_CAPABILITY,
};

pub const STORAGE_TIER_MEDIA_TYPE = enum(i32) {
    Unspecified = 0,
    Disk = 1,
    Ssd = 2,
    Scm = 4,
    Max = 5,
};
pub const StorageTierMediaTypeUnspecified = STORAGE_TIER_MEDIA_TYPE.Unspecified;
pub const StorageTierMediaTypeDisk = STORAGE_TIER_MEDIA_TYPE.Disk;
pub const StorageTierMediaTypeSsd = STORAGE_TIER_MEDIA_TYPE.Ssd;
pub const StorageTierMediaTypeScm = STORAGE_TIER_MEDIA_TYPE.Scm;
pub const StorageTierMediaTypeMax = STORAGE_TIER_MEDIA_TYPE.Max;

pub const STORAGE_TIER_CLASS = enum(i32) {
    Unspecified = 0,
    Capacity = 1,
    Performance = 2,
    Max = 3,
};
pub const StorageTierClassUnspecified = STORAGE_TIER_CLASS.Unspecified;
pub const StorageTierClassCapacity = STORAGE_TIER_CLASS.Capacity;
pub const StorageTierClassPerformance = STORAGE_TIER_CLASS.Performance;
pub const StorageTierClassMax = STORAGE_TIER_CLASS.Max;

pub const STORAGE_TIER = extern struct {
    Id: Guid,
    Name: [256]u16,
    Description: [256]u16,
    Flags: u64,
    ProvisionedCapacity: u64,
    MediaType: STORAGE_TIER_MEDIA_TYPE,
    Class: STORAGE_TIER_CLASS,
};

pub const STORAGE_DEVICE_TIERING_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    Flags: u32,
    TotalNumberOfTiers: u32,
    NumberOfTiersReturned: u32,
    Tiers: [1]STORAGE_TIER,
};

pub const STORAGE_DEVICE_FAULT_DOMAIN_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    NumberOfFaultDomains: u32,
    FaultDomainIds: [1]Guid,
};

pub const STORAGE_PROTOCOL_TYPE = enum(i32) {
    Unknown = 0,
    Scsi = 1,
    Ata = 2,
    Nvme = 3,
    Sd = 4,
    Ufs = 5,
    Proprietary = 126,
    MaxReserved = 127,
};
pub const ProtocolTypeUnknown = STORAGE_PROTOCOL_TYPE.Unknown;
pub const ProtocolTypeScsi = STORAGE_PROTOCOL_TYPE.Scsi;
pub const ProtocolTypeAta = STORAGE_PROTOCOL_TYPE.Ata;
pub const ProtocolTypeNvme = STORAGE_PROTOCOL_TYPE.Nvme;
pub const ProtocolTypeSd = STORAGE_PROTOCOL_TYPE.Sd;
pub const ProtocolTypeUfs = STORAGE_PROTOCOL_TYPE.Ufs;
pub const ProtocolTypeProprietary = STORAGE_PROTOCOL_TYPE.Proprietary;
pub const ProtocolTypeMaxReserved = STORAGE_PROTOCOL_TYPE.MaxReserved;

pub const STORAGE_PROTOCOL_NVME_DATA_TYPE = enum(i32) {
    Unknown = 0,
    Identify = 1,
    LogPage = 2,
    Feature = 3,
};
pub const NVMeDataTypeUnknown = STORAGE_PROTOCOL_NVME_DATA_TYPE.Unknown;
pub const NVMeDataTypeIdentify = STORAGE_PROTOCOL_NVME_DATA_TYPE.Identify;
pub const NVMeDataTypeLogPage = STORAGE_PROTOCOL_NVME_DATA_TYPE.LogPage;
pub const NVMeDataTypeFeature = STORAGE_PROTOCOL_NVME_DATA_TYPE.Feature;

pub const STORAGE_PROTOCOL_ATA_DATA_TYPE = enum(i32) {
    Unknown = 0,
    Identify = 1,
    LogPage = 2,
};
pub const AtaDataTypeUnknown = STORAGE_PROTOCOL_ATA_DATA_TYPE.Unknown;
pub const AtaDataTypeIdentify = STORAGE_PROTOCOL_ATA_DATA_TYPE.Identify;
pub const AtaDataTypeLogPage = STORAGE_PROTOCOL_ATA_DATA_TYPE.LogPage;

pub const STORAGE_PROTOCOL_UFS_DATA_TYPE = enum(i32) {
    Unknown = 0,
    QueryDescriptor = 1,
    QueryAttribute = 2,
    QueryFlag = 3,
    QueryDmeAttribute = 4,
    QueryDmePeerAttribute = 5,
    Max = 6,
};
pub const UfsDataTypeUnknown = STORAGE_PROTOCOL_UFS_DATA_TYPE.Unknown;
pub const UfsDataTypeQueryDescriptor = STORAGE_PROTOCOL_UFS_DATA_TYPE.QueryDescriptor;
pub const UfsDataTypeQueryAttribute = STORAGE_PROTOCOL_UFS_DATA_TYPE.QueryAttribute;
pub const UfsDataTypeQueryFlag = STORAGE_PROTOCOL_UFS_DATA_TYPE.QueryFlag;
pub const UfsDataTypeQueryDmeAttribute = STORAGE_PROTOCOL_UFS_DATA_TYPE.QueryDmeAttribute;
pub const UfsDataTypeQueryDmePeerAttribute = STORAGE_PROTOCOL_UFS_DATA_TYPE.QueryDmePeerAttribute;
pub const UfsDataTypeMax = STORAGE_PROTOCOL_UFS_DATA_TYPE.Max;

pub const STORAGE_PROTOCOL_DATA_SUBVALUE_GET_LOG_PAGE = extern union {
    Anonymous: extern struct {
        _bitfield: u32,
    },
    AsUlong: u32,
};

pub const STORAGE_PROTOCOL_SPECIFIC_DATA = extern struct {
    ProtocolType: STORAGE_PROTOCOL_TYPE,
    DataType: u32,
    ProtocolDataRequestValue: u32,
    ProtocolDataRequestSubValue: u32,
    ProtocolDataOffset: u32,
    ProtocolDataLength: u32,
    FixedProtocolReturnData: u32,
    ProtocolDataRequestSubValue2: u32,
    ProtocolDataRequestSubValue3: u32,
    ProtocolDataRequestSubValue4: u32,
};

pub const STORAGE_PROTOCOL_SPECIFIC_DATA_EXT = extern struct {
    ProtocolType: STORAGE_PROTOCOL_TYPE,
    DataType: u32,
    ProtocolDataValue: u32,
    ProtocolDataSubValue: u32,
    ProtocolDataOffset: u32,
    ProtocolDataLength: u32,
    FixedProtocolReturnData: u32,
    ProtocolDataSubValue2: u32,
    ProtocolDataSubValue3: u32,
    ProtocolDataSubValue4: u32,
    ProtocolDataSubValue5: u32,
    Reserved: [5]u32,
};

pub const STORAGE_PROTOCOL_DATA_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    ProtocolSpecificData: STORAGE_PROTOCOL_SPECIFIC_DATA,
};

pub const STORAGE_PROTOCOL_DATA_DESCRIPTOR_EXT = extern struct {
    Version: u32,
    Size: u32,
    ProtocolSpecificData: STORAGE_PROTOCOL_SPECIFIC_DATA_EXT,
};

pub const STORAGE_TEMPERATURE_INFO = extern struct {
    Index: u16,
    Temperature: i16,
    OverThreshold: i16,
    UnderThreshold: i16,
    OverThresholdChangable: BOOLEAN,
    UnderThresholdChangable: BOOLEAN,
    EventGenerated: BOOLEAN,
    Reserved0: u8,
    Reserved1: u32,
};

pub const STORAGE_TEMPERATURE_DATA_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    CriticalTemperature: i16,
    WarningTemperature: i16,
    InfoCount: u16,
    Reserved0: [2]u8,
    Reserved1: [2]u32,
    TemperatureInfo: [1]STORAGE_TEMPERATURE_INFO,
};

pub const STORAGE_TEMPERATURE_THRESHOLD = extern struct {
    Version: u32,
    Size: u32,
    Flags: u16,
    Index: u16,
    Threshold: i16,
    OverThreshold: BOOLEAN,
    Reserved: u8,
};

pub const STORAGE_DEVICE_FORM_FACTOR = enum(i32) {
    Unknown = 0,
    @"3_5" = 1,
    @"2_5" = 2,
    @"1_8" = 3,
    @"1_8Less" = 4,
    Embedded = 5,
    MemoryCard = 6,
    mSata = 7,
    M_2 = 8,
    PCIeBoard = 9,
    Dimm = 10,
};
pub const FormFactorUnknown = STORAGE_DEVICE_FORM_FACTOR.Unknown;
pub const FormFactor3_5 = STORAGE_DEVICE_FORM_FACTOR.@"3_5";
pub const FormFactor2_5 = STORAGE_DEVICE_FORM_FACTOR.@"2_5";
pub const FormFactor1_8 = STORAGE_DEVICE_FORM_FACTOR.@"1_8";
pub const FormFactor1_8Less = STORAGE_DEVICE_FORM_FACTOR.@"1_8Less";
pub const FormFactorEmbedded = STORAGE_DEVICE_FORM_FACTOR.Embedded;
pub const FormFactorMemoryCard = STORAGE_DEVICE_FORM_FACTOR.MemoryCard;
pub const FormFactormSata = STORAGE_DEVICE_FORM_FACTOR.mSata;
pub const FormFactorM_2 = STORAGE_DEVICE_FORM_FACTOR.M_2;
pub const FormFactorPCIeBoard = STORAGE_DEVICE_FORM_FACTOR.PCIeBoard;
pub const FormFactorDimm = STORAGE_DEVICE_FORM_FACTOR.Dimm;

pub const STORAGE_COMPONENT_HEALTH_STATUS = enum(i32) {
    Unknown = 0,
    Normal = 1,
    Throttled = 2,
    Warning = 3,
    Disabled = 4,
    Failed = 5,
};
pub const HealthStatusUnknown = STORAGE_COMPONENT_HEALTH_STATUS.Unknown;
pub const HealthStatusNormal = STORAGE_COMPONENT_HEALTH_STATUS.Normal;
pub const HealthStatusThrottled = STORAGE_COMPONENT_HEALTH_STATUS.Throttled;
pub const HealthStatusWarning = STORAGE_COMPONENT_HEALTH_STATUS.Warning;
pub const HealthStatusDisabled = STORAGE_COMPONENT_HEALTH_STATUS.Disabled;
pub const HealthStatusFailed = STORAGE_COMPONENT_HEALTH_STATUS.Failed;

pub const STORAGE_SPEC_VERSION = extern union {
    Anonymous: extern struct {
        MinorVersion: extern union {
            Anonymous: extern struct {
                SubMinor: u8,
                Minor: u8,
            },
            AsUshort: u16,
        },
        MajorVersion: u16,
    },
    AsUlong: u32,
};

pub const STORAGE_PHYSICAL_DEVICE_DATA = extern struct {
    DeviceId: u32,
    Role: u32,
    HealthStatus: STORAGE_COMPONENT_HEALTH_STATUS,
    CommandProtocol: STORAGE_PROTOCOL_TYPE,
    SpecVersion: STORAGE_SPEC_VERSION,
    FormFactor: STORAGE_DEVICE_FORM_FACTOR,
    Vendor: [8]u8,
    Model: [40]u8,
    FirmwareRevision: [16]u8,
    Capacity: u64,
    PhysicalLocation: [32]u8,
    Reserved: [2]u32,
};

pub const STORAGE_PHYSICAL_ADAPTER_DATA = extern struct {
    AdapterId: u32,
    HealthStatus: STORAGE_COMPONENT_HEALTH_STATUS,
    CommandProtocol: STORAGE_PROTOCOL_TYPE,
    SpecVersion: STORAGE_SPEC_VERSION,
    Vendor: [8]u8,
    Model: [40]u8,
    FirmwareRevision: [16]u8,
    PhysicalLocation: [32]u8,
    ExpanderConnected: BOOLEAN,
    Reserved0: [3]u8,
    Reserved1: [3]u32,
};

pub const STORAGE_PHYSICAL_NODE_DATA = extern struct {
    NodeId: u32,
    AdapterCount: u32,
    AdapterDataLength: u32,
    AdapterDataOffset: u32,
    DeviceCount: u32,
    DeviceDataLength: u32,
    DeviceDataOffset: u32,
    Reserved: [3]u32,
};

pub const STORAGE_PHYSICAL_TOPOLOGY_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    NodeCount: u32,
    Reserved: u32,
    Node: [1]STORAGE_PHYSICAL_NODE_DATA,
};

pub const STORAGE_DEVICE_IO_CAPABILITY_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    LunMaxIoCount: u32,
    AdapterMaxIoCount: u32,
};

pub const STORAGE_DEVICE_ATTRIBUTES_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    Attributes: u64,
};

pub const STORAGE_DISK_HEALTH_STATUS = enum(i32) {
    Unknown = 0,
    Unhealthy = 1,
    Warning = 2,
    Healthy = 3,
    Max = 4,
};
pub const DiskHealthUnknown = STORAGE_DISK_HEALTH_STATUS.Unknown;
pub const DiskHealthUnhealthy = STORAGE_DISK_HEALTH_STATUS.Unhealthy;
pub const DiskHealthWarning = STORAGE_DISK_HEALTH_STATUS.Warning;
pub const DiskHealthHealthy = STORAGE_DISK_HEALTH_STATUS.Healthy;
pub const DiskHealthMax = STORAGE_DISK_HEALTH_STATUS.Max;

pub const STORAGE_DISK_OPERATIONAL_STATUS = enum(i32) {
    None = 0,
    Unknown = 1,
    Ok = 2,
    PredictingFailure = 3,
    InService = 4,
    HardwareError = 5,
    NotUsable = 6,
    TransientError = 7,
    Missing = 8,
};
pub const DiskOpStatusNone = STORAGE_DISK_OPERATIONAL_STATUS.None;
pub const DiskOpStatusUnknown = STORAGE_DISK_OPERATIONAL_STATUS.Unknown;
pub const DiskOpStatusOk = STORAGE_DISK_OPERATIONAL_STATUS.Ok;
pub const DiskOpStatusPredictingFailure = STORAGE_DISK_OPERATIONAL_STATUS.PredictingFailure;
pub const DiskOpStatusInService = STORAGE_DISK_OPERATIONAL_STATUS.InService;
pub const DiskOpStatusHardwareError = STORAGE_DISK_OPERATIONAL_STATUS.HardwareError;
pub const DiskOpStatusNotUsable = STORAGE_DISK_OPERATIONAL_STATUS.NotUsable;
pub const DiskOpStatusTransientError = STORAGE_DISK_OPERATIONAL_STATUS.TransientError;
pub const DiskOpStatusMissing = STORAGE_DISK_OPERATIONAL_STATUS.Missing;

pub const STORAGE_OPERATIONAL_STATUS_REASON = enum(i32) {
    Unknown = 0,
    ScsiSenseCode = 1,
    Media = 2,
    Io = 3,
    ThresholdExceeded = 4,
    LostData = 5,
    EnergySource = 6,
    Configuration = 7,
    DeviceController = 8,
    MediaController = 9,
    Component = 10,
    NVDIMM_N = 11,
    BackgroundOperation = 12,
    InvalidFirmware = 13,
    HealthCheck = 14,
    LostDataPersistence = 15,
    DisabledByPlatform = 16,
    LostWritePersistence = 17,
    DataPersistenceLossImminent = 18,
    WritePersistenceLossImminent = 19,
    Max = 20,
};
pub const DiskOpReasonUnknown = STORAGE_OPERATIONAL_STATUS_REASON.Unknown;
pub const DiskOpReasonScsiSenseCode = STORAGE_OPERATIONAL_STATUS_REASON.ScsiSenseCode;
pub const DiskOpReasonMedia = STORAGE_OPERATIONAL_STATUS_REASON.Media;
pub const DiskOpReasonIo = STORAGE_OPERATIONAL_STATUS_REASON.Io;
pub const DiskOpReasonThresholdExceeded = STORAGE_OPERATIONAL_STATUS_REASON.ThresholdExceeded;
pub const DiskOpReasonLostData = STORAGE_OPERATIONAL_STATUS_REASON.LostData;
pub const DiskOpReasonEnergySource = STORAGE_OPERATIONAL_STATUS_REASON.EnergySource;
pub const DiskOpReasonConfiguration = STORAGE_OPERATIONAL_STATUS_REASON.Configuration;
pub const DiskOpReasonDeviceController = STORAGE_OPERATIONAL_STATUS_REASON.DeviceController;
pub const DiskOpReasonMediaController = STORAGE_OPERATIONAL_STATUS_REASON.MediaController;
pub const DiskOpReasonComponent = STORAGE_OPERATIONAL_STATUS_REASON.Component;
pub const DiskOpReasonNVDIMM_N = STORAGE_OPERATIONAL_STATUS_REASON.NVDIMM_N;
pub const DiskOpReasonBackgroundOperation = STORAGE_OPERATIONAL_STATUS_REASON.BackgroundOperation;
pub const DiskOpReasonInvalidFirmware = STORAGE_OPERATIONAL_STATUS_REASON.InvalidFirmware;
pub const DiskOpReasonHealthCheck = STORAGE_OPERATIONAL_STATUS_REASON.HealthCheck;
pub const DiskOpReasonLostDataPersistence = STORAGE_OPERATIONAL_STATUS_REASON.LostDataPersistence;
pub const DiskOpReasonDisabledByPlatform = STORAGE_OPERATIONAL_STATUS_REASON.DisabledByPlatform;
pub const DiskOpReasonLostWritePersistence = STORAGE_OPERATIONAL_STATUS_REASON.LostWritePersistence;
pub const DiskOpReasonDataPersistenceLossImminent = STORAGE_OPERATIONAL_STATUS_REASON.DataPersistenceLossImminent;
pub const DiskOpReasonWritePersistenceLossImminent = STORAGE_OPERATIONAL_STATUS_REASON.WritePersistenceLossImminent;
pub const DiskOpReasonMax = STORAGE_OPERATIONAL_STATUS_REASON.Max;

pub const STORAGE_OPERATIONAL_REASON = extern struct {
    Version: u32,
    Size: u32,
    Reason: STORAGE_OPERATIONAL_STATUS_REASON,
    RawBytes: extern union {
        ScsiSenseKey: extern struct {
            SenseKey: u8,
            ASC: u8,
            ASCQ: u8,
            Reserved: u8,
        },
        NVDIMM_N: extern struct {
            CriticalHealth: u8,
            ModuleHealth: [2]u8,
            ErrorThresholdStatus: u8,
        },
        AsUlong: u32,
    },
};

pub const STORAGE_DEVICE_MANAGEMENT_STATUS = extern struct {
    Version: u32,
    Size: u32,
    Health: STORAGE_DISK_HEALTH_STATUS,
    NumberOfOperationalStatus: u32,
    NumberOfAdditionalReasons: u32,
    OperationalStatus: [16]STORAGE_DISK_OPERATIONAL_STATUS,
    AdditionalReasons: [1]STORAGE_OPERATIONAL_REASON,
};

pub const STORAGE_ADAPTER_SERIAL_NUMBER = extern struct {
    Version: u32,
    Size: u32,
    SerialNumber: [128]u16,
};

pub const STORAGE_ZONED_DEVICE_TYPES = enum(i32) {
    Unknown = 0,
    HostManaged = 1,
    HostAware = 2,
    DeviceManaged = 3,
};
pub const ZonedDeviceTypeUnknown = STORAGE_ZONED_DEVICE_TYPES.Unknown;
pub const ZonedDeviceTypeHostManaged = STORAGE_ZONED_DEVICE_TYPES.HostManaged;
pub const ZonedDeviceTypeHostAware = STORAGE_ZONED_DEVICE_TYPES.HostAware;
pub const ZonedDeviceTypeDeviceManaged = STORAGE_ZONED_DEVICE_TYPES.DeviceManaged;

pub const STORAGE_ZONE_TYPES = enum(i32) {
    Unknown = 0,
    Conventional = 1,
    SequentialWriteRequired = 2,
    SequentialWritePreferred = 3,
    Max = 4,
};
pub const ZoneTypeUnknown = STORAGE_ZONE_TYPES.Unknown;
pub const ZoneTypeConventional = STORAGE_ZONE_TYPES.Conventional;
pub const ZoneTypeSequentialWriteRequired = STORAGE_ZONE_TYPES.SequentialWriteRequired;
pub const ZoneTypeSequentialWritePreferred = STORAGE_ZONE_TYPES.SequentialWritePreferred;
pub const ZoneTypeMax = STORAGE_ZONE_TYPES.Max;

pub const STORAGE_ZONE_GROUP = extern struct {
    ZoneCount: u32,
    ZoneType: STORAGE_ZONE_TYPES,
    ZoneSize: u64,
};

pub const STORAGE_ZONED_DEVICE_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    DeviceType: STORAGE_ZONED_DEVICE_TYPES,
    ZoneCount: u32,
    ZoneAttributes: extern union {
        SequentialRequiredZone: extern struct {
            MaxOpenZoneCount: u32,
            UnrestrictedRead: BOOLEAN,
            Reserved: [3]u8,
        },
        SequentialPreferredZone: extern struct {
            OptimalOpenZoneCount: u32,
            Reserved: u32,
        },
    },
    ZoneGroupCount: u32,
    ZoneGroup: [1]STORAGE_ZONE_GROUP,
};

pub const DEVICE_LOCATION = extern struct {
    Socket: u32,
    Slot: u32,
    Adapter: u32,
    Port: u32,
    Anonymous: extern union {
        Anonymous1: extern struct {
            Channel: u32,
            Device: u32,
        },
        Anonymous2: extern struct {
            Target: u32,
            Lun: u32,
        },
    },
};

pub const STORAGE_DEVICE_LOCATION_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    Location: DEVICE_LOCATION,
    StringOffset: u32,
};

pub const STORAGE_DEVICE_NUMA_PROPERTY = extern struct {
    Version: u32,
    Size: u32,
    NumaNode: u32,
};

pub const STORAGE_DEVICE_UNSAFE_SHUTDOWN_COUNT = extern struct {
    Version: u32,
    Size: u32,
    UnsafeShutdownCount: u32,
};

pub const STORAGE_HW_ENDURANCE_INFO = extern struct {
    ValidFields: u32,
    GroupId: u32,
    Flags: extern struct {
        _bitfield: u32,
    },
    LifePercentage: u32,
    BytesReadCount: [16]u8,
    ByteWriteCount: [16]u8,
};

pub const STORAGE_HW_ENDURANCE_DATA_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    EnduranceInfo: STORAGE_HW_ENDURANCE_INFO,
};

pub const STORAGE_DEVICE_LED_STATE_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    State: u64,
};

pub const STORAGE_DEVICE_SELF_ENCRYPTION_PROPERTY = extern struct {
    Version: u32,
    Size: u32,
    SupportsSelfEncryption: BOOLEAN,
};

pub const STORAGE_FRU_ID_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    IdentifierSize: u32,
    Identifier: [1]u8,
};

pub const DEVICE_DATA_SET_RANGE = extern struct {
    StartingOffset: i64,
    LengthInBytes: u64,
};

pub const DEVICE_MANAGE_DATA_SET_ATTRIBUTES = extern struct {
    Size: u32,
    Action: u32,
    Flags: u32,
    ParameterBlockOffset: u32,
    ParameterBlockLength: u32,
    DataSetRangesOffset: u32,
    DataSetRangesLength: u32,
};

pub const DEVICE_MANAGE_DATA_SET_ATTRIBUTES_OUTPUT = extern struct {
    Size: u32,
    Action: u32,
    Flags: u32,
    OperationStatus: u32,
    ExtendedError: u32,
    TargetDetailedError: u32,
    ReservedStatus: u32,
    OutputBlockOffset: u32,
    OutputBlockLength: u32,
};

pub const DEVICE_DSM_DEFINITION = extern struct {
    Action: u32,
    SingleRange: BOOLEAN,
    ParameterBlockAlignment: u32,
    ParameterBlockLength: u32,
    HasOutput: BOOLEAN,
    OutputBlockAlignment: u32,
    OutputBlockLength: u32,
};

pub const DEVICE_DSM_NOTIFICATION_PARAMETERS = extern struct {
    Size: u32,
    Flags: u32,
    NumFileTypeIDs: u32,
    FileTypeID: [1]Guid,
};

pub const STORAGE_OFFLOAD_TOKEN = extern struct {
    TokenType: [4]u8,
    Reserved: [2]u8,
    TokenIdLength: [2]u8,
    Anonymous: extern union {
        StorageOffloadZeroDataToken: extern struct {
            Reserved2: [504]u8,
        },
        Token: [504]u8,
    },
};

pub const DEVICE_DSM_OFFLOAD_READ_PARAMETERS = extern struct {
    Flags: u32,
    TimeToLive: u32,
    Reserved: [2]u32,
};

pub const STORAGE_OFFLOAD_READ_OUTPUT = extern struct {
    OffloadReadFlags: u32,
    Reserved: u32,
    LengthProtected: u64,
    TokenLength: u32,
    Token: STORAGE_OFFLOAD_TOKEN,
};

pub const DEVICE_DSM_OFFLOAD_WRITE_PARAMETERS = extern struct {
    Flags: u32,
    Reserved: u32,
    TokenOffset: u64,
    Token: STORAGE_OFFLOAD_TOKEN,
};

pub const STORAGE_OFFLOAD_WRITE_OUTPUT = extern struct {
    OffloadWriteFlags: u32,
    Reserved: u32,
    LengthCopied: u64,
};

pub const DEVICE_DATA_SET_LBP_STATE_PARAMETERS = extern struct {
    Version: u32,
    Size: u32,
    Flags: u32,
    OutputVersion: u32,
};

pub const DEVICE_DATA_SET_LB_PROVISIONING_STATE = extern struct {
    Size: u32,
    Version: u32,
    SlabSizeInBytes: u64,
    SlabOffsetDeltaInBytes: u32,
    SlabAllocationBitMapBitCount: u32,
    SlabAllocationBitMapLength: u32,
    SlabAllocationBitMap: [1]u32,
};

pub const DEVICE_DATA_SET_LB_PROVISIONING_STATE_V2 = extern struct {
    Size: u32,
    Version: u32,
    SlabSizeInBytes: u64,
    SlabOffsetDeltaInBytes: u64,
    SlabAllocationBitMapBitCount: u32,
    SlabAllocationBitMapLength: u32,
    SlabAllocationBitMap: [1]u32,
};

pub const DEVICE_DATA_SET_REPAIR_PARAMETERS = extern struct {
    NumberOfRepairCopies: u32,
    SourceCopy: u32,
    RepairCopies: [1]u32,
};

pub const DEVICE_DATA_SET_REPAIR_OUTPUT = extern struct {
    ParityExtent: DEVICE_DATA_SET_RANGE,
};

pub const DEVICE_DATA_SET_SCRUB_OUTPUT = extern struct {
    BytesProcessed: u64,
    BytesRepaired: u64,
    BytesFailed: u64,
};

pub const DEVICE_DATA_SET_SCRUB_EX_OUTPUT = extern struct {
    BytesProcessed: u64,
    BytesRepaired: u64,
    BytesFailed: u64,
    ParityExtent: DEVICE_DATA_SET_RANGE,
    BytesScrubbed: u64,
};

pub const DEVICE_DSM_TIERING_QUERY_INPUT = extern struct {
    Version: u32,
    Size: u32,
    Flags: u32,
    NumberOfTierIds: u32,
    TierIds: [1]Guid,
};

pub const STORAGE_TIER_REGION = extern struct {
    TierId: Guid,
    Offset: u64,
    Length: u64,
};

pub const DEVICE_DSM_TIERING_QUERY_OUTPUT = extern struct {
    Version: u32,
    Size: u32,
    Flags: u32,
    Reserved: u32,
    Alignment: u64,
    TotalNumberOfRegions: u32,
    NumberOfRegionsReturned: u32,
    Regions: [1]STORAGE_TIER_REGION,
};

pub const DEVICE_DSM_NVCACHE_CHANGE_PRIORITY_PARAMETERS = extern struct {
    Size: u32,
    TargetPriority: u8,
    Reserved: [3]u8,
};

pub const DEVICE_DATA_SET_TOPOLOGY_ID_QUERY_OUTPUT = extern struct {
    TopologyRangeBytes: u64,
    TopologyId: [16]u8,
};

pub const DEVICE_STORAGE_ADDRESS_RANGE = extern struct {
    StartAddress: i64,
    LengthInBytes: u64,
};

pub const DEVICE_DSM_PHYSICAL_ADDRESSES_OUTPUT = extern struct {
    Version: u32,
    Flags: u32,
    TotalNumberOfRanges: u32,
    NumberOfRangesReturned: u32,
    Ranges: [1]DEVICE_STORAGE_ADDRESS_RANGE,
};

pub const DEVICE_DSM_REPORT_ZONES_PARAMETERS = extern struct {
    Size: u32,
    ReportOption: u8,
    Partial: u8,
    Reserved: [2]u8,
};

pub const STORAGE_ZONES_ATTRIBUTES = enum(i32) {
    AndLengthMayDifferent = 0,
    SameLengthSame = 1,
    SameLastZoneLengthDifferent = 2,
    MayDifferentLengthSame = 3,
};
pub const ZonesAttributeTypeAndLengthMayDifferent = STORAGE_ZONES_ATTRIBUTES.AndLengthMayDifferent;
pub const ZonesAttributeTypeSameLengthSame = STORAGE_ZONES_ATTRIBUTES.SameLengthSame;
pub const ZonesAttributeTypeSameLastZoneLengthDifferent = STORAGE_ZONES_ATTRIBUTES.SameLastZoneLengthDifferent;
pub const ZonesAttributeTypeMayDifferentLengthSame = STORAGE_ZONES_ATTRIBUTES.MayDifferentLengthSame;

pub const STORAGE_ZONE_CONDITION = enum(i32) {
    Conventional = 0,
    Empty = 1,
    ImplicitlyOpened = 2,
    ExplicitlyOpened = 3,
    Closed = 4,
    ReadOnly = 13,
    Full = 14,
    Offline = 15,
};
pub const ZoneConditionConventional = STORAGE_ZONE_CONDITION.Conventional;
pub const ZoneConditionEmpty = STORAGE_ZONE_CONDITION.Empty;
pub const ZoneConditionImplicitlyOpened = STORAGE_ZONE_CONDITION.ImplicitlyOpened;
pub const ZoneConditionExplicitlyOpened = STORAGE_ZONE_CONDITION.ExplicitlyOpened;
pub const ZoneConditionClosed = STORAGE_ZONE_CONDITION.Closed;
pub const ZoneConditionReadOnly = STORAGE_ZONE_CONDITION.ReadOnly;
pub const ZoneConditionFull = STORAGE_ZONE_CONDITION.Full;
pub const ZoneConditionOffline = STORAGE_ZONE_CONDITION.Offline;

pub const STORAGE_ZONE_DESCRIPTOR = extern struct {
    Size: u32,
    ZoneType: STORAGE_ZONE_TYPES,
    ZoneCondition: STORAGE_ZONE_CONDITION,
    ResetWritePointerRecommend: BOOLEAN,
    Reserved0: [3]u8,
    ZoneSize: u64,
    WritePointerOffset: u64,
};

pub const DEVICE_DSM_REPORT_ZONES_DATA = extern struct {
    Size: u32,
    ZoneCount: u32,
    Attributes: STORAGE_ZONES_ATTRIBUTES,
    Reserved0: u32,
    ZoneDescriptors: [1]STORAGE_ZONE_DESCRIPTOR,
};

pub const DEVICE_STORAGE_RANGE_ATTRIBUTES = extern struct {
    LengthInBytes: u64,
    Anonymous: extern union {
        AllFlags: u32,
        Anonymous: extern struct {
            _bitfield: u32,
        },
    },
    Reserved: u32,
};

pub const DEVICE_DSM_RANGE_ERROR_INFO = extern struct {
    Version: u32,
    Flags: u32,
    TotalNumberOfRanges: u32,
    NumberOfRangesReturned: u32,
    Ranges: [1]DEVICE_STORAGE_RANGE_ATTRIBUTES,
};

pub const DEVICE_DSM_LOST_QUERY_PARAMETERS = extern struct {
    Version: u32,
    Granularity: u64,
};

pub const DEVICE_DSM_LOST_QUERY_OUTPUT = extern struct {
    Version: u32,
    Size: u32,
    Alignment: u64,
    NumberOfBits: u32,
    BitMap: [1]u32,
};

pub const DEVICE_DSM_FREE_SPACE_OUTPUT = extern struct {
    Version: u32,
    FreeSpace: u64,
};

pub const DEVICE_DSM_CONVERSION_OUTPUT = extern struct {
    Version: u32,
    Source: Guid,
};

pub const STORAGE_GET_BC_PROPERTIES_OUTPUT = extern struct {
    MaximumRequestsPerPeriod: u32,
    MinimumPeriod: u32,
    MaximumRequestSize: u64,
    EstimatedTimePerRequest: u32,
    NumOutStandingRequests: u32,
    RequestSize: u64,
};

pub const STORAGE_ALLOCATE_BC_STREAM_INPUT = extern struct {
    Version: u32,
    RequestsPerPeriod: u32,
    Period: u32,
    RetryFailures: BOOLEAN,
    Discardable: BOOLEAN,
    Reserved1: [2]BOOLEAN,
    AccessType: u32,
    AccessMode: u32,
};

pub const STORAGE_ALLOCATE_BC_STREAM_OUTPUT = extern struct {
    RequestSize: u64,
    NumOutStandingRequests: u32,
};

pub const STORAGE_PRIORITY_HINT_SUPPORT = extern struct {
    SupportFlags: u32,
};

pub const STORAGE_DIAGNOSTIC_LEVEL = enum(i32) {
    Default = 0,
    Max = 1,
};
pub const StorageDiagnosticLevelDefault = STORAGE_DIAGNOSTIC_LEVEL.Default;
pub const StorageDiagnosticLevelMax = STORAGE_DIAGNOSTIC_LEVEL.Max;

pub const STORAGE_DIAGNOSTIC_TARGET_TYPE = enum(i32) {
    Undefined = 0,
    Port = 1,
    Miniport = 2,
    HbaFirmware = 3,
    Max = 4,
};
pub const StorageDiagnosticTargetTypeUndefined = STORAGE_DIAGNOSTIC_TARGET_TYPE.Undefined;
pub const StorageDiagnosticTargetTypePort = STORAGE_DIAGNOSTIC_TARGET_TYPE.Port;
pub const StorageDiagnosticTargetTypeMiniport = STORAGE_DIAGNOSTIC_TARGET_TYPE.Miniport;
pub const StorageDiagnosticTargetTypeHbaFirmware = STORAGE_DIAGNOSTIC_TARGET_TYPE.HbaFirmware;
pub const StorageDiagnosticTargetTypeMax = STORAGE_DIAGNOSTIC_TARGET_TYPE.Max;

pub const STORAGE_DIAGNOSTIC_REQUEST = extern struct {
    Version: u32,
    Size: u32,
    Flags: u32,
    TargetType: STORAGE_DIAGNOSTIC_TARGET_TYPE,
    Level: STORAGE_DIAGNOSTIC_LEVEL,
};

pub const STORAGE_DIAGNOSTIC_DATA = extern struct {
    Version: u32,
    Size: u32,
    ProviderId: Guid,
    BufferSize: u32,
    Reserved: u32,
    DiagnosticDataBuffer: [1]u8,
};

pub const PHYSICAL_ELEMENT_STATUS_REQUEST = extern struct {
    Version: u32,
    Size: u32,
    StartingElement: u32,
    Filter: u8,
    ReportType: u8,
    Reserved: [2]u8,
};

pub const PHYSICAL_ELEMENT_STATUS_DESCRIPTOR = extern struct {
    Version: u32,
    Size: u32,
    ElementIdentifier: u32,
    PhysicalElementType: u8,
    PhysicalElementHealth: u8,
    Reserved1: [2]u8,
    AssociatedCapacity: u64,
    Reserved2: [4]u32,
};

pub const PHYSICAL_ELEMENT_STATUS = extern struct {
    Version: u32,
    Size: u32,
    DescriptorCount: u32,
    ReturnedDescriptorCount: u32,
    ElementIdentifierBeingDepoped: u32,
    Reserved: u32,
    Descriptors: [1]PHYSICAL_ELEMENT_STATUS_DESCRIPTOR,
};

pub const REMOVE_ELEMENT_AND_TRUNCATE_REQUEST = extern struct {
    Version: u32,
    Size: u32,
    RequestCapacity: u64,
    ElementIdentifier: u32,
    Reserved: u32,
};

pub const DEVICE_INTERNAL_STATUS_DATA_REQUEST_TYPE = enum(i32) {
    InternalStatusDataRequestTypeUndefined = 0,
    CurrentInternalStatusDataHeader = 1,
    CurrentInternalStatusData = 2,
    SavedInternalStatusDataHeader = 3,
    SavedInternalStatusData = 4,
};
pub const DeviceInternalStatusDataRequestTypeUndefined = DEVICE_INTERNAL_STATUS_DATA_REQUEST_TYPE.InternalStatusDataRequestTypeUndefined;
pub const DeviceCurrentInternalStatusDataHeader = DEVICE_INTERNAL_STATUS_DATA_REQUEST_TYPE.CurrentInternalStatusDataHeader;
pub const DeviceCurrentInternalStatusData = DEVICE_INTERNAL_STATUS_DATA_REQUEST_TYPE.CurrentInternalStatusData;
pub const DeviceSavedInternalStatusDataHeader = DEVICE_INTERNAL_STATUS_DATA_REQUEST_TYPE.SavedInternalStatusDataHeader;
pub const DeviceSavedInternalStatusData = DEVICE_INTERNAL_STATUS_DATA_REQUEST_TYPE.SavedInternalStatusData;

pub const DEVICE_INTERNAL_STATUS_DATA_SET = enum(i32) {
    Undefined = 0,
    @"1" = 1,
    @"2" = 2,
    @"3" = 3,
    @"4" = 4,
    Max = 5,
};
pub const DeviceStatusDataSetUndefined = DEVICE_INTERNAL_STATUS_DATA_SET.Undefined;
pub const DeviceStatusDataSet1 = DEVICE_INTERNAL_STATUS_DATA_SET.@"1";
pub const DeviceStatusDataSet2 = DEVICE_INTERNAL_STATUS_DATA_SET.@"2";
pub const DeviceStatusDataSet3 = DEVICE_INTERNAL_STATUS_DATA_SET.@"3";
pub const DeviceStatusDataSet4 = DEVICE_INTERNAL_STATUS_DATA_SET.@"4";
pub const DeviceStatusDataSetMax = DEVICE_INTERNAL_STATUS_DATA_SET.Max;

pub const GET_DEVICE_INTERNAL_STATUS_DATA_REQUEST = extern struct {
    Version: u32,
    Size: u32,
    RequestDataType: DEVICE_INTERNAL_STATUS_DATA_REQUEST_TYPE,
    RequestDataSet: DEVICE_INTERNAL_STATUS_DATA_SET,
};

pub const DEVICE_INTERNAL_STATUS_DATA = extern struct {
    Version: u32,
    Size: u32,
    T10VendorId: u64,
    DataSet1Length: u32,
    DataSet2Length: u32,
    DataSet3Length: u32,
    DataSet4Length: u32,
    StatusDataVersion: u8,
    Reserved: [3]u8,
    ReasonIdentifier: [128]u8,
    StatusDataLength: u32,
    StatusData: [1]u8,
};

pub const STORAGE_SANITIZE_METHOD = enum(i32) {
    Default = 0,
    BlockErase = 1,
    CryptoErase = 2,
};
pub const StorageSanitizeMethodDefault = STORAGE_SANITIZE_METHOD.Default;
pub const StorageSanitizeMethodBlockErase = STORAGE_SANITIZE_METHOD.BlockErase;
pub const StorageSanitizeMethodCryptoErase = STORAGE_SANITIZE_METHOD.CryptoErase;

pub const STORAGE_REINITIALIZE_MEDIA = extern struct {
    Version: u32,
    Size: u32,
    TimeoutInSeconds: u32,
    SanitizeOption: extern struct {
        _bitfield: u32,
    },
};

pub const STORAGE_MEDIA_SERIAL_NUMBER_DATA = extern struct {
    Reserved: u16,
    SerialNumberLength: u16,
    SerialNumber: [1]u8,
};

pub const STORAGE_READ_CAPACITY = extern struct {
    Version: u32,
    Size: u32,
    BlockLength: u32,
    NumberOfBlocks: LARGE_INTEGER,
    DiskLength: LARGE_INTEGER,
};

pub const WRITE_CACHE_TYPE = enum(i32) {
    Unknown = 0,
    None = 1,
    WriteBack = 2,
    WriteThrough = 3,
};
pub const WriteCacheTypeUnknown = WRITE_CACHE_TYPE.Unknown;
pub const WriteCacheTypeNone = WRITE_CACHE_TYPE.None;
pub const WriteCacheTypeWriteBack = WRITE_CACHE_TYPE.WriteBack;
pub const WriteCacheTypeWriteThrough = WRITE_CACHE_TYPE.WriteThrough;

pub const WRITE_CACHE_ENABLE = enum(i32) {
    EnableUnknown = 0,
    Disabled = 1,
    Enabled = 2,
};
pub const WriteCacheEnableUnknown = WRITE_CACHE_ENABLE.EnableUnknown;
pub const WriteCacheDisabled = WRITE_CACHE_ENABLE.Disabled;
pub const WriteCacheEnabled = WRITE_CACHE_ENABLE.Enabled;

pub const WRITE_CACHE_CHANGE = enum(i32) {
    ChangeUnknown = 0,
    NotChangeable = 1,
    Changeable = 2,
};
pub const WriteCacheChangeUnknown = WRITE_CACHE_CHANGE.ChangeUnknown;
pub const WriteCacheNotChangeable = WRITE_CACHE_CHANGE.NotChangeable;
pub const WriteCacheChangeable = WRITE_CACHE_CHANGE.Changeable;

pub const WRITE_THROUGH = enum(i32) {
    Unknown = 0,
    NotSupported = 1,
    Supported = 2,
};
pub const WriteThroughUnknown = WRITE_THROUGH.Unknown;
pub const WriteThroughNotSupported = WRITE_THROUGH.NotSupported;
pub const WriteThroughSupported = WRITE_THROUGH.Supported;

pub const STORAGE_WRITE_CACHE_PROPERTY = extern struct {
    Version: u32,
    Size: u32,
    WriteCacheType: WRITE_CACHE_TYPE,
    WriteCacheEnabled: WRITE_CACHE_ENABLE,
    WriteCacheChangeable: WRITE_CACHE_CHANGE,
    WriteThroughSupported: WRITE_THROUGH,
    FlushCacheSupported: BOOLEAN,
    UserDefinedPowerProtection: BOOLEAN,
    NVCacheEnabled: BOOLEAN,
};

pub const PERSISTENT_RESERVE_COMMAND = extern struct {
    Version: u32,
    Size: u32,
    Anonymous: extern union {
        PR_IN: extern struct {
            _bitfield: u8,
            AllocationLength: u16,
        },
        PR_OUT: extern struct {
            _bitfield1: u8,
            _bitfield2: u8,
            ParameterList: [1]u8,
        },
    },
};

pub const _DEVICEDUMP_COLLECTION_TYPE = enum(i32) {
    BugCheck = 1,
    ApplicationRequested = 2,
    DeviceRequested = 3,
};
pub const TCCollectionBugCheck = _DEVICEDUMP_COLLECTION_TYPE.BugCheck;
pub const TCCollectionApplicationRequested = _DEVICEDUMP_COLLECTION_TYPE.ApplicationRequested;
pub const TCCollectionDeviceRequested = _DEVICEDUMP_COLLECTION_TYPE.DeviceRequested;

pub const DEVICEDUMP_SUBSECTION_POINTER = extern struct {
    dwSize: u32 align(1),
    dwFlags: u32 align(1),
    dwOffset: u32 align(1),
};

pub const DEVICEDUMP_STRUCTURE_VERSION = extern struct {
    dwSignature: u32 align(1),
    dwVersion: u32 align(1),
    dwSize: u32 align(1),
};

pub const DEVICEDUMP_SECTION_HEADER = extern struct {
    guidDeviceDataId: Guid align(1),
    sOrganizationID: [16]u8 align(1),
    dwFirmwareRevision: u32 align(1),
    sModelNumber: [32]u8 align(1),
    szDeviceManufacturingID: [32]u8 align(1),
    dwFlags: u32 align(1),
    bRestrictedPrivateDataVersion: u32 align(1),
    dwFirmwareIssueId: u32 align(1),
    szIssueDescriptionString: [132]u8 align(1),
};

pub const GP_LOG_PAGE_DESCRIPTOR = extern struct {
    LogAddress: u16 align(1),
    LogSectors: u16 align(1),
};

pub const DEVICEDUMP_PUBLIC_SUBSECTION = extern struct {
    dwFlags: u32 align(1),
    GPLogTable: [16]GP_LOG_PAGE_DESCRIPTOR align(1),
    szDescription: [16]CHAR align(1),
    bData: [1]u8 align(1),
};

pub const DEVICEDUMP_RESTRICTED_SUBSECTION = extern struct {
    bData: [1]u8,
};

pub const DEVICEDUMP_PRIVATE_SUBSECTION = extern struct {
    dwFlags: u32 align(1),
    GPLogId: GP_LOG_PAGE_DESCRIPTOR align(1),
    bData: [1]u8 align(1),
};

pub const DEVICEDUMP_STORAGEDEVICE_DATA = extern struct {
    Descriptor: DEVICEDUMP_STRUCTURE_VERSION align(1),
    SectionHeader: DEVICEDUMP_SECTION_HEADER align(1),
    dwBufferSize: u32 align(1),
    dwReasonForCollection: u32 align(1),
    PublicData: DEVICEDUMP_SUBSECTION_POINTER align(1),
    RestrictedData: DEVICEDUMP_SUBSECTION_POINTER align(1),
    PrivateData: DEVICEDUMP_SUBSECTION_POINTER align(1),
};

pub const DEVICEDUMP_STORAGESTACK_PUBLIC_STATE_RECORD = extern struct {
    Cdb: [16]u8 align(1),
    Command: [16]u8 align(1),
    StartTime: u64 align(1),
    EndTime: u64 align(1),
    OperationStatus: u32 align(1),
    OperationError: u32 align(1),
    StackSpecific: extern union {
        ExternalStack: extern struct {
            dwReserved: u32 align(1),
        },
        AtaPort: extern struct {
            dwAtaPortSpecific: u32 align(1),
        },
        StorPort: extern struct {
            SrbTag: u32 align(1),
        },
    } align(1),
};

pub const DEVICEDUMP_STORAGESTACK_PUBLIC_DUMP = extern struct {
    Descriptor: DEVICEDUMP_STRUCTURE_VERSION align(1),
    dwReasonForCollection: u32 align(1),
    cDriverName: [16]u8 align(1),
    uiNumRecords: u32 align(1),
    RecordArray: [1]DEVICEDUMP_STORAGESTACK_PUBLIC_STATE_RECORD align(1),
};

pub const STORAGE_IDLE_POWER = extern struct {
    Version: u32,
    Size: u32,
    _bitfield: u32,
    D3IdleTimeout: u32,
};

pub const STORAGE_POWERUP_REASON_TYPE = enum(i32) {
    Unknown = 0,
    IO = 1,
    DeviceAttention = 2,
};
pub const StoragePowerupUnknown = STORAGE_POWERUP_REASON_TYPE.Unknown;
pub const StoragePowerupIO = STORAGE_POWERUP_REASON_TYPE.IO;
pub const StoragePowerupDeviceAttention = STORAGE_POWERUP_REASON_TYPE.DeviceAttention;

pub const STORAGE_IDLE_POWERUP_REASON = extern struct {
    Version: u32,
    Size: u32,
    PowerupReason: STORAGE_POWERUP_REASON_TYPE,
};

pub const STORAGE_DEVICE_POWER_CAP_UNITS = enum(i32) {
    Percent = 0,
    Milliwatts = 1,
};
pub const StorageDevicePowerCapUnitsPercent = STORAGE_DEVICE_POWER_CAP_UNITS.Percent;
pub const StorageDevicePowerCapUnitsMilliwatts = STORAGE_DEVICE_POWER_CAP_UNITS.Milliwatts;

pub const STORAGE_DEVICE_POWER_CAP = extern struct {
    Version: u32,
    Size: u32,
    Units: STORAGE_DEVICE_POWER_CAP_UNITS,
    MaxPower: u64,
};

pub const STORAGE_RPMB_DATA_FRAME = extern struct {
    Stuff: [196]u8,
    KeyOrMAC: [32]u8,
    Data: [256]u8,
    Nonce: [16]u8,
    WriteCounter: [4]u8,
    Address: [2]u8,
    BlockCount: [2]u8,
    OperationResult: [2]u8,
    RequestOrResponseType: [2]u8,
};

pub const STORAGE_RPMB_COMMAND_TYPE = enum(i32) {
    ProgramAuthKey = 1,
    QueryWriteCounter = 2,
    AuthenticatedWrite = 3,
    AuthenticatedRead = 4,
    ReadResultRequest = 5,
    AuthenticatedDeviceConfigWrite = 6,
    AuthenticatedDeviceConfigRead = 7,
};
pub const StorRpmbProgramAuthKey = STORAGE_RPMB_COMMAND_TYPE.ProgramAuthKey;
pub const StorRpmbQueryWriteCounter = STORAGE_RPMB_COMMAND_TYPE.QueryWriteCounter;
pub const StorRpmbAuthenticatedWrite = STORAGE_RPMB_COMMAND_TYPE.AuthenticatedWrite;
pub const StorRpmbAuthenticatedRead = STORAGE_RPMB_COMMAND_TYPE.AuthenticatedRead;
pub const StorRpmbReadResultRequest = STORAGE_RPMB_COMMAND_TYPE.ReadResultRequest;
pub const StorRpmbAuthenticatedDeviceConfigWrite = STORAGE_RPMB_COMMAND_TYPE.AuthenticatedDeviceConfigWrite;
pub const StorRpmbAuthenticatedDeviceConfigRead = STORAGE_RPMB_COMMAND_TYPE.AuthenticatedDeviceConfigRead;

pub const STORAGE_EVENT_NOTIFICATION = extern struct {
    Version: u32,
    Size: u32,
    Events: u64,
};

pub const STORAGE_COUNTER_TYPE = enum(i32) {
    Unknown = 0,
    TemperatureCelsius = 1,
    TemperatureCelsiusMax = 2,
    ReadErrorsTotal = 3,
    ReadErrorsCorrected = 4,
    ReadErrorsUncorrected = 5,
    WriteErrorsTotal = 6,
    WriteErrorsCorrected = 7,
    WriteErrorsUncorrected = 8,
    ManufactureDate = 9,
    StartStopCycleCount = 10,
    StartStopCycleCountMax = 11,
    LoadUnloadCycleCount = 12,
    LoadUnloadCycleCountMax = 13,
    WearPercentage = 14,
    WearPercentageWarning = 15,
    WearPercentageMax = 16,
    PowerOnHours = 17,
    ReadLatency100NSMax = 18,
    WriteLatency100NSMax = 19,
    FlushLatency100NSMax = 20,
    Max = 21,
};
pub const StorageCounterTypeUnknown = STORAGE_COUNTER_TYPE.Unknown;
pub const StorageCounterTypeTemperatureCelsius = STORAGE_COUNTER_TYPE.TemperatureCelsius;
pub const StorageCounterTypeTemperatureCelsiusMax = STORAGE_COUNTER_TYPE.TemperatureCelsiusMax;
pub const StorageCounterTypeReadErrorsTotal = STORAGE_COUNTER_TYPE.ReadErrorsTotal;
pub const StorageCounterTypeReadErrorsCorrected = STORAGE_COUNTER_TYPE.ReadErrorsCorrected;
pub const StorageCounterTypeReadErrorsUncorrected = STORAGE_COUNTER_TYPE.ReadErrorsUncorrected;
pub const StorageCounterTypeWriteErrorsTotal = STORAGE_COUNTER_TYPE.WriteErrorsTotal;
pub const StorageCounterTypeWriteErrorsCorrected = STORAGE_COUNTER_TYPE.WriteErrorsCorrected;
pub const StorageCounterTypeWriteErrorsUncorrected = STORAGE_COUNTER_TYPE.WriteErrorsUncorrected;
pub const StorageCounterTypeManufactureDate = STORAGE_COUNTER_TYPE.ManufactureDate;
pub const StorageCounterTypeStartStopCycleCount = STORAGE_COUNTER_TYPE.StartStopCycleCount;
pub const StorageCounterTypeStartStopCycleCountMax = STORAGE_COUNTER_TYPE.StartStopCycleCountMax;
pub const StorageCounterTypeLoadUnloadCycleCount = STORAGE_COUNTER_TYPE.LoadUnloadCycleCount;
pub const StorageCounterTypeLoadUnloadCycleCountMax = STORAGE_COUNTER_TYPE.LoadUnloadCycleCountMax;
pub const StorageCounterTypeWearPercentage = STORAGE_COUNTER_TYPE.WearPercentage;
pub const StorageCounterTypeWearPercentageWarning = STORAGE_COUNTER_TYPE.WearPercentageWarning;
pub const StorageCounterTypeWearPercentageMax = STORAGE_COUNTER_TYPE.WearPercentageMax;
pub const StorageCounterTypePowerOnHours = STORAGE_COUNTER_TYPE.PowerOnHours;
pub const StorageCounterTypeReadLatency100NSMax = STORAGE_COUNTER_TYPE.ReadLatency100NSMax;
pub const StorageCounterTypeWriteLatency100NSMax = STORAGE_COUNTER_TYPE.WriteLatency100NSMax;
pub const StorageCounterTypeFlushLatency100NSMax = STORAGE_COUNTER_TYPE.FlushLatency100NSMax;
pub const StorageCounterTypeMax = STORAGE_COUNTER_TYPE.Max;

pub const STORAGE_COUNTER = extern struct {
    Type: STORAGE_COUNTER_TYPE,
    Value: extern union {
        ManufactureDate: extern struct {
            Week: u32,
            Year: u32,
        },
        AsUlonglong: u64,
    },
};

pub const STORAGE_COUNTERS = extern struct {
    Version: u32,
    Size: u32,
    NumberOfCounters: u32,
    Counters: [1]STORAGE_COUNTER,
};

pub const STORAGE_HW_FIRMWARE_INFO_QUERY = extern struct {
    Version: u32,
    Size: u32,
    Flags: u32,
    Reserved: u32,
};

pub const STORAGE_HW_FIRMWARE_SLOT_INFO = extern struct {
    Version: u32,
    Size: u32,
    SlotNumber: u8,
    _bitfield: u8,
    Reserved1: [6]u8,
    Revision: [16]u8,
};

pub const STORAGE_HW_FIRMWARE_INFO = extern struct {
    Version: u32,
    Size: u32,
    _bitfield: u8,
    SlotCount: u8,
    ActiveSlot: u8,
    PendingActivateSlot: u8,
    FirmwareShared: BOOLEAN,
    Reserved: [3]u8,
    ImagePayloadAlignment: u32,
    ImagePayloadMaxSize: u32,
    Slot: [1]STORAGE_HW_FIRMWARE_SLOT_INFO,
};

pub const STORAGE_HW_FIRMWARE_DOWNLOAD = extern struct {
    Version: u32,
    Size: u32,
    Flags: u32,
    Slot: u8,
    Reserved: [3]u8,
    Offset: u64,
    BufferSize: u64,
    ImageBuffer: [1]u8,
};

pub const STORAGE_HW_FIRMWARE_DOWNLOAD_V2 = extern struct {
    Version: u32,
    Size: u32,
    Flags: u32,
    Slot: u8,
    Reserved: [3]u8,
    Offset: u64,
    BufferSize: u64,
    ImageSize: u32,
    Reserved2: u32,
    ImageBuffer: [1]u8,
};

pub const STORAGE_HW_FIRMWARE_ACTIVATE = extern struct {
    Version: u32,
    Size: u32,
    Flags: u32,
    Slot: u8,
    Reserved0: [3]u8,
};

pub const STORAGE_PROTOCOL_COMMAND = extern struct {
    Version: u32,
    Length: u32,
    ProtocolType: STORAGE_PROTOCOL_TYPE,
    Flags: u32,
    ReturnStatus: u32,
    ErrorCode: u32,
    CommandLength: u32,
    ErrorInfoLength: u32,
    DataToDeviceTransferLength: u32,
    DataFromDeviceTransferLength: u32,
    TimeOutValue: u32,
    ErrorInfoOffset: u32,
    DataToDeviceBufferOffset: u32,
    DataFromDeviceBufferOffset: u32,
    CommandSpecific: u32,
    Reserved0: u32,
    FixedProtocolReturnData: u32,
    Reserved1: [3]u32,
    Command: [1]u8,
};

pub const STORAGE_ATTRIBUTE_MGMT_ACTION = enum(i32) {
    ClearAttribute = 0,
    SetAttribute = 1,
    ResetAttribute = 2,
};
pub const StorAttributeMgmt_ClearAttribute = STORAGE_ATTRIBUTE_MGMT_ACTION.ClearAttribute;
pub const StorAttributeMgmt_SetAttribute = STORAGE_ATTRIBUTE_MGMT_ACTION.SetAttribute;
pub const StorAttributeMgmt_ResetAttribute = STORAGE_ATTRIBUTE_MGMT_ACTION.ResetAttribute;

pub const STORAGE_ATTRIBUTE_MGMT = extern struct {
    Version: u32,
    Size: u32,
    Action: STORAGE_ATTRIBUTE_MGMT_ACTION,
    Attribute: u32,
};

pub const SCM_PD_HEALTH_NOTIFICATION_DATA = extern struct {
    DeviceGuid: Guid,
};

pub const SCM_LOGICAL_DEVICE_INSTANCE = extern struct {
    Version: u32,
    Size: u32,
    DeviceGuid: Guid,
    SymbolicLink: [256]u16,
};

pub const SCM_LOGICAL_DEVICES = extern struct {
    Version: u32,
    Size: u32,
    DeviceCount: u32,
    Devices: [1]SCM_LOGICAL_DEVICE_INSTANCE,
};

pub const SCM_PHYSICAL_DEVICE_INSTANCE = extern struct {
    Version: u32,
    Size: u32,
    NfitHandle: u32,
    SymbolicLink: [256]u16,
};

pub const SCM_PHYSICAL_DEVICES = extern struct {
    Version: u32,
    Size: u32,
    DeviceCount: u32,
    Devices: [1]SCM_PHYSICAL_DEVICE_INSTANCE,
};

pub const SCM_REGION_FLAG = enum(i32) {
    None = 0,
    Label = 1,
};
pub const ScmRegionFlagNone = SCM_REGION_FLAG.None;
pub const ScmRegionFlagLabel = SCM_REGION_FLAG.Label;

pub const SCM_REGION = extern struct {
    Version: u32,
    Size: u32,
    Flags: u32,
    NfitHandle: u32,
    LogicalDeviceGuid: Guid,
    AddressRangeType: Guid,
    AssociatedId: u32,
    Length: u64,
    StartingDPA: u64,
    BaseSPA: u64,
    SPAOffset: u64,
    RegionOffset: u64,
};

pub const SCM_REGIONS = extern struct {
    Version: u32,
    Size: u32,
    RegionCount: u32,
    Regions: [1]SCM_REGION,
};

pub const SCM_BUS_QUERY_TYPE = enum(i32) {
    Descriptor = 0,
    IsSupported = 1,
    Max = 2,
};
pub const ScmBusQuery_Descriptor = SCM_BUS_QUERY_TYPE.Descriptor;
pub const ScmBusQuery_IsSupported = SCM_BUS_QUERY_TYPE.IsSupported;
pub const ScmBusQuery_Max = SCM_BUS_QUERY_TYPE.Max;

pub const SCM_BUS_SET_TYPE = enum(i32) {
    Descriptor = 0,
    IsSupported = 1,
    Max = 2,
};
pub const ScmBusSet_Descriptor = SCM_BUS_SET_TYPE.Descriptor;
pub const ScmBusSet_IsSupported = SCM_BUS_SET_TYPE.IsSupported;
pub const ScmBusSet_Max = SCM_BUS_SET_TYPE.Max;

pub const SCM_BUS_PROPERTY_ID = enum(i32) {
    RuntimeFwActivationInfo = 0,
    DedicatedMemoryInfo = 1,
    DedicatedMemoryState = 2,
    Max = 3,
};
pub const ScmBusProperty_RuntimeFwActivationInfo = SCM_BUS_PROPERTY_ID.RuntimeFwActivationInfo;
pub const ScmBusProperty_DedicatedMemoryInfo = SCM_BUS_PROPERTY_ID.DedicatedMemoryInfo;
pub const ScmBusProperty_DedicatedMemoryState = SCM_BUS_PROPERTY_ID.DedicatedMemoryState;
pub const ScmBusProperty_Max = SCM_BUS_PROPERTY_ID.Max;

pub const SCM_BUS_PROPERTY_QUERY = extern struct {
    Version: u32,
    Size: u32,
    PropertyId: SCM_BUS_PROPERTY_ID,
    QueryType: SCM_BUS_QUERY_TYPE,
    AdditionalParameters: [1]u8,
};

pub const SCM_BUS_FIRMWARE_ACTIVATION_STATE = enum(i32) {
    Idle = 0,
    Armed = 1,
    Busy = 2,
};
pub const ScmBusFirmwareActivationState_Idle = SCM_BUS_FIRMWARE_ACTIVATION_STATE.Idle;
pub const ScmBusFirmwareActivationState_Armed = SCM_BUS_FIRMWARE_ACTIVATION_STATE.Armed;
pub const ScmBusFirmwareActivationState_Busy = SCM_BUS_FIRMWARE_ACTIVATION_STATE.Busy;

pub const SCM_BUS_RUNTIME_FW_ACTIVATION_INFO = extern struct {
    Version: u32,
    Size: u32,
    RuntimeFwActivationSupported: BOOLEAN,
    FirmwareActivationState: SCM_BUS_FIRMWARE_ACTIVATION_STATE,
    FirmwareActivationCapability: extern struct {
        _bitfield: u32,
    },
    EstimatedFirmwareActivationTimeInUSecs: u64,
    EstimatedProcessorAccessQuiesceTimeInUSecs: u64,
    EstimatedIOAccessQuiesceTimeInUSecs: u64,
    PlatformSupportedMaxIOAccessQuiesceTimeInUSecs: u64,
};

pub const SCM_BUS_DEDICATED_MEMORY_DEVICE_INFO = extern struct {
    DeviceGuid: Guid,
    DeviceNumber: u32,
    Flags: extern struct {
        _bitfield: u32,
    },
    DeviceSize: u64,
};

pub const SCM_BUS_DEDICATED_MEMORY_DEVICES_INFO = extern struct {
    Version: u32,
    Size: u32,
    DeviceCount: u32,
    Devices: [1]SCM_BUS_DEDICATED_MEMORY_DEVICE_INFO,
};

pub const SCM_BUS_PROPERTY_SET = extern struct {
    Version: u32,
    Size: u32,
    PropertyId: SCM_BUS_PROPERTY_ID,
    SetType: SCM_BUS_SET_TYPE,
    AdditionalParameters: [1]u8,
};

pub const SCM_BUS_DEDICATED_MEMORY_STATE = extern struct {
    ActivateState: BOOLEAN,
};

pub const SCM_INTERLEAVED_PD_INFO = extern struct {
    DeviceHandle: u32,
    DeviceGuid: Guid,
};

pub const SCM_LD_INTERLEAVE_SET_INFO = extern struct {
    Version: u32,
    Size: u32,
    InterleaveSetSize: u32,
    InterleaveSet: [1]SCM_INTERLEAVED_PD_INFO,
};

pub const SCM_PD_QUERY_TYPE = enum(i32) {
    Descriptor = 0,
    IsSupported = 1,
    Max = 2,
};
pub const ScmPhysicalDeviceQuery_Descriptor = SCM_PD_QUERY_TYPE.Descriptor;
pub const ScmPhysicalDeviceQuery_IsSupported = SCM_PD_QUERY_TYPE.IsSupported;
pub const ScmPhysicalDeviceQuery_Max = SCM_PD_QUERY_TYPE.Max;

pub const SCM_PD_SET_TYPE = enum(i32) {
    Descriptor = 0,
    IsSupported = 1,
    Max = 2,
};
pub const ScmPhysicalDeviceSet_Descriptor = SCM_PD_SET_TYPE.Descriptor;
pub const ScmPhysicalDeviceSet_IsSupported = SCM_PD_SET_TYPE.IsSupported;
pub const ScmPhysicalDeviceSet_Max = SCM_PD_SET_TYPE.Max;

pub const SCM_PD_PROPERTY_ID = enum(i32) {
    DeviceInfo = 0,
    ManagementStatus = 1,
    FirmwareInfo = 2,
    LocationString = 3,
    DeviceSpecificInfo = 4,
    DeviceHandle = 5,
    FruIdString = 6,
    RuntimeFwActivationInfo = 7,
    RuntimeFwActivationArmState = 8,
    Max = 9,
};
pub const ScmPhysicalDeviceProperty_DeviceInfo = SCM_PD_PROPERTY_ID.DeviceInfo;
pub const ScmPhysicalDeviceProperty_ManagementStatus = SCM_PD_PROPERTY_ID.ManagementStatus;
pub const ScmPhysicalDeviceProperty_FirmwareInfo = SCM_PD_PROPERTY_ID.FirmwareInfo;
pub const ScmPhysicalDeviceProperty_LocationString = SCM_PD_PROPERTY_ID.LocationString;
pub const ScmPhysicalDeviceProperty_DeviceSpecificInfo = SCM_PD_PROPERTY_ID.DeviceSpecificInfo;
pub const ScmPhysicalDeviceProperty_DeviceHandle = SCM_PD_PROPERTY_ID.DeviceHandle;
pub const ScmPhysicalDeviceProperty_FruIdString = SCM_PD_PROPERTY_ID.FruIdString;
pub const ScmPhysicalDeviceProperty_RuntimeFwActivationInfo = SCM_PD_PROPERTY_ID.RuntimeFwActivationInfo;
pub const ScmPhysicalDeviceProperty_RuntimeFwActivationArmState = SCM_PD_PROPERTY_ID.RuntimeFwActivationArmState;
pub const ScmPhysicalDeviceProperty_Max = SCM_PD_PROPERTY_ID.Max;

pub const SCM_PD_PROPERTY_QUERY = extern struct {
    Version: u32,
    Size: u32,
    PropertyId: SCM_PD_PROPERTY_ID,
    QueryType: SCM_PD_QUERY_TYPE,
    AdditionalParameters: [1]u8,
};

pub const SCM_PD_PROPERTY_SET = extern struct {
    Version: u32,
    Size: u32,
    PropertyId: SCM_PD_PROPERTY_ID,
    SetType: SCM_PD_SET_TYPE,
    AdditionalParameters: [1]u8,
};

pub const SCM_PD_RUNTIME_FW_ACTIVATION_ARM_STATE = extern struct {
    ArmState: BOOLEAN,
};

pub const SCM_PD_DESCRIPTOR_HEADER = extern struct {
    Version: u32,
    Size: u32,
};

pub const SCM_PD_DEVICE_HANDLE = extern struct {
    Version: u32,
    Size: u32,
    DeviceGuid: Guid,
    DeviceHandle: u32,
};

pub const SCM_PD_DEVICE_INFO = extern struct {
    Version: u32,
    Size: u32,
    DeviceGuid: Guid,
    UnsafeShutdownCount: u32,
    PersistentMemorySizeInBytes: u64,
    VolatileMemorySizeInBytes: u64,
    TotalMemorySizeInBytes: u64,
    SlotNumber: u32,
    DeviceHandle: u32,
    PhysicalId: u16,
    NumberOfFormatInterfaceCodes: u8,
    FormatInterfaceCodes: [8]u16,
    VendorId: u32,
    ProductId: u32,
    SubsystemDeviceId: u32,
    SubsystemVendorId: u32,
    ManufacturingLocation: u8,
    ManufacturingWeek: u8,
    ManufacturingYear: u8,
    SerialNumber4Byte: u32,
    SerialNumberLengthInChars: u32,
    SerialNumber: [1]CHAR,
};

pub const SCM_PD_DEVICE_SPECIFIC_PROPERTY = extern struct {
    Name: [128]u16,
    Value: i64,
};

pub const SCM_PD_DEVICE_SPECIFIC_INFO = extern struct {
    Version: u32,
    Size: u32,
    NumberOfProperties: u32,
    DeviceSpecificProperties: [1]SCM_PD_DEVICE_SPECIFIC_PROPERTY,
};

pub const SCM_PD_FIRMWARE_SLOT_INFO = extern struct {
    Version: u32,
    Size: u32,
    SlotNumber: u8,
    _bitfield: u8,
    Reserved1: [6]u8,
    Revision: [32]u8,
};

pub const SCM_PD_FIRMWARE_INFO = extern struct {
    Version: u32,
    Size: u32,
    ActiveSlot: u8,
    NextActiveSlot: u8,
    SlotCount: u8,
    Slots: [1]SCM_PD_FIRMWARE_SLOT_INFO,
};

pub const SCM_PD_HEALTH_STATUS = enum(i32) {
    Unknown = 0,
    Unhealthy = 1,
    Warning = 2,
    Healthy = 3,
    Max = 4,
};
pub const ScmPhysicalDeviceHealth_Unknown = SCM_PD_HEALTH_STATUS.Unknown;
pub const ScmPhysicalDeviceHealth_Unhealthy = SCM_PD_HEALTH_STATUS.Unhealthy;
pub const ScmPhysicalDeviceHealth_Warning = SCM_PD_HEALTH_STATUS.Warning;
pub const ScmPhysicalDeviceHealth_Healthy = SCM_PD_HEALTH_STATUS.Healthy;
pub const ScmPhysicalDeviceHealth_Max = SCM_PD_HEALTH_STATUS.Max;

pub const SCM_PD_OPERATIONAL_STATUS = enum(i32) {
    Unknown = 0,
    Ok = 1,
    PredictingFailure = 2,
    InService = 3,
    HardwareError = 4,
    NotUsable = 5,
    TransientError = 6,
    Missing = 7,
    Max = 8,
};
pub const ScmPhysicalDeviceOpStatus_Unknown = SCM_PD_OPERATIONAL_STATUS.Unknown;
pub const ScmPhysicalDeviceOpStatus_Ok = SCM_PD_OPERATIONAL_STATUS.Ok;
pub const ScmPhysicalDeviceOpStatus_PredictingFailure = SCM_PD_OPERATIONAL_STATUS.PredictingFailure;
pub const ScmPhysicalDeviceOpStatus_InService = SCM_PD_OPERATIONAL_STATUS.InService;
pub const ScmPhysicalDeviceOpStatus_HardwareError = SCM_PD_OPERATIONAL_STATUS.HardwareError;
pub const ScmPhysicalDeviceOpStatus_NotUsable = SCM_PD_OPERATIONAL_STATUS.NotUsable;
pub const ScmPhysicalDeviceOpStatus_TransientError = SCM_PD_OPERATIONAL_STATUS.TransientError;
pub const ScmPhysicalDeviceOpStatus_Missing = SCM_PD_OPERATIONAL_STATUS.Missing;
pub const ScmPhysicalDeviceOpStatus_Max = SCM_PD_OPERATIONAL_STATUS.Max;

pub const SCM_PD_OPERATIONAL_STATUS_REASON = enum(i32) {
    Unknown = 0,
    Media = 1,
    ThresholdExceeded = 2,
    LostData = 3,
    EnergySource = 4,
    Configuration = 5,
    DeviceController = 6,
    MediaController = 7,
    Component = 8,
    BackgroundOperation = 9,
    InvalidFirmware = 10,
    HealthCheck = 11,
    LostDataPersistence = 12,
    DisabledByPlatform = 13,
    PermanentError = 14,
    LostWritePersistence = 15,
    FatalError = 16,
    DataPersistenceLossImminent = 17,
    WritePersistenceLossImminent = 18,
    MediaRemainingSpareBlock = 19,
    PerformanceDegradation = 20,
    ExcessiveTemperature = 21,
    InternalFailure = 22,
    Max = 23,
};
pub const ScmPhysicalDeviceOpReason_Unknown = SCM_PD_OPERATIONAL_STATUS_REASON.Unknown;
pub const ScmPhysicalDeviceOpReason_Media = SCM_PD_OPERATIONAL_STATUS_REASON.Media;
pub const ScmPhysicalDeviceOpReason_ThresholdExceeded = SCM_PD_OPERATIONAL_STATUS_REASON.ThresholdExceeded;
pub const ScmPhysicalDeviceOpReason_LostData = SCM_PD_OPERATIONAL_STATUS_REASON.LostData;
pub const ScmPhysicalDeviceOpReason_EnergySource = SCM_PD_OPERATIONAL_STATUS_REASON.EnergySource;
pub const ScmPhysicalDeviceOpReason_Configuration = SCM_PD_OPERATIONAL_STATUS_REASON.Configuration;
pub const ScmPhysicalDeviceOpReason_DeviceController = SCM_PD_OPERATIONAL_STATUS_REASON.DeviceController;
pub const ScmPhysicalDeviceOpReason_MediaController = SCM_PD_OPERATIONAL_STATUS_REASON.MediaController;
pub const ScmPhysicalDeviceOpReason_Component = SCM_PD_OPERATIONAL_STATUS_REASON.Component;
pub const ScmPhysicalDeviceOpReason_BackgroundOperation = SCM_PD_OPERATIONAL_STATUS_REASON.BackgroundOperation;
pub const ScmPhysicalDeviceOpReason_InvalidFirmware = SCM_PD_OPERATIONAL_STATUS_REASON.InvalidFirmware;
pub const ScmPhysicalDeviceOpReason_HealthCheck = SCM_PD_OPERATIONAL_STATUS_REASON.HealthCheck;
pub const ScmPhysicalDeviceOpReason_LostDataPersistence = SCM_PD_OPERATIONAL_STATUS_REASON.LostDataPersistence;
pub const ScmPhysicalDeviceOpReason_DisabledByPlatform = SCM_PD_OPERATIONAL_STATUS_REASON.DisabledByPlatform;
pub const ScmPhysicalDeviceOpReason_PermanentError = SCM_PD_OPERATIONAL_STATUS_REASON.PermanentError;
pub const ScmPhysicalDeviceOpReason_LostWritePersistence = SCM_PD_OPERATIONAL_STATUS_REASON.LostWritePersistence;
pub const ScmPhysicalDeviceOpReason_FatalError = SCM_PD_OPERATIONAL_STATUS_REASON.FatalError;
pub const ScmPhysicalDeviceOpReason_DataPersistenceLossImminent = SCM_PD_OPERATIONAL_STATUS_REASON.DataPersistenceLossImminent;
pub const ScmPhysicalDeviceOpReason_WritePersistenceLossImminent = SCM_PD_OPERATIONAL_STATUS_REASON.WritePersistenceLossImminent;
pub const ScmPhysicalDeviceOpReason_MediaRemainingSpareBlock = SCM_PD_OPERATIONAL_STATUS_REASON.MediaRemainingSpareBlock;
pub const ScmPhysicalDeviceOpReason_PerformanceDegradation = SCM_PD_OPERATIONAL_STATUS_REASON.PerformanceDegradation;
pub const ScmPhysicalDeviceOpReason_ExcessiveTemperature = SCM_PD_OPERATIONAL_STATUS_REASON.ExcessiveTemperature;
pub const ScmPhysicalDeviceOpReason_InternalFailure = SCM_PD_OPERATIONAL_STATUS_REASON.InternalFailure;
pub const ScmPhysicalDeviceOpReason_Max = SCM_PD_OPERATIONAL_STATUS_REASON.Max;

pub const SCM_PD_MANAGEMENT_STATUS = extern struct {
    Version: u32,
    Size: u32,
    Health: SCM_PD_HEALTH_STATUS,
    NumberOfOperationalStatus: u32,
    NumberOfAdditionalReasons: u32,
    OperationalStatus: [16]SCM_PD_OPERATIONAL_STATUS,
    AdditionalReasons: [1]SCM_PD_OPERATIONAL_STATUS_REASON,
};

pub const SCM_PD_LOCATION_STRING = extern struct {
    Version: u32,
    Size: u32,
    Location: [1]u16,
};

pub const SCM_PD_FRU_ID_STRING = extern struct {
    Version: u32,
    Size: u32,
    IdentifierSize: u32,
    Identifier: [1]u8,
};

pub const SCM_PD_FIRMWARE_DOWNLOAD = extern struct {
    Version: u32,
    Size: u32,
    Flags: u32,
    Slot: u8,
    Reserved: [3]u8,
    Offset: u64,
    FirmwareImageSizeInBytes: u32,
    FirmwareImage: [1]u8,
};

pub const SCM_PD_FIRMWARE_ACTIVATE = extern struct {
    Version: u32,
    Size: u32,
    Flags: u32,
    Slot: u8,
};

pub const SCM_PD_LAST_FW_ACTIVATION_STATUS = enum(i32) {
    tionStatus_None = 0,
    tionStatus_Success = 1,
    tionStatus_FwNotFound = 2,
    tionStatus_ColdRebootRequired = 3,
    itonStatus_ActivationInProgress = 4,
    itonStatus_Retry = 5,
    itonStatus_FwUnsupported = 6,
    itonStatus_UnknownError = 7,
};
pub const ScmPdLastFwActivationStatus_None = SCM_PD_LAST_FW_ACTIVATION_STATUS.tionStatus_None;
pub const ScmPdLastFwActivationStatus_Success = SCM_PD_LAST_FW_ACTIVATION_STATUS.tionStatus_Success;
pub const ScmPdLastFwActivationStatus_FwNotFound = SCM_PD_LAST_FW_ACTIVATION_STATUS.tionStatus_FwNotFound;
pub const ScmPdLastFwActivationStatus_ColdRebootRequired = SCM_PD_LAST_FW_ACTIVATION_STATUS.tionStatus_ColdRebootRequired;
pub const ScmPdLastFwActivaitonStatus_ActivationInProgress = SCM_PD_LAST_FW_ACTIVATION_STATUS.itonStatus_ActivationInProgress;
pub const ScmPdLastFwActivaitonStatus_Retry = SCM_PD_LAST_FW_ACTIVATION_STATUS.itonStatus_Retry;
pub const ScmPdLastFwActivaitonStatus_FwUnsupported = SCM_PD_LAST_FW_ACTIVATION_STATUS.itonStatus_FwUnsupported;
pub const ScmPdLastFwActivaitonStatus_UnknownError = SCM_PD_LAST_FW_ACTIVATION_STATUS.itonStatus_UnknownError;

pub const SCM_PD_FIRMWARE_ACTIVATION_STATE = enum(i32) {
    Idle = 0,
    Armed = 1,
    Busy = 2,
};
pub const ScmPdFirmwareActivationState_Idle = SCM_PD_FIRMWARE_ACTIVATION_STATE.Idle;
pub const ScmPdFirmwareActivationState_Armed = SCM_PD_FIRMWARE_ACTIVATION_STATE.Armed;
pub const ScmPdFirmwareActivationState_Busy = SCM_PD_FIRMWARE_ACTIVATION_STATE.Busy;

pub const SCM_PD_RUNTIME_FW_ACTIVATION_INFO = extern struct {
    Version: u32,
    Size: u32,
    LastFirmwareActivationStatus: SCM_PD_LAST_FW_ACTIVATION_STATUS,
    FirmwareActivationState: SCM_PD_FIRMWARE_ACTIVATION_STATE,
};

pub const SCM_PD_PASSTHROUGH_INPUT = extern struct {
    Version: u32,
    Size: u32,
    ProtocolGuid: Guid,
    DataSize: u32,
    Data: [1]u8,
};

pub const SCM_PD_PASSTHROUGH_OUTPUT = extern struct {
    Version: u32,
    Size: u32,
    ProtocolGuid: Guid,
    DataSize: u32,
    Data: [1]u8,
};

pub const SCM_PD_PASSTHROUGH_INVDIMM_INPUT = extern struct {
    Opcode: u32,
    OpcodeParametersLength: u32,
    OpcodeParameters: [1]u8,
};

pub const SCM_PD_PASSTHROUGH_INVDIMM_OUTPUT = extern struct {
    GeneralStatus: u16,
    ExtendedStatus: u16,
    OutputDataLength: u32,
    OutputData: [1]u8,
};

pub const SCM_PD_REINITIALIZE_MEDIA_INPUT = extern struct {
    Version: u32,
    Size: u32,
    Options: extern struct {
        _bitfield: u32,
    },
};

pub const SCM_PD_MEDIA_REINITIALIZATION_STATUS = enum(i32) {
    Success = 0,
    RebootNeeded = 1,
    ColdBootNeeded = 2,
    Max = 3,
};
pub const ScmPhysicalDeviceReinit_Success = SCM_PD_MEDIA_REINITIALIZATION_STATUS.Success;
pub const ScmPhysicalDeviceReinit_RebootNeeded = SCM_PD_MEDIA_REINITIALIZATION_STATUS.RebootNeeded;
pub const ScmPhysicalDeviceReinit_ColdBootNeeded = SCM_PD_MEDIA_REINITIALIZATION_STATUS.ColdBootNeeded;
pub const ScmPhysicalDeviceReinit_Max = SCM_PD_MEDIA_REINITIALIZATION_STATUS.Max;

pub const SCM_PD_REINITIALIZE_MEDIA_OUTPUT = extern struct {
    Version: u32,
    Size: u32,
    Status: SCM_PD_MEDIA_REINITIALIZATION_STATUS,
};

pub const MEDIA_TYPE = enum(i32) {
    Unknown = 0,
    F5_1Pt2_512 = 1,
    F3_1Pt44_512 = 2,
    F3_2Pt88_512 = 3,
    F3_20Pt8_512 = 4,
    F3_720_512 = 5,
    F5_360_512 = 6,
    F5_320_512 = 7,
    F5_320_1024 = 8,
    F5_180_512 = 9,
    F5_160_512 = 10,
    RemovableMedia = 11,
    FixedMedia = 12,
    F3_120M_512 = 13,
    F3_640_512 = 14,
    F5_640_512 = 15,
    F5_720_512 = 16,
    F3_1Pt2_512 = 17,
    F3_1Pt23_1024 = 18,
    F5_1Pt23_1024 = 19,
    F3_128Mb_512 = 20,
    F3_230Mb_512 = 21,
    F8_256_128 = 22,
    F3_200Mb_512 = 23,
    F3_240M_512 = 24,
    F3_32M_512 = 25,
};
pub const Unknown = MEDIA_TYPE.Unknown;
pub const F5_1Pt2_512 = MEDIA_TYPE.F5_1Pt2_512;
pub const F3_1Pt44_512 = MEDIA_TYPE.F3_1Pt44_512;
pub const F3_2Pt88_512 = MEDIA_TYPE.F3_2Pt88_512;
pub const F3_20Pt8_512 = MEDIA_TYPE.F3_20Pt8_512;
pub const F3_720_512 = MEDIA_TYPE.F3_720_512;
pub const F5_360_512 = MEDIA_TYPE.F5_360_512;
pub const F5_320_512 = MEDIA_TYPE.F5_320_512;
pub const F5_320_1024 = MEDIA_TYPE.F5_320_1024;
pub const F5_180_512 = MEDIA_TYPE.F5_180_512;
pub const F5_160_512 = MEDIA_TYPE.F5_160_512;
pub const RemovableMedia = MEDIA_TYPE.RemovableMedia;
pub const FixedMedia = MEDIA_TYPE.FixedMedia;
pub const F3_120M_512 = MEDIA_TYPE.F3_120M_512;
pub const F3_640_512 = MEDIA_TYPE.F3_640_512;
pub const F5_640_512 = MEDIA_TYPE.F5_640_512;
pub const F5_720_512 = MEDIA_TYPE.F5_720_512;
pub const F3_1Pt2_512 = MEDIA_TYPE.F3_1Pt2_512;
pub const F3_1Pt23_1024 = MEDIA_TYPE.F3_1Pt23_1024;
pub const F5_1Pt23_1024 = MEDIA_TYPE.F5_1Pt23_1024;
pub const F3_128Mb_512 = MEDIA_TYPE.F3_128Mb_512;
pub const F3_230Mb_512 = MEDIA_TYPE.F3_230Mb_512;
pub const F8_256_128 = MEDIA_TYPE.F8_256_128;
pub const F3_200Mb_512 = MEDIA_TYPE.F3_200Mb_512;
pub const F3_240M_512 = MEDIA_TYPE.F3_240M_512;
pub const F3_32M_512 = MEDIA_TYPE.F3_32M_512;

pub const FORMAT_PARAMETERS = extern struct {
    MediaType: MEDIA_TYPE,
    StartCylinderNumber: u32,
    EndCylinderNumber: u32,
    StartHeadNumber: u32,
    EndHeadNumber: u32,
};

pub const FORMAT_EX_PARAMETERS = extern struct {
    MediaType: MEDIA_TYPE,
    StartCylinderNumber: u32,
    EndCylinderNumber: u32,
    StartHeadNumber: u32,
    EndHeadNumber: u32,
    FormatGapLength: u16,
    SectorsPerTrack: u16,
    SectorNumber: [1]u16,
};

pub const DISK_GEOMETRY = extern struct {
    Cylinders: LARGE_INTEGER,
    MediaType: MEDIA_TYPE,
    TracksPerCylinder: u32,
    SectorsPerTrack: u32,
    BytesPerSector: u32,
};

pub const PARTITION_INFORMATION = extern struct {
    StartingOffset: LARGE_INTEGER,
    PartitionLength: LARGE_INTEGER,
    HiddenSectors: u32,
    PartitionNumber: u32,
    PartitionType: u8,
    BootIndicator: BOOLEAN,
    RecognizedPartition: BOOLEAN,
    RewritePartition: BOOLEAN,
};

pub const SET_PARTITION_INFORMATION = extern struct {
    PartitionType: u8,
};

pub const DRIVE_LAYOUT_INFORMATION = extern struct {
    PartitionCount: u32,
    Signature: u32,
    PartitionEntry: [1]PARTITION_INFORMATION,
};

pub const VERIFY_INFORMATION = extern struct {
    StartingOffset: LARGE_INTEGER,
    Length: u32,
};

pub const REASSIGN_BLOCKS = extern struct {
    Reserved: u16,
    Count: u16,
    BlockNumber: [1]u32,
};

pub const REASSIGN_BLOCKS_EX = extern struct {
    Reserved: u16 align(1),
    Count: u16 align(1),
    BlockNumber: [1]LARGE_INTEGER align(1),
};

pub const PARTITION_STYLE = enum(i32) {
    MBR = 0,
    GPT = 1,
    RAW = 2,
};
pub const PARTITION_STYLE_MBR = PARTITION_STYLE.MBR;
pub const PARTITION_STYLE_GPT = PARTITION_STYLE.GPT;
pub const PARTITION_STYLE_RAW = PARTITION_STYLE.RAW;

pub const PARTITION_INFORMATION_GPT = extern struct {
    PartitionType: Guid,
    PartitionId: Guid,
    Attributes: GPT_ATTRIBUTES,
    Name: [36]u16,
};

pub const PARTITION_INFORMATION_MBR = extern struct {
    PartitionType: u8,
    BootIndicator: BOOLEAN,
    RecognizedPartition: BOOLEAN,
    HiddenSectors: u32,
    PartitionId: Guid,
};

pub const SET_PARTITION_INFORMATION_EX = extern struct {
    PartitionStyle: PARTITION_STYLE,
    Anonymous: extern union {
        Mbr: SET_PARTITION_INFORMATION,
        Gpt: PARTITION_INFORMATION_GPT,
    },
};

pub const CREATE_DISK_GPT = extern struct {
    DiskId: Guid,
    MaxPartitionCount: u32,
};

pub const CREATE_DISK_MBR = extern struct {
    Signature: u32,
};

pub const CREATE_DISK = extern struct {
    PartitionStyle: PARTITION_STYLE,
    Anonymous: extern union {
        Mbr: CREATE_DISK_MBR,
        Gpt: CREATE_DISK_GPT,
    },
};

pub const GET_LENGTH_INFORMATION = extern struct {
    Length: LARGE_INTEGER,
};

pub const PARTITION_INFORMATION_EX = extern struct {
    PartitionStyle: PARTITION_STYLE,
    StartingOffset: LARGE_INTEGER,
    PartitionLength: LARGE_INTEGER,
    PartitionNumber: u32,
    RewritePartition: BOOLEAN,
    IsServicePartition: BOOLEAN,
    Anonymous: extern union {
        Mbr: PARTITION_INFORMATION_MBR,
        Gpt: PARTITION_INFORMATION_GPT,
    },
};

pub const DRIVE_LAYOUT_INFORMATION_GPT = extern struct {
    DiskId: Guid,
    StartingUsableOffset: LARGE_INTEGER,
    UsableLength: LARGE_INTEGER,
    MaxPartitionCount: u32,
};

pub const DRIVE_LAYOUT_INFORMATION_MBR = extern struct {
    Signature: u32,
    CheckSum: u32,
};

pub const DRIVE_LAYOUT_INFORMATION_EX = extern struct {
    PartitionStyle: u32,
    PartitionCount: u32,
    Anonymous: extern union {
        Mbr: DRIVE_LAYOUT_INFORMATION_MBR,
        Gpt: DRIVE_LAYOUT_INFORMATION_GPT,
    },
    PartitionEntry: [1]PARTITION_INFORMATION_EX,
};

pub const DETECTION_TYPE = enum(i32) {
    None = 0,
    Int13 = 1,
    ExInt13 = 2,
};
pub const DetectNone = DETECTION_TYPE.None;
pub const DetectInt13 = DETECTION_TYPE.Int13;
pub const DetectExInt13 = DETECTION_TYPE.ExInt13;

pub const DISK_INT13_INFO = extern struct {
    DriveSelect: u16,
    MaxCylinders: u32,
    SectorsPerTrack: u16,
    MaxHeads: u16,
    NumberDrives: u16,
};

pub const DISK_EX_INT13_INFO = extern struct {
    ExBufferSize: u16,
    ExFlags: u16,
    ExCylinders: u32,
    ExHeads: u32,
    ExSectorsPerTrack: u32,
    ExSectorsPerDrive: u64,
    ExSectorSize: u16,
    ExReserved: u16,
};

pub const DISK_DETECTION_INFO = extern struct {
    SizeOfDetectInfo: u32,
    DetectionType: DETECTION_TYPE,
    Anonymous: extern union {
        Anonymous: extern struct {
            Int13: DISK_INT13_INFO,
            ExInt13: DISK_EX_INT13_INFO,
        },
    },
};

pub const DISK_PARTITION_INFO = extern struct {
    SizeOfPartitionInfo: u32,
    PartitionStyle: PARTITION_STYLE,
    Anonymous: extern union {
        Mbr: extern struct {
            Signature: u32,
            CheckSum: u32,
        },
        Gpt: extern struct {
            DiskId: Guid,
        },
    },
};

pub const DISK_GEOMETRY_EX = extern struct {
    Geometry: DISK_GEOMETRY,
    DiskSize: LARGE_INTEGER,
    Data: [1]u8,
};

pub const DISK_CONTROLLER_NUMBER = extern struct {
    ControllerNumber: u32,
    DiskNumber: u32,
};

pub const DISK_CACHE_RETENTION_PRIORITY = enum(i32) {
    EqualPriority = 0,
    KeepPrefetchedData = 1,
    KeepReadData = 2,
};
pub const EqualPriority = DISK_CACHE_RETENTION_PRIORITY.EqualPriority;
pub const KeepPrefetchedData = DISK_CACHE_RETENTION_PRIORITY.KeepPrefetchedData;
pub const KeepReadData = DISK_CACHE_RETENTION_PRIORITY.KeepReadData;

pub const DISK_CACHE_INFORMATION = extern struct {
    ParametersSavable: BOOLEAN,
    ReadCacheEnabled: BOOLEAN,
    WriteCacheEnabled: BOOLEAN,
    ReadRetentionPriority: DISK_CACHE_RETENTION_PRIORITY,
    WriteRetentionPriority: DISK_CACHE_RETENTION_PRIORITY,
    DisablePrefetchTransferLength: u16,
    PrefetchScalar: BOOLEAN,
    Anonymous: extern union {
        ScalarPrefetch: extern struct {
            Minimum: u16,
            Maximum: u16,
            MaximumBlocks: u16,
        },
        BlockPrefetch: extern struct {
            Minimum: u16,
            Maximum: u16,
        },
    },
};

pub const DISK_GROW_PARTITION = extern struct {
    PartitionNumber: u32,
    BytesToGrow: LARGE_INTEGER,
};

pub const HISTOGRAM_BUCKET = extern struct {
    Reads: u32,
    Writes: u32,
};

pub const DISK_HISTOGRAM = extern struct {
    DiskSize: LARGE_INTEGER,
    Start: LARGE_INTEGER,
    End: LARGE_INTEGER,
    Average: LARGE_INTEGER,
    AverageRead: LARGE_INTEGER,
    AverageWrite: LARGE_INTEGER,
    Granularity: u32,
    Size: u32,
    ReadCount: u32,
    WriteCount: u32,
    Histogram: ?*HISTOGRAM_BUCKET,
};

pub const DISK_PERFORMANCE = extern struct {
    BytesRead: LARGE_INTEGER,
    BytesWritten: LARGE_INTEGER,
    ReadTime: LARGE_INTEGER,
    WriteTime: LARGE_INTEGER,
    IdleTime: LARGE_INTEGER,
    ReadCount: u32,
    WriteCount: u32,
    QueueDepth: u32,
    SplitCount: u32,
    QueryTime: LARGE_INTEGER,
    StorageDeviceNumber: u32,
    StorageManagerName: [8]u16,
};

pub const DISK_RECORD = extern struct {
    ByteOffset: LARGE_INTEGER,
    StartTime: LARGE_INTEGER,
    EndTime: LARGE_INTEGER,
    VirtualAddress: ?*anyopaque,
    NumberOfBytes: u32,
    DeviceNumber: u8,
    ReadRequest: BOOLEAN,
};

pub const DISK_LOGGING = extern struct {
    Function: u8,
    BufferAddress: ?*anyopaque,
    BufferSize: u32,
};

pub const BIN_TYPES = enum(i32) {
    Size = 0,
    Location = 1,
};
pub const RequestSize = BIN_TYPES.Size;
pub const RequestLocation = BIN_TYPES.Location;

pub const BIN_RANGE = extern struct {
    StartValue: LARGE_INTEGER,
    Length: LARGE_INTEGER,
};

pub const PERF_BIN = extern struct {
    NumberOfBins: u32,
    TypeOfBin: u32,
    BinsRanges: [1]BIN_RANGE,
};

pub const BIN_COUNT = extern struct {
    BinRange: BIN_RANGE,
    BinCount: u32,
};

pub const BIN_RESULTS = extern struct {
    NumberOfBins: u32,
    BinCounts: [1]BIN_COUNT,
};

pub const GETVERSIONINPARAMS = extern struct {
    bVersion: u8 align(1),
    bRevision: u8 align(1),
    bReserved: u8 align(1),
    bIDEDeviceMap: u8 align(1),
    fCapabilities: u32 align(1),
    dwReserved: [4]u32 align(1),
};

pub const IDEREGS = extern struct {
    bFeaturesReg: u8,
    bSectorCountReg: u8,
    bSectorNumberReg: u8,
    bCylLowReg: u8,
    bCylHighReg: u8,
    bDriveHeadReg: u8,
    bCommandReg: u8,
    bReserved: u8,
};

pub const SENDCMDINPARAMS = extern struct {
    cBufferSize: u32 align(1),
    irDriveRegs: IDEREGS align(1),
    bDriveNumber: u8 align(1),
    bReserved: [3]u8 align(1),
    dwReserved: [4]u32 align(1),
    bBuffer: [1]u8 align(1),
};

pub const DRIVERSTATUS = extern struct {
    bDriverError: u8 align(1),
    bIDEError: u8 align(1),
    bReserved: [2]u8 align(1),
    dwReserved: [2]u32 align(1),
};

pub const SENDCMDOUTPARAMS = extern struct {
    cBufferSize: u32 align(1),
    DriverStatus: DRIVERSTATUS align(1),
    bBuffer: [1]u8 align(1),
};

pub const GET_DISK_ATTRIBUTES = extern struct {
    Version: u32,
    Reserved1: u32,
    Attributes: u64,
};

pub const SET_DISK_ATTRIBUTES = extern struct {
    Version: u32,
    Persist: BOOLEAN,
    Reserved1: [3]u8,
    Attributes: u64,
    AttributesMask: u64,
    Reserved2: [4]u32,
};

pub const ELEMENT_TYPE = enum(i32) {
    AllElements = 0,
    ChangerTransport = 1,
    ChangerSlot = 2,
    ChangerIEPort = 3,
    ChangerDrive = 4,
    ChangerDoor = 5,
    ChangerKeypad = 6,
    ChangerMaxElement = 7,
};
pub const AllElements = ELEMENT_TYPE.AllElements;
pub const ChangerTransport = ELEMENT_TYPE.ChangerTransport;
pub const ChangerSlot = ELEMENT_TYPE.ChangerSlot;
pub const ChangerIEPort = ELEMENT_TYPE.ChangerIEPort;
pub const ChangerDrive = ELEMENT_TYPE.ChangerDrive;
pub const ChangerDoor = ELEMENT_TYPE.ChangerDoor;
pub const ChangerKeypad = ELEMENT_TYPE.ChangerKeypad;
pub const ChangerMaxElement = ELEMENT_TYPE.ChangerMaxElement;

pub const CHANGER_ELEMENT = extern struct {
    ElementType: ELEMENT_TYPE,
    ElementAddress: u32,
};

pub const CHANGER_ELEMENT_LIST = extern struct {
    Element: CHANGER_ELEMENT,
    NumberOfElements: u32,
};

pub const GET_CHANGER_PARAMETERS = extern struct {
    Size: u32,
    NumberTransportElements: u16,
    NumberStorageElements: u16,
    NumberCleanerSlots: u16,
    NumberIEElements: u16,
    NumberDataTransferElements: u16,
    NumberOfDoors: u16,
    FirstSlotNumber: u16,
    FirstDriveNumber: u16,
    FirstTransportNumber: u16,
    FirstIEPortNumber: u16,
    FirstCleanerSlotAddress: u16,
    MagazineSize: u16,
    DriveCleanTimeout: u32,
    Features0: CHANGER_FEATURES,
    Features1: GET_CHANGER_PARAMETERS_FEATURES1,
    MoveFromTransport: u8,
    MoveFromSlot: u8,
    MoveFromIePort: u8,
    MoveFromDrive: u8,
    ExchangeFromTransport: u8,
    ExchangeFromSlot: u8,
    ExchangeFromIePort: u8,
    ExchangeFromDrive: u8,
    LockUnlockCapabilities: u8,
    PositionCapabilities: u8,
    Reserved1: [2]u8,
    Reserved2: [2]u32,
};

pub const CHANGER_PRODUCT_DATA = extern struct {
    VendorId: [8]u8,
    ProductId: [16]u8,
    Revision: [4]u8,
    SerialNumber: [32]u8,
    DeviceType: u8,
};

pub const CHANGER_SET_ACCESS = extern struct {
    Element: CHANGER_ELEMENT,
    Control: u32,
};

pub const CHANGER_READ_ELEMENT_STATUS = extern struct {
    ElementList: CHANGER_ELEMENT_LIST,
    VolumeTagInfo: BOOLEAN,
};

pub const CHANGER_ELEMENT_STATUS = extern struct {
    Element: CHANGER_ELEMENT,
    SrcElementAddress: CHANGER_ELEMENT,
    Flags: CHANGER_ELEMENT_STATUS_FLAGS,
    ExceptionCode: u32,
    TargetId: u8,
    Lun: u8,
    Reserved: u16,
    PrimaryVolumeID: [36]u8,
    AlternateVolumeID: [36]u8,
};

pub const CHANGER_ELEMENT_STATUS_EX = extern struct {
    Element: CHANGER_ELEMENT,
    SrcElementAddress: CHANGER_ELEMENT,
    Flags: CHANGER_ELEMENT_STATUS_FLAGS,
    ExceptionCode: u32,
    TargetId: u8,
    Lun: u8,
    Reserved: u16,
    PrimaryVolumeID: [36]u8,
    AlternateVolumeID: [36]u8,
    VendorIdentification: [8]u8,
    ProductIdentification: [16]u8,
    SerialNumber: [32]u8,
};

pub const CHANGER_INITIALIZE_ELEMENT_STATUS = extern struct {
    ElementList: CHANGER_ELEMENT_LIST,
    BarCodeScan: BOOLEAN,
};

pub const CHANGER_SET_POSITION = extern struct {
    Transport: CHANGER_ELEMENT,
    Destination: CHANGER_ELEMENT,
    Flip: BOOLEAN,
};

pub const CHANGER_EXCHANGE_MEDIUM = extern struct {
    Transport: CHANGER_ELEMENT,
    Source: CHANGER_ELEMENT,
    Destination1: CHANGER_ELEMENT,
    Destination2: CHANGER_ELEMENT,
    Flip1: BOOLEAN,
    Flip2: BOOLEAN,
};

pub const CHANGER_MOVE_MEDIUM = extern struct {
    Transport: CHANGER_ELEMENT,
    Source: CHANGER_ELEMENT,
    Destination: CHANGER_ELEMENT,
    Flip: BOOLEAN,
};

pub const CHANGER_SEND_VOLUME_TAG_INFORMATION = extern struct {
    StartingElement: CHANGER_ELEMENT,
    ActionCode: u32,
    VolumeIDTemplate: [40]u8,
};

pub const READ_ELEMENT_ADDRESS_INFO = extern struct {
    NumberOfElements: u32,
    ElementStatus: [1]CHANGER_ELEMENT_STATUS,
};

pub const CHANGER_DEVICE_PROBLEM_TYPE = enum(i32) {
    None = 0,
    Hardware = 1,
    CHMError = 2,
    DoorOpen = 3,
    CalibrationError = 4,
    TargetFailure = 5,
    CHMMoveError = 6,
    CHMZeroError = 7,
    CartridgeInsertError = 8,
    PositionError = 9,
    SensorError = 10,
    CartridgeEjectError = 11,
    GripperError = 12,
    DriveError = 13,
};
pub const DeviceProblemNone = CHANGER_DEVICE_PROBLEM_TYPE.None;
pub const DeviceProblemHardware = CHANGER_DEVICE_PROBLEM_TYPE.Hardware;
pub const DeviceProblemCHMError = CHANGER_DEVICE_PROBLEM_TYPE.CHMError;
pub const DeviceProblemDoorOpen = CHANGER_DEVICE_PROBLEM_TYPE.DoorOpen;
pub const DeviceProblemCalibrationError = CHANGER_DEVICE_PROBLEM_TYPE.CalibrationError;
pub const DeviceProblemTargetFailure = CHANGER_DEVICE_PROBLEM_TYPE.TargetFailure;
pub const DeviceProblemCHMMoveError = CHANGER_DEVICE_PROBLEM_TYPE.CHMMoveError;
pub const DeviceProblemCHMZeroError = CHANGER_DEVICE_PROBLEM_TYPE.CHMZeroError;
pub const DeviceProblemCartridgeInsertError = CHANGER_DEVICE_PROBLEM_TYPE.CartridgeInsertError;
pub const DeviceProblemPositionError = CHANGER_DEVICE_PROBLEM_TYPE.PositionError;
pub const DeviceProblemSensorError = CHANGER_DEVICE_PROBLEM_TYPE.SensorError;
pub const DeviceProblemCartridgeEjectError = CHANGER_DEVICE_PROBLEM_TYPE.CartridgeEjectError;
pub const DeviceProblemGripperError = CHANGER_DEVICE_PROBLEM_TYPE.GripperError;
pub const DeviceProblemDriveError = CHANGER_DEVICE_PROBLEM_TYPE.DriveError;

pub const PATHNAME_BUFFER = extern struct {
    PathNameLength: u32,
    Name: [1]u16,
};

pub const FSCTL_QUERY_FAT_BPB_BUFFER = extern struct {
    First0x24BytesOfBootSector: [36]u8,
};

pub const NTFS_VOLUME_DATA_BUFFER = extern struct {
    VolumeSerialNumber: LARGE_INTEGER,
    NumberSectors: LARGE_INTEGER,
    TotalClusters: LARGE_INTEGER,
    FreeClusters: LARGE_INTEGER,
    TotalReserved: LARGE_INTEGER,
    BytesPerSector: u32,
    BytesPerCluster: u32,
    BytesPerFileRecordSegment: u32,
    ClustersPerFileRecordSegment: u32,
    MftValidDataLength: LARGE_INTEGER,
    MftStartLcn: LARGE_INTEGER,
    Mft2StartLcn: LARGE_INTEGER,
    MftZoneStart: LARGE_INTEGER,
    MftZoneEnd: LARGE_INTEGER,
};

pub const NTFS_EXTENDED_VOLUME_DATA = extern struct {
    ByteCount: u32,
    MajorVersion: u16,
    MinorVersion: u16,
    BytesPerPhysicalSector: u32,
    LfsMajorVersion: u16,
    LfsMinorVersion: u16,
    MaxDeviceTrimExtentCount: u32,
    MaxDeviceTrimByteCount: u32,
    MaxVolumeTrimExtentCount: u32,
    MaxVolumeTrimByteCount: u32,
};

pub const REFS_VOLUME_DATA_BUFFER = extern struct {
    ByteCount: u32,
    MajorVersion: u32,
    MinorVersion: u32,
    BytesPerPhysicalSector: u32,
    VolumeSerialNumber: LARGE_INTEGER,
    NumberSectors: LARGE_INTEGER,
    TotalClusters: LARGE_INTEGER,
    FreeClusters: LARGE_INTEGER,
    TotalReserved: LARGE_INTEGER,
    BytesPerSector: u32,
    BytesPerCluster: u32,
    MaximumSizeOfResidentFile: LARGE_INTEGER,
    FastTierDataFillRatio: u16,
    SlowTierDataFillRatio: u16,
    DestagesFastTierToSlowTierRate: u32,
    Reserved: [9]LARGE_INTEGER,
};

pub const STARTING_LCN_INPUT_BUFFER = extern struct {
    StartingLcn: LARGE_INTEGER,
};

pub const STARTING_LCN_INPUT_BUFFER_EX = extern struct {
    StartingLcn: LARGE_INTEGER,
    Flags: u32,
};

pub const VOLUME_BITMAP_BUFFER = extern struct {
    StartingLcn: LARGE_INTEGER,
    BitmapSize: LARGE_INTEGER,
    Buffer: [1]u8,
};

pub const STARTING_VCN_INPUT_BUFFER = extern struct {
    StartingVcn: LARGE_INTEGER,
};

pub const RETRIEVAL_POINTERS_BUFFER = extern struct {
    ExtentCount: u32,
    StartingVcn: LARGE_INTEGER,
    Extents: [1]extern struct {
        NextVcn: LARGE_INTEGER,
        Lcn: LARGE_INTEGER,
    },
};

pub const RETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER = extern struct {
    ExtentCount: u32,
    StartingVcn: LARGE_INTEGER,
    Extents: [1]extern struct {
        NextVcn: LARGE_INTEGER,
        Lcn: LARGE_INTEGER,
        ReferenceCount: u32,
    },
};

pub const RETRIEVAL_POINTER_COUNT = extern struct {
    ExtentCount: u32,
};

pub const NTFS_FILE_RECORD_INPUT_BUFFER = extern struct {
    FileReferenceNumber: LARGE_INTEGER,
};

pub const NTFS_FILE_RECORD_OUTPUT_BUFFER = extern struct {
    FileReferenceNumber: LARGE_INTEGER,
    FileRecordLength: u32,
    FileRecordBuffer: [1]u8,
};

pub const MOVE_FILE_DATA = extern struct {
    FileHandle: ?HANDLE,
    StartingVcn: LARGE_INTEGER,
    StartingLcn: LARGE_INTEGER,
    ClusterCount: u32,
};

pub const MOVE_FILE_RECORD_DATA = extern struct {
    FileHandle: ?HANDLE,
    SourceFileRecord: LARGE_INTEGER,
    TargetFileRecord: LARGE_INTEGER,
};

pub const FIND_BY_SID_DATA = extern struct {
    Restart: u32,
    Sid: SID,
};

pub const FIND_BY_SID_OUTPUT = extern struct {
    NextEntryOffset: u32,
    FileIndex: u32,
    FileNameLength: u32,
    FileName: [1]u16,
};

pub const MFT_ENUM_DATA_V0 = extern struct {
    StartFileReferenceNumber: u64,
    LowUsn: i64,
    HighUsn: i64,
};

pub const MFT_ENUM_DATA_V1 = extern struct {
    StartFileReferenceNumber: u64,
    LowUsn: i64,
    HighUsn: i64,
    MinMajorVersion: u16,
    MaxMajorVersion: u16,
};

pub const CREATE_USN_JOURNAL_DATA = extern struct {
    MaximumSize: u64,
    AllocationDelta: u64,
};

pub const READ_FILE_USN_DATA = extern struct {
    MinMajorVersion: u16,
    MaxMajorVersion: u16,
};

pub const READ_USN_JOURNAL_DATA_V0 = extern struct {
    StartUsn: i64,
    ReasonMask: u32,
    ReturnOnlyOnClose: u32,
    Timeout: u64,
    BytesToWaitFor: u64,
    UsnJournalID: u64,
};

pub const READ_USN_JOURNAL_DATA_V1 = extern struct {
    StartUsn: i64,
    ReasonMask: u32,
    ReturnOnlyOnClose: u32,
    Timeout: u64,
    BytesToWaitFor: u64,
    UsnJournalID: u64,
    MinMajorVersion: u16,
    MaxMajorVersion: u16,
};

pub const USN_TRACK_MODIFIED_RANGES = extern struct {
    Flags: u32,
    Unused: u32,
    ChunkSize: u64,
    FileSizeThreshold: i64,
};

pub const USN_RANGE_TRACK_OUTPUT = extern struct {
    Usn: i64,
};

pub const USN_RECORD_V2 = extern struct {
    RecordLength: u32,
    MajorVersion: u16,
    MinorVersion: u16,
    FileReferenceNumber: u64,
    ParentFileReferenceNumber: u64,
    Usn: i64,
    TimeStamp: LARGE_INTEGER,
    Reason: u32,
    SourceInfo: u32,
    SecurityId: u32,
    FileAttributes: u32,
    FileNameLength: u16,
    FileNameOffset: u16,
    FileName: [1]u16,
};

pub const USN_RECORD_V3 = extern struct {
    RecordLength: u32,
    MajorVersion: u16,
    MinorVersion: u16,
    FileReferenceNumber: FILE_ID_128,
    ParentFileReferenceNumber: FILE_ID_128,
    Usn: i64,
    TimeStamp: LARGE_INTEGER,
    Reason: u32,
    SourceInfo: u32,
    SecurityId: u32,
    FileAttributes: u32,
    FileNameLength: u16,
    FileNameOffset: u16,
    FileName: [1]u16,
};

pub const USN_RECORD_COMMON_HEADER = extern struct {
    RecordLength: u32,
    MajorVersion: u16,
    MinorVersion: u16,
};

pub const USN_RECORD_EXTENT = extern struct {
    Offset: i64,
    Length: i64,
};

pub const USN_RECORD_V4 = extern struct {
    Header: USN_RECORD_COMMON_HEADER,
    FileReferenceNumber: FILE_ID_128,
    ParentFileReferenceNumber: FILE_ID_128,
    Usn: i64,
    Reason: u32,
    SourceInfo: USN_SOURCE_INFO_ID,
    RemainingExtents: u32,
    NumberOfExtents: u16,
    ExtentSize: u16,
    Extents: [1]USN_RECORD_EXTENT,
};

pub const USN_RECORD_UNION = extern union {
    Header: USN_RECORD_COMMON_HEADER,
    V2: USN_RECORD_V2,
    V3: USN_RECORD_V3,
    V4: USN_RECORD_V4,
};

pub const USN_JOURNAL_DATA_V0 = extern struct {
    UsnJournalID: u64,
    FirstUsn: i64,
    NextUsn: i64,
    LowestValidUsn: i64,
    MaxUsn: i64,
    MaximumSize: u64,
    AllocationDelta: u64,
};

pub const USN_JOURNAL_DATA_V1 = extern struct {
    UsnJournalID: u64,
    FirstUsn: i64,
    NextUsn: i64,
    LowestValidUsn: i64,
    MaxUsn: i64,
    MaximumSize: u64,
    AllocationDelta: u64,
    MinSupportedMajorVersion: u16,
    MaxSupportedMajorVersion: u16,
};

pub const USN_JOURNAL_DATA_V2 = extern struct {
    UsnJournalID: u64,
    FirstUsn: i64,
    NextUsn: i64,
    LowestValidUsn: i64,
    MaxUsn: i64,
    MaximumSize: u64,
    AllocationDelta: u64,
    MinSupportedMajorVersion: u16,
    MaxSupportedMajorVersion: u16,
    Flags: u32,
    RangeTrackChunkSize: u64,
    RangeTrackFileSizeThreshold: i64,
};

pub const DELETE_USN_JOURNAL_DATA = extern struct {
    UsnJournalID: u64,
    DeleteFlags: USN_DELETE_FLAGS,
};

pub const MARK_HANDLE_INFO = extern struct {
    Anonymous: extern union {
        UsnSourceInfo: u32,
        CopyNumber: u32,
    },
    VolumeHandle: ?HANDLE,
    HandleInfo: u32,
};

pub const BULK_SECURITY_TEST_DATA = extern struct {
    DesiredAccess: u32,
    SecurityIds: [1]u32,
};

pub const FILE_PREFETCH = extern struct {
    Type: u32,
    Count: u32,
    Prefetch: [1]u64,
};

pub const FILE_PREFETCH_EX = extern struct {
    Type: u32,
    Count: u32,
    Context: ?*anyopaque,
    Prefetch: [1]u64,
};

pub const FILESYSTEM_STATISTICS = extern struct {
    FileSystemType: FILESYSTEM_STATISTICS_TYPE,
    Version: u16,
    SizeOfCompleteStructure: u32,
    UserFileReads: u32,
    UserFileReadBytes: u32,
    UserDiskReads: u32,
    UserFileWrites: u32,
    UserFileWriteBytes: u32,
    UserDiskWrites: u32,
    MetaDataReads: u32,
    MetaDataReadBytes: u32,
    MetaDataDiskReads: u32,
    MetaDataWrites: u32,
    MetaDataWriteBytes: u32,
    MetaDataDiskWrites: u32,
};

pub const FAT_STATISTICS = extern struct {
    CreateHits: u32,
    SuccessfulCreates: u32,
    FailedCreates: u32,
    NonCachedReads: u32,
    NonCachedReadBytes: u32,
    NonCachedWrites: u32,
    NonCachedWriteBytes: u32,
    NonCachedDiskReads: u32,
    NonCachedDiskWrites: u32,
};

pub const EXFAT_STATISTICS = extern struct {
    CreateHits: u32,
    SuccessfulCreates: u32,
    FailedCreates: u32,
    NonCachedReads: u32,
    NonCachedReadBytes: u32,
    NonCachedWrites: u32,
    NonCachedWriteBytes: u32,
    NonCachedDiskReads: u32,
    NonCachedDiskWrites: u32,
};

pub const NTFS_STATISTICS = extern struct {
    LogFileFullExceptions: u32,
    OtherExceptions: u32,
    MftReads: u32,
    MftReadBytes: u32,
    MftWrites: u32,
    MftWriteBytes: u32,
    MftWritesUserLevel: extern struct {
        Write: u16,
        Create: u16,
        SetInfo: u16,
        Flush: u16,
    },
    MftWritesFlushForLogFileFull: u16,
    MftWritesLazyWriter: u16,
    MftWritesUserRequest: u16,
    Mft2Writes: u32,
    Mft2WriteBytes: u32,
    Mft2WritesUserLevel: extern struct {
        Write: u16,
        Create: u16,
        SetInfo: u16,
        Flush: u16,
    },
    Mft2WritesFlushForLogFileFull: u16,
    Mft2WritesLazyWriter: u16,
    Mft2WritesUserRequest: u16,
    RootIndexReads: u32,
    RootIndexReadBytes: u32,
    RootIndexWrites: u32,
    RootIndexWriteBytes: u32,
    BitmapReads: u32,
    BitmapReadBytes: u32,
    BitmapWrites: u32,
    BitmapWriteBytes: u32,
    BitmapWritesFlushForLogFileFull: u16,
    BitmapWritesLazyWriter: u16,
    BitmapWritesUserRequest: u16,
    BitmapWritesUserLevel: extern struct {
        Write: u16,
        Create: u16,
        SetInfo: u16,
    },
    MftBitmapReads: u32,
    MftBitmapReadBytes: u32,
    MftBitmapWrites: u32,
    MftBitmapWriteBytes: u32,
    MftBitmapWritesFlushForLogFileFull: u16,
    MftBitmapWritesLazyWriter: u16,
    MftBitmapWritesUserRequest: u16,
    MftBitmapWritesUserLevel: extern struct {
        Write: u16,
        Create: u16,
        SetInfo: u16,
        Flush: u16,
    },
    UserIndexReads: u32,
    UserIndexReadBytes: u32,
    UserIndexWrites: u32,
    UserIndexWriteBytes: u32,
    LogFileReads: u32,
    LogFileReadBytes: u32,
    LogFileWrites: u32,
    LogFileWriteBytes: u32,
    Allocate: extern struct {
        Calls: u32,
        Clusters: u32,
        Hints: u32,
        RunsReturned: u32,
        HintsHonored: u32,
        HintsClusters: u32,
        Cache: u32,
        CacheClusters: u32,
        CacheMiss: u32,
        CacheMissClusters: u32,
    },
    DiskResourcesExhausted: u32,
};

pub const FILESYSTEM_STATISTICS_EX = extern struct {
    FileSystemType: FILESYSTEM_STATISTICS_TYPE,
    Version: u16,
    SizeOfCompleteStructure: u32,
    UserFileReads: u64,
    UserFileReadBytes: u64,
    UserDiskReads: u64,
    UserFileWrites: u64,
    UserFileWriteBytes: u64,
    UserDiskWrites: u64,
    MetaDataReads: u64,
    MetaDataReadBytes: u64,
    MetaDataDiskReads: u64,
    MetaDataWrites: u64,
    MetaDataWriteBytes: u64,
    MetaDataDiskWrites: u64,
};

pub const NTFS_STATISTICS_EX = extern struct {
    LogFileFullExceptions: u32,
    OtherExceptions: u32,
    MftReads: u64,
    MftReadBytes: u64,
    MftWrites: u64,
    MftWriteBytes: u64,
    MftWritesUserLevel: extern struct {
        Write: u32,
        Create: u32,
        SetInfo: u32,
        Flush: u32,
    },
    MftWritesFlushForLogFileFull: u32,
    MftWritesLazyWriter: u32,
    MftWritesUserRequest: u32,
    Mft2Writes: u64,
    Mft2WriteBytes: u64,
    Mft2WritesUserLevel: extern struct {
        Write: u32,
        Create: u32,
        SetInfo: u32,
        Flush: u32,
    },
    Mft2WritesFlushForLogFileFull: u32,
    Mft2WritesLazyWriter: u32,
    Mft2WritesUserRequest: u32,
    RootIndexReads: u64,
    RootIndexReadBytes: u64,
    RootIndexWrites: u64,
    RootIndexWriteBytes: u64,
    BitmapReads: u64,
    BitmapReadBytes: u64,
    BitmapWrites: u64,
    BitmapWriteBytes: u64,
    BitmapWritesFlushForLogFileFull: u32,
    BitmapWritesLazyWriter: u32,
    BitmapWritesUserRequest: u32,
    BitmapWritesUserLevel: extern struct {
        Write: u32,
        Create: u32,
        SetInfo: u32,
        Flush: u32,
    },
    MftBitmapReads: u64,
    MftBitmapReadBytes: u64,
    MftBitmapWrites: u64,
    MftBitmapWriteBytes: u64,
    MftBitmapWritesFlushForLogFileFull: u32,
    MftBitmapWritesLazyWriter: u32,
    MftBitmapWritesUserRequest: u32,
    MftBitmapWritesUserLevel: extern struct {
        Write: u32,
        Create: u32,
        SetInfo: u32,
        Flush: u32,
    },
    UserIndexReads: u64,
    UserIndexReadBytes: u64,
    UserIndexWrites: u64,
    UserIndexWriteBytes: u64,
    LogFileReads: u64,
    LogFileReadBytes: u64,
    LogFileWrites: u64,
    LogFileWriteBytes: u64,
    Allocate: extern struct {
        Calls: u32,
        RunsReturned: u32,
        Hints: u32,
        HintsHonored: u32,
        Cache: u32,
        CacheMiss: u32,
        Clusters: u64,
        HintsClusters: u64,
        CacheClusters: u64,
        CacheMissClusters: u64,
    },
    DiskResourcesExhausted: u32,
    VolumeTrimCount: u64,
    VolumeTrimTime: u64,
    VolumeTrimByteCount: u64,
    FileLevelTrimCount: u64,
    FileLevelTrimTime: u64,
    FileLevelTrimByteCount: u64,
    VolumeTrimSkippedCount: u64,
    VolumeTrimSkippedByteCount: u64,
    NtfsFillStatInfoFromMftRecordCalledCount: u64,
    NtfsFillStatInfoFromMftRecordBailedBecauseOfAttributeListCount: u64,
    NtfsFillStatInfoFromMftRecordBailedBecauseOfNonResReparsePointCount: u64,
};

pub const FILE_OBJECTID_BUFFER = extern struct {
    ObjectId: [16]u8,
    Anonymous: extern union {
        Anonymous: extern struct {
            BirthVolumeId: [16]u8,
            BirthObjectId: [16]u8,
            DomainId: [16]u8,
        },
        ExtendedInfo: [48]u8,
    },
};

pub const FILE_SET_SPARSE_BUFFER = extern struct {
    SetSparse: BOOLEAN,
};

pub const FILE_ZERO_DATA_INFORMATION = extern struct {
    FileOffset: LARGE_INTEGER,
    BeyondFinalZero: LARGE_INTEGER,
};

pub const FILE_ZERO_DATA_INFORMATION_EX = extern struct {
    FileOffset: LARGE_INTEGER,
    BeyondFinalZero: LARGE_INTEGER,
    Flags: u32,
};

pub const FILE_ALLOCATED_RANGE_BUFFER = extern struct {
    FileOffset: LARGE_INTEGER,
    Length: LARGE_INTEGER,
};

pub const ENCRYPTION_BUFFER = extern struct {
    EncryptionOperation: u32,
    Private: [1]u8,
};

pub const DECRYPTION_STATUS_BUFFER = extern struct {
    NoEncryptedStreams: BOOLEAN,
};

pub const REQUEST_RAW_ENCRYPTED_DATA = extern struct {
    FileOffset: i64,
    Length: u32,
};

pub const ENCRYPTED_DATA_INFO = extern struct {
    StartingFileOffset: u64,
    OutputBufferOffset: u32,
    BytesWithinFileSize: u32,
    BytesWithinValidDataLength: u32,
    CompressionFormat: u16,
    DataUnitShift: u8,
    ChunkShift: u8,
    ClusterShift: u8,
    EncryptionFormat: u8,
    NumberOfDataBlocks: u16,
    DataBlockSize: [1]u32,
};

pub const EXTENDED_ENCRYPTED_DATA_INFO = extern struct {
    ExtendedCode: u32,
    Length: u32,
    Flags: u32,
    Reserved: u32,
};

pub const PLEX_READ_DATA_REQUEST = extern struct {
    ByteOffset: LARGE_INTEGER,
    ByteLength: u32,
    PlexNumber: u32,
};

pub const SI_COPYFILE = extern struct {
    SourceFileNameLength: u32,
    DestinationFileNameLength: u32,
    Flags: u32,
    FileNameBuffer: [1]u16,
};

pub const FILE_MAKE_COMPATIBLE_BUFFER = extern struct {
    CloseDisc: BOOLEAN,
};

pub const FILE_SET_DEFECT_MGMT_BUFFER = extern struct {
    Disable: BOOLEAN,
};

pub const FILE_QUERY_SPARING_BUFFER = extern struct {
    SparingUnitBytes: u32,
    SoftwareSparing: BOOLEAN,
    TotalSpareBlocks: u32,
    FreeSpareBlocks: u32,
};

pub const FILE_QUERY_ON_DISK_VOL_INFO_BUFFER = extern struct {
    DirectoryCount: LARGE_INTEGER,
    FileCount: LARGE_INTEGER,
    FsFormatMajVersion: u16,
    FsFormatMinVersion: u16,
    FsFormatName: [12]u16,
    FormatTime: LARGE_INTEGER,
    LastUpdateTime: LARGE_INTEGER,
    CopyrightInfo: [34]u16,
    AbstractInfo: [34]u16,
    FormattingImplementationInfo: [34]u16,
    LastModifyingImplementationInfo: [34]u16,
};

pub const FILE_INITIATE_REPAIR_OUTPUT_BUFFER = extern struct {
    Hint1: u64,
    Hint2: u64,
    Clsn: u64,
    Status: u32,
};

pub const SHRINK_VOLUME_REQUEST_TYPES = enum(i32) {
    Prepare = 1,
    Commit = 2,
    Abort = 3,
};
pub const ShrinkPrepare = SHRINK_VOLUME_REQUEST_TYPES.Prepare;
pub const ShrinkCommit = SHRINK_VOLUME_REQUEST_TYPES.Commit;
pub const ShrinkAbort = SHRINK_VOLUME_REQUEST_TYPES.Abort;

pub const SHRINK_VOLUME_INFORMATION = extern struct {
    ShrinkRequestType: SHRINK_VOLUME_REQUEST_TYPES,
    Flags: u64,
    NewNumberOfSectors: i64,
};

pub const TXFS_MODIFY_RM = extern struct {
    Flags: TXFS_RMF_LAGS,
    LogContainerCountMax: u32,
    LogContainerCountMin: u32,
    LogContainerCount: u32,
    LogGrowthIncrement: u32,
    LogAutoShrinkPercentage: u32,
    Reserved: u64,
    LoggingMode: u16,
};

pub const TXFS_QUERY_RM_INFORMATION = extern struct {
    BytesRequired: u32,
    TailLsn: u64,
    CurrentLsn: u64,
    ArchiveTailLsn: u64,
    LogContainerSize: u64,
    HighestVirtualClock: LARGE_INTEGER,
    LogContainerCount: u32,
    LogContainerCountMax: u32,
    LogContainerCountMin: u32,
    LogGrowthIncrement: u32,
    LogAutoShrinkPercentage: u32,
    Flags: TXFS_RMF_LAGS,
    LoggingMode: u16,
    Reserved: u16,
    RmState: u32,
    LogCapacity: u64,
    LogFree: u64,
    TopsSize: u64,
    TopsUsed: u64,
    TransactionCount: u64,
    OnePCCount: u64,
    TwoPCCount: u64,
    NumberLogFileFull: u64,
    OldestTransactionAge: u64,
    RMName: Guid,
    TmLogPathOffset: u32,
};

pub const TXFS_ROLLFORWARD_REDO_INFORMATION = extern struct {
    LastVirtualClock: LARGE_INTEGER,
    LastRedoLsn: u64,
    HighestRecoveryLsn: u64,
    Flags: u32,
};

pub const TXFS_START_RM_INFORMATION = extern struct {
    Flags: u32,
    LogContainerSize: u64,
    LogContainerCountMin: u32,
    LogContainerCountMax: u32,
    LogGrowthIncrement: u32,
    LogAutoShrinkPercentage: u32,
    TmLogPathOffset: u32,
    TmLogPathLength: u16,
    LoggingMode: u16,
    LogPathLength: u16,
    Reserved: u16,
    LogPath: [1]u16,
};

pub const TXFS_GET_METADATA_INFO_OUT = extern struct {
    TxfFileId: extern struct {
        LowPart: i64,
        HighPart: i64,
    },
    LockingTransaction: Guid,
    LastLsn: u64,
    TransactionState: u32,
};

pub const TXFS_LIST_TRANSACTION_LOCKED_FILES_ENTRY = extern struct {
    Offset: u64,
    NameFlags: u32,
    FileId: i64,
    Reserved1: u32,
    Reserved2: u32,
    Reserved3: i64,
    FileName: [1]u16,
};

pub const TXFS_LIST_TRANSACTION_LOCKED_FILES = extern struct {
    KtmTransaction: Guid,
    NumberOfFiles: u64,
    BufferSizeRequired: u64,
    Offset: u64,
};

pub const TXFS_LIST_TRANSACTIONS_ENTRY = extern struct {
    TransactionId: Guid,
    TransactionState: u32,
    Reserved1: u32,
    Reserved2: u32,
    Reserved3: i64,
};

pub const TXFS_LIST_TRANSACTIONS = extern struct {
    NumberOfTransactions: u64,
    BufferSizeRequired: u64,
};

pub const TXFS_READ_BACKUP_INFORMATION_OUT = extern struct {
    Anonymous: extern union {
        BufferLength: u32,
        Buffer: [1]u8,
    },
};

pub const TXFS_WRITE_BACKUP_INFORMATION = extern struct {
    Buffer: [1]u8,
};

pub const TXFS_GET_TRANSACTED_VERSION = extern struct {
    ThisBaseVersion: u32,
    LatestVersion: u32,
    ThisMiniVersion: u16,
    FirstMiniVersion: u16,
    LatestMiniVersion: u16,
};

pub const TXFS_SAVEPOINT_INFORMATION = extern struct {
    KtmTransaction: ?HANDLE,
    ActionCode: u32,
    SavepointId: u32,
};

pub const TXFS_CREATE_MINIVERSION_INFO = extern struct {
    StructureVersion: u16,
    StructureLength: u16,
    BaseVersion: u32,
    MiniVersion: u16,
};

pub const TXFS_TRANSACTION_ACTIVE_INFO = extern struct {
    TransactionsActiveAtSnapshot: BOOLEAN,
};

pub const BOOT_AREA_INFO = extern struct {
    BootSectorCount: u32,
    BootSectors: [2]extern struct {
        Offset: LARGE_INTEGER,
    },
};

pub const RETRIEVAL_POINTER_BASE = extern struct {
    FileAreaOffset: LARGE_INTEGER,
};

pub const FILE_FS_PERSISTENT_VOLUME_INFORMATION = extern struct {
    VolumeFlags: u32,
    FlagMask: u32,
    Version: u32,
    Reserved: u32,
};

pub const FILE_SYSTEM_RECOGNITION_INFORMATION = extern struct {
    FileSystem: [9]CHAR,
};

pub const REQUEST_OPLOCK_INPUT_BUFFER = extern struct {
    StructureVersion: u16,
    StructureLength: u16,
    RequestedOplockLevel: u32,
    Flags: u32,
};

pub const REQUEST_OPLOCK_OUTPUT_BUFFER = extern struct {
    StructureVersion: u16,
    StructureLength: u16,
    OriginalOplockLevel: u32,
    NewOplockLevel: u32,
    Flags: u32,
    AccessMode: u32,
    ShareMode: u16,
};

pub const STORAGE_QUERY_DEPENDENT_VOLUME_REQUEST = extern struct {
    RequestLevel: u32,
    RequestFlags: u32,
};

pub const STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY = extern struct {
    EntryLength: u32,
    DependencyTypeFlags: u32,
    ProviderSpecificFlags: u32,
    VirtualStorageType: VIRTUAL_STORAGE_TYPE,
};

pub const STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY = extern struct {
    EntryLength: u32,
    DependencyTypeFlags: u32,
    ProviderSpecificFlags: u32,
    VirtualStorageType: VIRTUAL_STORAGE_TYPE,
    AncestorLevel: u32,
    HostVolumeNameOffset: u32,
    HostVolumeNameSize: u32,
    DependentVolumeNameOffset: u32,
    DependentVolumeNameSize: u32,
    RelativePathOffset: u32,
    RelativePathSize: u32,
    DependentDeviceNameOffset: u32,
    DependentDeviceNameSize: u32,
};

pub const STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE = extern struct {
    ResponseLevel: u32,
    NumberEntries: u32,
    Anonymous: extern union {
        Lev1Depends: [1]STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY,
        Lev2Depends: [1]STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY,
    },
};

pub const SD_CHANGE_MACHINE_SID_INPUT = extern struct {
    CurrentMachineSIDOffset: u16,
    CurrentMachineSIDLength: u16,
    NewMachineSIDOffset: u16,
    NewMachineSIDLength: u16,
};

pub const SD_CHANGE_MACHINE_SID_OUTPUT = extern struct {
    NumSDChangedSuccess: u64,
    NumSDChangedFail: u64,
    NumSDUnused: u64,
    NumSDTotal: u64,
    NumMftSDChangedSuccess: u64,
    NumMftSDChangedFail: u64,
    NumMftSDTotal: u64,
};

pub const SD_QUERY_STATS_INPUT = extern struct {
    Reserved: u32,
};

pub const SD_QUERY_STATS_OUTPUT = extern struct {
    SdsStreamSize: u64,
    SdsAllocationSize: u64,
    SiiStreamSize: u64,
    SiiAllocationSize: u64,
    SdhStreamSize: u64,
    SdhAllocationSize: u64,
    NumSDTotal: u64,
    NumSDUnused: u64,
};

pub const SD_ENUM_SDS_INPUT = extern struct {
    StartingOffset: u64,
    MaxSDEntriesToReturn: u64,
};

pub const SD_ENUM_SDS_ENTRY = extern struct {
    Hash: u32,
    SecurityId: u32,
    Offset: u64,
    Length: u32,
    Descriptor: [1]u8,
};

pub const SD_ENUM_SDS_OUTPUT = extern struct {
    NextOffset: u64,
    NumSDEntriesReturned: u64,
    NumSDBytesReturned: u64,
    SDEntry: [1]SD_ENUM_SDS_ENTRY,
};

pub const SD_GLOBAL_CHANGE_INPUT = extern struct {
    Flags: u32,
    ChangeType: u32,
    Anonymous: extern union {
        SdChange: SD_CHANGE_MACHINE_SID_INPUT,
        SdQueryStats: SD_QUERY_STATS_INPUT,
        SdEnumSds: SD_ENUM_SDS_INPUT,
    },
};

pub const SD_GLOBAL_CHANGE_OUTPUT = extern struct {
    Flags: u32,
    ChangeType: u32,
    Anonymous: extern union {
        SdChange: SD_CHANGE_MACHINE_SID_OUTPUT,
        SdQueryStats: SD_QUERY_STATS_OUTPUT,
        SdEnumSds: SD_ENUM_SDS_OUTPUT,
    },
};

pub const LOOKUP_STREAM_FROM_CLUSTER_INPUT = extern struct {
    Flags: u32,
    NumberOfClusters: u32,
    Cluster: [1]LARGE_INTEGER,
};

pub const LOOKUP_STREAM_FROM_CLUSTER_OUTPUT = extern struct {
    Offset: u32,
    NumberOfMatches: u32,
    BufferSizeRequired: u32,
};

pub const LOOKUP_STREAM_FROM_CLUSTER_ENTRY = extern struct {
    OffsetToNext: u32,
    Flags: u32,
    Reserved: LARGE_INTEGER,
    Cluster: LARGE_INTEGER,
    FileName: [1]u16,
};

pub const FILE_TYPE_NOTIFICATION_INPUT = extern struct {
    Flags: u32,
    NumFileTypeIDs: u32,
    FileTypeID: [1]Guid,
};

pub const CSV_MGMT_LOCK = extern struct {
    Flags: u32,
};

pub const CSV_NAMESPACE_INFO = extern struct {
    Version: u32,
    DeviceNumber: u32,
    StartingOffset: LARGE_INTEGER,
    SectorSize: u32,
};

pub const CSV_CONTROL_OP = enum(i32) {
    StartRedirectFile = 2,
    StopRedirectFile = 3,
    QueryRedirectState = 4,
    QueryFileRevision = 6,
    QueryMdsPath = 8,
    QueryFileRevisionFileId128 = 9,
    QueryVolumeRedirectState = 10,
    EnableUSNRangeModificationTracking = 13,
    MarkHandleLocalVolumeMount = 14,
    UnmarkHandleLocalVolumeMount = 15,
    GetCsvFsMdsPathV2 = 18,
    DisableCaching = 19,
    EnableCaching = 20,
    StartForceDFO = 21,
    StopForceDFO = 22,
    QueryMdsPathNoPause = 23,
    SetVolumeId = 24,
    QueryVolumeId = 25,
};
pub const CsvControlStartRedirectFile = CSV_CONTROL_OP.StartRedirectFile;
pub const CsvControlStopRedirectFile = CSV_CONTROL_OP.StopRedirectFile;
pub const CsvControlQueryRedirectState = CSV_CONTROL_OP.QueryRedirectState;
pub const CsvControlQueryFileRevision = CSV_CONTROL_OP.QueryFileRevision;
pub const CsvControlQueryMdsPath = CSV_CONTROL_OP.QueryMdsPath;
pub const CsvControlQueryFileRevisionFileId128 = CSV_CONTROL_OP.QueryFileRevisionFileId128;
pub const CsvControlQueryVolumeRedirectState = CSV_CONTROL_OP.QueryVolumeRedirectState;
pub const CsvControlEnableUSNRangeModificationTracking = CSV_CONTROL_OP.EnableUSNRangeModificationTracking;
pub const CsvControlMarkHandleLocalVolumeMount = CSV_CONTROL_OP.MarkHandleLocalVolumeMount;
pub const CsvControlUnmarkHandleLocalVolumeMount = CSV_CONTROL_OP.UnmarkHandleLocalVolumeMount;
pub const CsvControlGetCsvFsMdsPathV2 = CSV_CONTROL_OP.GetCsvFsMdsPathV2;
pub const CsvControlDisableCaching = CSV_CONTROL_OP.DisableCaching;
pub const CsvControlEnableCaching = CSV_CONTROL_OP.EnableCaching;
pub const CsvControlStartForceDFO = CSV_CONTROL_OP.StartForceDFO;
pub const CsvControlStopForceDFO = CSV_CONTROL_OP.StopForceDFO;
pub const CsvControlQueryMdsPathNoPause = CSV_CONTROL_OP.QueryMdsPathNoPause;
pub const CsvControlSetVolumeId = CSV_CONTROL_OP.SetVolumeId;
pub const CsvControlQueryVolumeId = CSV_CONTROL_OP.QueryVolumeId;

pub const CSV_CONTROL_PARAM = extern struct {
    Operation: CSV_CONTROL_OP,
    Unused: i64,
};

pub const CSV_QUERY_REDIRECT_STATE = extern struct {
    MdsNodeId: u32,
    DsNodeId: u32,
    FileRedirected: BOOLEAN,
};

pub const CSV_QUERY_FILE_REVISION = extern struct {
    FileId: i64,
    FileRevision: [3]i64,
};

pub const CSV_QUERY_FILE_REVISION_FILE_ID_128 = extern struct {
    FileId: FILE_ID_128,
    FileRevision: [3]i64,
};

pub const CSV_QUERY_MDS_PATH = extern struct {
    MdsNodeId: u32,
    DsNodeId: u32,
    PathLength: u32,
    Path: [1]u16,
};

pub const CSVFS_DISK_CONNECTIVITY = enum(i32) {
    None = 0,
    MdsNodeOnly = 1,
    SubsetOfNodes = 2,
    AllNodes = 3,
};
pub const CsvFsDiskConnectivityNone = CSVFS_DISK_CONNECTIVITY.None;
pub const CsvFsDiskConnectivityMdsNodeOnly = CSVFS_DISK_CONNECTIVITY.MdsNodeOnly;
pub const CsvFsDiskConnectivitySubsetOfNodes = CSVFS_DISK_CONNECTIVITY.SubsetOfNodes;
pub const CsvFsDiskConnectivityAllNodes = CSVFS_DISK_CONNECTIVITY.AllNodes;

pub const CSV_QUERY_VOLUME_REDIRECT_STATE = extern struct {
    MdsNodeId: u32,
    DsNodeId: u32,
    IsDiskConnected: BOOLEAN,
    ClusterEnableDirectIo: BOOLEAN,
    DiskConnectivity: CSVFS_DISK_CONNECTIVITY,
};

pub const CSV_QUERY_MDS_PATH_V2 = extern struct {
    Version: i64,
    RequiredSize: u32,
    MdsNodeId: u32,
    DsNodeId: u32,
    Flags: u32,
    DiskConnectivity: CSVFS_DISK_CONNECTIVITY,
    VolumeId: Guid,
    IpAddressOffset: u32,
    IpAddressLength: u32,
    PathOffset: u32,
    PathLength: u32,
};

pub const CSV_SET_VOLUME_ID = extern struct {
    VolumeId: Guid,
};

pub const CSV_QUERY_VOLUME_ID = extern struct {
    VolumeId: Guid,
};

pub const CSV_QUERY_VETO_FILE_DIRECT_IO_OUTPUT = extern struct {
    VetoedFromAltitudeIntegral: u64,
    VetoedFromAltitudeDecimal: u64,
    Reason: [256]u16,
};

pub const STORAGE_RESERVE_ID = enum(i32) {
    None = 0,
    Hard = 1,
    Soft = 2,
    UpdateScratch = 3,
    Max = 4,
};
pub const StorageReserveIdNone = STORAGE_RESERVE_ID.None;
pub const StorageReserveIdHard = STORAGE_RESERVE_ID.Hard;
pub const StorageReserveIdSoft = STORAGE_RESERVE_ID.Soft;
pub const StorageReserveIdUpdateScratch = STORAGE_RESERVE_ID.UpdateScratch;
pub const StorageReserveIdMax = STORAGE_RESERVE_ID.Max;

pub const CSV_IS_OWNED_BY_CSVFS = extern struct {
    OwnedByCSVFS: BOOLEAN,
};

pub const FILE_LEVEL_TRIM_RANGE = extern struct {
    Offset: u64,
    Length: u64,
};

pub const FILE_LEVEL_TRIM = extern struct {
    Key: u32,
    NumRanges: u32,
    Ranges: [1]FILE_LEVEL_TRIM_RANGE,
};

pub const FILE_LEVEL_TRIM_OUTPUT = extern struct {
    NumRangesProcessed: u32,
};

pub const QUERY_FILE_LAYOUT_FILTER_TYPE = enum(i32) {
    FILTER_TYPE_NONE = 0,
    FILTER_TYPE_CLUSTERS = 1,
    FILTER_TYPE_FILEID = 2,
    FILTER_TYPE_STORAGE_RESERVE_ID = 3,
    NUM_FILTER_TYPES = 4,
};
pub const QUERY_FILE_LAYOUT_FILTER_TYPE_NONE = QUERY_FILE_LAYOUT_FILTER_TYPE.FILTER_TYPE_NONE;
pub const QUERY_FILE_LAYOUT_FILTER_TYPE_CLUSTERS = QUERY_FILE_LAYOUT_FILTER_TYPE.FILTER_TYPE_CLUSTERS;
pub const QUERY_FILE_LAYOUT_FILTER_TYPE_FILEID = QUERY_FILE_LAYOUT_FILTER_TYPE.FILTER_TYPE_FILEID;
pub const QUERY_FILE_LAYOUT_FILTER_TYPE_STORAGE_RESERVE_ID = QUERY_FILE_LAYOUT_FILTER_TYPE.FILTER_TYPE_STORAGE_RESERVE_ID;
pub const QUERY_FILE_LAYOUT_NUM_FILTER_TYPES = QUERY_FILE_LAYOUT_FILTER_TYPE.NUM_FILTER_TYPES;

pub const CLUSTER_RANGE = extern struct {
    StartingCluster: LARGE_INTEGER,
    ClusterCount: LARGE_INTEGER,
};

pub const FILE_REFERENCE_RANGE = extern struct {
    StartingFileReferenceNumber: u64,
    EndingFileReferenceNumber: u64,
};

pub const QUERY_FILE_LAYOUT_INPUT = extern struct {
    Anonymous: extern union {
        FilterEntryCount: u32,
        NumberOfPairs: u32,
    },
    Flags: u32,
    FilterType: QUERY_FILE_LAYOUT_FILTER_TYPE,
    Reserved: u32,
    Filter: extern union {
        ClusterRanges: [1]CLUSTER_RANGE,
        FileReferenceRanges: [1]FILE_REFERENCE_RANGE,
        StorageReserveIds: [1]STORAGE_RESERVE_ID,
    },
};

pub const QUERY_FILE_LAYOUT_OUTPUT = extern struct {
    FileEntryCount: u32,
    FirstFileOffset: u32,
    Flags: u32,
    Reserved: u32,
};

pub const FILE_LAYOUT_ENTRY = extern struct {
    Version: u32,
    NextFileOffset: u32,
    Flags: u32,
    FileAttributes: u32,
    FileReferenceNumber: u64,
    FirstNameOffset: u32,
    FirstStreamOffset: u32,
    ExtraInfoOffset: u32,
    ExtraInfoLength: u32,
};

pub const FILE_LAYOUT_NAME_ENTRY = extern struct {
    NextNameOffset: u32,
    Flags: u32,
    ParentFileReferenceNumber: u64,
    FileNameLength: u32,
    Reserved: u32,
    FileName: [1]u16,
};

pub const FILE_LAYOUT_INFO_ENTRY = extern struct {
    BasicInformation: extern struct {
        CreationTime: LARGE_INTEGER,
        LastAccessTime: LARGE_INTEGER,
        LastWriteTime: LARGE_INTEGER,
        ChangeTime: LARGE_INTEGER,
        FileAttributes: u32,
    },
    OwnerId: u32,
    SecurityId: u32,
    Usn: i64,
    StorageReserveId: STORAGE_RESERVE_ID,
};

pub const STREAM_LAYOUT_ENTRY = extern struct {
    Version: u32,
    NextStreamOffset: u32,
    Flags: u32,
    ExtentInformationOffset: u32,
    AllocationSize: LARGE_INTEGER,
    EndOfFile: LARGE_INTEGER,
    StreamInformationOffset: u32,
    AttributeTypeCode: u32,
    AttributeFlags: u32,
    StreamIdentifierLength: u32,
    StreamIdentifier: [1]u16,
};

pub const STREAM_EXTENT_ENTRY = extern struct {
    Flags: u32,
    ExtentInformation: extern union {
        RetrievalPointers: RETRIEVAL_POINTERS_BUFFER,
    },
};

pub const FSCTL_GET_INTEGRITY_INFORMATION_BUFFER = extern struct {
    ChecksumAlgorithm: u16,
    Reserved: u16,
    Flags: u32,
    ChecksumChunkSizeInBytes: u32,
    ClusterSizeInBytes: u32,
};

pub const FSCTL_SET_INTEGRITY_INFORMATION_BUFFER = extern struct {
    ChecksumAlgorithm: u16,
    Reserved: u16,
    Flags: u32,
};

pub const FSCTL_SET_INTEGRITY_INFORMATION_BUFFER_EX = extern struct {
    EnableIntegrity: u8,
    KeepIntegrityStateUnchanged: u8,
    Reserved: u16,
    Flags: u32,
    Version: u8,
    Reserved2: [7]u8,
};

pub const FSCTL_OFFLOAD_READ_INPUT = extern struct {
    Size: u32,
    Flags: u32,
    TokenTimeToLive: u32,
    Reserved: u32,
    FileOffset: u64,
    CopyLength: u64,
};

pub const FSCTL_OFFLOAD_READ_OUTPUT = extern struct {
    Size: u32,
    Flags: u32,
    TransferLength: u64,
    Token: [512]u8,
};

pub const FSCTL_OFFLOAD_WRITE_INPUT = extern struct {
    Size: u32,
    Flags: u32,
    FileOffset: u64,
    CopyLength: u64,
    TransferOffset: u64,
    Token: [512]u8,
};

pub const FSCTL_OFFLOAD_WRITE_OUTPUT = extern struct {
    Size: u32,
    Flags: u32,
    LengthWritten: u64,
};

pub const SET_PURGE_FAILURE_MODE_INPUT = extern struct {
    Flags: u32,
};

pub const REPAIR_COPIES_INPUT = extern struct {
    Size: u32,
    Flags: u32,
    FileOffset: LARGE_INTEGER,
    Length: u32,
    SourceCopy: u32,
    NumberOfRepairCopies: u32,
    RepairCopies: [1]u32,
};

pub const REPAIR_COPIES_OUTPUT = extern struct {
    Size: u32,
    Status: u32,
    ResumeFileOffset: LARGE_INTEGER,
};

pub const FILE_REGION_INFO = extern struct {
    FileOffset: i64,
    Length: i64,
    Usage: u32,
    Reserved: u32,
};

pub const FILE_REGION_OUTPUT = extern struct {
    Flags: u32,
    TotalRegionEntryCount: u32,
    RegionEntryCount: u32,
    Reserved: u32,
    Region: [1]FILE_REGION_INFO,
};

pub const FILE_REGION_INPUT = extern struct {
    FileOffset: i64,
    Length: i64,
    DesiredUsage: u32,
};

pub const WRITE_USN_REASON_INPUT = extern struct {
    Flags: u32,
    UsnReasonToWrite: u32,
};

pub const FILE_STORAGE_TIER_MEDIA_TYPE = enum(i32) {
    Unspecified = 0,
    Disk = 1,
    Ssd = 2,
    Scm = 4,
    Max = 5,
};
pub const FileStorageTierMediaTypeUnspecified = FILE_STORAGE_TIER_MEDIA_TYPE.Unspecified;
pub const FileStorageTierMediaTypeDisk = FILE_STORAGE_TIER_MEDIA_TYPE.Disk;
pub const FileStorageTierMediaTypeSsd = FILE_STORAGE_TIER_MEDIA_TYPE.Ssd;
pub const FileStorageTierMediaTypeScm = FILE_STORAGE_TIER_MEDIA_TYPE.Scm;
pub const FileStorageTierMediaTypeMax = FILE_STORAGE_TIER_MEDIA_TYPE.Max;

pub const FILE_STORAGE_TIER_CLASS = enum(i32) {
    Unspecified = 0,
    Capacity = 1,
    Performance = 2,
    Max = 3,
};
pub const FileStorageTierClassUnspecified = FILE_STORAGE_TIER_CLASS.Unspecified;
pub const FileStorageTierClassCapacity = FILE_STORAGE_TIER_CLASS.Capacity;
pub const FileStorageTierClassPerformance = FILE_STORAGE_TIER_CLASS.Performance;
pub const FileStorageTierClassMax = FILE_STORAGE_TIER_CLASS.Max;

pub const FILE_STORAGE_TIER = extern struct {
    Id: Guid,
    Name: [256]u16,
    Description: [256]u16,
    Flags: FILE_STORAGE_TIER_FLAGS,
    ProvisionedCapacity: u64,
    MediaType: FILE_STORAGE_TIER_MEDIA_TYPE,
    Class: FILE_STORAGE_TIER_CLASS,
};

pub const FSCTL_QUERY_STORAGE_CLASSES_OUTPUT = extern struct {
    Version: u32,
    Size: u32,
    Flags: FILE_STORAGE_TIER_FLAGS,
    TotalNumberOfTiers: u32,
    NumberOfTiersReturned: u32,
    Tiers: [1]FILE_STORAGE_TIER,
};

pub const STREAM_INFORMATION_ENTRY = extern struct {
    pub const _StreamInformation = extern union {
        pub const _Reparse = extern struct {
            Length: u16,
            Flags: u16,
            ReparseDataSize: u32,
            ReparseDataOffset: u32,
        };
        pub const _DesiredStorageClass = extern struct {
            Class: FILE_STORAGE_TIER_CLASS,
            Flags: u32,
        };
        pub const _DataStream = extern struct {
            Length: u16,
            Flags: u16,
            Reserved: u32,
            Vdl: u64,
        };
        pub const _Ea = extern struct {
            Length: u16,
            Flags: u16,
            EaSize: u32,
            EaInformationOffset: u32,
        };
        DesiredStorageClass: _DesiredStorageClass,
        DataStream: _DataStream,
        Reparse: _Reparse,
        Ea: _Ea,
    };
    Version: u32,
    Flags: u32,
    StreamInformation: _StreamInformation,
};

pub const FSCTL_QUERY_REGION_INFO_INPUT = extern struct {
    Version: u32,
    Size: u32,
    Flags: u32,
    NumberOfTierIds: u32,
    TierIds: [1]Guid,
};

pub const FILE_STORAGE_TIER_REGION = extern struct {
    TierId: Guid,
    Offset: u64,
    Length: u64,
};

pub const FSCTL_QUERY_REGION_INFO_OUTPUT = extern struct {
    Version: u32,
    Size: u32,
    Flags: u32,
    Reserved: u32,
    Alignment: u64,
    TotalNumberOfRegions: u32,
    NumberOfRegionsReturned: u32,
    Regions: [1]FILE_STORAGE_TIER_REGION,
};

pub const FILE_DESIRED_STORAGE_CLASS_INFORMATION = extern struct {
    Class: FILE_STORAGE_TIER_CLASS,
    Flags: u32,
};

pub const DUPLICATE_EXTENTS_DATA = extern struct {
    FileHandle: ?HANDLE,
    SourceFileOffset: LARGE_INTEGER,
    TargetFileOffset: LARGE_INTEGER,
    ByteCount: LARGE_INTEGER,
};

pub const DUPLICATE_EXTENTS_DATA_EX = extern struct {
    Size: usize,
    FileHandle: ?HANDLE,
    SourceFileOffset: LARGE_INTEGER,
    TargetFileOffset: LARGE_INTEGER,
    ByteCount: LARGE_INTEGER,
    Flags: u32,
};

pub const DUPLICATE_EXTENTS_STATE = enum(i32) {
    Inactive = 0,
    Source = 1,
    Target = 2,
};
pub const FileSnapStateInactive = DUPLICATE_EXTENTS_STATE.Inactive;
pub const FileSnapStateSource = DUPLICATE_EXTENTS_STATE.Source;
pub const FileSnapStateTarget = DUPLICATE_EXTENTS_STATE.Target;

pub const ASYNC_DUPLICATE_EXTENTS_STATUS = extern struct {
    Version: u32,
    State: DUPLICATE_EXTENTS_STATE,
    SourceFileOffset: u64,
    TargetFileOffset: u64,
    ByteCount: u64,
    BytesDuplicated: u64,
};

pub const REFS_SMR_VOLUME_GC_STATE = enum(i32) {
    Inactive = 0,
    Paused = 1,
    Active = 2,
    ActiveFullSpeed = 3,
};
pub const SmrGcStateInactive = REFS_SMR_VOLUME_GC_STATE.Inactive;
pub const SmrGcStatePaused = REFS_SMR_VOLUME_GC_STATE.Paused;
pub const SmrGcStateActive = REFS_SMR_VOLUME_GC_STATE.Active;
pub const SmrGcStateActiveFullSpeed = REFS_SMR_VOLUME_GC_STATE.ActiveFullSpeed;

pub const REFS_SMR_VOLUME_INFO_OUTPUT = extern struct {
    Version: u32,
    Flags: u32,
    SizeOfRandomlyWritableTier: LARGE_INTEGER,
    FreeSpaceInRandomlyWritableTier: LARGE_INTEGER,
    SizeofSMRTier: LARGE_INTEGER,
    FreeSpaceInSMRTier: LARGE_INTEGER,
    UsableFreeSpaceInSMRTier: LARGE_INTEGER,
    VolumeGcState: REFS_SMR_VOLUME_GC_STATE,
    VolumeGcLastStatus: u32,
    CurrentGcBandFillPercentage: u32,
    Unused: [6]u64,
};

pub const REFS_SMR_VOLUME_GC_ACTION = enum(i32) {
    Start = 1,
    StartFullSpeed = 2,
    Pause = 3,
    Stop = 4,
};
pub const SmrGcActionStart = REFS_SMR_VOLUME_GC_ACTION.Start;
pub const SmrGcActionStartFullSpeed = REFS_SMR_VOLUME_GC_ACTION.StartFullSpeed;
pub const SmrGcActionPause = REFS_SMR_VOLUME_GC_ACTION.Pause;
pub const SmrGcActionStop = REFS_SMR_VOLUME_GC_ACTION.Stop;

pub const REFS_SMR_VOLUME_GC_METHOD = enum(i32) {
    Compaction = 1,
    Compression = 2,
    Rotation = 3,
};
pub const SmrGcMethodCompaction = REFS_SMR_VOLUME_GC_METHOD.Compaction;
pub const SmrGcMethodCompression = REFS_SMR_VOLUME_GC_METHOD.Compression;
pub const SmrGcMethodRotation = REFS_SMR_VOLUME_GC_METHOD.Rotation;

pub const REFS_SMR_VOLUME_GC_PARAMETERS = extern struct {
    Version: u32,
    Flags: u32,
    Action: REFS_SMR_VOLUME_GC_ACTION,
    Method: REFS_SMR_VOLUME_GC_METHOD,
    IoGranularity: u32,
    CompressionFormat: u32,
    Unused: [8]u64,
};

pub const STREAMS_QUERY_PARAMETERS_OUTPUT_BUFFER = extern struct {
    OptimalWriteSize: u32,
    StreamGranularitySize: u32,
    StreamIdMin: u32,
    StreamIdMax: u32,
};

pub const STREAMS_ASSOCIATE_ID_INPUT_BUFFER = extern struct {
    Flags: u32,
    StreamId: u32,
};

pub const STREAMS_QUERY_ID_OUTPUT_BUFFER = extern struct {
    StreamId: u32,
};

pub const QUERY_BAD_RANGES_INPUT_RANGE = extern struct {
    StartOffset: u64,
    LengthInBytes: u64,
};

pub const QUERY_BAD_RANGES_INPUT = extern struct {
    Flags: u32,
    NumRanges: u32,
    Ranges: [1]QUERY_BAD_RANGES_INPUT_RANGE,
};

pub const QUERY_BAD_RANGES_OUTPUT_RANGE = extern struct {
    Flags: u32,
    Reserved: u32,
    StartOffset: u64,
    LengthInBytes: u64,
};

pub const QUERY_BAD_RANGES_OUTPUT = extern struct {
    Flags: u32,
    NumBadRanges: u32,
    NextOffsetToLookUp: u64,
    BadRanges: [1]QUERY_BAD_RANGES_OUTPUT_RANGE,
};

pub const SET_DAX_ALLOC_ALIGNMENT_HINT_INPUT = extern struct {
    Flags: u32,
    AlignmentShift: u32,
    FileOffsetToAlign: u64,
    FallbackAlignmentShift: u32,
};

pub const VIRTUAL_STORAGE_BEHAVIOR_CODE = enum(i32) {
    Undefined = 0,
    CacheWriteThrough = 1,
    CacheWriteBack = 2,
    StopIoProcessing = 3,
    RestartIoProcessing = 4,
};
pub const VirtualStorageBehaviorUndefined = VIRTUAL_STORAGE_BEHAVIOR_CODE.Undefined;
pub const VirtualStorageBehaviorCacheWriteThrough = VIRTUAL_STORAGE_BEHAVIOR_CODE.CacheWriteThrough;
pub const VirtualStorageBehaviorCacheWriteBack = VIRTUAL_STORAGE_BEHAVIOR_CODE.CacheWriteBack;
pub const VirtualStorageBehaviorStopIoProcessing = VIRTUAL_STORAGE_BEHAVIOR_CODE.StopIoProcessing;
pub const VirtualStorageBehaviorRestartIoProcessing = VIRTUAL_STORAGE_BEHAVIOR_CODE.RestartIoProcessing;

pub const VIRTUAL_STORAGE_SET_BEHAVIOR_INPUT = extern struct {
    Size: u32,
    BehaviorCode: VIRTUAL_STORAGE_BEHAVIOR_CODE,
};

pub const ENCRYPTION_KEY_CTRL_INPUT = extern struct {
    HeaderSize: u32,
    StructureSize: u32,
    KeyOffset: u16,
    KeySize: u16,
    DplLock: u32,
    DplUserId: u64,
    DplCredentialId: u64,
};

pub const WOF_EXTERNAL_INFO = extern struct {
    Version: u32,
    Provider: u32,
};

pub const WOF_EXTERNAL_FILE_ID = extern struct {
    FileId: FILE_ID_128,
};

pub const WOF_VERSION_INFO = extern struct {
    WofVersion: u32,
};

pub const WIM_PROVIDER_EXTERNAL_INFO = extern struct {
    Version: u32,
    Flags: u32,
    DataSourceId: LARGE_INTEGER,
    ResourceHash: [20]u8,
};

pub const WIM_PROVIDER_ADD_OVERLAY_INPUT = extern struct {
    WimType: u32,
    WimIndex: u32,
    WimFileNameOffset: u32,
    WimFileNameLength: u32,
};

pub const WIM_PROVIDER_UPDATE_OVERLAY_INPUT = extern struct {
    DataSourceId: LARGE_INTEGER,
    WimFileNameOffset: u32,
    WimFileNameLength: u32,
};

pub const WIM_PROVIDER_REMOVE_OVERLAY_INPUT = extern struct {
    DataSourceId: LARGE_INTEGER,
};

pub const WIM_PROVIDER_SUSPEND_OVERLAY_INPUT = extern struct {
    DataSourceId: LARGE_INTEGER,
};

pub const WIM_PROVIDER_OVERLAY_ENTRY = extern struct {
    NextEntryOffset: u32,
    DataSourceId: LARGE_INTEGER,
    WimGuid: Guid,
    WimFileNameOffset: u32,
    WimType: u32,
    WimIndex: u32,
    Flags: u32,
};

pub const FILE_PROVIDER_EXTERNAL_INFO_V0 = extern struct {
    Version: u32,
    Algorithm: u32,
};

pub const FILE_PROVIDER_EXTERNAL_INFO_V1 = extern struct {
    Version: u32,
    Algorithm: u32,
    Flags: u32,
};

pub const CONTAINER_VOLUME_STATE = extern struct {
    Flags: u32,
};

pub const CONTAINER_ROOT_INFO_INPUT = extern struct {
    Flags: u32,
};

pub const CONTAINER_ROOT_INFO_OUTPUT = extern struct {
    ContainerRootIdLength: u16,
    ContainerRootId: [1]u8,
};

pub const VIRTUALIZATION_INSTANCE_INFO_INPUT = extern struct {
    NumberOfWorkerThreads: u32,
    Flags: u32,
};

pub const VIRTUALIZATION_INSTANCE_INFO_INPUT_EX = extern struct {
    HeaderSize: u16,
    Flags: u32,
    NotificationInfoSize: u32,
    NotificationInfoOffset: u16,
    ProviderMajorVersion: u16,
};

pub const VIRTUALIZATION_INSTANCE_INFO_OUTPUT = extern struct {
    VirtualizationInstanceID: Guid,
};

pub const GET_FILTER_FILE_IDENTIFIER_INPUT = extern struct {
    AltitudeLength: u16,
    Altitude: [1]u16,
};

pub const GET_FILTER_FILE_IDENTIFIER_OUTPUT = extern struct {
    FilterFileIdentifierLength: u16,
    FilterFileIdentifier: [1]u8,
};

pub const FS_BPIO_OPERATIONS = enum(i32) {
    ENABLE = 1,
    DISABLE = 2,
    QUERY = 3,
    VOLUME_STACK_PAUSE = 4,
    VOLUME_STACK_RESUME = 5,
    STREAM_PAUSE = 6,
    STREAM_RESUME = 7,
    GET_INFO = 8,
    MAX_OPERATION = 9,
};
pub const FS_BPIO_OP_ENABLE = FS_BPIO_OPERATIONS.ENABLE;
pub const FS_BPIO_OP_DISABLE = FS_BPIO_OPERATIONS.DISABLE;
pub const FS_BPIO_OP_QUERY = FS_BPIO_OPERATIONS.QUERY;
pub const FS_BPIO_OP_VOLUME_STACK_PAUSE = FS_BPIO_OPERATIONS.VOLUME_STACK_PAUSE;
pub const FS_BPIO_OP_VOLUME_STACK_RESUME = FS_BPIO_OPERATIONS.VOLUME_STACK_RESUME;
pub const FS_BPIO_OP_STREAM_PAUSE = FS_BPIO_OPERATIONS.STREAM_PAUSE;
pub const FS_BPIO_OP_STREAM_RESUME = FS_BPIO_OPERATIONS.STREAM_RESUME;
pub const FS_BPIO_OP_GET_INFO = FS_BPIO_OPERATIONS.GET_INFO;
pub const FS_BPIO_OP_MAX_OPERATION = FS_BPIO_OPERATIONS.MAX_OPERATION;

pub const FS_BPIO_INFLAGS = enum(i32) {
    None = 0,
    SKIP_STORAGE_STACK_QUERY = 1,
};
pub const FSBPIO_INFL_None = FS_BPIO_INFLAGS.None;
pub const FSBPIO_INFL_SKIP_STORAGE_STACK_QUERY = FS_BPIO_INFLAGS.SKIP_STORAGE_STACK_QUERY;

pub const FS_BPIO_INPUT = extern struct {
    Operation: FS_BPIO_OPERATIONS,
    InFlags: FS_BPIO_INFLAGS,
    Reserved1: u64,
    Reserved2: u64,
};

pub const FS_BPIO_OUTFLAGS = enum(i32) {
    None = 0,
    VOLUME_STACK_BYPASS_PAUSED = 1,
    STREAM_BYPASS_PAUSED = 2,
    FILTER_ATTACH_BLOCKED = 4,
    COMPATIBLE_STORAGE_DRIVER = 8,
};
pub const FSBPIO_OUTFL_None = FS_BPIO_OUTFLAGS.None;
pub const FSBPIO_OUTFL_VOLUME_STACK_BYPASS_PAUSED = FS_BPIO_OUTFLAGS.VOLUME_STACK_BYPASS_PAUSED;
pub const FSBPIO_OUTFL_STREAM_BYPASS_PAUSED = FS_BPIO_OUTFLAGS.STREAM_BYPASS_PAUSED;
pub const FSBPIO_OUTFL_FILTER_ATTACH_BLOCKED = FS_BPIO_OUTFLAGS.FILTER_ATTACH_BLOCKED;
pub const FSBPIO_OUTFL_COMPATIBLE_STORAGE_DRIVER = FS_BPIO_OUTFLAGS.COMPATIBLE_STORAGE_DRIVER;

pub const FS_BPIO_RESULTS = extern struct {
    OpStatus: u32,
    FailingDriverNameLen: u16,
    FailingDriverName: [32]u16,
    FailureReasonLen: u16,
    FailureReason: [128]u16,
};

pub const FS_BPIO_INFO = extern struct {
    ActiveBypassIoCount: u32,
    StorageDriverNameLen: u16,
    StorageDriverName: [32]u16,
};

pub const FS_BPIO_OUTPUT = extern struct {
    Operation: FS_BPIO_OPERATIONS,
    OutFlags: FS_BPIO_OUTFLAGS,
    Reserved1: u64,
    Reserved2: u64,
    Anonymous: extern union {
        Enable: FS_BPIO_RESULTS,
        Query: FS_BPIO_RESULTS,
        VolumeStackResume: FS_BPIO_RESULTS,
        StreamResume: FS_BPIO_RESULTS,
        GetInfo: FS_BPIO_INFO,
    },
};

pub const SMB_SHARE_FLUSH_AND_PURGE_INPUT = extern struct {
    Version: u16,
};

pub const SMB_SHARE_FLUSH_AND_PURGE_OUTPUT = extern struct {
    cEntriesPurged: u32,
};

pub const DISK_EXTENT = extern struct {
    DiskNumber: u32,
    StartingOffset: LARGE_INTEGER,
    ExtentLength: LARGE_INTEGER,
};

pub const VOLUME_DISK_EXTENTS = extern struct {
    NumberOfDiskExtents: u32,
    Extents: [1]DISK_EXTENT,
};

pub const VOLUME_GET_GPT_ATTRIBUTES_INFORMATION = extern struct {
    GptAttributes: u64,
};

// TODO: this function pointer causes dependency loop problems, so it's stubbed out
pub const PIO_IRP_EXT_PROCESS_TRACKED_OFFSET_CALLBACK = switch (@import("builtin").zig_backend) {
    .stage1 => fn () callconv(@import("std").os.windows.WINAPI) void,
    else => *const fn () callconv(@import("std").os.windows.WINAPI) void,
};

pub const IO_IRP_EXT_TRACK_OFFSET_HEADER = extern struct {
    Validation: u16,
    Flags: u16,
    TrackedOffsetCallback: ?PIO_IRP_EXT_PROCESS_TRACKED_OFFSET_CALLBACK,
};

pub const MOVE_FILE_DATA32 = switch (@import("../zig.zig").arch) {
    .X64, .Arm64 => extern struct {
        FileHandle: u32,
        StartingVcn: LARGE_INTEGER,
        StartingLcn: LARGE_INTEGER,
        ClusterCount: u32,
    },
    else => usize, // NOTE: this should be a @compileError but can't because of https://github.com/ziglang/zig/issues/9682
};
pub const MARK_HANDLE_INFO32 = switch (@import("../zig.zig").arch) {
    .X64, .Arm64 => extern struct {
        Anonymous: extern union {
            UsnSourceInfo: u32,
            CopyNumber: u32,
        },
        VolumeHandle: u32,
        HandleInfo: u32,
    },
    else => usize, // NOTE: this should be a @compileError but can't because of https://github.com/ziglang/zig/issues/9682
};
pub const DUPLICATE_EXTENTS_DATA32 = switch (@import("../zig.zig").arch) {
    .X64, .Arm64 => extern struct {
        FileHandle: u32,
        SourceFileOffset: LARGE_INTEGER,
        TargetFileOffset: LARGE_INTEGER,
        ByteCount: LARGE_INTEGER,
    },
    else => usize, // NOTE: this should be a @compileError but can't because of https://github.com/ziglang/zig/issues/9682
};
pub const DUPLICATE_EXTENTS_DATA_EX32 = switch (@import("../zig.zig").arch) {
    .X64, .Arm64 => extern struct {
        Size: u32,
        FileHandle: u32,
        SourceFileOffset: LARGE_INTEGER,
        TargetFileOffset: LARGE_INTEGER,
        ByteCount: LARGE_INTEGER,
        Flags: u32,
    },
    else => usize, // NOTE: this should be a @compileError but can't because of https://github.com/ziglang/zig/issues/9682
};

//--------------------------------------------------------------------------------
// Section: Functions (0)
//--------------------------------------------------------------------------------

//--------------------------------------------------------------------------------
// Section: Unicode Aliases (0)
//--------------------------------------------------------------------------------
const thismodule = @This();
pub usingnamespace switch (@import("../zig.zig").unicode_mode) {
    .ansi => struct {},
    .wide => struct {},
    .unspecified => if (@import("builtin").is_test) struct {} else struct {},
};
//--------------------------------------------------------------------------------
// Section: Imports (10)
//--------------------------------------------------------------------------------
const Guid = @import("../zig.zig").Guid;
const BOOLEAN = @import("../foundation.zig").BOOLEAN;
const CHAR = @import("../foundation.zig").CHAR;
const FILE_ID_128 = @import("../storage/file_system.zig").FILE_ID_128;
const HANDLE = @import("../foundation.zig").HANDLE;
const LARGE_INTEGER = @import("../foundation.zig").LARGE_INTEGER;
const PROPERTYKEY = @import("../ui/shell/properties_system.zig").PROPERTYKEY;
const SID = @import("../security.zig").SID;
const STORAGE_BUS_TYPE = @import("../storage/file_system.zig").STORAGE_BUS_TYPE;
const VIRTUAL_STORAGE_TYPE = @import("../storage/vhd.zig").VIRTUAL_STORAGE_TYPE;

test {
    @setEvalBranchQuota(comptime @import("std").meta.declarations(@This()).len * 3);

    // reference all the pub declarations
    if (!@import("builtin").is_test) return;
    inline for (comptime @import("std").meta.declarations(@This())) |decl| {
        if (decl.is_pub) {
            _ = @field(@This(), decl.name);
        }
    }
}
