3 Copyright (c) Alex Ionescu. All rights reserved.
11 Type definitions for the Configuration Manager.
15 Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
29 #define MAX_BUS_NAME 24
32 // PLUGPLAY_CONTROL_RELATED_DEVICE_DATA.Relations
34 #define PNP_GET_PARENT_DEVICE 1
35 #define PNP_GET_CHILD_DEVICE 2
36 #define PNP_GET_SIBLING_DEVICE 3
39 // PLUGPLAY_CONTROL_STATUS_DATA Operations
41 #define PNP_GET_DEVICE_STATUS 0
42 #define PNP_SET_DEVICE_STATUS 1
43 #define PNP_CLEAR_DEVICE_STATUS 2
48 #define CmResourceTypeNull 0
49 #define CmResourceTypePort 1
50 #define CmResourceTypeInterrupt 2
51 #define CmResourceTypeMemory 3
52 #define CmResourceTypeDma 4
53 #define CmResourceTypeDeviceSpecific 5
54 #define CmResourceTypeBusNumber 6
55 #define CmResourceTypeMaximum 7
56 #define CmResourceTypeNonArbitrated 128
57 #define CmResourceTypeConfigData 128
58 #define CmResourceTypeDevicePrivate 129
59 #define CmResourceTypePcCardConfig 130
60 #define CmResourceTypeMfCardConfig 131
65 // Resource Descriptor Share Dispositions
67 typedef enum _CM_SHARE_DISPOSITION
69 CmResourceShareUndetermined
,
70 CmResourceShareDeviceExclusive
,
71 CmResourceShareDriverExclusive
,
73 } CM_SHARE_DISPOSITION
;
78 // Port Resource Descriptor Flags
80 #define CM_RESOURCE_PORT_MEMORY 0x0000
81 #define CM_RESOURCE_PORT_IO 0x0001
82 #define CM_RESOURCE_PORT_10_BIT_DECODE 0x0004
83 #define CM_RESOURCE_PORT_12_BIT_DECODE 0x0008
84 #define CM_RESOURCE_PORT_16_BIT_DECODE 0x0010
85 #define CM_RESOURCE_PORT_POSITIVE_DECODE 0x0020
86 #define CM_RESOURCE_PORT_PASSIVE_DECODE 0x0040
87 #define CM_RESOURCE_PORT_WINDOW_DECODE 0x0080
90 // Memory Resource Descriptor Flags
92 #define CM_RESOURCE_MEMORY_READ_WRITE 0x0000
93 #define CM_RESOURCE_MEMORY_READ_ONLY 0x0001
94 #define CM_RESOURCE_MEMORY_WRITE_ONLY 0x0002
95 #define CM_RESOURCE_MEMORY_PREFETCHABLE 0x0004
96 #define CM_RESOURCE_MEMORY_COMBINEDWRITE 0x0008
97 #define CM_RESOURCE_MEMORY_24 0x0010
98 #define CM_RESOURCE_MEMORY_CACHEABLE 0x0020
101 // DMA Resource Descriptor Flags
103 #define CM_RESOURCE_DMA_8 0x0000
104 #define CM_RESOURCE_DMA_16 0x0001
105 #define CM_RESOURCE_DMA_32 0x0002
106 #define CM_RESOURCE_DMA_8_AND_16 0x0004
107 #define CM_RESOURCE_DMA_BUS_MASTER 0x0008
108 #define CM_RESOURCE_DMA_TYPE_A 0x0010
109 #define CM_RESOURCE_DMA_TYPE_B 0x0020
110 #define CM_RESOURCE_DMA_TYPE_F 0x0040
112 #ifdef NTOS_MODE_USER
115 // Information Classes for NtQueryKey
117 typedef enum _KEY_INFORMATION_CLASS
123 KeyCachedInformation
,
125 } KEY_INFORMATION_CLASS
;
127 typedef enum _KEY_VALUE_INFORMATION_CLASS
129 KeyValueBasicInformation
,
130 KeyValueFullInformation
,
131 KeyValuePartialInformation
,
132 KeyValueFullInformationAlign64
,
133 KeyValuePartialInformationAlign64
134 } KEY_VALUE_INFORMATION_CLASS
;
136 typedef enum _KEY_SET_INFORMATION_CLASS
138 KeyWriteTimeInformation
,
139 KeyUserFlagsInformation
,
141 } KEY_SET_INFORMATION_CLASS
;
146 // Plag and Play Classes
148 typedef enum _PLUGPLAY_CONTROL_CLASS
150 PlugPlayControlUserResponse
= 0x07,
151 PlugPlayControlProperty
= 0x0A,
152 PlugPlayControlGetRelatedDevice
= 0x0C,
153 PlugPlayControlDeviceStatus
= 0x0E,
154 PlugPlayControlGetDeviceDepth
,
155 PlugPlayControlResetDevice
= 0x14
156 } PLUGPLAY_CONTROL_CLASS
;
158 typedef enum _PLUGPLAY_BUS_CLASS
163 } PLUGPLAY_BUS_CLASS
, *PPLUGPLAY_BUS_CLASS
;
166 // Plag and Play Bus Types
168 typedef enum _PLUGPLAY_VIRTUAL_BUS_TYPE
171 MaxPlugPlayVirtualBusType
172 } PLUGPLAY_VIRTUAL_BUS_TYPE
, *PPLUGPLAY_VIRTUAL_BUS_TYPE
;
175 // Plag and Play Event Categories
177 typedef enum _PLUGPLAY_EVENT_CATEGORY
179 HardwareProfileChangeEvent
,
180 TargetDeviceChangeEvent
,
181 DeviceClassChangeEvent
,
189 } PLUGPLAY_EVENT_CATEGORY
;
191 #ifdef NTOS_MODE_USER
194 // Information Structures for NtQueryKeyInformation
196 typedef struct _KEY_WRITE_TIME_INFORMATION
198 LARGE_INTEGER LastWriteTime
;
199 } KEY_WRITE_TIME_INFORMATION
, *PKEY_WRITE_TIME_INFORMATION
;
201 typedef struct _KEY_USER_FLAGS_INFORMATION
204 } KEY_USER_FLAGS_INFORMATION
, *PKEY_USER_FLAGS_INFORMATION
;
206 typedef struct _KEY_FULL_INFORMATION
208 LARGE_INTEGER LastWriteTime
;
216 ULONG MaxValueNameLen
;
217 ULONG MaxValueDataLen
;
219 } KEY_FULL_INFORMATION
, *PKEY_FULL_INFORMATION
;
221 typedef struct _KEY_NODE_INFORMATION
223 LARGE_INTEGER LastWriteTime
;
229 } KEY_NODE_INFORMATION
, *PKEY_NODE_INFORMATION
;
231 typedef struct _KEY_VALUE_ENTRY
233 PUNICODE_STRING ValueName
;
237 } KEY_VALUE_ENTRY
, *PKEY_VALUE_ENTRY
;
239 typedef struct _KEY_VALUE_PARTIAL_INFORMATION
245 } KEY_VALUE_PARTIAL_INFORMATION
, *PKEY_VALUE_PARTIAL_INFORMATION
;
247 typedef struct _KEY_VALUE_BASIC_INFORMATION
253 } KEY_VALUE_BASIC_INFORMATION
, *PKEY_VALUE_BASIC_INFORMATION
;
255 typedef struct _KEY_VALUE_FULL_INFORMATION
263 } KEY_VALUE_FULL_INFORMATION
, *PKEY_VALUE_FULL_INFORMATION
;
265 typedef struct _KEY_BASIC_INFORMATION
267 LARGE_INTEGER LastWriteTime
;
271 } KEY_BASIC_INFORMATION
, *PKEY_BASIC_INFORMATION
;
276 // Plug and Play Event Block
278 typedef struct _PLUGPLAY_EVENT_BLOCK
281 PLUGPLAY_EVENT_CATEGORY EventCategory
;
291 WCHAR SymbolicLinkName
[ANYSIZE_ARRAY
];
295 WCHAR DeviceIds
[ANYSIZE_ARRAY
];
299 WCHAR DeviceId
[ANYSIZE_ARRAY
];
303 PVOID NotificationStructure
;
304 WCHAR DeviceIds
[ANYSIZE_ARRAY
];
305 } CustomNotification
;
309 } ProfileNotification
;
312 ULONG NotificationCode
;
313 ULONG NotificationData
;
317 PNP_VETO_TYPE VetoType
;
318 WCHAR DeviceIdVetoNameBuffer
[ANYSIZE_ARRAY
];
322 GUID BlockedDriverGuid
;
323 } BlockedDriverNotification
;
325 } PLUGPLAY_EVENT_BLOCK
, *PPLUGPLAY_EVENT_BLOCK
;
328 // Plug and Play Control Classes
332 typedef struct _PLUGPLAY_CONTROL_PROPERTY_DATA
334 UNICODE_STRING DeviceInstance
;
338 } PLUGPLAY_CONTROL_PROPERTY_DATA
, *PPLUGPLAY_CONTROL_PROPERTY_DATA
;
341 typedef struct _PLUGPLAY_CONTROL_RELATED_DEVICE_DATA
343 UNICODE_STRING TargetDeviceInstance
;
345 UNICODE_STRING RelatedDeviceInstance
;
346 } PLUGPLAY_CONTROL_RELATED_DEVICE_DATA
, *PPLUGPLAY_CONTROL_RELATED_DEVICE_DATA
;
349 typedef struct _PLUGPLAY_CONTOL_STATUS_DATA
351 UNICODE_STRING DeviceInstance
;
355 } PLUGPLAY_CONTROL_STATUS_DATA
, *PPLUGPLAY_CONTROL_STATUS_DATA
;
358 typedef struct _PLUGPLAY_CONTROL_DEPTH_DATA
360 UNICODE_STRING DeviceInstance
;
362 } PLUGPLAY_CONTROL_DEPTH_DATA
, *PPLUGPLAY_CONTROL_DEPTH_DATA
;
365 typedef struct _PLUGPLAY_CONTROL_RESET_DEVICE_DATA
367 UNICODE_STRING DeviceInstance
;
368 } PLUGPLAY_CONTROL_RESET_DEVICE_DATA
, *PPLUGPLAY_CONTROL_RESET_DEVICE_DATA
;
371 // Plug and Play Bus Type Definition
373 typedef struct _PLUGPLAY_BUS_TYPE
375 PLUGPLAY_BUS_CLASS BusClass
;
378 INTERFACE_TYPE SystemBusType
;
379 PLUGPLAY_VIRTUAL_BUS_TYPE PlugPlayVirtualBusType
;
381 } PLUGPLAY_BUS_TYPE
, *PPLUGPLAY_BUS_TYPE
;
384 // Plug and Play Bus Instance Definition
386 typedef struct _PLUGPLAY_BUS_INSTANCE
388 PLUGPLAY_BUS_TYPE BusType
;
390 WCHAR BusName
[MAX_BUS_NAME
];
391 } PLUGPLAY_BUS_INSTANCE
, *PPLUGPLAY_BUS_INSTANCE
;
393 #ifdef NTOS_MODE_USER
396 // Partial Resource Descriptor and List for Hardware
398 #include <pshpack1.h>
399 typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR
402 UCHAR ShareDisposition
;
408 PHYSICAL_ADDRESS Start
;
413 PHYSICAL_ADDRESS Start
;
424 PHYSICAL_ADDRESS Start
;
448 } DeviceSpecificData
;
450 } CM_PARTIAL_RESOURCE_DESCRIPTOR
, *PCM_PARTIAL_RESOURCE_DESCRIPTOR
;
452 typedef struct _CM_PARTIAL_RESOURCE_LIST
457 CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors
[1];
458 } CM_PARTIAL_RESOURCE_LIST
, *PCM_PARTIAL_RESOURCE_LIST
;
461 // Full Resource Descriptor and List for Hardware
463 typedef struct _CM_FULL_RESOURCE_DESCRIPTOR
465 INTERFACE_TYPE InterfaceType
;
467 CM_PARTIAL_RESOURCE_LIST PartialResourceList
;
468 } CM_FULL_RESOURCE_DESCRIPTOR
, *PCM_FULL_RESOURCE_DESCRIPTOR
;
470 typedef struct _CM_RESOURCE_LIST
473 CM_FULL_RESOURCE_DESCRIPTOR List
[1];
474 } CM_RESOURCE_LIST
, *PCM_RESOURCE_LIST
;
477 // Disk/INT13 Structures
479 typedef struct _CM_INT13_DRIVE_PARAMETER
483 USHORT SectorsPerTrack
;
486 } CM_INT13_DRIVE_PARAMETER
, *PCM_INT13_DRIVE_PARAMETER
;
488 typedef struct _CM_DISK_GEOMETRY_DEVICE_DATA
490 ULONG BytesPerSector
;
491 ULONG NumberOfCylinders
;
492 ULONG SectorsPerTrack
;
494 } CM_DISK_GEOMETRY_DEVICE_DATA
, *PCM_DISK_GEOMETRY_DEVICE_DATA
;
498 #endif // _!NTOS_MODE_USER