1 #ifndef __INCLUDE_DDK_PNPTYPES_H
2 #define __INCLUDE_DDK_PNPTYPES_H
7 // windows.h may be included before
11 typedef struct _GUID {
20 typedef struct _PNP_BUS_INFORMATION {
22 INTERFACE_TYPE LegacyBusType;
24 } PNP_BUS_INFORMATION, *PPNP_BUS_INFORMATION;
26 typedef struct _DEVICE_CAPABILITIES {
31 ULONG LockSupported:1;
32 ULONG EjectSupported:1;
36 ULONG SilentInstall:1;
38 ULONG SurpriseRemovalOK:1;
43 ULONG HardwareDisabled:1;
45 ULONG WarmEjectSupported:1;
49 DEVICE_POWER_STATE DeviceState[PowerSystemMaximum];
50 SYSTEM_POWER_STATE SystemWake;
51 DEVICE_POWER_STATE DeviceWake;
55 } DEVICE_CAPABILITIES, *PDEVICE_CAPABILITIES;
57 typedef struct _DEVICE_INTERFACE_CHANGE_NOTIFICATION {
62 // Event-specific data
64 GUID InterfaceClassGuid;
65 PUNICODE_STRING SymbolicLinkName;
66 } DEVICE_INTERFACE_CHANGE_NOTIFICATION, *PDEVICE_INTERFACE_CHANGE_NOTIFICATION;
68 typedef struct _HWPROFILE_CHANGE_NOTIFICATION {
73 // (No event-specific data)
75 } HWPROFILE_CHANGE_NOTIFICATION, *PHWPROFILE_CHANGE_NOTIFICATION;
77 typedef struct _PLUGPLAY_NOTIFICATION_HEADER {
81 } PLUGPLAY_NOTIFICATION_HEADER, *PPLUGPLAY_NOTIFICATION_HEADER;
83 typedef ULONG PNP_DEVICE_STATE, *PPNP_DEVICE_STATE;
85 #define PNP_DEVICE_DISABLED 0x00000001
86 #define PNP_DEVICE_DONT_DISPLAY_IN_UI 0x00000002
87 #define PNP_DEVICE_FAILED 0x00000004
88 #define PNP_DEVICE_REMOVED 0x00000008
89 #define PNP_DEVICE_RESOURCE_REQUIREMENTS_CHANGED 0x00000010
90 #define PNP_DEVICE_NOT_DISABLEABLE 0x00000020
92 typedef struct _TARGET_DEVICE_CUSTOM_NOTIFICATION {
97 // Event-specific data
99 struct _FILE_OBJECT *FileObject;
100 LONG NameBufferOffset;
101 UCHAR CustomDataBuffer[1];
102 } TARGET_DEVICE_CUSTOM_NOTIFICATION, *PTARGET_DEVICE_CUSTOM_NOTIFICATION;
104 typedef struct _TARGET_DEVICE_REMOVAL_NOTIFICATION {
109 // Event-specific data
111 struct _FILE_OBJECT *FileObject;
112 } TARGET_DEVICE_REMOVAL_NOTIFICATION, *PTARGET_DEVICE_REMOVAL_NOTIFICATION;
115 // PnP Device Property for IoGetDeviceProperty
117 DevicePropertyDeviceDescription,
118 DevicePropertyHardwareID,
119 DevicePropertyCompatibleIDs,
120 DevicePropertyBootConfiguration,
121 DevicePropertyBootConfigurationTranslated,
122 DevicePropertyClassName,
123 DevicePropertyClassGuid,
124 DevicePropertyDriverKeyName,
125 DevicePropertyManufacturer,
126 DevicePropertyFriendlyName,
127 DevicePropertyLocationInformation,
128 DevicePropertyPhysicalDeviceObjectName,
129 DevicePropertyBusTypeGuid,
130 DevicePropertyLegacyBusType,
131 DevicePropertyBusNumber,
132 DevicePropertyEnumeratorName,
133 DevicePropertyAddress,
134 DevicePropertyUINumber
135 } DEVICE_REGISTRY_PROPERTY;
137 // DevInstKeyType values for IoOpenDeviceRegistryKey
138 #define PLUGPLAY_REGKEY_DEVICE 1
139 #define PLUGPLAY_REGKEY_DRIVER 2
140 #define PLUGPLAY_REGKEY_CURRENT_HWPROFILE 4
142 // EventCategory for IoRegisterPlugPlayNotification
143 typedef enum _IO_NOTIFICATION_EVENT_CATEGORY {
144 EventCategoryReserved,
145 EventCategoryHardwareProfileChange,
146 EventCategoryDeviceInterfaceChange,
147 EventCategoryTargetDeviceChange
148 } IO_NOTIFICATION_EVENT_CATEGORY;
150 // CallbackRoutine for IoRegisterPlugPlayNotification
151 typedef NTSTATUS STDCALL
152 (*PDRIVER_NOTIFICATION_CALLBACK_ROUTINE)(
153 IN PVOID NotificationStructure,
156 // Callback for IoReportTargetDeviceChangeAsynchronous
158 (*PDEVICE_CHANGE_COMPLETE_CALLBACK)(
161 // PNP/POWER values for IRP_MJ_PNP/IRP_MJ_POWER
162 typedef enum _DEVICE_RELATION_TYPE {
168 } DEVICE_RELATION_TYPE, *PDEVICE_RELATION_TYPE;
170 typedef struct _DEVICE_RELATIONS {
172 struct _DEVICE_OBJECT *Objects[1];
173 } DEVICE_RELATIONS, *PDEVICE_RELATIONS;
175 typedef enum _DEVICE_USAGE_NOTIFICATION_TYPE {
176 DeviceUsageTypeUndefined,
177 DeviceUsageTypePaging,
178 DeviceUsageTypeHibernation,
179 DeviceUsageTypeDumpFile
180 } DEVICE_USAGE_NOTIFICATION_TYPE;
183 typedef struct _IO_REMOVE_LOCK_COMMON_BLOCK {
188 } IO_REMOVE_LOCK_COMMON_BLOCK;
190 typedef struct _IO_REMOVE_LOCK {
191 IO_REMOVE_LOCK_COMMON_BLOCK Common;
192 } IO_REMOVE_LOCK, *PIO_REMOVE_LOCK;
194 #endif /* __INCLUDE_DDK_PNPTYPES_H */