[PSDK] Import definitions needed by newer storage class drivers

CORE-17129
This commit is contained in:
Victor Perevertkin 2020-08-24 04:04:32 +03:00
parent 4aaf54e0a4
commit 075871076c
No known key found for this signature in database
GPG Key ID: C750B7222E9C7830
6 changed files with 902 additions and 68 deletions

View File

@ -56,6 +56,7 @@ DEFINE_DEVPROPKEY(DEVPKEY_Device_RemovalPolicyOverride, 0xa45c254e,0xdf1c,0x4efd
DEFINE_DEVPROPKEY(DEVPKEY_Device_InstallState, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 36);
DEFINE_DEVPROPKEY(DEVPKEY_Device_LocationPaths, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 37);
DEFINE_DEVPROPKEY(DEVPKEY_Device_BaseContainerId, 0xa45c254e,0xdf1c,0x4efd,0x80,0x20,0x67,0xd1,0x46,0xa8,0x50,0xe0, 38);
DEFINE_DEVPROPKEY(DEVPKEY_Device_InLocalMachineContainer, 0x8c7ed206, 0x3f8a, 0x4827, 0xb3, 0xab, 0xae, 0x9e, 0x1f, 0xae, 0xfc, 0x6c, 4);
DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterface_FriendlyName, 0x026e516e,0x8b14,0x414b,0x83,0xcd,0x85,0x6d,0x6f,0xef,0x48,0x22, 2);
DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterface_Enabled, 0x026e516e,0x8b14,0x414b,0x83,0xcd,0x85,0x6d,0x6f,0xef,0x48,0x22, 3);

View File

@ -90,18 +90,18 @@ typedef struct _DEVPROPKEY {
#ifdef INITGUID
#ifdef __cplusplus
#define DEFINE_DEVPROPKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) \
EXTERN_C const DEVPROPKEY DECLSPEC_HIDDEN DECLSPEC_SELECTANY name = { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }, pid }
EXTERN_C const DEVPROPKEY DECLSPEC_SELECTANY name = { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }, pid }
#else
#define DEFINE_DEVPROPKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) \
const DEVPROPKEY DECLSPEC_HIDDEN DECLSPEC_SELECTANY name = { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }, pid }
const DEVPROPKEY DECLSPEC_SELECTANY name = { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }, pid }
#endif
#else
#ifdef __GNUC__
#define DEFINE_DEVPROPKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) \
EXTERN_C const DEVPROPKEY DECLSPEC_HIDDEN name
EXTERN_C const DEVPROPKEY name
#else
#define DEFINE_DEVPROPKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) \
EXTERN_C const DEVPROPKEY DECLSPEC_HIDDEN DECLSPEC_SELECTANY name
EXTERN_C const DEVPROPKEY DECLSPEC_SELECTANY name
#endif
#endif /* INITGUID */

View File

