forked from hiyohiyo/CrystalDiskInfo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
StorageQuery.h
77 lines (70 loc) · 1.97 KB
/
StorageQuery.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#pragma once
namespace StorageQuery {
typedef enum {
StorageDeviceProperty = 0,
StorageAdapterProperty,
StorageDeviceIdProperty,
StorageDeviceUniqueIdProperty,
StorageDeviceWriteCacheProperty,
StorageMiniportProperty,
StorageAccessAlignmentProperty,
StorageDeviceSeekPenaltyProperty,
StorageDeviceTrimProperty,
StorageDeviceWriteAggregationProperty,
StorageDeviceDeviceTelemetryProperty,
StorageDeviceLBProvisioningProperty,
StorageDevicePowerProperty,
StorageDeviceCopyOffloadProperty,
StorageDeviceResiliencyProperty,
StorageDeviceMediumProductType,
StorageDeviceRpmbProperty,
StorageDeviceIoCapabilityProperty = 48,
StorageAdapterProtocolSpecificProperty,
StorageDeviceProtocolSpecificProperty,
StorageAdapterTemperatureProperty,
StorageDeviceTemperatureProperty,
StorageAdapterPhysicalTopologyProperty,
StorageDevicePhysicalTopologyProperty,
StorageDeviceAttributesProperty,
} TStoragePropertyId;
typedef enum {
PropertyStandardQuery = 0,
PropertyExistsQuery,
PropertyMaskQuery,
PropertyQueryMaxDefined
} TStorageQueryType;
typedef struct {
TStoragePropertyId PropertyId;
TStorageQueryType QueryType;
} TStoragePropertyQuery;
typedef enum {
ProtocolTypeUnknown = 0x00,
ProtocolTypeScsi,
ProtocolTypeAta,
ProtocolTypeNvme,
ProtocolTypeSd,
ProtocolTypeProprietary = 0x7E,
ProtocolTypeMaxReserved = 0x7F
} TStroageProtocolType;
typedef struct {
TStroageProtocolType ProtocolType;
DWORD DataType;
DWORD ProtocolDataRequestValue;
DWORD ProtocolDataRequestSubValue;
DWORD ProtocolDataOffset;
DWORD ProtocolDataLength;
DWORD FixedProtocolReturnData;
DWORD Reserved[3];
} TStorageProtocolSpecificData;
typedef enum {
NVMeDataTypeUnknown = 0,
NVMeDataTypeIdentify,
NVMeDataTypeLogPage,
NVMeDataTypeFeature,
} TStorageProtocolNVMeDataType;
typedef struct {
TStoragePropertyQuery Query;
TStorageProtocolSpecificData ProtocolSpecific;
BYTE Buffer[4096];
} TStorageQueryWithBuffer;
}