namespace Vanara.PInvoke { public static partial class Kernel32 { /// Specifies the type of CSV control operation to use with the FSCTL_CSV_CONTROL control code. /// /// An alternative to calling the FSCTL_CSV_CONTROL control code with this enumeration is to use the CSV_CONTROL_PARAM structure, /// which encapsulates a member of this enumeration type. /// // https://docs.microsoft.com/en-us/windows/win32/api/winioctl/ne-winioctl-csv_control_op typedef enum _CSV_CONTROL_OP { // CsvControlStartRedirectFile, CsvControlStopRedirectFile, CsvControlQueryRedirectState, CsvControlQueryFileRevision, // CsvControlQueryMdsPath, CsvControlQueryFileRevisionFileId128, CsvControlQueryVolumeRedirectState, // CsvControlEnableUSNRangeModificationTracking, CsvControlMarkHandleLocalVolumeMount, CsvControlUnmarkHandleLocalVolumeMount, // CsvControlGetCsvFsMdsPathV2, CsvControlDisableCaching, CsvControlEnableCaching } CSV_CONTROL_OP, *PCSV_CONTROL_OP; [PInvokeData("winioctl.h", MSDNShortId = "77A2106F-2C07-4A30-BA46-651F74032609")] public enum CSV_CONTROL_OP { /// Start file redirection. CsvControlStartRedirectFile = 0x02, /// Stop file redirection. CsvControlStopRedirectFile, /// /// Search for state redirection. When this value is specified, the CSV_QUERY_REDIRECT_STATE structure must also be used. /// CsvControlQueryRedirectState, /// Search for file revision. When this value is specified, the CSV_QUERY_FILE_REVISION structure must also be used. CsvControlQueryFileRevision = 0x06, /// CsvControlQueryMdsPath = 0x08, /// CsvControlQueryFileRevisionFileId128, /// CsvControlQueryVolumeRedirectState, /// CsvControlEnableUSNRangeModificationTracking = 0x0d, /// CsvControlMarkHandleLocalVolumeMount, /// CsvControlUnmarkHandleLocalVolumeMount, /// CsvControlGetCsvFsMdsPathV2 = 0x12, /// CsvControlDisableCaching, /// CsvControlEnableCaching, } /// Specifies the element type of a changer device. // https://docs.microsoft.com/en-us/windows/win32/api/winioctl/ne-winioctl-element_type typedef enum _ELEMENT_TYPE { AllElements, // ChangerTransport, ChangerSlot, ChangerIEPort, ChangerDrive, ChangerDoor, ChangerKeypad, ChangerMaxElement } ELEMENT_TYPE, *PELEMENT_TYPE; [PInvokeData("winioctl.h", MSDNShortId = "b026d0f5-133d-4138-a727-80bf4480bb74")] public enum ELEMENT_TYPE { /// /// All elements of a changer, including its robotic transport, drives, slots, and insert/eject ports. This value is valid only /// with IOCTL_CHANGER_GET_ELEMENT_STATUS or IOCTL_CHANGER_INITIALIZE_ELEMENT_STATUS. /// AllElements, /// Robotic transport element, which is used to move media between insert/eject ports, slots, and drives. ChangerTransport, /// Storage element, which is a slot in the changer in which media is stored when not mounted in a drive. ChangerSlot, /// /// Insert/eject port, which is a single- or multiple-cartridge access port in some changers. An element is an insert/eject port /// only if it is possible to move a piece of media from a slot to the insert/eject port. /// ChangerIEPort, /// Data transfer element where data can be read from and written to media. ChangerDrive, /// /// Mechanism that provides access to all media in a changer at one time (as compared to an IEport that provides access to one or /// more, but not all, media). For example, a large front door or a magazine that contains all media in the changer is an element /// of this type. This value is valid only with IOCTL_CHANGER_SET_ACCESS. /// ChangerDoor, /// Keypad or other input control on the front panel of a changer. This value is valid only with IOCTL_CHANGER_SET_ACCESS. ChangerKeypad, } /// Specifies the storage media type. // https://docs.microsoft.com/en-us/windows/win32/api/winioctl/ne-winioctl-file_storage_tier_media_type typedef enum // _FILE_STORAGE_TIER_MEDIA_TYPE { FileStorageTierMediaTypeUnspecified, FileStorageTierMediaTypeDisk, FileStorageTierMediaTypeSsd, // FileStorageTierMediaTypeScm, FileStorageTierMediaTypeMax } FILE_STORAGE_TIER_MEDIA_TYPE, *PFILE_STORAGE_TIER_MEDIA_TYPE; [PInvokeData("winioctl.h", MSDNShortId = "6D580AC6-5E3C-4F0B-A922-E81E6B8D8658")] public enum FILE_STORAGE_TIER_MEDIA_TYPE { /// Media type is unspecified. FileStorageTierMediaTypeUnspecified = 0, /// Media type is an HDD (hard disk drive). FileStorageTierMediaTypeDisk, /// Media type is an SSD (solid state drive). FileStorageTierMediaTypeSsd, /// FileStorageTierMediaTypeScm = 4, } /// Defines values for the type of desired storage class. // https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/ntifs/ne-ntifs-_file_storage_tier_class typedef enum // _FILE_STORAGE_TIER_CLASS { FileStorageTierClassUnspecified, FileStorageTierClassCapacity, FileStorageTierClassPerformance, // FileStorageTierClassMax } FILE_STORAGE_TIER_CLASS, *PFILE_STORAGE_TIER_CLASS; [PInvokeData("ntifs.h", MSDNShortId = "d969fc78-2517-4b9c-b2ce-489af3ff4e5f")] // public enum FILE_STORAGE_TIER_CLASS{FileStorageTierClassUnspecified, FileStorageTierClassCapacity, // FileStorageTierClassPerformance, FileStorageTierClassMax, FILE_STORAGE_TIER_CLASS, *PFILE_STORAGE_TIER_CLASS} public enum FILE_STORAGE_TIER_CLASS { /// Unspecified class type. FileStorageTierClassUnspecified, /// Class capacity. FileStorageTierClassCapacity, /// Class performance. FileStorageTierClassPerformance, } /// Represents the various forms of device media. /// /// The MediaType member of the DISK_GEOMETRY data structure is of type MEDIA_TYPE. The DeviceIoControl function /// receives a DISK_GEOMETRY structure in response to an IOCTL_DISK_GET_DRIVE_GEOMETRY control code. The /// DeviceIoControl function receives an array of DISK_GEOMETRY structures in response to an /// IOCTL_STORAGE_GET_MEDIA_TYPES control code. The STORAGE_MEDIA_TYPE enumeration type extends this enumeration type. /// // https://docs.microsoft.com/en-us/windows/win32/api/winioctl/ne-winioctl-media_type typedef enum _MEDIA_TYPE { Unknown, // F5_1Pt2_512, F3_1Pt44_512, F3_2Pt88_512, F3_20Pt8_512, F3_720_512, F5_360_512, F5_320_512, F5_320_1024, F5_180_512, F5_160_512, // RemovableMedia, FixedMedia, F3_120M_512, F3_640_512, F5_640_512, F5_720_512, F3_1Pt2_512, F3_1Pt23_1024, F5_1Pt23_1024, // F3_128Mb_512, F3_230Mb_512, F8_256_128, F3_200Mb_512, F3_240M_512, F3_32M_512 } MEDIA_TYPE, *PMEDIA_TYPE; [PInvokeData("winioctl.h", MSDNShortId = "183cf8fc-c17b-4def-b590-0aa4b67488f6")] public enum MEDIA_TYPE { /// Format is unknown Unknown, /// A 5.25" floppy, with 1.2MB and 512 bytes/sector. F5_1Pt2_512, /// A 3.5" floppy, with 1.44MB and 512 bytes/sector. F3_1Pt44_512, /// A 3.5" floppy, with 2.88MB and 512 bytes/sector. F3_2Pt88_512, /// A 3.5" floppy, with 20.8MB and 512 bytes/sector. F3_20Pt8_512, /// A 3.5" floppy, with 720KB and 512 bytes/sector. F3_720_512, /// A 5.25" floppy, with 360KB and 512 bytes/sector. F5_360_512, /// A 5.25" floppy, with 320KB and 512 bytes/sector. F5_320_512, /// A 5.25" floppy, with 320KB and 1024 bytes/sector. F5_320_1024, /// A 5.25" floppy, with 180KB and 512 bytes/sector. F5_180_512, /// A 5.25" floppy, with 160KB and 512 bytes/sector. F5_160_512, /// Removable media other than floppy. RemovableMedia, /// Fixed hard disk media. FixedMedia, /// A 3.5" floppy, with 120MB and 512 bytes/sector. F3_120M_512, /// A 3.5" floppy, with 640KB and 512 bytes/sector. F3_640_512, /// A 5.25" floppy, with 640KB and 512 bytes/sector. F5_640_512, /// A 5.25" floppy, with 720KB and 512 bytes/sector. F5_720_512, /// A 3.5" floppy, with 1.2MB and 512 bytes/sector. F3_1Pt2_512, /// A 3.5" floppy, with 1.23MB and 1024 bytes/sector. F3_1Pt23_1024, /// A 5.25" floppy, with 1.23MB and 1024 bytes/sector. F5_1Pt23_1024, /// A 3.5" floppy, with 128MB and 512 bytes/sector. F3_128Mb_512, /// A 3.5" floppy, with 230MB and 512 bytes/sector. F3_230Mb_512, /// An 8" floppy, with 256KB and 128 bytes/sector. F8_256_128, /// A 3.5" floppy, with 200MB and 512 bytes/sector. (HiFD). F3_200Mb_512, /// A 3.5" floppy, with 240MB and 512 bytes/sector. (HiFD). F3_240M_512, /// A 3.5" floppy, with 32MB and 512 bytes/sector. F3_32M_512, } /// Represents the format of a partition. // https://docs.microsoft.com/en-us/windows/win32/api/winioctl/ne-winioctl-partition_style typedef enum _PARTITION_STYLE { // PARTITION_STYLE_MBR, PARTITION_STYLE_GPT, PARTITION_STYLE_RAW } PARTITION_STYLE; [PInvokeData("winioctl.h", MSDNShortId = "254e4ea1-d0c8-4033-b8af-e5dbfb7c7da8")] public enum PARTITION_STYLE { /// Master boot record (MBR) format. This corresponds to standard AT-style MBR partitions. PARTITION_STYLE_MBR, /// GUID Partition Table (GPT) format. PARTITION_STYLE_GPT, /// Partition not formatted in either of the recognized formats—MBR or GPT. PARTITION_STYLE_RAW, } /// Specifies the various types of storage buses. // https://docs.microsoft.com/en-us/windows/win32/api/winioctl/ne-winioctl-storage_bus_type typedef enum _STORAGE_BUS_TYPE { // BusTypeUnknown, BusTypeScsi, BusTypeAtapi, BusTypeAta, BusType1394, BusTypeSsa, BusTypeFibre, BusTypeUsb, BusTypeRAID, // BusTypeiScsi, BusTypeSas, BusTypeSata, BusTypeSd, BusTypeMmc, BusTypeVirtual, BusTypeFileBackedVirtual, BusTypeSpaces, // BusTypeNvme, BusTypeSCM, BusTypeUfs, BusTypeMax, BusTypeMaxReserved } STORAGE_BUS_TYPE, *PSTORAGE_BUS_TYPE; [PInvokeData("winioctl.h", MSDNShortId = "fb5a17f7-8ddb-4738-83e1-f00abc3555d2")] public enum STORAGE_BUS_TYPE { /// Unknown bus type. BusTypeUnknown, /// SCSI bus. BusTypeScsi, /// ATAPI bus. BusTypeAtapi, /// ATA bus. BusTypeAta, /// IEEE-1394 bus. BusType1394, /// SSA bus. BusTypeSsa, /// Fibre Channel bus. BusTypeFibre, /// USB bus. BusTypeUsb, /// RAID bus. BusTypeRAID, /// BusTypeiScsi, /// Serial Attached SCSI (SAS) bus. Windows Server 2003: This is not supported before Windows Server 2003 with SP1. BusTypeSas, /// SATA bus. Windows Server 2003: This is not supported before Windows Server 2003 with SP1. BusTypeSata, /// BusTypeSd, /// BusTypeMmc, /// BusTypeVirtual, /// BusTypeFileBackedVirtual, /// BusTypeSpaces, /// BusTypeNvme, /// BusTypeSCM, /// BusTypeUfs, /// BusTypeMaxReserved = 0x7f, } /// Specifies the health status of a storage component. // https://docs.microsoft.com/en-us/windows/win32/api/winioctl/ne-winioctl-storage_component_health_status typedef enum // _STORAGE_COMPONENT_HEALTH_STATUS { HealthStatusUnknown, HealthStatusNormal, HealthStatusThrottled, HealthStatusWarning, // HealthStatusDisabled, HealthStatusFailed } STORAGE_COMPONENT_HEALTH_STATUS, *PSTORAGE_COMPONENT_HEALTH_STATUS; [PInvokeData("winioctl.h", MSDNShortId = "ECC5A745-EA8B-4FBE-840D-0D959C9ED5BA")] public enum STORAGE_COMPONENT_HEALTH_STATUS { /// HealthStatusUnknown, /// HealthStatusNormal, /// HealthStatusThrottled, /// HealthStatusWarning, /// HealthStatusDisabled, /// HealthStatusFailed, } /// Specifies the form factor of a device. // https://docs.microsoft.com/en-us/windows/win32/api/winioctl/ne-winioctl-storage_device_form_factor typedef enum // _STORAGE_DEVICE_FORM_FACTOR { FormFactorUnknown, FormFactor3_5, FormFactor2_5, FormFactor1_8, FormFactor1_8Less, // FormFactorEmbedded, FormFactorMemoryCard, FormFactormSata, FormFactorM_2, FormFactorPCIeBoard, FormFactorDimm } // STORAGE_DEVICE_FORM_FACTOR, *PSTORAGE_DEVICE_FORM_FACTOR; [PInvokeData("winioctl.h", MSDNShortId = "B8FCDC58-D599-4EEE-8096-818345FCD75F")] public enum STORAGE_DEVICE_FORM_FACTOR { /// FormFactorUnknown, /// 3.5-inch nominal form factor. FormFactor3_5, /// 2.5-inch nominal form factor. FormFactor2_5, /// 1.8-inch nominal form factor. FormFactor1_8, /// Less than 1.8-inch nominal form factor. FormFactor1_8Less, /// Embedded on board. FormFactorEmbedded, /// Memory card such as SD, CF. FormFactorMemoryCard, /// mSATA FormFactormSata, /// M.2 FormFactorM_2, /// PCIe card plug into slot. FormFactorPCIeBoard, /// DIMM slot. FormFactorDimm, } /// The units of the maximum power threshold. // https://docs.microsoft.com/en-us/windows/win32/api/winioctl/ne-winioctl-storage_device_power_cap_units typedef enum // _STORAGE_DEVICE_POWER_CAP_UNITS { StorageDevicePowerCapUnitsPercent, StorageDevicePowerCapUnitsMilliwatts } // STORAGE_DEVICE_POWER_CAP_UNITS, *PSTORAGE_DEVICE_POWER_CAP_UNITS; [PInvokeData("winioctl.h", MSDNShortId = "A6C48765-9A18-4F77-8B0F-9653CE6FDE23")] public enum STORAGE_DEVICE_POWER_CAP_UNITS { /// Units in percent. StorageDevicePowerCapUnitsPercent, /// Units in milliwatts. StorageDevicePowerCapUnitsMilliwatts, } /// /// Specifies various types of storage media. Parameters and members of type STORAGE_MEDIA_TYPE also accept values from the /// MEDIA_TYPE enumeration type. /// // https://docs.microsoft.com/en-us/windows/win32/api/winioctl/ne-winioctl-storage_media_type typedef enum _STORAGE_MEDIA_TYPE { // DDS_4mm, MiniQic, Travan, QIC, MP_8mm, AME_8mm, AIT1_8mm, DLT, NCTP, IBM_3480, IBM_3490E, IBM_Magstar_3590, IBM_Magstar_MP, // STK_DATA_D3, SONY_DTF, DV_6mm, DMI, SONY_D2, CLEANER_CARTRIDGE, CD_ROM, CD_R, CD_RW, DVD_ROM, DVD_R, DVD_RW, MO_3_RW, MO_5_WO, // MO_5_RW, MO_5_LIMDOW, PC_5_WO, PC_5_RW, PD_5_RW, ABL_5_WO, PINNACLE_APEX_5_RW, SONY_12_WO, PHILIPS_12_WO, HITACHI_12_WO, // CYGNET_12_WO, KODAK_14_WO, MO_NFR_525, NIKON_12_RW, IOMEGA_ZIP, IOMEGA_JAZ, SYQUEST_EZ135, SYQUEST_EZFLYER, SYQUEST_SYJET, // AVATAR_F2, MP2_8mm, DST_S, DST_M, DST_L, VXATape_1, VXATape_2, STK_EAGLE, LTO_Ultrium, LTO_Accelis, DVD_RAM, AIT_8mm, ADR_1, // ADR_2, STK_9940, SAIT, VXATape } STORAGE_MEDIA_TYPE, *PSTORAGE_MEDIA_TYPE; [PInvokeData("winioctl.h", MSDNShortId = "f584d766-0d4d-49b8-b58a-09556c494270")] public enum STORAGE_MEDIA_TYPE { /// One of the following tape types: DAT, DDS1, DDS2, and so on. DDS_4mm = 0x20, /// MiniQIC tape. MiniQic, /// Travan tape (TR-1, TR-2, TR-3, and so on). Travan, /// QIC tape. QIC, /// An 8mm Exabyte metal particle tape. MP_8mm, /// An 8mm Exabyte advanced metal evaporative tape. AME_8mm, /// An 8mm Sony AIT1 tape. AIT1_8mm, /// DLT compact tape (IIIxt or IV). DLT, /// Philips NCTP tape. NCTP, /// IBM 3480 tape. IBM_3480, /// IBM 3490E tape. IBM_3490E, /// IBM Magstar 3590 tape. IBM_Magstar_3590, /// IBM Magstar MP tape. IBM_Magstar_MP, /// STK data D3 tape. STK_DATA_D3, /// Sony DTF tape. SONY_DTF, /// A 6mm digital videotape. DV_6mm, /// Exabyte DMI tape (or compatible). DMI, /// Sony D2S or D2L tape. SONY_D2, /// Cleaner (all drive types that support cleaners). CLEANER_CARTRIDGE, /// CD. CD_ROM, /// CD (write once). CD_R, /// CD (rewritable). CD_RW, /// DVD. DVD_ROM, /// DVD (write once). DVD_R, /// DVD (rewritable). DVD_RW, /// Magneto-optical 3.5" (rewritable). MO_3_RW, /// Magneto-optical 5.25" (write once). MO_5_WO, /// Magneto-optical 5.25" (rewritable; not LIMDOW). MO_5_RW, /// Magneto-optical 5.25" (rewritable; LIMDOW). MO_5_LIMDOW, /// Phase change 5.25" (write once) PC_5_WO, /// Phase change 5.25" (rewritable) PC_5_RW, /// Phase change dual (rewritable) PD_5_RW, /// Ablative 5.25" (write once). ABL_5_WO, /// Pinnacle Apex 4.6GB (rewritable) PINNACLE_APEX_5_RW, /// Sony 12" (write once). SONY_12_WO, /// Philips/LMS 12" (write once). PHILIPS_12_WO, /// Hitachi 12" (write once) HITACHI_12_WO, /// Cygnet/ATG 12" (write once) CYGNET_12_WO, /// Kodak 14" (write once) KODAK_14_WO, /// MO near field recording (Terastor) MO_NFR_525, /// Nikon 12" (rewritable). NIKON_12_RW, /// Iomega Zip. IOMEGA_ZIP, /// Iomega Jaz. IOMEGA_JAZ, /// Syquest EZ135. SYQUEST_EZ135, /// Syquest EzFlyer. SYQUEST_EZFLYER, /// Syquest SyJet. SYQUEST_SYJET, /// Avatar 2.5" floppy. AVATAR_F2, /// An 8mm Hitachi tape. MP2_8mm, /// Ampex DST small tape. DST_S, /// Ampex DST medium tape. DST_M, /// Ampex DST large tape. DST_L, /// Ecrix 8mm tape. VXATape_1, /// Ecrix 8mm tape. VXATape_2, /// STK_EAGLE, /// LTO Ultrium (IBM, HP, Seagate). LTO_Ultrium, /// LTO Accelis (IBM, HP, Seagate). LTO_Accelis, /// DVD-RAM. DVD_RAM, /// AIT tape (AIT2 or higher). AIT_8mm, /// OnStream ADR1. ADR_1, /// OnStream ADR2. ADR_2, /// STK 9940. STK_9940, /// SAIT tape. Windows Server 2003: This is not supported before Windows Server 2003 with SP1. SAIT, /// Exabyte VXA tape. Windows Server 2008: This is not supported before Windows Server 2008. VXATape, } /// Reserved for system use. // https://docs.microsoft.com/en-us/windows/win32/api/winioctl/ne-winioctl-storage_port_code_set typedef enum _STORAGE_PORT_CODE_SET // { StoragePortCodeSetReserved, StoragePortCodeSetStorport, StoragePortCodeSetSCSIport, StoragePortCodeSetSpaceport, // StoragePortCodeSetATAport, StoragePortCodeSetUSBport, StoragePortCodeSetSBP2port, StoragePortCodeSetSDport } // STORAGE_PORT_CODE_SET, *PSTORAGE_PORT_CODE_SET; [PInvokeData("winioctl.h", MSDNShortId = "1c1032e8-30b8-45ad-973a-c7616139b26e")] public enum STORAGE_PORT_CODE_SET { /// Indicates an unknown storage adapter driver type. StoragePortCodeSetReserved, /// Storage adapter driver is a Storport-miniport driver. StoragePortCodeSetStorport, /// Storage adapter driver is a SCSI Port-miniport driver. StoragePortCodeSetSCSIport, /// Storage adapter driver is the Spaceport driver. StoragePortCodeSetSpaceport, /// Storage adapter driver is an ATA-port miniport driver. StoragePortCodeSetATAport, /// Storage adapter driver is the USB-storage port driver. StoragePortCodeSetUSBport, /// Storage adapter driver is the SBP2 port driver. StoragePortCodeSetSBP2port, /// Storage adapter driver is an SD-port miniport driver. StoragePortCodeSetSDport, } /// /// Enumerates the possible values of the PropertyId member of the STORAGE_PROPERTY_QUERY structure passed as input to the /// IOCTL_STORAGE_QUERY_PROPERTY request to retrieve the properties of a storage device or adapter. /// /// /// The optional output buffer returned through the lpOutBuffer parameter of the IOCTL_STORAGE_QUERY_PROPERTY control code request /// can be one of several structures depending on the value of the PropertyId member of the STORAGE_PROPERTY_QUERY structure /// pointed to by the lpInBuffer parameter. If the QueryType member of the STORAGE_PROPERTY_QUERY is set to /// PropertyExistsQuery, then no structure is returned. /// // https://docs.microsoft.com/en-us/windows/win32/api/winioctl/ne-winioctl-storage_property_id typedef enum _STORAGE_PROPERTY_ID { // StorageDeviceProperty, StorageAdapterProperty, StorageDeviceIdProperty, StorageDeviceUniqueIdProperty, // StorageDeviceWriteCacheProperty, StorageMiniportProperty, StorageAccessAlignmentProperty, StorageDeviceSeekPenaltyProperty, // StorageDeviceTrimProperty, StorageDeviceWriteAggregationProperty, StorageDeviceDeviceTelemetryProperty, // StorageDeviceLBProvisioningProperty, StorageDevicePowerProperty, StorageDeviceCopyOffloadProperty, // StorageDeviceResiliencyProperty, StorageDeviceMediumProductType, StorageAdapterRpmbProperty, StorageAdapterCryptoProperty, // StorageDeviceIoCapabilityProperty, StorageAdapterProtocolSpecificProperty, StorageDeviceProtocolSpecificProperty, // StorageAdapterTemperatureProperty, StorageDeviceTemperatureProperty, StorageAdapterPhysicalTopologyProperty, // StorageDevicePhysicalTopologyProperty, StorageDeviceAttributesProperty, StorageDeviceManagementStatus, // StorageAdapterSerialNumberProperty, StorageDeviceLocationProperty, StorageDeviceNumaProperty, StorageDeviceZonedDeviceProperty, // StorageDeviceUnsafeShutdownCount, StorageDeviceEnduranceProperty } STORAGE_PROPERTY_ID, *PSTORAGE_PROPERTY_ID; [PInvokeData("winioctl.h", MSDNShortId = "9747be01-7c70-4697-97f7-e3830b54ba0a")] public enum STORAGE_PROPERTY_ID { /// Indicates that the caller is querying for the device descriptor, STORAGE_DEVICE_DESCRIPTOR. StorageDeviceProperty, /// Indicates that the caller is querying for the adapter descriptor, STORAGE_ADAPTER_DESCRIPTOR. StorageAdapterProperty, /// /// Indicates that the caller is querying for the device identifiers provided with the SCSI vital product data pages. Data is /// returned using the STORAGE_DEVICE_ID_DESCRIPTOR structure. /// StorageDeviceIdProperty, /// /// Intended for driver usage. Indicates that the caller is querying for the unique device identifiers. Data is returned using /// the STORAGE_DEVICE_UNIQUE_IDENTIFIER structure (see the storduid.h header in the DDK). Windows Server 2003 and Windows XP: /// This value is not supported before Windows Vista and Windows Server 2008. /// StorageDeviceUniqueIdProperty, /// /// Indicates that the caller is querying for the write cache property. Data is returned using the STORAGE_WRITE_CACHE_PROPERTY /// structure. Windows Server 2003 and Windows XP: This value is not supported before Windows Vista and Windows Server 2008. /// StorageDeviceWriteCacheProperty, /// Reserved for system use. StorageMiniportProperty, /// /// Indicates that the caller is querying for the access alignment descriptor, STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR. Windows /// Server 2003 and Windows XP: This value is not supported before Windows Vista and Windows Server 2008. /// StorageAccessAlignmentProperty, /// /// Indicates that the caller is querying for the trim descriptor, DEVICE_TRIM_DESCRIPTOR. Windows Server 2008, Windows Vista, /// Windows Server 2003 and Windows XP: This value is not supported before Windows 7 and Windows Server 2008 R2. /// StorageDeviceTrimProperty, /// /// Indicates that the caller is querying for the device power descriptor. Data is returned using the DEVICE_POWER_DESCRIPTOR /// structure. Windows 7, Windows Server 2008 R2, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP: This /// value is not supported before Windows 8 and Windows Server 2012. /// StorageDevicePowerProperty, /// Reserved for system use. StorageDeviceResiliencyProperty, /// /// Indicates that the caller is querying for the medium product type. Data is returned using the /// STORAGE_MEDIUM_PRODUCT_TYPE_DESCRIPTOR structure. /// StorageDeviceMediumProductType, /// /// Indicates that the caller is querying for RPMB support and properties. Data is returned using the STORAGE_RPMB_DESCRIPTOR structure. /// StorageAdapterRpmbProperty, /// StorageAdapterCryptoProperty, /// /// Indicates that the caller is querying for the device I/O capability property. Data is returned using the /// DEVICE_IO_CAPABILITY_DESCRIPTOR structure. /// StorageDeviceIoCapabilityProperty, /// /// Indicates that the caller is querying for protocol-specific data from the adapter. Data is returned using the /// STORAGE_PROTOCOL_DATA_DESCRIPTOR structure. See the remarks for more info. /// StorageAdapterProtocolSpecificProperty, /// /// Indicates that the caller is querying for protocol-specific data from the device. Data is returned using the /// STORAGE_PROTOCOL_DATA_DESCRIPTOR structure. See the remarks for more info. /// StorageDeviceProtocolSpecificProperty, /// /// Indicates that the caller is querying temperature data from the adapter. Data is returned using the /// STORAGE_TEMPERATURE_DATA_DESCRIPTOR structure. /// StorageAdapterTemperatureProperty, /// /// Indicates that the caller is querying for temperature data from the device. Data is returned using the /// STORAGE_TEMPERATURE_DATA_DESCRIPTOR structure. /// StorageDeviceTemperatureProperty, /// /// Indicates that the caller is querying for topology information from the adapter. Data is returned using the /// STORAGE_PHYSICAL_TOPOLOGY_DESCRIPTOR structure. /// StorageAdapterPhysicalTopologyProperty, /// /// Indicates that the caller is querying for topology information from the device. Data is returned using the /// STORAGE_PHYSICAL_TOPOLOGY_DESCRIPTOR structure. /// StorageDevicePhysicalTopologyProperty, /// Reserved for future use. StorageDeviceAttributesProperty, /// StorageDeviceManagementStatus, /// StorageAdapterSerialNumberProperty, /// StorageDeviceLocationProperty, /// StorageDeviceNumaProperty, /// StorageDeviceZonedDeviceProperty, /// StorageDeviceUnsafeShutdownCount, /// StorageDeviceEnduranceProperty, } /// /// /// [Some information relates to pre-released product which may be substantially modified before it's commercially released. /// Microsoft makes no warranties, express or implied, with respect to the information provided here.] /// /// The ATA protocol data type. /// /// /// /// When using IOCTL_STORAGE_QUERY_PROPERTY to retrieve protocol-specific information in the STORAGE_PROTOCOL_DATA_DESCRIPTOR, /// configure the STORAGE_PROPERTY_QUERY structure as follows: /// /// /// /// Allocate a buffer that can contains both a STORAGE_PROPERTY_QUERY and a STORAGE_PROTOCOL_SPECIFIC_DATA structure. /// /// /// /// Set the PropertyID field to StorageAdapterProtocolSpecificProperty or StorageDeviceProtocolSpecificProperty /// for a controller or device/namespace request, respectively. /// /// /// /// Set the QueryType field to PropertyStandardQuery. /// /// /// /// Fill the STORAGE_PROTOCOL_SPECIFIC_DATA structure with the desired values. The start of the STORAGE_PROTOCOL_SPECIFIC_DATA /// is the AdditionalParameters field of STORAGE_PROPERTY_QUERY. /// /// /// /// To specify a type of ATA protocol-specific information, configure the STORAGE_PROTOCOL_SPECIFIC_DATA structure as follows: /// /// /// Set the ProtocolType field to ProtocolTypeAta. /// /// /// Set the DataType field to an enumeration value defined by STORAGE_PROTOCOL_ATA_DATA_TYPE: /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/winioctl/ne-winioctl-storage_protocol_ata_data_type typedef enum // _STORAGE_PROTOCOL_ATA_DATA_TYPE { AtaDataTypeUnknown, AtaDataTypeIdentify, AtaDataTypeLogPage } STORAGE_PROTOCOL_ATA_DATA_TYPE, *PSTORAGE_PROTOCOL_ATA_DATA_TYPE; [PInvokeData("winioctl.h", MSDNShortId = "999CB5EB-9D19-41B9-B4ED-001B63C1A7EA")] public enum STORAGE_PROTOCOL_ATA_DATA_TYPE { /// Unknown data type. AtaDataTypeUnknown, /// Identify device data type. AtaDataTypeIdentify, /// Log page data type. AtaDataTypeLogPage, } /// Describes the type of NVMe protocol-specific data that's to be queried during an IOCTL_STORAGE_QUERY_PROPERTY request. /// /// /// When using IOCTL_STORAGE_QUERY_PROPERTY to retrieve protocol-specific information in the STORAGE_PROTOCOL_DATA_DESCRIPTOR, /// configure the STORAGE_PROPERTY_QUERY structure as follows: /// /// /// /// Allocate a buffer that can contains both a STORAGE_PROPERTY_QUERY and a STORAGE_PROTOCOL_SPECIFIC_DATA structure. /// /// /// /// Set the PropertyID field to StorageAdapterProtocolSpecificProperty or StorageDeviceProtocolSpecificProperty /// for a controller or device/namespace request, respectively. /// /// /// /// Set the QueryType field to PropertyStandardQuery. /// /// /// /// Fill the STORAGE_PROTOCOL_SPECIFIC_DATA structure with the desired values. The start of the STORAGE_PROTOCOL_SPECIFIC_DATA /// is the AdditionalParameters field of STORAGE_PROPERTY_QUERY. /// /// /// /// To specify a type of NVMe protocol-specific information, configure the STORAGE_PROTOCOL_SPECIFIC_DATA structure as follows: /// /// /// Set the ProtocolType field to ProtocolTypeNVMe. /// /// /// Set the DataType field to an enumeration value defined by STORAGE_PROTOCOL_NVME_DATA_TYPE: /// /// /// // https://docs.microsoft.com/en-us/windows/win32/api/winioctl/ne-winioctl-storage_protocol_nvme_data_type typedef enum // _STORAGE_PROTOCOL_NVME_DATA_TYPE { NVMeDataTypeUnknown, NVMeDataTypeIdentify, NVMeDataTypeLogPage, NVMeDataTypeFeature } // STORAGE_PROTOCOL_NVME_DATA_TYPE, *PSTORAGE_PROTOCOL_NVME_DATA_TYPE; [PInvokeData("winioctl.h", MSDNShortId = "BB171CEE-1CB7-44AC-9F39-87394EFAFAEC")] public enum STORAGE_PROTOCOL_NVME_DATA_TYPE { /// Unknown data type. NVMeDataTypeUnknown, /// /// Identify data type. This can be either Identify Controller data or Identify Namespace data. When this type of data is being /// queried, the ProtocolDataRequestValue field of STORAGE_PROTOCOL_SPECIFIC_DATA will have a value of /// NVME_IDENTIFY_CNS_CONTROLLER for adapter or NVME_IDENTIFY_CNS_SPECIFIC_NAMESPACE for namespace. If the /// ProtocolDataRequestValue is NVME_IDENTIFY_CNS_SPECIFIC_NAMESPACE, the ProtocolDataRequestSubValue field from the /// STORAGE_PROTOCOL_SPECIFIC_DATA structure will have a value of the namespace ID. /// NVMeDataTypeIdentify, /// Log page data type. NVMeDataTypeLogPage, /// Feature data type. NVMeDataTypeFeature, } /// Specifies the protocol of a storage device. // https://docs.microsoft.com/en-us/windows/win32/api/winioctl/ne-winioctl-storage_protocol_type typedef enum _STORAGE_PROTOCOL_TYPE // { ProtocolTypeUnknown, ProtocolTypeScsi, ProtocolTypeAta, ProtocolTypeNvme, ProtocolTypeSd, ProtocolTypeUfs, // ProtocolTypeProprietary, ProtocolTypeMaxReserved } STORAGE_PROTOCOL_TYPE, *PSTORAGE_PROTOCOL_TYPE; [PInvokeData("winioctl.h", MSDNShortId = "8055B633-99EF-4AAE-AA80-FC09F357BEAB")] public enum STORAGE_PROTOCOL_TYPE { /// Unknown protocol type. ProtocolTypeUnknown, /// SCSI protocol type. ProtocolTypeScsi, /// ATA protocol type. ProtocolTypeAta, /// NVMe protocol type. ProtocolTypeNvme, /// SD protocol type. ProtocolTypeSd, /// ProtocolTypeUfs, /// Vendor-specific protocol type. ProtocolTypeProprietary = 0x7E, /// Reserved. ProtocolTypeMaxReserved = 0x7F, } /// /// Used by the STORAGE_PROPERTY_QUERY structure passed to the IOCTL_STORAGE_QUERY_PROPERTY control code to indicate what information /// is returned about a property of a storage device or adapter. /// // https://docs.microsoft.com/en-us/windows/win32/api/winioctl/ne-winioctl-storage_query_type typedef enum _STORAGE_QUERY_TYPE { // PropertyStandardQuery, PropertyExistsQuery, PropertyMaskQuery, PropertyQueryMaxDefined } STORAGE_QUERY_TYPE, *PSTORAGE_QUERY_TYPE; [PInvokeData("winioctl.h", MSDNShortId = "0bce42d2-9d42-4881-9e33-4b3858a40353")] public enum STORAGE_QUERY_TYPE { /// Instructs the driver to return an appropriate descriptor. PropertyStandardQuery, /// Instructs the driver to report whether the descriptor is supported. PropertyExistsQuery, /// Not currently supported. Do not use. PropertyMaskQuery, /// Specifies the upper limit of the list of query types. This is used to validate the query type. PropertyQueryMaxDefined, } /// Indicates whether the write cache features of a device are changeable. /// /// The IOCTL_STORAGE_QUERY_PROPERTY request returns a WRITE_CACHE_CHANGE value in the STORAGE_WRITE_CACHE_PROPERTY structure. /// // https://docs.microsoft.com/en-us/windows/win32/api/winioctl/ne-winioctl-write_cache_change typedef enum _WRITE_CACHE_CHANGE { // WriteCacheChangeUnknown, WriteCacheNotChangeable, WriteCacheChangeable } WRITE_CACHE_CHANGE; [PInvokeData("winioctl.h", MSDNShortId = "a6974092-fa4f-4524-96ec-b4fad0b8c5ea")] public enum WRITE_CACHE_CHANGE { /// The system cannot report the write cache change capability of the device. WriteCacheChangeUnknown, /// Host software cannot change the characteristics of the device's write cache. WriteCacheNotChangeable, /// Host software can change the characteristics of the device's write cache. WriteCacheChangeable, } /// Indicates whether the write cache is enabled or disabled. /// /// The IOCTL_STORAGE_QUERY_PROPERTY control code reports a WRITE_CACHE_ENABLE value in the STORAGE_WRITE_CACHE_PROPERTY structure. /// // https://docs.microsoft.com/en-us/windows/win32/api/winioctl/ne-winioctl-write_cache_enable typedef enum _WRITE_CACHE_ENABLE { // WriteCacheEnableUnknown, WriteCacheDisabled, WriteCacheEnabled } WRITE_CACHE_ENABLE; [PInvokeData("winioctl.h", MSDNShortId = "3ed8bc79-d8f9-4a57-a37c-46202d639a63")] public enum WRITE_CACHE_ENABLE { /// The system cannot report whether the device's write cache is enabled or disabled. WriteCacheEnableUnknown, /// The device's write cache is disabled. WriteCacheDisabled, /// The device's write cache is enabled. WriteCacheEnabled, } /// Specifies the cache type. /// /// /// There are two main types of write cache: write back and write through. With a write-back cache, the device does not copy cache /// data to nonvolatile media until absolutely necessary. This type of operation improves the performance of write operations. With a /// write-through cache, the device writes data to the cache and the media in parallel. This type of operation does not improve write /// performance, but it makes subsequent read operations faster. /// /// /// The IOCTL_STORAGE_QUERY_PROPERTY control code reports a WRITE_CACHE_TYPE value in the STORAGE_WRITE_CACHE_PROPERTY structure. /// /// // https://docs.microsoft.com/en-us/windows/win32/api/winioctl/ne-winioctl-write_cache_type typedef enum _WRITE_CACHE_TYPE { // WriteCacheTypeUnknown, WriteCacheTypeNone, WriteCacheTypeWriteBack, WriteCacheTypeWriteThrough } WRITE_CACHE_TYPE; [PInvokeData("winioctl.h", MSDNShortId = "fb861a65-5207-4af3-b994-0883febcbb0a")] public enum WRITE_CACHE_TYPE { /// The system cannot report the type of the write cache. WriteCacheTypeUnknown, /// The device does not have a write cache. WriteCacheTypeNone, /// The device has a write-back cache. WriteCacheTypeWriteBack, /// The device has a write-through cache. WriteCacheTypeWriteThrough, } /// Specifies whether a storage device supports write-through caching. /// The IOCTL_STORAGE_QUERY_PROPERTY control code reports this value in the STORAGE_WRITE_CACHE_PROPERTY structure. // https://docs.microsoft.com/en-us/windows/win32/api/winioctl/ne-winioctl-write_through typedef enum _WRITE_THROUGH { // WriteThroughUnknown, WriteThroughNotSupported, WriteThroughSupported } WRITE_THROUGH; [PInvokeData("winioctl.h", MSDNShortId = "8bb26be1-ad02-4cf0-8505-021f922f34bf")] public enum WRITE_THROUGH { /// Indicates that no information is available about the write-through capabilities of the device. WriteThroughUnknown, /// Indicates that the device does not support write-through caching. WriteThroughNotSupported, /// Indicates that the device supports write-through caching. WriteThroughSupported, } } }