@ -43,6 +43,9 @@ extern "C" {
#define IOCTL_DISK_BASE FILE_DEVICE_DISK
#define IOCTL_DISK_ARE_VOLUMES_READY \
CTL_CODE(IOCTL_DISK_BASE, 0x0087, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_DISK_CHECK_VERIFY \
CTL_CODE(IOCTL_DISK_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
@ -58,6 +61,9 @@ extern "C" {
#define IOCTL_DISK_FIND_NEW_DEVICES \
CTL_CODE(IOCTL_DISK_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_DISK_FORMAT_DRIVE \
CTL_CODE(IOCTL_DISK_BASE, 0x00f3, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_FORMAT_TRACKS \
CTL_CODE(IOCTL_DISK_BASE, 0x0006, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
@ -67,6 +73,15 @@ extern "C" {
#define IOCTL_DISK_GET_CACHE_INFORMATION \
CTL_CODE(IOCTL_DISK_BASE, 0x0035, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_DISK_GET_CACHE_SETTING \
CTL_CODE(IOCTL_DISK_BASE, 0x0038, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_DISK_GET_CLUSTER_INFO \
CTL_CODE(IOCTL_DISK_BASE, 0x0085, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_DISK_GET_DISK_ATTRIBUTES \
CTL_CODE(IOCTL_DISK_BASE, 0x003c, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_DISK_GET_DRIVE_GEOMETRY \
CTL_CODE(IOCTL_DISK_BASE, 0x0000, METHOD_BUFFERED, FILE_ANY_ACCESS)
@ -85,12 +100,24 @@ extern "C" {
#define IOCTL_DISK_GET_LENGTH_INFO \
CTL_CODE(IOCTL_DISK_BASE, 0x0017, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_DISK_GET_PARTITION_ATTRIBUTES \
CTL_CODE(IOCTL_DISK_BASE, 0x003a, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_DISK_GET_PARTITION_INFO \
CTL_CODE(IOCTL_DISK_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_DISK_GET_PARTITION_INFO_EX \
CTL_CODE(IOCTL_DISK_BASE, 0x0012, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_DISK_GET_PERFORMANCE_INFO \
CTL_CODE(IOCTL_DISK_BASE, 0x0089, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_DISK_GET_SAN_SETTINGS \
CTL_CODE(IOCTL_DISK_BASE, 0x0080, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_DISK_GET_SNAPSHOT_INFO \
CTL_CODE(IOCTL_DISK_BASE, 0x0082, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_DISK_GROW_PARTITION \
CTL_CODE(IOCTL_DISK_BASE, 0x0034, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
@ -112,6 +139,9 @@ extern "C" {
#define IOCTL_DISK_INTERNAL_SET_NOTIFY \
CTL_CODE(IOCTL_DISK_BASE, 0x0102, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_DISK_IS_CLUSTERED \
CTL_CODE(IOCTL_DISK_BASE, 0x003e, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_DISK_IS_WRITABLE \
CTL_CODE(IOCTL_DISK_BASE, 0x0009, METHOD_BUFFERED, FILE_ANY_ACCESS)
@ -133,6 +163,9 @@ extern "C" {
#define IOCTL_DISK_REQUEST_STRUCTURE \
CTL_CODE(IOCTL_DISK_BASE, 0x000f, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_DISK_RESET_SNAPSHOT_INFO \
CTL_CODE(IOCTL_DISK_BASE, 0x0084, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_MEDIA_REMOVAL \
CTL_CODE(IOCTL_DISK_BASE, 0x0201, METHOD_BUFFERED, FILE_READ_ACCESS)
@ -142,6 +175,9 @@ extern "C" {
#define IOCTL_DISK_LOAD_MEDIA \
CTL_CODE(IOCTL_DISK_BASE, 0x0203, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_DISK_REASSIGN_BLOCKS_EX \
CTL_CODE(IOCTL_DISK_BASE, 0x0029, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_RESERVE \
CTL_CODE(IOCTL_DISK_BASE, 0x0204, METHOD_BUFFERED, FILE_READ_ACCESS)
@ -151,9 +187,42 @@ extern "C" {
#define IOCTL_DISK_FIND_NEW_DEVICES \
CTL_CODE(IOCTL_DISK_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_DISK_SENSE_DEVICE \
CTL_CODE(IOCTL_DISK_BASE, 0x00f8, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_DISK_SET_CACHE_INFORMATION \
CTL_CODE(IOCTL_DISK_BASE, 0x0036, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_SET_CACHE_SETTING \
CTL_CODE(IOCTL_DISK_BASE, 0x0039, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_SET_CLUSTER_INFO \
CTL_CODE(IOCTL_DISK_BASE, 0x0086, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_SET_DISK_ATTRIBUTES \
CTL_CODE(IOCTL_DISK_BASE, 0x003d, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_SET_DRIVE_LAYOUT \
CTL_CODE(IOCTL_DISK_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_SET_DRIVE_LAYOUT_EX \
CTL_CODE(IOCTL_DISK_BASE, 0x0015, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_SET_PARTITION_ATTRIBUTES \
CTL_CODE(IOCTL_DISK_BASE, 0x003b, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_SET_PARTITION_INFO \
CTL_CODE(IOCTL_DISK_BASE, 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_SET_PARTITION_INFO_EX \
CTL_CODE(IOCTL_DISK_BASE, 0x0013, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_SET_SAN_SETTINGS \
CTL_CODE(IOCTL_DISK_BASE, 0x0081, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_SET_SNAPSHOT_INFO \
CTL_CODE(IOCTL_DISK_BASE, 0x0083, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
//
// NTDDI_WIN2003 was an older define used in the early beta builds, which
// Microsoft forgot to fix in a few headers.
@ -167,24 +236,18 @@ extern "C" {
CTL_CODE(IOCTL_DISK_BASE, 0x0037, METHOD_BUFFERED, FILE_READ_ACCESS)
#endif
#define IOCTL_DISK_SET_DRIVE_LAYOUT \
CTL_CODE(IOCTL_DISK_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_SET_DRIVE_LAYOUT_EX \
CTL_CODE(IOCTL_DISK_BASE, 0x0015, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_SET_PARTITION_INFO \
CTL_CODE(IOCTL_DISK_BASE, 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_SET_PARTITION_INFO_EX \
CTL_CODE(IOCTL_DISK_BASE, 0x0013, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_UPDATE_DRIVE_SIZE \
CTL_CODE(IOCTL_DISK_BASE, 0x0032, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_UPDATE_PROPERTIES \
CTL_CODE(IOCTL_DISK_BASE, 0x0050, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_DISK_VERIFY \
CTL_CODE(IOCTL_DISK_BASE, 0x0005, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_DISK_VOLUMES_ARE_READY \
CTL_CODE(IOCTL_DISK_BASE, 0x0088, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_COPY_DATA \
CTL_CODE(IOCTL_DISK_BASE, 0x0019, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
@ -200,17 +263,6 @@ extern "C" {
#define SMART_SEND_DRIVE_COMMAND \
CTL_CODE(IOCTL_DISK_BASE, 0x0021, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#if(_WIN32_WINNT >= 0x0500)
#define IOCTL_DISK_UPDATE_DRIVE_SIZE CTL_CODE(IOCTL_DISK_BASE, 0x0032, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_GROW_PARTITION CTL_CODE(IOCTL_DISK_BASE, 0x0034, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_GET_CACHE_INFORMATION CTL_CODE(IOCTL_DISK_BASE, 0x0035, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_DISK_SET_CACHE_INFORMATION CTL_CODE(IOCTL_DISK_BASE, 0x0036, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_DELETE_DRIVE_LAYOUT CTL_CODE(IOCTL_DISK_BASE, 0x0040, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_UPDATE_PROPERTIES CTL_CODE(IOCTL_DISK_BASE, 0x0050, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_DISK_FORMAT_DRIVE CTL_CODE(IOCTL_DISK_BASE, 0x00f3, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DISK_SENSE_DEVICE CTL_CODE(IOCTL_DISK_BASE, 0x00f8, METHOD_BUFFERED, FILE_ANY_ACCESS)
#endif
#define PARTITION_ENTRY_UNUSED 0x00
#define PARTITION_FAT_12 0x01
#define PARTITION_XENIX_1 0x02
@ -224,9 +276,23 @@ extern "C" {
#define PARTITION_FAT32_XINT13 0x0C
#define PARTITION_XINT13 0x0E
#define PARTITION_XINT13_EXTENDED 0x0F
#define PARTITION_MSFT_RECOVERY 0x27
#define PARTITION_MAIN_OS 0x28
#define PARTIITON_OS_DATA 0x29
#define PARTITION_PRE_INSTALLED 0x2a
#define PARTITION_BSP 0x2b
#define PARTITION_DPP 0x2c
#define PARTITION_WINDOWS_SYSTEM 0x2d
#define PARTITION_PREP 0x41
#define PARTITION_LDM 0x42
#define PARTITION_DM 0x54
#define PARTITION_EZDRIVE 0x55
#define PARTITION_UNIX 0x63
#define PARTITION_SPACES_DATA 0xD7
#define PARTITION_SPACES 0xE7
#define PARTITION_GPT 0xEE
#define PARTITION_SYSTEM 0xEF
#define VALID_NTFT 0xC0
#define PARTITION_NTFT 0x80
#ifdef __REACTOS__
@ -338,11 +404,6 @@ typedef enum _DETECTION_TYPE {
DetectExInt13
} DETECTION_TYPE;
typedef struct _DISK_CONTROLLER_NUMBER {
ULONG ControllerNumber;
ULONG DiskNumber;
} DISK_CONTROLLER_NUMBER, *PDISK_CONTROLLER_NUMBER;
typedef struct _DISK_INT13_INFO {
USHORT DriveSelect;
ULONG MaxCylinders;
@ -490,6 +551,9 @@ typedef struct _DRIVE_LAYOUT_INFORMATION {
typedef struct _DRIVE_LAYOUT_INFORMATION_MBR {
ULONG Signature;
#if (NTDDI_VERSION >= NTDDI_WIN10_RS1)
ULONG CheckSum;
#endif
} DRIVE_LAYOUT_INFORMATION_MBR, *PDRIVE_LAYOUT_INFORMATION_MBR;
typedef struct _DRIVE_LAYOUT_INFORMATION_GPT {
@ -538,6 +602,12 @@ typedef struct _REASSIGN_BLOCKS {
ULONG BlockNumber[1];
} REASSIGN_BLOCKS, *PREASSIGN_BLOCKS;
typedef struct _REASSIGN_BLOCKS_EX {
USHORT Reserved;
USHORT Count;
LARGE_INTEGER BlockNumber[1];
} REASSIGN_BLOCKS_EX, *PREASSIGN_BLOCKS_EX;
typedef struct _SET_PARTITION_INFORMATION {
UCHAR PartitionType;
} SET_PARTITION_INFORMATION, *PSET_PARTITION_INFORMATION;
@ -731,6 +801,165 @@ typedef struct _DISK_GROW_PARTITION {
} DISK_GROW_PARTITION, *PDISK_GROW_PARTITION;
#endif
// for IOCTL_DISK_CONTROLLER_NUMBER
typedef struct _DISK_CONTROLLER_NUMBER {
ULONG ControllerNumber;
ULONG DiskNumber;
} DISK_CONTROLLER_NUMBER, *PDISK_CONTROLLER_NUMBER;
// for IOCTL_DISK_COPY_DATA
typedef struct _DISK_COPY_DATA_PARAMETERS {
LARGE_INTEGER SourceOffset;
LARGE_INTEGER DestinationOffset;
LARGE_INTEGER CopyLength;
ULONGLONG Reserved;
} DISK_COPY_DATA_PARAMETERS, *PDISK_COPY_DATA_PARAMETERS;
// for IOCTL_DISK_GET_CACHE_SETTING and IOCTL_DISK_SET_CACHE_SETTING
typedef enum _DISK_CACHE_STATE {
DiskCacheNormal,
DiskCacheWriteThroughNotSupported,
DiskCacheModifyUnsuccessful
} DISK_CACHE_STATE, *PDISK_CACHE_STATE;
typedef struct _DISK_CACHE_SETTING {
ULONG Version;
DISK_CACHE_STATE State;
BOOLEAN IsPowerProtected;
} DISK_CACHE_SETTING, *PDISK_CACHE_SETTING;
#if (NTDDI_VERSION >= NTDDI_VISTA)
// for IOCTL_DISK_GET_PARTITION_ATTRIBUTES and IOCTL_DISK_SET_PARTITION_ATTRIBUTES
typedef struct _GET_PARTITION_ATTRIBUTES {
ULONG Version;
ULONG Reserved1;
ULONGLONG Attributes;
} GET_PARTITION_ATTRIBUTES, *PGET_PARTITION_ATTRIBUTES;
typedef struct _SET_PARTITION_ATTRIBUTES {
ULONG Version;
BOOLEAN Persist;
BOOLEAN Reserved1[3];
ULONGLONG Attributes;
ULONGLONG AttributesMask;
} SET_PARTITION_ATTRIBUTES, *PSET_PARTITION_ATTRIBUTES;
// for IOCTL_DISK_GET_DISK_ATTRIBUTES and IOCTL_DISK_SET_DISK_ATTRIBUTES
#define DISK_ATTRIBUTE_OFFLINE 0x0000000000000001
#define DISK_ATTRIBUTE_READ_ONLY 0x0000000000000002
#define DISK_ATTRIBUTE_HIDDEN 0x0000000000000004
#define DISK_ATTRIBUTE_MAINTENANCE 0x0000000000000008
#define DISK_ATTRIBUTE_SPACES_BYPASS 0x0000000000000010
typedef struct _GET_DISK_ATTRIBUTES {
ULONG Version;
ULONG Reserved1;
ULONGLONG Attributes;
} GET_DISK_ATTRIBUTES, *PGET_DISK_ATTRIBUTES;
typedef struct _SET_DISK_ATTRIBUTES {
ULONG Version;
BOOLEAN Persist;
BOOLEAN RelinquishOwnership;
BOOLEAN Reserved1[2];
ULONGLONG Attributes;
ULONGLONG AttributesMask;
GUID Owner;
} SET_DISK_ATTRIBUTES, *PSET_DISK_ATTRIBUTES;
// for IOCTL_DISK_GET_SAN_SETTINGS and IOCTL_DISK_SET_SAN_SETTINGS
typedef enum _DISK_SAN_POLICY {
DiskSanPolicyUnknown,
DiskSanPolicyOnline,
DiskSanPolicyOfflineShared,
DiskSanPolicyOffline,
DiskSanPolicyOfflineInternal,
DiskSanPolicyMax
} DISK_SAN_POLICY, *PDISK_SAN_POLICY;
typedef struct _DISK_SAN_SETTINGS {
ULONG Version;
DISK_SAN_POLICY SanPolicy;
} DISK_SAN_SETTINGS, *PDISK_SAN_SETTINGS;
// for IOCTL_DISK_GET_SNAPSHOT_INFO and IOCTL_DISK_SET_SNAPSHOT_INFO
typedef enum _DISK_SNAPSHOT_STATE {
DiskSnapshotNormalDisk,
DiskSnapshotSnapshotCheckRequired,
DiskSnapshotPreSnapshot,
DiskSnapshotSnapshotDisk
} DISK_SNAPSHOT_STATE, *PDISK_SNAPSHOT_STATE;
typedef struct _DISK_SNAPSHOT_INFO {
ULONG Version;
DISK_SNAPSHOT_STATE State;
GUID SnapshotSetId;
GUID SnapshotId;
GUID LunId;
LARGE_INTEGER CreationTimeStamp;
ULONG ImportCount;
ULONG Flags;
ULONG AdditionalDataSize;
UCHAR AdditionalData[ANYSIZE_ARRAY];
} DISK_SNAPSHOT_INFO, *PDISK_SNAPSHOT_INFO;
#endif /* NTDDI_VERSION >= NTDDI_VISTA */
#if (NTDDI_VERSION >= NTDDI_WIN8)
// for IOCTL_DISK_GET_CLUSTER_INFO and IOCTL_DISK_SET_CLUSTER_INFO
#define DISK_CLUSTER_FLAG_ENABLED 0x0000000000000001
#define DISK_CLUSTER_FLAG_CSV 0x0000000000000002
#define DISK_CLUSTER_FLAG_IN_MAINTENANCE 0x0000000000000004
#define DISK_CLUSTER_FLAG_PNP_ARRIVAL_COMPLETE 0x0000000000000008
typedef struct _DISK_CLUSTER_INFO {
ULONG Version;
ULONGLONG Flags;
ULONGLONG FlagsMask;
BOOLEAN Notify;
} DISK_CLUSTER_INFO, *PDISK_CLUSTER_INFO;
// for IOCTL_DISK_GET_PERFORMANCE_INFO
typedef enum _DISK_PERFORMANCE_TYPE {
DiskPerformanceTypeAllPriority,
DiskPerformanceTypeNonLowPriority,
DiskPerformanceTypeMax
} DISK_PERFORMANCE_TYPE, *PDISK_PERFORMANCE_TYPE;
typedef struct _DISK_PERFORMANCE_PARAMETERS {
ULONG Version;
DISK_PERFORMANCE_TYPE Type;
} DISK_PERFORMANCE_PARAMETERS, *PDISK_PERFORMANCE_PARAMETERS;
typedef struct _DISK_PERFORMANCE_INFO {
ULONG Version;
DISK_PERFORMANCE_TYPE Type;
LARGE_INTEGER QueryTime;
LARGE_INTEGER BytesRead;
LARGE_INTEGER BytesWritten;
LARGE_INTEGER ReadTime;
LARGE_INTEGER WriteTime;
LARGE_INTEGER FlushTime;
LARGE_INTEGER IdleTime;
ULONG ReadCount;
ULONG WriteCount;
ULONG FlushCount;
ULONG QueueDepth;
ULONG SplitCount;
} DISK_PERFORMANCE_INFO, *PDISK_PERFORMANCE_INFO;
#endif /* NTDDI_VERSION >= NTDDI_WIN8 */
#ifdef __cplusplus
}

View File

@ -170,6 +170,9 @@ DEFINE_GUID(GUID_DEVINTERFACE_HIDDEN_VOLUME,
#define IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES \
CTL_CODE(IOCTL_STORAGE_BASE, 0x0501, METHOD_BUFFERED, FILE_WRITE_ACCESS)
#define IOCTL_STORAGE_GET_LB_PROVISIONING_MAP_RESOURCES \
CTL_CODE(IOCTL_STORAGE_BASE, 0x0502, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_STORAGE_GET_BC_PROPERTIES \
CTL_CODE(IOCTL_STORAGE_BASE, 0x0600, METHOD_BUFFERED, FILE_READ_ACCESS)
@ -182,6 +185,57 @@ DEFINE_GUID(GUID_DEVINTERFACE_HIDDEN_VOLUME,
#define IOCTL_STORAGE_CHECK_PRIORITY_HINT_SUPPORT \
CTL_CODE(IOCTL_STORAGE_BASE, 0x0620, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_STORAGE_START_DATA_INTEGRITY_CHECK \
CTL_CODE(IOCTL_STORAGE_BASE, 0x0621, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_STORAGE_STOP_DATA_INTEGRITY_CHECK \
CTL_CODE(IOCTL_STORAGE_BASE, 0x0622, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_STORAGE_FIRMWARE_GET_INFO \
CTL_CODE(IOCTL_STORAGE_BASE, 0x0700, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_STORAGE_FIRMWARE_DOWNLOAD \
CTL_CODE(IOCTL_STORAGE_BASE, 0x0701, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_STORAGE_FIRMWARE_ACTIVATE \
CTL_CODE(IOCTL_STORAGE_BASE, 0x0702, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_STORAGE_ENABLE_IDLE_POWER \
CTL_CODE(IOCTL_STORAGE_BASE, 0x0720, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_STORAGE_GET_IDLE_POWERUP_REASON \
CTL_CODE(IOCTL_STORAGE_BASE, 0x0721, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_STORAGE_POWER_ACTIVE \
CTL_CODE(IOCTL_STORAGE_BASE, 0x0722, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_STORAGE_POWER_IDLE \
CTL_CODE(IOCTL_STORAGE_BASE, 0x0723, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_STORAGE_EVENT_NOTIFICATION \
CTL_CODE(IOCTL_STORAGE_BASE, 0x0724, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_STORAGE_DEVICE_POWER_CAP \
CTL_CODE(IOCTL_STORAGE_BASE, 0x0725, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_STORAGE_RPMB_COMMAND \
CTL_CODE(IOCTL_STORAGE_BASE, 0x0726, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_STORAGE_ATTRIBUTE_MANAGEMENT \
CTL_CODE(IOCTL_STORAGE_BASE, 0x0727, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_STORAGE_DIAGNOSTIC \
CTL_CODE(IOCTL_STORAGE_BASE, 0x0728, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_STORAGE_GET_PHYSICAL_ELEMENT_STATUS \
CTL_CODE(IOCTL_STORAGE_BASE, 0x0729, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_STORAGE_REMOVE_ELEMENT_AND_TRUNCATE \
CTL_CODE(IOCTL_STORAGE_BASE, 0x0730, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_STORAGE_GET_DEVICE_INTERNAL_LOG \
CTL_CODE(IOCTL_STORAGE_BASE, 0x0731, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define RECOVERED_WRITES_VALID 0x00000001
#define UNRECOVERED_WRITES_VALID 0x00000002
#define RECOVERED_READS_VALID 0x00000004
@ -207,9 +261,36 @@ DEFINE_GUID(GUID_DEVINTERFACE_HIDDEN_VOLUME,
#define IsDsmActionNonDestructive(_Action) ((BOOLEAN)((_Action & DeviceDsmActionFlag_NonDestructive) != 0))
#define DeviceDsmAction_None 0
#define DeviceDsmAction_Trim 1
#define DeviceDsmAction_Notification (2 | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_None 0x0u
#define DeviceDsmAction_Trim 0x1u
#define DeviceDsmAction_Notification (0x00000002u | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_OffloadRead (0x00000003u | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_OffloadWrite (0x00000004u)
#define DeviceDsmAction_Allocation (0x00000005u | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_Repair (0x00000006u | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_Scrub (0x00000007u | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_DrtQuery (0x00000008u | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_DrtClear (0x00000009u | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_DrtDisable (0x0000000Au | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_TieringQuery (0x0000000Bu | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_Map (0x0000000Cu | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_RegenerateParity (0x0000000Du | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_NvCache_Change_Priority (0x0000000Eu | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_NvCache_Evict (0x0000000Fu | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_TopologyIdQuery (0x00000010u | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_GetPhysicalAddresses (0x00000011u | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_ScopeRegen (0x00000012u | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_ReportZones (0x00000013u | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_OpenZone (0x00000014u | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_FinishZone (0x00000015u | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_CloseZone (0x00000016u | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_ResetWritePointer (0x00000017u)
#define DeviceDsmAction_GetRangeErrorInfo (0x00000018u | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_WriteZeroes (0x00000019u)
#define DeviceDsmAction_LostQuery (0x0000001Au | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_GetFreeSpace (0x0000001Bu | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_ConversionQuery (0x0000001Cu | DeviceDsmActionFlag_NonDestructive)
#define DeviceDsmAction_VdtSet (0x0000001Du)
#define DEVICE_DSM_FLAG_ENTIRE_DATA_SET_RANGE 0x00000001
@ -426,7 +507,34 @@ typedef enum _STORAGE_PROPERTY_ID {
StorageAccessAlignmentProperty,
StorageDeviceSeekPenaltyProperty,
StorageDeviceTrimProperty,
StorageDeviceWriteAggregationProperty
StorageDeviceWriteAggregationProperty,
StorageDeviceDeviceTelemetryProperty,
StorageDeviceLBProvisioningProperty,
StorageDevicePowerProperty,
StorageDeviceCopyOffloadProperty,
StorageDeviceResiliencyProperty,
StorageDeviceMediumProductType,
StorageAdapterRpmbProperty,
StorageAdapterCryptoProperty,
StorageDeviceTieringProperty,
StorageDeviceFaultDomainProperty,
StorageDeviceClusportProperty,
StorageDeviceDependantDevicesProperty,
StorageDeviceIoCapabilityProperty = 48,
StorageAdapterProtocolSpecificProperty,
StorageDeviceProtocolSpecificProperty,
StorageAdapterTemperatureProperty,
StorageDeviceTemperatureProperty,
StorageAdapterPhysicalTopologyProperty,
StorageDevicePhysicalTopologyProperty,
StorageDeviceAttributesProperty,
StorageDeviceManagementStatus,
StorageAdapterSerialNumberProperty,
StorageDeviceLocationProperty,
StorageDeviceNumaProperty,
StorageDeviceZonedDeviceProperty,
StorageDeviceUnsafeShutdownCount,
StorageDeviceEnduranceProperty,
} STORAGE_PROPERTY_ID, *PSTORAGE_PROPERTY_ID;
typedef struct _STORAGE_PROPERTY_QUERY {
@ -473,6 +581,10 @@ typedef _Struct_size_bytes_(Size) struct _STORAGE_ADAPTER_DESCRIPTOR {
#endif
USHORT BusMajorVersion;
USHORT BusMinorVersion;
#if (NTDDI_VERSION >= NTDDI_WIN8)
UCHAR SrbType;
UCHAR AddressType;
#endif
} STORAGE_ADAPTER_DESCRIPTOR, *PSTORAGE_ADAPTER_DESCRIPTOR;
typedef _Struct_size_bytes_(Size) struct _STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR {
@ -485,10 +597,21 @@ typedef _Struct_size_bytes_(Size) struct _STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR {
ULONG BytesOffsetForSectorAlignment;
} STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR, *PSTORAGE_ACCESS_ALIGNMENT_DESCRIPTOR;
typedef _Struct_size_bytes_(Size) struct _STORAGE_MEDIUM_PRODUCT_TYPE_DESCRIPTOR {
ULONG Version;
ULONG Size;
ULONG MediumProductType;
} STORAGE_MEDIUM_PRODUCT_TYPE_DESCRIPTOR, *PSTORAGE_MEDIUM_PRODUCT_TYPE_DESCRIPTOR;
typedef enum _STORAGE_PORT_CODE_SET {
StoragePortCodeSetReserved = 0,
StoragePortCodeSetStorport = 1,
StoragePortCodeSetSCSIport = 2
StoragePortCodeSetSCSIport = 2,
StoragePortCodeSetSpaceport= 3,
StoragePortCodeSetATAport = 4,
StoragePortCodeSetUSBport = 5,
StoragePortCodeSetSBP2port = 6,
StoragePortCodeSetSDport = 7
} STORAGE_PORT_CODE_SET, *PSTORAGE_PORT_CODE_SET;
typedef struct _STORAGE_MINIPORT_DESCRIPTOR {
@ -497,8 +620,69 @@ typedef struct _STORAGE_MINIPORT_DESCRIPTOR {
STORAGE_PORT_CODE_SET Portdriver;
BOOLEAN LUNResetSupported;
BOOLEAN TargetResetSupported;
#if (NTDDI_VERSION >= NTDDI_WIN8)
USHORT IoTimeoutValue;
#endif
#if (NTDDI_VERSION >= NTDDI_WINBLUE)
BOOLEAN ExtraIoInfoSupported;
UCHAR Reserved0[3];
ULONG Reserved1;
#endif
} STORAGE_MINIPORT_DESCRIPTOR, *PSTORAGE_MINIPORT_DESCRIPTOR;
typedef struct _DEVICE_LB_PROVISIONING_DESCRIPTOR {
ULONG Version;
ULONG Size;
UCHAR ThinProvisioningEnabled:1;
UCHAR ThinProvisioningReadZeros:1;
UCHAR AnchorSupported:3;
UCHAR UnmapGranularityAlignmentValid:1;
UCHAR Reserved0:2;
UCHAR Reserved1[7];
ULONGLONG OptimalUnmapGranularity;
ULONGLONG UnmapGranularityAlignment;
#if (NTDDI_VERSION >= NTDDI_WINBLUE)
ULONG MaxUnmapLbaCount;
ULONG MaxUnmapBlockDescriptorCount;
#endif
} DEVICE_LB_PROVISIONING_DESCRIPTOR, *PDEVICE_LB_PROVISIONING_DESCRIPTOR;
#define DEVICE_LB_PROVISIONING_DESCRIPTOR_V1_SIZE RTL_SIZEOF_THROUGH_FIELD(DEVICE_LB_PROVISIONING_DESCRIPTOR, UnmapGranularityAlignment)
typedef struct _DEVICE_POWER_DESCRIPTOR {
ULONG Version;
ULONG Size;
BOOLEAN DeviceAttentionSupported;
BOOLEAN AsynchronousNotificationSupported;
BOOLEAN IdlePowerManagementEnabled;
BOOLEAN D3ColdEnabled;
BOOLEAN D3ColdSupported;
BOOLEAN NoVerifyDuringIdlePower;
UCHAR Reserved[2];
ULONG IdleTimeoutInMS;
} DEVICE_POWER_DESCRIPTOR, *PDEVICE_POWER_DESCRIPTOR;
typedef struct _DEVICE_COPY_OFFLOAD_DESCRIPTOR {
ULONG Version;
ULONG Size;
ULONG MaximumTokenLifetime;
ULONG DefaultTokenLifetime;
ULONGLONG MaximumTransferSize;
ULONGLONG OptimalTransferCount;
ULONG MaximumDataDescriptors;
ULONG MaximumTransferLengthPerDescriptor;
ULONG OptimalTransferLengthPerDescriptor;
USHORT OptimalTransferLengthGranularity;
UCHAR Reserved[2];
} DEVICE_COPY_OFFLOAD_DESCRIPTOR, *PDEVICE_COPY_OFFLOAD_DESCRIPTOR;
typedef _Struct_size_bytes_(Size) struct _STORAGE_DEVICE_IO_CAPABILITY_DESCRIPTOR {
ULONG Version;
ULONG Size;
ULONG LunMaxIoCount;
ULONG AdapterMaxIoCount;
} STORAGE_DEVICE_IO_CAPABILITY_DESCRIPTOR, *PSTORAGE_DEVICE_IO_CAPABILITY_DESCRIPTOR;
typedef enum _STORAGE_IDENTIFIER_CODE_SET {
StorageIdCodeSetReserved = 0,
StorageIdCodeSetBinary = 1,
@ -702,6 +886,195 @@ typedef _Struct_size_bytes_(Size) struct _STORAGE_WRITE_CACHE_PROPERTY {
BOOLEAN NVCacheEnabled;
} STORAGE_WRITE_CACHE_PROPERTY, *PSTORAGE_WRITE_CACHE_PROPERTY;
typedef struct _STORAGE_LB_PROVISIONING_MAP_RESOURCES {
ULONG Size;
ULONG Version;
UCHAR AvailableMappingResourcesValid:1;
UCHAR UsedMappingResourcesValid:1;
UCHAR Reserved0:6;
UCHAR Reserved1[3];
UCHAR AvailableMappingResourcesScope:2;
UCHAR UsedMappingResourcesScope:2;
UCHAR Reserved2:4;
UCHAR Reserved3[3];
ULONGLONG AvailableMappingResources;
ULONGLONG UsedMappingResources;
} STORAGE_LB_PROVISIONING_MAP_RESOURCES, *PSTORAGE_LB_PROVISIONING_MAP_RESOURCES;
typedef struct _DEVICE_MANAGE_DATA_SET_ATTRIBUTES_OUTPUT {
ULONG Size;
DEVICE_DATA_MANAGEMENT_SET_ACTION Action;
ULONG Flags;
ULONG OperationStatus;
ULONG ExtendedError;
ULONG TargetDetailedError;
ULONG ReservedStatus;
ULONG OutputBlockOffset;
ULONG OutputBlockLength;
} DEVICE_MANAGE_DATA_SET_ATTRIBUTES_OUTPUT, *PDEVICE_MANAGE_DATA_SET_ATTRIBUTES_OUTPUT;
typedef struct _DEVICE_DATA_SET_LB_PROVISIONING_STATE {
ULONG Size;
ULONG Version;
ULONGLONG SlabSizeInBytes;
ULONG SlabOffsetDeltaInBytes;
ULONG SlabAllocationBitMapBitCount;
ULONG SlabAllocationBitMapLength;
ULONG SlabAllocationBitMap[ANYSIZE_ARRAY];
} DEVICE_DATA_SET_LB_PROVISIONING_STATE, *PDEVICE_DATA_SET_LB_PROVISIONING_STATE,
DEVICE_DSM_ALLOCATION_OUTPUT, *PDEVICE_DSM_ALLOCATION_OUTPUT;
#define DEVICE_DSM_ALLOCATION_OUTPUT_V1 (sizeof(DEVICE_DSM_ALLOCATION_OUTPUT))
#define DEVICE_DATA_SET_LB_PROVISIONING_STATE_VERSION_V1 DEVICE_DSM_ALLOCATION_OUTPUT_V1
typedef struct _DEVICE_DATA_SET_LB_PROVISIONING_STATE_V2 {
ULONG Size;
ULONG Version;
ULONGLONG SlabSizeInBytes;
ULONGLONG SlabOffsetDeltaInBytes;
ULONG SlabAllocationBitMapBitCount;
ULONG SlabAllocationBitMapLength;
ULONG SlabAllocationBitMap[ANYSIZE_ARRAY];
} DEVICE_DATA_SET_LB_PROVISIONING_STATE_V2, *PDEVICE_DATA_SET_LB_PROVISIONING_STATE_V2,
DEVICE_DSM_ALLOCATION_OUTPUT2, *PDEVICE_DSM_ALLOCATION_OUTPUT2;
#define DEVICE_DSM_ALLOCATION_OUTPUT_V2 (sizeof(DEVICE_DSM_ALLOCATION_OUTPUT2))
#define DEVICE_DATA_SET_LB_PROVISIONING_STATE_VERSION_V2 DEVICE_DSM_ALLOCATION_OUTPUT_V2
#define DeviceDsmDefinition_Allocation {DeviceDsmAction_Allocation, \
TRUE, \
__alignof(DEVICE_DSM_ALLOCATION_PARAMETERS), \
sizeof(DEVICE_DSM_ALLOCATION_PARAMETERS), \
TRUE, \
__alignof(DEVICE_DSM_ALLOCATION_OUTPUT2), \
sizeof(DEVICE_DSM_ALLOCATION_OUTPUT2)}
#define DEVICE_DSM_FLAG_ALLOCATION_CONSOLIDATEABLE_ONLY 0x40000000
typedef struct _DEVICE_DATA_SET_LBP_STATE_PARAMETERS {
ULONG Version;
ULONG Size;
ULONG Flags;
ULONG OutputVersion;
} DEVICE_DATA_SET_LBP_STATE_PARAMETERS, *PDEVICE_DATA_SET_LBP_STATE_PARAMETERS,
DEVICE_DSM_ALLOCATION_PARAMETERS, *PDEVICE_DSM_ALLOCATION_PARAMETERS;
typedef struct _STORAGE_EVENT_NOTIFICATION {
ULONG Version;
ULONG Size;
ULONGLONG Events;
} STORAGE_EVENT_NOTIFICATION, *PSTORAGE_EVENT_NOTIFICATION;
#define STORAGE_EVENT_NOTIFICATION_VERSION_V1 1
#define STORAGE_EVENT_MEDIA_STATUS 0x0000000000000001
#define STORAGE_EVENT_DEVICE_STATUS 0x0000000000000002
#define STORAGE_EVENT_DEVICE_OPERATION 0x0000000000000004
#define STORAGE_EVENT_ALL (STORAGE_EVENT_MEDIA_STATUS | STORAGE_EVENT_DEVICE_STATUS | STORAGE_EVENT_DEVICE_OPERATION)
#define STORAGE_OFFLOAD_MAX_TOKEN_LENGTH 512
#define STORAGE_OFFLOAD_TOKEN_ID_LENGTH 0x1F8
#define STORAGE_OFFLOAD_TOKEN_TYPE_ZERO_DATA 0xFFFF0001
typedef struct _STORAGE_OFFLOAD_TOKEN {
UCHAR TokenType[4];
UCHAR Reserved[2];
UCHAR TokenIdLength[2];
union {
struct {
UCHAR Reserved2[STORAGE_OFFLOAD_TOKEN_ID_LENGTH];
} StorageOffloadZeroDataToken;
UCHAR Token[STORAGE_OFFLOAD_TOKEN_ID_LENGTH];
} DUMMYUNIONNAME;
} STORAGE_OFFLOAD_TOKEN, *PSTORAGE_OFFLOAD_TOKEN;
#define MAKE_ZERO_TOKEN(T) ( \
((PSTORAGE_OFFLOAD_TOKEN)T)->TokenType[0] = 0xFF, \
((PSTORAGE_OFFLOAD_TOKEN)T)->TokenType[1] = 0xFF, \
((PSTORAGE_OFFLOAD_TOKEN)T)->TokenType[2] = 0x00, \
((PSTORAGE_OFFLOAD_TOKEN)T)->TokenType[3] = 0x01, \
((PSTORAGE_OFFLOAD_TOKEN)T)->TokenIdLength[0] = 0x01, \
((PSTORAGE_OFFLOAD_TOKEN)T)->TokenIdLength[1] = 0xF8 \
)
#define IS_ZERO_TOKEN(T) ( \
(((PSTORAGE_OFFLOAD_TOKEN)T)->TokenType[0] == 0xFF && \
((PSTORAGE_OFFLOAD_TOKEN)T)->TokenType[1] == 0xFF && \
((PSTORAGE_OFFLOAD_TOKEN)T)->TokenType[2] == 0x00 && \
((PSTORAGE_OFFLOAD_TOKEN)T)->TokenType[3] == 0x01 && \
((PSTORAGE_OFFLOAD_TOKEN)T)->TokenIdLength[0] == 0x01 && \
((PSTORAGE_OFFLOAD_TOKEN)T)->TokenIdLength[1] == 0xF8) \
)
typedef struct _DEVICE_DSM_OFFLOAD_READ_PARAMETERS {
ULONG Flags;
ULONG TimeToLive;
ULONG Reserved[2];
} DEVICE_DSM_OFFLOAD_READ_PARAMETERS, *PDEVICE_DSM_OFFLOAD_READ_PARAMETERS;
#define STORAGE_OFFLOAD_READ_RANGE_TRUNCATED 0x00000001
typedef struct _STORAGE_OFFLOAD_READ_OUTPUT {
ULONG OffloadReadFlags;
ULONG Reserved;
ULONGLONG LengthProtected;
ULONG TokenLength;
STORAGE_OFFLOAD_TOKEN Token;
} STORAGE_OFFLOAD_READ_OUTPUT, *PSTORAGE_OFFLOAD_READ_OUTPUT;
#define DeviceDsmDefinition_OffloadRead {DeviceDsmAction_OffloadRead, \
FALSE, \
__alignof(DEVICE_DSM_OFFLOAD_READ_PARAMETERS), \
sizeof(DEVICE_DSM_OFFLOAD_READ_PARAMETERS), \
FALSE, \
__alignof(STORAGE_OFFLOAD_READ_OUTPUT), \
sizeof(STORAGE_OFFLOAD_READ_OUTPUT)}
typedef struct _DEVICE_DSM_OFFLOAD_WRITE_PARAMETERS {
ULONG Flags;
ULONG Reserved;
ULONGLONG TokenOffset;
STORAGE_OFFLOAD_TOKEN Token;
} DEVICE_DSM_OFFLOAD_WRITE_PARAMETERS, *PDEVICE_DSM_OFFLOAD_WRITE_PARAMETERS;
#define STORAGE_OFFLOAD_WRITE_RANGE_TRUNCATED 0x0001
#define STORAGE_OFFLOAD_TOKEN_INVALID 0x0002
typedef struct _STORAGE_OFFLOAD_WRITE_OUTPUT {
ULONG OffloadWriteFlags;
ULONG Reserved;
ULONGLONG LengthCopied;
} STORAGE_OFFLOAD_WRITE_OUTPUT, *PSTORAGE_OFFLOAD_WRITE_OUTPUT;
#define DeviceDsmDefinition_OffloadWrite {DeviceDsmAction_OffloadWrite, \
FALSE, \
__alignof(DEVICE_DSM_OFFLOAD_WRITE_PARAMETERS), \
sizeof(DEVICE_DSM_OFFLOAD_WRITE_PARAMETERS), \
FALSE, \
__alignof(STORAGE_OFFLOAD_WRITE_OUTPUT), \
sizeof(STORAGE_OFFLOAD_WRITE_OUTPUT)}
#define READ_COPY_NUMBER_KEY 0x52434e00 //'RCN'
#define READ_COPY_NUMBER_BYPASS_CACHE_FLAG 0x00000100
#define IsKeyReadCopyNumber(_k) (((_k) & 0xFFFFFE00) == READ_COPY_NUMBER_KEY)
#define IsKeyReadCopyNumberBypassCache(_k) ((_k) & READ_COPY_NUMBER_BYPASS_CACHE_FLAG)
#define SetReadCopyNumberBypassCacheToKey(_k) ((_k) |= READ_COPY_NUMBER_BYPASS_CACHE_FLAG)
#define ReadCopyNumberToKey(_c) (READ_COPY_NUMBER_KEY | (UCHAR)(_c))
#define ReadCopyNumberFromKey(_k) (UCHAR)((_k) & 0x000000FF)
typedef struct _STORAGE_IDLE_POWER {
ULONG Version;
ULONG Size;
ULONG WakeCapableHint:1;
ULONG D3ColdSupported:1;
ULONG Reserved:30;
ULONG D3IdleTimeout;
} STORAGE_IDLE_POWER, *PSTORAGE_IDLE_POWER;
#ifdef __cplusplus
}
#endif

View File

@ -25,40 +25,63 @@
#define FACILITY_IO_ERROR_CODE 0x4
#define FACILITY_MCA_ERROR_CODE 0x5
#define IO_ERR_RETRY_SUCCEEDED ((NTSTATUS)0x00040001L)
#define IO_ERR_INSUFFICIENT_RESOURCES ((NTSTATUS)0xC0040002L)
#define IO_ERR_CONFIGURATION_ERROR ((NTSTATUS)0xC0040003L)
#define IO_ERR_DRIVER_ERROR ((NTSTATUS)0xC0040004L)
#define IO_ERR_PARITY ((NTSTATUS)0xC0040005L)
#define IO_ERR_SEEK_ERROR ((NTSTATUS)0xC0040006L)
#define IO_ERR_BAD_BLOCK ((NTSTATUS)0xC0040007L)
#define IO_ERR_OVERRUN_ERROR ((NTSTATUS)0xC0040008L)
#define IO_ERR_TIMEOUT ((NTSTATUS)0xC0040009L)
#define IO_ERR_SEQUENCE ((NTSTATUS)0xC004000AL)
#define IO_ERR_CONTROLLER_ERROR ((NTSTATUS)0xC004000BL)
#define IO_ERR_NOT_READY ((NTSTATUS)0xC004000FL)
#define IO_ERR_INVALID_REQUEST ((NTSTATUS)0xC0040010L)
#define IO_ERR_RESET ((NTSTATUS)0xC0040013L)
#define IO_ERR_BAD_FIRMWARE ((NTSTATUS)0xC0040019L)
#define IO_WRN_BAD_FIRMWARE ((NTSTATUS)0x8004001AL)
#define IO_WRITE_CACHE_ENABLED ((NTSTATUS)0x80040020L)
#define IO_RECOVERED_VIA_ECC ((NTSTATUS)0x80040021L)
#define IO_WRITE_CACHE_DISABLED ((NTSTATUS)0x80040022L)
#define IO_WARNING_PAGING_FAILURE ((NTSTATUS)0x80040033L)
#define IO_WRN_FAILURE_PREDICTED ((NTSTATUS)0x80040034L)
#define IO_WARNING_ALLOCATION_FAILED ((NTSTATUS)0x80040038L)
#define IO_WARNING_DUPLICATE_SIGNATURE ((NTSTATUS)0x8004003AL)
#define IO_WARNING_DUPLICATE_PATH ((NTSTATUS)0x8004003BL)
#define IO_WARNING_WRITE_FUA_PROBLEM ((NTSTATUS)0x80040084L)
#define IO_WARNING_VOLUME_LOST_DISK_EXTENT ((NTSTATUS)0x8004008EL)
#define IO_WARNING_DEVICE_HAS_INTERNAL_DUMP ((NTSTATUS)0x8004008FL)
#define IO_WARNING_SOFT_THRESHOLD_REACHED ((NTSTATUS)0x80040090L)
#define IO_WARNING_SOFT_THRESHOLD_REACHED_EX ((NTSTATUS)0x80040091L)
#define IO_WARNING_SOFT_THRESHOLD_REACHED_EX_LUN_LUN ((NTSTATUS)0x80040092L)
#define IO_WARNING_SOFT_THRESHOLD_REACHED_EX_LUN_POOL ((NTSTATUS)0x80040093L)
#define IO_WARNING_SOFT_THRESHOLD_REACHED_EX_POOL_LUN ((NTSTATUS)0x80040094L)
#define IO_WARNING_SOFT_THRESHOLD_REACHED_EX_POOL_POOL ((NTSTATUS)0x80040095L)
#define IO_ERROR_DISK_RESOURCES_EXHAUSTED ((NTSTATUS)0xC0040096L)
#define IO_WARNING_DISK_CAPACITY_CHANGED ((NTSTATUS)0x80040097L)
#define IO_WARNING_DISK_PROVISIONING_TYPE_CHANGED ((NTSTATUS)0x80040098L)
#define IO_WARNING_IO_OPERATION_RETRIED ((NTSTATUS)0x80040099L)
#define IO_ERROR_IO_HARDWARE_ERROR ((NTSTATUS)0xC004009AL)
#define IO_WARNING_COMPLETION_TIME ((NTSTATUS)0x8004009BL)
#define IO_WARNING_DISK_SURPRISE_REMOVED ((NTSTATUS)0x8004009DL)
#define IO_WARNING_REPEATED_DISK_GUID ((NTSTATUS)0x8004009EL)
#define IO_WARNING_DISK_FIRMWARE_UPDATED ((NTSTATUS)0x4004009FL)
#define IO_ERR_RETRY_SUCCEEDED ((NTSTATUS)0x00040001L)
#define IO_ERR_CONFIGURATION_ERROR ((NTSTATUS)0xC0040003L)
#define IO_ERR_PARITY ((NTSTATUS)0xC0040005L)
#define IO_ERR_OVERRUN_ERROR ((NTSTATUS)0xC0040008L)
#define IO_ERR_SEQUENCE ((NTSTATUS)0xC004000AL)
#define IO_ERR_INTERNAL_ERROR ((NTSTATUS)0xC004000CL)
#define IO_ERR_INCORRECT_IRQL ((NTSTATUS)0xC004000DL)
#define IO_ERR_INVALID_IOBASE ((NTSTATUS)0xC004000EL)
#define IO_ERR_NOT_READY ((NTSTATUS)0xC004000FL)
#define IO_ERR_INVALID_REQUEST ((NTSTATUS)0xC0040010L)
#define IO_ERR_VERSION ((NTSTATUS)0xC0040011L)
#define IO_ERR_LAYERED_FAILURE ((NTSTATUS)0xC0040012L)
#define IO_ERR_RESET ((NTSTATUS)0xC0040013L)
#define IO_ERR_PROTOCOL ((NTSTATUS)0xC0040014L)
#define IO_ERR_MEMORY_CONFLICT_DETECTED ((NTSTATUS)0xC0040015L)
#define IO_ERR_PORT_CONFLICT_DETECTED ((NTSTATUS)0xC0040016L)
#define IO_ERR_DMA_CONFLICT_DETECTED ((NTSTATUS)0xC0040017L)
#define IO_ERR_IRQ_CONFLICT_DETECTED ((NTSTATUS)0xC0040018L)
#define IO_ERR_BAD_FIRMWARE ((NTSTATUS)0xC0040019L)
#define IO_WRN_BAD_FIRMWARE ((NTSTATUS)0x8004001AL)
#define IO_ERR_DMA_RESOURCE_CONFLICT ((NTSTATUS)0xC004001BL)
#define IO_ERR_INTERRUPT_RESOURCE_CONFLICT ((NTSTATUS)0xC004001CL)
#define IO_ERR_MEMORY_RESOURCE_CONFLICT ((NTSTATUS)0xC004001DL)
#define IO_ERR_PORT_RESOURCE_CONFLICT ((NTSTATUS)0xC004001EL)
#define IO_BAD_BLOCK_WITH_NAME ((NTSTATUS)0xC004001FL)
#define IO_WRITE_CACHE_ENABLED ((NTSTATUS)0x80040020L)
#define IO_RECOVERED_VIA_ECC ((NTSTATUS)0x80040021L)
#define IO_WRITE_CACHE_DISABLED ((NTSTATUS)0x80040022L)
#define IO_FILE_QUOTA_THRESHOLD ((NTSTATUS)0x40040024L)
#define IO_FILE_QUOTA_LIMIT ((NTSTATUS)0x40040025L)
#define IO_FILE_QUOTA_STARTED ((NTSTATUS)0x40040026L)
@ -74,32 +97,21 @@
#define IO_DUMP_DIRECT_CONFIG_FAILED ((NTSTATUS)0xC0040030L)
#define IO_DUMP_PAGE_CONFIG_FAILED ((NTSTATUS)0xC0040031L)
#define IO_LOST_DELAYED_WRITE ((NTSTATUS)0x80040032L)
#define IO_WARNING_PAGING_FAILURE ((NTSTATUS)0x80040033L)
#define IO_WRN_FAILURE_PREDICTED ((NTSTATUS)0x80040034L)
#define IO_WARNING_INTERRUPT_STILL_PENDING ((NTSTATUS)0x80040035L)
#define IO_DRIVER_CANCEL_TIMEOUT ((NTSTATUS)0x80040036L)
#define IO_FILE_SYSTEM_CORRUPT_WITH_NAME ((NTSTATUS)0xC0040037L)
#define IO_WARNING_ALLOCATION_FAILED ((NTSTATUS)0x80040038L)
#define IO_WARNING_LOG_FLUSH_FAILED ((NTSTATUS)0x80040039L)
#define IO_WARNING_DUPLICATE_SIGNATURE ((NTSTATUS)0x8004003AL)
#define IO_WARNING_DUPLICATE_PATH ((NTSTATUS)0x8004003BL)
#define IO_ERR_THREAD_STUCK_IN_DEVICE_DRIVER ((NTSTATUS)0xC004006CL)
#define IO_ERR_PORT_TIMEOUT ((NTSTATUS)0xC0040075L)
#define IO_WARNING_BUS_RESET ((NTSTATUS)0x80040076L)
#define IO_INFO_THROTTLE_COMPLETE ((NTSTATUS)0x40040077L)
#define IO_WARNING_RESET ((NTSTATUS)0x80040081L)
#define IO_FILE_SYSTEM_REPAIR_SUCCESS ((NTSTATUS)0x80040082L)
#define IO_FILE_SYSTEM_REPAIR_FAILED ((NTSTATUS)0xC0040083L)
#define IO_WARNING_WRITE_FUA_PROBLEM ((NTSTATUS)0x80040084L)
#define IO_CDROM_EXCLUSIVE_LOCK ((NTSTATUS)0x40040085L)
#define IO_FILE_SYSTEM_TXF_RECOVERY_FAILURE ((NTSTATUS)0x80040086L)
#define IO_FILE_SYSTEM_TXF_LOG_FULL_HANDLING_FAILED ((NTSTATUS)0xC0040087L)
#define IO_FILE_SYSTEM_TXF_RESOURCE_MANAGER_RESET ((NTSTATUS)0x80040088L)
#define IO_FILE_SYSTEM_TXF_RESOURCE_MANAGER_START_FAILED ((NTSTATUS)0xC0040089L)
#define IO_FILE_SYSTEM_TXF_RESOURCE_MANAGER_SHUT_DOWN ((NTSTATUS)0xC004008AL)
#define IO_LOST_DELAYED_WRITE_NETWORK_DISCONNECTED ((NTSTATUS)0x8004008BL)
#define IO_LOST_DELAYED_WRITE_NETWORK_SERVER_ERROR ((NTSTATUS)0x8004008CL)
#define IO_LOST_DELAYED_WRITE_NETWORK_LOCAL_DISK_ERROR ((NTSTATUS)0x8004008DL)
#define IO_WARNING_DUMP_DISABLED_DEVICE_GONE ((NTSTATUS)0x8004009CL)
#define IO_WARNING_ADAPTER_FIRMWARE_UPDATED ((NTSTATUS)0x400400A0L)
#define IO_ERROR_DUMP_CREATION_ERROR ((NTSTATUS)0xC00400A1L)
#define MCA_WARNING_CACHE ((NTSTATUS)0x8005003CL)
#define MCA_ERROR_CACHE ((NTSTATUS)0xC005003DL)

View File

@ -156,8 +156,20 @@ extern "C" {
#define STATUS_HIBERNATED ((NTSTATUS)0x4000002A)
#define STATUS_RESUME_HIBERNATION ((NTSTATUS)0x4000002B)
#define STATUS_FIRMWARE_UPDATED ((NTSTATUS)0x4000002C)
#define STATUS_DRIVERS_LEAKING_LOCKED_PAGES ((NTSTATUS)0x4000002D)
#define STATUS_MESSAGE_RETRIEVED ((NTSTATUS)0x4000002E)
#define STATUS_SYSTEM_POWERSTATE_TRANSITION ((NTSTATUS)0x4000002F)
#define STATUS_ALPC_CHECK_COMPLETION_LIST ((NTSTATUS)0x40000030)
#define STATUS_SYSTEM_POWERSTATE_COMPLEX_TRANSITION ((NTSTATUS)0x40000031)
#define STATUS_ACCESS_AUDIT_BY_POLICY ((NTSTATUS)0x40000032)
#define STATUS_ABANDON_HIBERFILE ((NTSTATUS)0x40000033)
#define STATUS_BIZRULES_NOT_ENABLED ((NTSTATUS)0x40000034)
#define STATUS_FT_READ_FROM_COPY ((NTSTATUS)0x40000035)
#define STATUS_IMAGE_AT_DIFFERENT_BASE ((NTSTATUS)0x40000036)
#define STATUS_PATCH_DEFERRED ((NTSTATUS)0x40000037)
#define STATUS_WAKE_SYSTEM ((NTSTATUS)0x40000294)
#define STATUS_DS_SHUTTING_DOWN ((NTSTATUS)0x40000370)
#define STATUS_DISK_REPAIR_REDIRECTED ((NTSTATUS)0x40000807)
#define RPC_NT_UUID_LOCAL_ONLY ((NTSTATUS)0x40020056)
#define RPC_NT_SEND_INCOMPLETE ((NTSTATUS)0x400200AF)
@ -214,6 +226,8 @@ extern "C" {
#define STATUS_DEVICE_REQUIRES_CLEANING ((NTSTATUS)0x80000288)
#define STATUS_DEVICE_DOOR_OPEN ((NTSTATUS)0x80000289)
#define STATUS_DATA_LOST_REPAIR ((NTSTATUS)0x80000803)
#define STATUS_CLUSTER_NODE_ALREADY_UP ((NTSTATUS)0x80130001)
#define STATUS_CLUSTER_NODE_ALREADY_DOWN ((NTSTATUS)0x80130002)
#define STATUS_CLUSTER_NETWORK_ALREADY_ONLINE ((NTSTATUS)0x80130003)
@ -943,12 +957,217 @@ extern "C" {
#define STATUS_VDM_DISALLOWED ((NTSTATUS)0xC0000414)
#define STATUS_HUNG_DISPLAY_DRIVER_THREAD ((NTSTATUS)0xC0000415)
#define STATUS_INVALID_CRUNTIME_PARAMETER ((NTSTATUS)0xC0000417)
#define STATUS_ASSERTION_FAILURE ((NTSTATUS)0xC0000420L)
#define STATUS_ASSERTION_FAILURE ((NTSTATUS)0xC0000420)
#define STATUS_CALLBACK_POP_STACK ((NTSTATUS)0xC0000423)
#define STATUS_HIVE_UNLOADED ((NTSTATUS)0xC0000425)
#define STATUS_ELEVATION_REQUIRED ((NTSTATUS)0xC000042C)
#define STATUS_PURGE_FAILED ((NTSTATUS)0xC0000435)
#define STATUS_CRED_REQUIRES_CONFIRMATION ((NTSTATUS)0xC0000440)
#define STATUS_CS_ENCRYPTION_INVALID_SERVER_RESPONSE ((NTSTATUS)0xC0000441)
#define STATUS_CS_ENCRYPTION_UNSUPPORTED_SERVER ((NTSTATUS)0xC0000442)
#define STATUS_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE ((NTSTATUS)0xC0000443)
#define STATUS_CS_ENCRYPTION_NEW_ENCRYPTED_FILE ((NTSTATUS)0xC0000444)
#define STATUS_CS_ENCRYPTION_FILE_NOT_CSE ((NTSTATUS)0xC0000445)
#define STATUS_INVALID_LABEL ((NTSTATUS)0xC0000446)
#define STATUS_DRIVER_PROCESS_TERMINATED ((NTSTATUS)0xC0000450)
#define STATUS_AMBIGUOUS_SYSTEM_DEVICE ((NTSTATUS)0xC0000451)
#define STATUS_SYSTEM_DEVICE_NOT_FOUND ((NTSTATUS)0xC0000452)
#define STATUS_RESTART_BOOT_APPLICATION ((NTSTATUS)0xC0000453)
#define STATUS_INSUFFICIENT_NVRAM_RESOURCES ((NTSTATUS)0xC0000454)
#define STATUS_INVALID_SESSION ((NTSTATUS)0xC0000455)
#define STATUS_THREAD_ALREADY_IN_SESSION ((NTSTATUS)0xC0000456)
#define STATUS_THREAD_NOT_IN_SESSION ((NTSTATUS)0xC0000457)
#define STATUS_INVALID_WEIGHT ((NTSTATUS)0xC0000458)
#define STATUS_REQUEST_PAUSED ((NTSTATUS)0xC0000459)
#define STATUS_NO_RANGES_PROCESSED ((NTSTATUS)0xC0000460)
#define STATUS_DISK_RESOURCES_EXHAUSTED ((NTSTATUS)0xC0000461)
#define STATUS_NEEDS_REMEDIATION ((NTSTATUS)0xC0000462)
#define STATUS_DEVICE_FEATURE_NOT_SUPPORTED ((NTSTATUS)0xC0000463)
#define STATUS_DEVICE_UNREACHABLE ((NTSTATUS)0xC0000464)
#define STATUS_INVALID_TOKEN ((NTSTATUS)0xC0000465)
#define STATUS_SERVER_UNAVAILABLE ((NTSTATUS)0xC0000466)
#define STATUS_FILE_NOT_AVAILABLE ((NTSTATUS)0xC0000467)
#define STATUS_DEVICE_INSUFFICIENT_RESOURCES ((NTSTATUS)0xC0000468)
#define STATUS_PACKAGE_UPDATING ((NTSTATUS)0xC0000469)
#define STATUS_NOT_READ_FROM_COPY ((NTSTATUS)0xC000046A)
#define STATUS_FT_WRITE_FAILURE ((NTSTATUS)0xC000046B)
#define STATUS_FT_DI_SCAN_REQUIRED ((NTSTATUS)0xC000046C)
#define STATUS_OBJECT_NOT_EXTERNALLY_BACKED ((NTSTATUS)0xC000046D)
#define STATUS_EXTERNAL_BACKING_PROVIDER_UNKNOWN ((NTSTATUS)0xC000046E)
#define STATUS_COMPRESSION_NOT_BENEFICIAL ((NTSTATUS)0xC000046F)
#define STATUS_DATA_CHECKSUM_ERROR ((NTSTATUS)0xC0000470)
#define STATUS_INTERMIXED_KERNEL_EA_OPERATION ((NTSTATUS)0xC0000471)
#define STATUS_TRIM_READ_ZERO_NOT_SUPPORTED ((NTSTATUS)0xC0000472)
#define STATUS_TOO_MANY_SEGMENT_DESCRIPTORS ((NTSTATUS)0xC0000473)
#define STATUS_INVALID_OFFSET_ALIGNMENT ((NTSTATUS)0xC0000474)
#define STATUS_INVALID_FIELD_IN_PARAMETER_LIST ((NTSTATUS)0xC0000475)
#define STATUS_OPERATION_IN_PROGRESS ((NTSTATUS)0xC0000476)
#define STATUS_INVALID_INITIATOR_TARGET_PATH ((NTSTATUS)0xC0000477)
#define STATUS_SCRUB_DATA_DISABLED ((NTSTATUS)0xC0000478)
#define STATUS_NOT_REDUNDANT_STORAGE ((NTSTATUS)0xC0000479)
#define STATUS_RESIDENT_FILE_NOT_SUPPORTED ((NTSTATUS)0xC000047A)
#define STATUS_COMPRESSED_FILE_NOT_SUPPORTED ((NTSTATUS)0xC000047B)
#define STATUS_DIRECTORY_NOT_SUPPORTED ((NTSTATUS)0xC000047C)
#define STATUS_IO_OPERATION_TIMEOUT ((NTSTATUS)0xC000047D)
#define STATUS_SYSTEM_NEEDS_REMEDIATION ((NTSTATUS)0xC000047E)
#define STATUS_APPX_INTEGRITY_FAILURE_CLR_NGEN ((NTSTATUS)0xC000047F)
#define STATUS_SHARE_UNAVAILABLE ((NTSTATUS)0xC0000480)
#define STATUS_APISET_NOT_HOSTED ((NTSTATUS)0xC0000481)
#define STATUS_APISET_NOT_PRESENT ((NTSTATUS)0xC0000482)
#define STATUS_DEVICE_HARDWARE_ERROR ((NTSTATUS)0xC0000483)
#define STATUS_FIRMWARE_SLOT_INVALID ((NTSTATUS)0xC0000484)
#define STATUS_FIRMWARE_IMAGE_INVALID ((NTSTATUS)0xC0000485)
#define STATUS_STORAGE_TOPOLOGY_ID_MISMATCH ((NTSTATUS)0xC0000486)
#define STATUS_WIM_NOT_BOOTABLE ((NTSTATUS)0xC0000487)
#define STATUS_BLOCKED_BY_PARENTAL_CONTROLS ((NTSTATUS)0xC0000488)
#define STATUS_NEEDS_REGISTRATION ((NTSTATUS)0xC0000489)
#define STATUS_QUOTA_ACTIVITY ((NTSTATUS)0xC000048A)
#define STATUS_CALLBACK_INVOKE_INLINE ((NTSTATUS)0xC000048B)
#define STATUS_BLOCK_TOO_MANY_REFERENCES ((NTSTATUS)0xC000048C)
#define STATUS_MARKED_TO_DISALLOW_WRITES ((NTSTATUS)0xC000048D)
#define STATUS_NETWORK_ACCESS_DENIED_EDP ((NTSTATUS)0xC000048E)
#define STATUS_ENCLAVE_FAILURE ((NTSTATUS)0xC000048F)
#define STATUS_PNP_NO_COMPAT_DRIVERS ((NTSTATUS)0xC0000490)
#define STATUS_PNP_DRIVER_PACKAGE_NOT_FOUND ((NTSTATUS)0xC0000491)
#define STATUS_PNP_DRIVER_CONFIGURATION_NOT_FOUND ((NTSTATUS)0xC0000492)
#define STATUS_PNP_DRIVER_CONFIGURATION_INCOMPLETE ((NTSTATUS)0xC0000493)
#define STATUS_PNP_FUNCTION_DRIVER_REQUIRED ((NTSTATUS)0xC0000494)
#define STATUS_PNP_DEVICE_CONFIGURATION_PENDING ((NTSTATUS)0xC0000495)
#define STATUS_DEVICE_HINT_NAME_BUFFER_TOO_SMALL ((NTSTATUS)0xC0000496)
#define STATUS_PACKAGE_NOT_AVAILABLE ((NTSTATUS)0xC0000497)
#define STATUS_DEVICE_IN_MAINTENANCE ((NTSTATUS)0xC0000499)
#define STATUS_NOT_SUPPORTED_ON_DAX ((NTSTATUS)0xC000049A)
#define STATUS_FREE_SPACE_TOO_FRAGMENTED ((NTSTATUS)0xC000049B)
#define STATUS_DAX_MAPPING_EXISTS ((NTSTATUS)0xC000049C)
#define STATUS_CHILD_PROCESS_BLOCKED ((NTSTATUS)0xC000049D)
#define STATUS_STORAGE_LOST_DATA_PERSISTENCE ((NTSTATUS)0xC000049E)
#define STATUS_VRF_CFG_AND_IO_ENABLED ((NTSTATUS)0xC000049F)
#define STATUS_PARTITION_TERMINATING ((NTSTATUS)0xC00004A0)
#define STATUS_EXTERNAL_SYSKEY_NOT_SUPPORTED ((NTSTATUS)0xC00004A1)
#define STATUS_ENCLAVE_VIOLATION ((NTSTATUS)0xC00004A2)
#define STATUS_FILE_PROTECTED_UNDER_DPL ((NTSTATUS)0xC00004A3)
#define STATUS_VOLUME_NOT_CLUSTER_ALIGNED ((NTSTATUS)0xC00004A4)
#define STATUS_NO_PHYSICALLY_ALIGNED_FREE_SPACE_FOUND ((NTSTATUS)0xC00004A5)
#define STATUS_APPX_FILE_NOT_ENCRYPTED ((NTSTATUS)0xC00004A6)
#define STATUS_RWRAW_ENCRYPTED_FILE_NOT_ENCRYPTED ((NTSTATUS)0xC00004A7)
#define STATUS_RWRAW_ENCRYPTED_INVALID_EDATAINFO_FILEOFFSET ((NTSTATUS)0xC00004A8)
#define STATUS_RWRAW_ENCRYPTED_INVALID_EDATAINFO_FILERANGE ((NTSTATUS)0xC00004A9)
#define STATUS_RWRAW_ENCRYPTED_INVALID_EDATAINFO_PARAMETER ((NTSTATUS)0xC00004AA)
#define STATUS_FT_READ_FAILURE ((NTSTATUS)0xC00004AB)
#define STATUS_PATCH_CONFLICT ((NTSTATUS)0xC00004AC)
#define STATUS_STORAGE_RESERVE_ID_INVALID ((NTSTATUS)0xC00004AD)
#define STATUS_STORAGE_RESERVE_DOES_NOT_EXIST ((NTSTATUS)0xC00004AE)
#define STATUS_STORAGE_RESERVE_ALREADY_EXISTS ((NTSTATUS)0xC00004AF)
#define STATUS_STORAGE_RESERVE_NOT_EMPTY ((NTSTATUS)0xC00004B0)
#define STATUS_NOT_A_DAX_VOLUME ((NTSTATUS)0xC00004B1)
#define STATUS_NOT_DAX_MAPPABLE ((NTSTATUS)0xC00004B2)
#define STATUS_CASE_DIFFERING_NAMES_IN_DIR ((NTSTATUS)0xC00004B3)
#define STATUS_FILE_NOT_SUPPORTED ((NTSTATUS)0xC00004B4)
#define STATUS_NOT_SUPPORTED_WITH_BTT ((NTSTATUS)0xC00004B5)
#define STATUS_ENCRYPTION_DISABLED ((NTSTATUS)0xC00004B6)
#define STATUS_ENCRYPTING_METADATA_DISALLOWED ((NTSTATUS)0xC00004B7)
#define STATUS_CANT_CLEAR_ENCRYPTION_FLAG ((NTSTATUS)0xC00004B8)
#define STATUS_UNSATISFIED_DEPENDENCIES ((NTSTATUS)0xC00004B9)
#define STATUS_CASE_SENSITIVE_PATH ((NTSTATUS)0xC00004BA)
#define STATUS_INVALID_TASK_NAME ((NTSTATUS)0xC0000500)
#define STATUS_INVALID_TASK_INDEX ((NTSTATUS)0xC0000501)
#define STATUS_THREAD_ALREADY_IN_TASK ((NTSTATUS)0xC0000502)
#define STATUS_CALLBACK_BYPASS ((NTSTATUS)0xC0000503)
#define STATUS_UNDEFINED_SCOPE ((NTSTATUS)0xC0000504)
#define STATUS_INVALID_CAP ((NTSTATUS)0xC0000505)
#define STATUS_NOT_GUI_PROCESS ((NTSTATUS)0xC0000506)
#define STATUS_DEVICE_HUNG ((NTSTATUS)0xC0000507)
#define STATUS_CONTAINER_ASSIGNED ((NTSTATUS)0xC0000508)
#define STATUS_JOB_NO_CONTAINER ((NTSTATUS)0xC0000509)
#define STATUS_DEVICE_UNRESPONSIVE ((NTSTATUS)0xC000050A)
#define STATUS_REPARSE_POINT_ENCOUNTERED ((NTSTATUS)0xC000050B)
#define STATUS_ATTRIBUTE_NOT_PRESENT ((NTSTATUS)0xC000050C)
#define STATUS_NOT_A_TIERED_VOLUME ((NTSTATUS)0xC000050D)
#define STATUS_ALREADY_HAS_STREAM_ID ((NTSTATUS)0xC000050E)
#define STATUS_JOB_NOT_EMPTY ((NTSTATUS)0xC000050F)
#define STATUS_ALREADY_INITIALIZED ((NTSTATUS)0xC0000510)
#define STATUS_ENCLAVE_NOT_TERMINATED ((NTSTATUS)0xC0000511)
#define STATUS_ENCLAVE_IS_TERMINATING ((NTSTATUS)0xC0000512)
#define STATUS_SMB1_NOT_AVAILABLE ((NTSTATUS)0xC0000513)
#define STATUS_SMR_GARBAGE_COLLECTION_REQUIRED ((NTSTATUS)0xC0000514)
#define STATUS_INTERRUPTED ((NTSTATUS)0xC0000515)
#define STATUS_THREAD_NOT_RUNNING ((NTSTATUS)0xC0000516)
#define STATUS_FAIL_FAST_EXCEPTION ((NTSTATUS)0xC0000602)
#define STATUS_IMAGE_CERT_REVOKED ((NTSTATUS)0xC0000603)
#define STATUS_DYNAMIC_CODE_BLOCKED ((NTSTATUS)0xC0000604)
#define STATUS_IMAGE_CERT_EXPIRED ((NTSTATUS)0xC0000605)
#define STATUS_STRICT_CFG_VIOLATION ((NTSTATUS)0xC0000606)
#define STATUS_SET_CONTEXT_DENIED ((NTSTATUS)0xC000060A)
#define STATUS_CROSS_PARTITION_VIOLATION ((NTSTATUS)0xC000060B)
#define STATUS_PORT_CLOSED ((NTSTATUS)0xC0000700)
#define STATUS_MESSAGE_LOST ((NTSTATUS)0xC0000701)
#define STATUS_INVALID_MESSAGE ((NTSTATUS)0xC0000702)
#define STATUS_REQUEST_CANCELED ((NTSTATUS)0xC0000703)
#define STATUS_RECURSIVE_DISPATCH ((NTSTATUS)0xC0000704)
#define STATUS_LPC_RECEIVE_BUFFER_EXPECTED ((NTSTATUS)0xC0000705)
#define STATUS_LPC_INVALID_CONNECTION_USAGE ((NTSTATUS)0xC0000706)
#define STATUS_LPC_REQUESTS_NOT_ALLOWED ((NTSTATUS)0xC0000707)
#define STATUS_RESOURCE_IN_USE ((NTSTATUS)0xC0000708)
#define STATUS_HARDWARE_MEMORY_ERROR ((NTSTATUS)0xC0000709)
#define STATUS_THREADPOOL_HANDLE_EXCEPTION ((NTSTATUS)0xC000070A)
#define STATUS_THREADPOOL_SET_EVENT_ON_COMPLETION_FAILED ((NTSTATUS)0xC000070B)
#define STATUS_THREADPOOL_RELEASE_SEMAPHORE_ON_COMPLETION_FAILED ((NTSTATUS)0xC000070C)
#define STATUS_THREADPOOL_RELEASE_MUTEX_ON_COMPLETION_FAILED ((NTSTATUS)0xC000070D)
#define STATUS_THREADPOOL_FREE_LIBRARY_ON_COMPLETION_FAILED ((NTSTATUS)0xC000070E)
#define STATUS_THREADPOOL_RELEASED_DURING_OPERATION ((NTSTATUS)0xC000070F)
#define STATUS_CALLBACK_RETURNED_WHILE_IMPERSONATING ((NTSTATUS)0xC0000710)
#define STATUS_APC_RETURNED_WHILE_IMPERSONATING ((NTSTATUS)0xC0000711)
#define STATUS_PROCESS_IS_PROTECTED ((NTSTATUS)0xC0000712)
#define STATUS_MCA_EXCEPTION ((NTSTATUS)0xC0000713)
#define STATUS_CERTIFICATE_MAPPING_NOT_UNIQUE ((NTSTATUS)0xC0000714)
#define STATUS_SYMLINK_CLASS_DISABLED ((NTSTATUS)0xC0000715)
#define STATUS_INVALID_IDN_NORMALIZATION ((NTSTATUS)0xC0000716)
#define STATUS_NO_UNICODE_TRANSLATION ((NTSTATUS)0xC0000717)
#define STATUS_ALREADY_REGISTERED ((NTSTATUS)0xC0000718)
#define STATUS_CONTEXT_MISMATCH ((NTSTATUS)0xC0000719)
#define STATUS_PORT_ALREADY_HAS_COMPLETION_LIST ((NTSTATUS)0xC000071A)
#define STATUS_CALLBACK_RETURNED_THREAD_PRIORITY ((NTSTATUS)0xC000071B)
#define STATUS_INVALID_THREAD ((NTSTATUS)0xC000071C)
#define STATUS_CALLBACK_RETURNED_TRANSACTION ((NTSTATUS)0xC000071D)
#define STATUS_CALLBACK_RETURNED_LDR_LOCK ((NTSTATUS)0xC000071E)
#define STATUS_CALLBACK_RETURNED_LANG ((NTSTATUS)0xC000071F)
#define STATUS_CALLBACK_RETURNED_PRI_BACK ((NTSTATUS)0xC0000720)
#define STATUS_CALLBACK_RETURNED_THREAD_AFFINITY ((NTSTATUS)0xC0000721)
#define STATUS_LPC_HANDLE_COUNT_EXCEEDED ((NTSTATUS)0xC0000722)
#define STATUS_EXECUTABLE_MEMORY_WRITE ((NTSTATUS)0xC0000723)
#define STATUS_KERNEL_EXECUTABLE_MEMORY_WRITE ((NTSTATUS)0xC0000724)
#define STATUS_ATTACHED_EXECUTABLE_MEMORY_WRITE ((NTSTATUS)0xC0000725)
#define STATUS_TRIGGERED_EXECUTABLE_MEMORY_WRITE ((NTSTATUS)0xC0000726)
#define STATUS_DISK_REPAIR_DISABLED ((NTSTATUS)0xC0000800)
#define STATUS_DS_DOMAIN_RENAME_IN_PROGRESS ((NTSTATUS)0xC0000801)
#define STATUS_DISK_QUOTA_EXCEEDED ((NTSTATUS)0xC0000802)
#define STATUS_CONTENT_BLOCKED ((NTSTATUS)0xC0000804)
#define STATUS_BAD_CLUSTERS ((NTSTATUS)0xC0000805)
#define STATUS_VOLUME_DIRTY ((NTSTATUS)0xC0000806)
#define STATUS_DISK_REPAIR_UNSUCCESSFUL ((NTSTATUS)0xC0000808)
#define STATUS_CORRUPT_LOG_OVERFULL ((NTSTATUS)0xC0000809)
#define STATUS_CORRUPT_LOG_CORRUPTED ((NTSTATUS)0xC000080A)
#define STATUS_CORRUPT_LOG_UNAVAILABLE ((NTSTATUS)0xC000080B)
#define STATUS_CORRUPT_LOG_DELETED_FULL ((NTSTATUS)0xC000080C)
#define STATUS_CORRUPT_LOG_CLEARED ((NTSTATUS)0xC000080D)
#define STATUS_ORPHAN_NAME_EXHAUSTED ((NTSTATUS)0xC000080E)
#define STATUS_PROACTIVE_SCAN_IN_PROGRESS ((NTSTATUS)0xC000080F)
#define STATUS_ENCRYPTED_IO_NOT_POSSIBLE ((NTSTATUS)0xC0000810)
#define STATUS_CORRUPT_LOG_UPLEVEL_RECORDS ((NTSTATUS)0xC0000811)
#define STATUS_FILE_CHECKED_OUT ((NTSTATUS)0xC0000901)
#define STATUS_CHECKOUT_REQUIRED ((NTSTATUS)0xC0000902)
#define STATUS_BAD_FILE_TYPE ((NTSTATUS)0xC0000903)
#define STATUS_FILE_TOO_LARGE ((NTSTATUS)0xC0000904)
#define STATUS_FORMS_AUTH_REQUIRED ((NTSTATUS)0xC0000905)
#define STATUS_VIRUS_INFECTED ((NTSTATUS)0xC0000906)
#define STATUS_VIRUS_DELETED ((NTSTATUS)0xC0000907)
#define STATUS_BAD_MCFG_TABLE ((NTSTATUS)0xC0000908)
#define STATUS_CANNOT_BREAK_OPLOCK ((NTSTATUS)0xC0000909)
#define STATUS_BAD_KEY ((NTSTATUS)0xC000090A)
#define STATUS_BAD_DATA ((NTSTATUS)0xC000090B)
#define STATUS_NO_KEY ((NTSTATUS)0xC000090C)
#define STATUS_FILE_HANDLE_REVOKED ((NTSTATUS)0xC0000910)
#define STATUS_WOW_ASSERTION ((NTSTATUS)0xC0009898)
#define STATUS_INVALID_SIGNATURE ((NTSTATUS)0xC000A000)
#define STATUS_HMAC_NOT_SUPPORTED ((NTSTATUS)0xC000A001)