1 // 2 // Copyright (C) Microsoft. All rights reserved. 3 // 4 #ifndef _WDF_V1_0_TYPES_H_ 5 #define _WDF_V1_0_TYPES_H_ 6 7 8 typedef enum _WDFFUNCENUM_V1_0 { 9 WdfFunctionTableNumEntries_V1_0 = 383, 10 } WDFFUNCENUM_V1_0; 11 12 typedef struct _WDF_POWER_ROUTINE_TIMED_OUT_DATA_V1_0 *PWDF_POWER_ROUTINE_TIMED_OUT_DATA_V1_0; 13 typedef const struct _WDF_POWER_ROUTINE_TIMED_OUT_DATA_V1_0 *PCWDF_POWER_ROUTINE_TIMED_OUT_DATA_V1_0; 14 typedef struct _WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA_V1_0 *PWDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA_V1_0; 15 typedef const struct _WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA_V1_0 *PCWDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA_V1_0; 16 typedef struct _WDF_QUEUE_FATAL_ERROR_DATA_V1_0 *PWDF_QUEUE_FATAL_ERROR_DATA_V1_0; 17 typedef const struct _WDF_QUEUE_FATAL_ERROR_DATA_V1_0 *PCWDF_QUEUE_FATAL_ERROR_DATA_V1_0; 18 typedef struct _WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER_V1_0 *PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER_V1_0; 19 typedef const struct _WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER_V1_0 *PCWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER_V1_0; 20 typedef struct _WDF_CHILD_ADDRESS_DESCRIPTION_HEADER_V1_0 *PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER_V1_0; 21 typedef const struct _WDF_CHILD_ADDRESS_DESCRIPTION_HEADER_V1_0 *PCWDF_CHILD_ADDRESS_DESCRIPTION_HEADER_V1_0; 22 typedef struct _WDF_CHILD_RETRIEVE_INFO_V1_0 *PWDF_CHILD_RETRIEVE_INFO_V1_0; 23 typedef const struct _WDF_CHILD_RETRIEVE_INFO_V1_0 *PCWDF_CHILD_RETRIEVE_INFO_V1_0; 24 typedef struct _WDF_CHILD_LIST_CONFIG_V1_0 *PWDF_CHILD_LIST_CONFIG_V1_0; 25 typedef const struct _WDF_CHILD_LIST_CONFIG_V1_0 *PCWDF_CHILD_LIST_CONFIG_V1_0; 26 typedef struct _WDF_CHILD_LIST_ITERATOR_V1_0 *PWDF_CHILD_LIST_ITERATOR_V1_0; 27 typedef const struct _WDF_CHILD_LIST_ITERATOR_V1_0 *PCWDF_CHILD_LIST_ITERATOR_V1_0; 28 typedef struct _WDF_CLASS_EXTENSION_DESCRIPTOR_V1_0 *PWDF_CLASS_EXTENSION_DESCRIPTOR_V1_0; 29 typedef const struct _WDF_CLASS_EXTENSION_DESCRIPTOR_V1_0 *PCWDF_CLASS_EXTENSION_DESCRIPTOR_V1_0; 30 typedef struct _WDF_FILEOBJECT_CONFIG_V1_0 *PWDF_FILEOBJECT_CONFIG_V1_0; 31 typedef const struct _WDF_FILEOBJECT_CONFIG_V1_0 *PCWDF_FILEOBJECT_CONFIG_V1_0; 32 typedef struct _WDF_DEVICE_PNP_NOTIFICATION_DATA_V1_0 *PWDF_DEVICE_PNP_NOTIFICATION_DATA_V1_0; 33 typedef const struct _WDF_DEVICE_PNP_NOTIFICATION_DATA_V1_0 *PCWDF_DEVICE_PNP_NOTIFICATION_DATA_V1_0; 34 typedef struct _WDF_DEVICE_POWER_NOTIFICATION_DATA_V1_0 *PWDF_DEVICE_POWER_NOTIFICATION_DATA_V1_0; 35 typedef const struct _WDF_DEVICE_POWER_NOTIFICATION_DATA_V1_0 *PCWDF_DEVICE_POWER_NOTIFICATION_DATA_V1_0; 36 typedef struct _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA_V1_0 *PWDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA_V1_0; 37 typedef const struct _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA_V1_0 *PCWDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA_V1_0; 38 typedef struct _WDF_PNPPOWER_EVENT_CALLBACKS_V1_0 *PWDF_PNPPOWER_EVENT_CALLBACKS_V1_0; 39 typedef const struct _WDF_PNPPOWER_EVENT_CALLBACKS_V1_0 *PCWDF_PNPPOWER_EVENT_CALLBACKS_V1_0; 40 typedef struct _WDF_POWER_POLICY_EVENT_CALLBACKS_V1_0 *PWDF_POWER_POLICY_EVENT_CALLBACKS_V1_0; 41 typedef const struct _WDF_POWER_POLICY_EVENT_CALLBACKS_V1_0 *PCWDF_POWER_POLICY_EVENT_CALLBACKS_V1_0; 42 typedef struct _WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_V1_0 *PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_V1_0; 43 typedef const struct _WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_V1_0 *PCWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_V1_0; 44 typedef struct _WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS_V1_0 *PWDF_DEVICE_POWER_POLICY_WAKE_SETTINGS_V1_0; 45 typedef const struct _WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS_V1_0 *PCWDF_DEVICE_POWER_POLICY_WAKE_SETTINGS_V1_0; 46 typedef struct _WDF_DEVICE_STATE_V1_0 *PWDF_DEVICE_STATE_V1_0; 47 typedef const struct _WDF_DEVICE_STATE_V1_0 *PCWDF_DEVICE_STATE_V1_0; 48 typedef struct _WDF_DEVICE_PNP_CAPABILITIES_V1_0 *PWDF_DEVICE_PNP_CAPABILITIES_V1_0; 49 typedef const struct _WDF_DEVICE_PNP_CAPABILITIES_V1_0 *PCWDF_DEVICE_PNP_CAPABILITIES_V1_0; 50 typedef struct _WDF_DEVICE_POWER_CAPABILITIES_V1_0 *PWDF_DEVICE_POWER_CAPABILITIES_V1_0; 51 typedef const struct _WDF_DEVICE_POWER_CAPABILITIES_V1_0 *PCWDF_DEVICE_POWER_CAPABILITIES_V1_0; 52 typedef struct _WDF_DMA_ENABLER_CONFIG_V1_0 *PWDF_DMA_ENABLER_CONFIG_V1_0; 53 typedef const struct _WDF_DMA_ENABLER_CONFIG_V1_0 *PCWDF_DMA_ENABLER_CONFIG_V1_0; 54 typedef struct _WDF_DPC_CONFIG_V1_0 *PWDF_DPC_CONFIG_V1_0; 55 typedef const struct _WDF_DPC_CONFIG_V1_0 *PCWDF_DPC_CONFIG_V1_0; 56 typedef struct _WDF_DRIVER_CONFIG_V1_0 *PWDF_DRIVER_CONFIG_V1_0; 57 typedef const struct _WDF_DRIVER_CONFIG_V1_0 *PCWDF_DRIVER_CONFIG_V1_0; 58 typedef struct _WDF_DRIVER_VERSION_AVAILABLE_PARAMS_V1_0 *PWDF_DRIVER_VERSION_AVAILABLE_PARAMS_V1_0; 59 typedef const struct _WDF_DRIVER_VERSION_AVAILABLE_PARAMS_V1_0 *PCWDF_DRIVER_VERSION_AVAILABLE_PARAMS_V1_0; 60 typedef struct _WDF_FDO_EVENT_CALLBACKS_V1_0 *PWDF_FDO_EVENT_CALLBACKS_V1_0; 61 typedef const struct _WDF_FDO_EVENT_CALLBACKS_V1_0 *PCWDF_FDO_EVENT_CALLBACKS_V1_0; 62 typedef struct _WDF_DRIVER_GLOBALS_V1_0 *PWDF_DRIVER_GLOBALS_V1_0; 63 typedef const struct _WDF_DRIVER_GLOBALS_V1_0 *PCWDF_DRIVER_GLOBALS_V1_0; 64 typedef struct _WDF_INTERRUPT_CONFIG_V1_0 *PWDF_INTERRUPT_CONFIG_V1_0; 65 typedef const struct _WDF_INTERRUPT_CONFIG_V1_0 *PCWDF_INTERRUPT_CONFIG_V1_0; 66 typedef struct _WDF_INTERRUPT_INFO_V1_0 *PWDF_INTERRUPT_INFO_V1_0; 67 typedef const struct _WDF_INTERRUPT_INFO_V1_0 *PCWDF_INTERRUPT_INFO_V1_0; 68 typedef struct _WDF_IO_QUEUE_CONFIG_V1_0 *PWDF_IO_QUEUE_CONFIG_V1_0; 69 typedef const struct _WDF_IO_QUEUE_CONFIG_V1_0 *PCWDF_IO_QUEUE_CONFIG_V1_0; 70 typedef struct _WDF_IO_TARGET_OPEN_PARAMS_V1_0 *PWDF_IO_TARGET_OPEN_PARAMS_V1_0; 71 typedef const struct _WDF_IO_TARGET_OPEN_PARAMS_V1_0 *PCWDF_IO_TARGET_OPEN_PARAMS_V1_0; 72 typedef struct _WDFMEMORY_OFFSET_V1_0 *PWDFMEMORY_OFFSET_V1_0; 73 typedef const struct _WDFMEMORY_OFFSET_V1_0 *PCWDFMEMORY_OFFSET_V1_0; 74 typedef struct _WDF_MEMORY_DESCRIPTOR_V1_0 *PWDF_MEMORY_DESCRIPTOR_V1_0; 75 typedef const struct _WDF_MEMORY_DESCRIPTOR_V1_0 *PCWDF_MEMORY_DESCRIPTOR_V1_0; 76 typedef struct _WDF_OBJECT_ATTRIBUTES_V1_0 *PWDF_OBJECT_ATTRIBUTES_V1_0; 77 typedef const struct _WDF_OBJECT_ATTRIBUTES_V1_0 *PCWDF_OBJECT_ATTRIBUTES_V1_0; 78 typedef struct _WDF_OBJECT_CONTEXT_TYPE_INFO_V1_0 *PWDF_OBJECT_CONTEXT_TYPE_INFO_V1_0; 79 typedef const struct _WDF_OBJECT_CONTEXT_TYPE_INFO_V1_0 *PCWDF_OBJECT_CONTEXT_TYPE_INFO_V1_0; 80 typedef struct _WDF_PDO_EVENT_CALLBACKS_V1_0 *PWDF_PDO_EVENT_CALLBACKS_V1_0; 81 typedef const struct _WDF_PDO_EVENT_CALLBACKS_V1_0 *PCWDF_PDO_EVENT_CALLBACKS_V1_0; 82 typedef struct _WDF_QUERY_INTERFACE_CONFIG_V1_0 *PWDF_QUERY_INTERFACE_CONFIG_V1_0; 83 typedef const struct _WDF_QUERY_INTERFACE_CONFIG_V1_0 *PCWDF_QUERY_INTERFACE_CONFIG_V1_0; 84 typedef struct _WDF_REQUEST_PARAMETERS_V1_0 *PWDF_REQUEST_PARAMETERS_V1_0; 85 typedef const struct _WDF_REQUEST_PARAMETERS_V1_0 *PCWDF_REQUEST_PARAMETERS_V1_0; 86 typedef struct _WDF_REQUEST_COMPLETION_PARAMS_V1_0 *PWDF_REQUEST_COMPLETION_PARAMS_V1_0; 87 typedef const struct _WDF_REQUEST_COMPLETION_PARAMS_V1_0 *PCWDF_REQUEST_COMPLETION_PARAMS_V1_0; 88 typedef struct _WDF_REQUEST_REUSE_PARAMS_V1_0 *PWDF_REQUEST_REUSE_PARAMS_V1_0; 89 typedef const struct _WDF_REQUEST_REUSE_PARAMS_V1_0 *PCWDF_REQUEST_REUSE_PARAMS_V1_0; 90 typedef struct _WDF_REQUEST_SEND_OPTIONS_V1_0 *PWDF_REQUEST_SEND_OPTIONS_V1_0; 91 typedef const struct _WDF_REQUEST_SEND_OPTIONS_V1_0 *PCWDF_REQUEST_SEND_OPTIONS_V1_0; 92 typedef struct _WDF_TIMER_CONFIG_V1_0 *PWDF_TIMER_CONFIG_V1_0; 93 typedef const struct _WDF_TIMER_CONFIG_V1_0 *PCWDF_TIMER_CONFIG_V1_0; 94 typedef struct _WDF_USB_REQUEST_COMPLETION_PARAMS_V1_0 *PWDF_USB_REQUEST_COMPLETION_PARAMS_V1_0; 95 typedef const struct _WDF_USB_REQUEST_COMPLETION_PARAMS_V1_0 *PCWDF_USB_REQUEST_COMPLETION_PARAMS_V1_0; 96 typedef struct _WDF_USB_CONTINUOUS_READER_CONFIG_V1_0 *PWDF_USB_CONTINUOUS_READER_CONFIG_V1_0; 97 typedef const struct _WDF_USB_CONTINUOUS_READER_CONFIG_V1_0 *PCWDF_USB_CONTINUOUS_READER_CONFIG_V1_0; 98 typedef struct _WDF_USB_DEVICE_INFORMATION_V1_0 *PWDF_USB_DEVICE_INFORMATION_V1_0; 99 typedef const struct _WDF_USB_DEVICE_INFORMATION_V1_0 *PCWDF_USB_DEVICE_INFORMATION_V1_0; 100 typedef struct _WDF_USB_INTERFACE_SETTING_PAIR_V1_0 *PWDF_USB_INTERFACE_SETTING_PAIR_V1_0; 101 typedef const struct _WDF_USB_INTERFACE_SETTING_PAIR_V1_0 *PCWDF_USB_INTERFACE_SETTING_PAIR_V1_0; 102 typedef struct _WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_V1_0 *PWDF_USB_DEVICE_SELECT_CONFIG_PARAMS_V1_0; 103 typedef const struct _WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_V1_0 *PCWDF_USB_DEVICE_SELECT_CONFIG_PARAMS_V1_0; 104 typedef struct _WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_V1_0 *PWDF_USB_INTERFACE_SELECT_SETTING_PARAMS_V1_0; 105 typedef const struct _WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_V1_0 *PCWDF_USB_INTERFACE_SELECT_SETTING_PARAMS_V1_0; 106 typedef struct _WDF_USB_PIPE_INFORMATION_V1_0 *PWDF_USB_PIPE_INFORMATION_V1_0; 107 typedef const struct _WDF_USB_PIPE_INFORMATION_V1_0 *PCWDF_USB_PIPE_INFORMATION_V1_0; 108 typedef struct _WDF_WMI_PROVIDER_CONFIG_V1_0 *PWDF_WMI_PROVIDER_CONFIG_V1_0; 109 typedef const struct _WDF_WMI_PROVIDER_CONFIG_V1_0 *PCWDF_WMI_PROVIDER_CONFIG_V1_0; 110 typedef struct _WDF_WMI_INSTANCE_CONFIG_V1_0 *PWDF_WMI_INSTANCE_CONFIG_V1_0; 111 typedef const struct _WDF_WMI_INSTANCE_CONFIG_V1_0 *PCWDF_WMI_INSTANCE_CONFIG_V1_0; 112 typedef struct _WDF_WORKITEM_CONFIG_V1_0 *PWDF_WORKITEM_CONFIG_V1_0; 113 typedef const struct _WDF_WORKITEM_CONFIG_V1_0 *PCWDF_WORKITEM_CONFIG_V1_0; 114 115 // 116 // Versioning of structures for wdf.h 117 // 118 // End of versioning of structures for wdf.h 119 120 // 121 // Versioning of structures for wdfassert.h 122 // 123 // End of versioning of structures for wdfassert.h 124 125 // 126 // Versioning of structures for wdfbugcodes.h 127 // 128 typedef struct _WDF_POWER_ROUTINE_TIMED_OUT_DATA_V1_0 { 129 // 130 // Current power state associated with the timed out device 131 // 132 WDF_DEVICE_POWER_STATE PowerState; 133 134 // 135 // Current power policy state associated with the timed out device 136 // 137 WDF_DEVICE_POWER_POLICY_STATE PowerPolicyState; 138 139 // 140 // The device object for the timed out device 141 // 142 PDEVICE_OBJECT DeviceObject; 143 144 // 145 // The handle for the timed out device 146 // 147 WDFDEVICE Device; 148 149 // 150 // The thread which is stuck 151 // 152 PKTHREAD TimedOutThread; 153 154 } WDF_POWER_ROUTINE_TIMED_OUT_DATA_V1_0; 155 156 typedef struct _WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA_V1_0 { 157 WDFREQUEST Request; 158 159 PIRP Irp; 160 161 ULONG OutputBufferLength; 162 163 ULONG_PTR Information; 164 165 UCHAR MajorFunction; 166 167 } WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA_V1_0, *PWDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA_V1_0; 168 169 typedef struct _WDF_QUEUE_FATAL_ERROR_DATA_V1_0 { 170 WDFQUEUE Queue; 171 172 WDFREQUEST Request; 173 174 NTSTATUS Status; 175 176 } WDF_QUEUE_FATAL_ERROR_DATA_V1_0, *PWDF_QUEUE_FATAL_ERROR_DATA_V1_0; 177 178 // End of versioning of structures for wdfbugcodes.h 179 180 // 181 // Versioning of structures for wdfchildlist.h 182 // 183 typedef struct _WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER_V1_0 { 184 // 185 // Size in bytes of the entire description, including this header. 186 // 187 // Same value as WDF_CHILD_LIST_CONFIG::IdentificationDescriptionSize 188 // Used as a sanity check. 189 // 190 ULONG IdentificationDescriptionSize; 191 192 } WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER_V1_0, *PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER_V1_0; 193 194 typedef struct _WDF_CHILD_ADDRESS_DESCRIPTION_HEADER_V1_0 { 195 // 196 // Size in bytes of the entire description, including this header. 197 // 198 // Same value as WDF_CHILD_LIST_CONFIG::AddressDescriptionSize 199 // Used as a sanity check. 200 // 201 ULONG AddressDescriptionSize; 202 203 } WDF_CHILD_ADDRESS_DESCRIPTION_HEADER_V1_0, *PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER_V1_0; 204 205 typedef struct _WDF_CHILD_RETRIEVE_INFO_V1_0 { 206 // 207 // Size of the structure in bytes 208 // 209 ULONG Size; 210 211 // 212 // Must be a valid pointer when passed in, copied into upon success 213 // 214 PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER_V1_0 IdentificationDescription; 215 216 // 217 // Optional pointer when passed in, copied into upon success 218 // 219 PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER_V1_0 AddressDescription; 220 221 // 222 // Status of the returned device 223 // 224 WDF_CHILD_LIST_RETRIEVE_DEVICE_STATUS Status; 225 226 // 227 // If provided, will be used for searching through the list of devices 228 // instead of the default list ID compare function 229 // 230 PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_COMPARE EvtChildListIdentificationDescriptionCompare; 231 232 } WDF_CHILD_RETRIEVE_INFO_V1_0, *PWDF_CHILD_RETRIEVE_INFO_V1_0; 233 234 typedef struct _WDF_CHILD_LIST_CONFIG_V1_0 { 235 // 236 // Size of this structure in bytes 237 // 238 ULONG Size; 239 240 // 241 // The size in bytes of an identificaiton description to be used with the 242 // created WDFCHILDLIST handle 243 // 244 ULONG IdentificationDescriptionSize; 245 246 // 247 // Optional size in bytes of an address description to be used with the 248 // created WDFCHILDLIST handle. 249 // 250 ULONG AddressDescriptionSize; 251 252 // 253 // Required callback to be invoked when a description on the device list 254 // needs to be converted into a real WDFDEVICE handle. 255 // 256 PFN_WDF_CHILD_LIST_CREATE_DEVICE EvtChildListCreateDevice; 257 258 // 259 // Optional callback to be invoked when the device list needs to be 260 // rescanned. This function will be called after the device has entered D0 261 // and been fully initialized but before I/O has started. 262 // 263 PFN_WDF_CHILD_LIST_SCAN_FOR_CHILDREN EvtChildListScanForChildren; 264 265 // 266 // Optional callback to be invoked when an identification description needs 267 // to be copied from one location to another. 268 // 269 // If left NULL, RtlCopyMemory will be used to copy the description. 270 // 271 PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_COPY EvtChildListIdentificationDescriptionCopy; 272 273 // 274 // Optional callback to be invoked when an identification description needs 275 // to be duplicated. As opposed to EvtChildListIdentificationDescriptionCopy, 276 // EvtChildListIdentificationDescriptionDuplicate can fail. 277 // 278 PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_DUPLICATE EvtChildListIdentificationDescriptionDuplicate; 279 280 // 281 // Optional callback to be invoked when an identification description needs 282 // to be cleaned up. This function should *NOT* free the description passed 283 // to it, just free any associated resources. 284 // 285 PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_CLEANUP EvtChildListIdentificationDescriptionCleanup; 286 287 // 288 // Optional callback to be invoked when an identification description needs 289 // to be compared with another identificaiton description. 290 // 291 // If left NULL, RtlCompareMemory will be used to compare the two 292 // descriptions. 293 // 294 PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_COMPARE EvtChildListIdentificationDescriptionCompare; 295 296 // 297 // Optional callback to be invoked when an address description needs 298 // to be copied from one location to another. 299 // 300 // If left NULL, RtlCopyMemory will be used to copy the description. 301 // 302 PFN_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_COPY EvtChildListAddressDescriptionCopy; 303 304 // 305 // Optional callback to be invoked when an address description needs to be 306 // duplicated. As opposed to EvtChildListAddressDescriptionCopy, 307 // EvtChildListAddressDescriptionDuplicate can fail. 308 // 309 PFN_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_DUPLICATE EvtChildListAddressDescriptionDuplicate; 310 311 // 312 // Optional callback to be invoked when an address description needs to be 313 // cleaned up. This function should *NOT* free the description passed to 314 // it, just free any associated resources. 315 // 316 PFN_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_CLEANUP EvtChildListAddressDescriptionCleanup; 317 318 // 319 // If provided, will be called when the child's stack requests that the 320 // child be reenumerated. Returning TRUE allows for the reenumeration to 321 // proceed. FALSE will no reenumerate the stack. 322 // 323 PFN_WDF_CHILD_LIST_DEVICE_REENUMERATED EvtChildListDeviceReenumerated; 324 325 } WDF_CHILD_LIST_CONFIG_V1_0, *PWDF_CHILD_LIST_CONFIG_V1_0; 326 327 typedef struct _WDF_CHILD_LIST_ITERATOR_V1_0 { 328 // 329 // Size of this structure in bytes 330 // 331 ULONG Size; 332 333 // 334 // What type of devices to return, see WDF_RETRIEVE_CHILD_FLAGS for 335 // flag values 336 // 337 // 338 ULONG Flags; 339 340 // 341 // For internal use, treat this field as opaque 342 // 343 PVOID Reserved[4]; 344 345 } WDF_CHILD_LIST_ITERATOR_V1_0, *PWDF_CHILD_LIST_ITERATOR_V1_0; 346 347 // End of versioning of structures for wdfchildlist.h 348 349 // 350 // Versioning of structures for wdfClassExtension.h 351 // 352 typedef struct _WDF_CLASS_EXTENSION_DESCRIPTOR_V1_0 { 353 PCWDF_CLASS_EXTENSION_DESCRIPTOR_V1_0 Next; 354 355 ULONG Size; 356 357 PFN_WDF_CLASS_EXTENSIONIN_BIND Bind; 358 359 PFN_WDF_CLASS_EXTENSIONIN_UNBIND Unbind; 360 361 } WDF_CLASS_EXTENSION_DESCRIPTOR_V1_0, *PWDF_CLASS_EXTENSION_DESCRIPTOR_V1_0; 362 363 // End of versioning of structures for wdfClassExtension.h 364 365 // 366 // Versioning of structures for wdfClassExtensionList.h 367 // 368 // End of versioning of structures for wdfClassExtensionList.h 369 370 // 371 // Versioning of structures for wdfcollection.h 372 // 373 // End of versioning of structures for wdfcollection.h 374 375 // 376 // Versioning of structures for wdfCommonBuffer.h 377 // 378 // End of versioning of structures for wdfCommonBuffer.h 379 380 // 381 // Versioning of structures for wdfcontrol.h 382 // 383 // End of versioning of structures for wdfcontrol.h 384 385 // 386 // Versioning of structures for wdfcore.h 387 // 388 // End of versioning of structures for wdfcore.h 389 390 // 391 // Versioning of structures for wdfDevice.h 392 // 393 typedef struct _WDF_FILEOBJECT_CONFIG_V1_0 { 394 // 395 // Size of this structure in bytes 396 // 397 ULONG Size; 398 399 // 400 // Event callback for create requests 401 // 402 PFN_WDF_DEVICE_FILE_CREATE EvtDeviceFileCreate; 403 404 // 405 // Event callback for close requests 406 // 407 PFN_WDF_FILE_CLOSE EvtFileClose; 408 409 // 410 // Event callback for cleanup requests 411 // 412 PFN_WDF_FILE_CLEANUP EvtFileCleanup; 413 414 // 415 // If WdfTrue, create/cleanup/close file object related requests will be 416 // sent down the stack. 417 // 418 // If WdfFalse, create/cleanup/close will be completed at this location in 419 // the device stack. 420 // 421 // If WdfDefault, behavior depends on device type 422 // FDO, PDO, Control: use the WdfFalse behavior 423 // Filter: use the WdfTrue behavior 424 // 425 WDF_TRI_STATE AutoForwardCleanupClose; 426 427 // 428 // Specify whether framework should create WDFFILEOBJECT and also 429 // whether it can FsContexts fields in the WDM fileobject to store 430 // WDFFILEOBJECT so that it can avoid table look up and improve perf. 431 // 432 WDF_FILEOBJECT_CLASS FileObjectClass; 433 434 } WDF_FILEOBJECT_CONFIG_V1_0, *PWDF_FILEOBJECT_CONFIG_V1_0; 435 436 typedef struct _WDF_DEVICE_PNP_NOTIFICATION_DATA_V1_0 { 437 // 438 // Type of data 439 // 440 WDF_STATE_NOTIFICATION_TYPE Type; 441 442 union { 443 struct { 444 // 445 // The current state that is about to be exited 446 // 447 WDF_DEVICE_PNP_STATE CurrentState; 448 449 // 450 // The new state that is about to be entered 451 // 452 WDF_DEVICE_PNP_STATE NewState; 453 454 } EnterState; 455 456 struct { 457 // 458 // The current state 459 // 460 WDF_DEVICE_PNP_STATE CurrentState; 461 462 } PostProcessState; 463 464 struct { 465 // 466 // The current state that is about to be exitted 467 // 468 WDF_DEVICE_PNP_STATE CurrentState; 469 470 // 471 // The state that is about to be entered 472 // 473 WDF_DEVICE_PNP_STATE NewState; 474 475 } LeaveState; 476 477 } Data; 478 479 } WDF_DEVICE_PNP_NOTIFICATION_DATA_V1_0; 480 481 typedef struct _WDF_DEVICE_POWER_NOTIFICATION_DATA_V1_0 { 482 // 483 // Type of data 484 // 485 WDF_STATE_NOTIFICATION_TYPE Type; 486 487 union { 488 struct { 489 // 490 // The current state that is about to be exitted 491 // 492 WDF_DEVICE_POWER_STATE CurrentState; 493 494 // 495 // The new state that is about to be entered 496 // 497 WDF_DEVICE_POWER_STATE NewState; 498 499 } EnterState; 500 501 struct { 502 // 503 // The current state 504 // 505 WDF_DEVICE_POWER_STATE CurrentState; 506 507 } PostProcessState; 508 509 struct { 510 // 511 // The current state that is about to be exitted 512 // 513 WDF_DEVICE_POWER_STATE CurrentState; 514 515 // 516 // The state that is about to be entered 517 // 518 WDF_DEVICE_POWER_STATE NewState; 519 520 } LeaveState; 521 522 } Data; 523 524 } WDF_DEVICE_POWER_NOTIFICATION_DATA_V1_0; 525 526 typedef struct _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA_V1_0 { 527 // 528 // Type of data 529 // 530 WDF_STATE_NOTIFICATION_TYPE Type; 531 532 union { 533 struct { 534 // 535 // The current state that is about to be exitted 536 // 537 WDF_DEVICE_POWER_POLICY_STATE CurrentState; 538 539 // 540 // The new state that is about to be entered 541 // 542 WDF_DEVICE_POWER_POLICY_STATE NewState; 543 544 } EnterState; 545 546 struct { 547 // 548 // The current state 549 // 550 WDF_DEVICE_POWER_POLICY_STATE CurrentState; 551 552 } PostProcessState; 553 554 struct { 555 // 556 // The current state that is about to be exitted 557 // 558 WDF_DEVICE_POWER_POLICY_STATE CurrentState; 559 560 // 561 // The state that is about to be entered 562 // 563 WDF_DEVICE_POWER_POLICY_STATE NewState; 564 565 } LeaveState; 566 567 } Data; 568 569 } WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA_V1_0; 570 571 typedef struct _WDF_PNPPOWER_EVENT_CALLBACKS_V1_0 { 572 // 573 // Size of this structure in bytes 574 // 575 ULONG Size; 576 577 PFN_WDF_DEVICE_D0_ENTRY EvtDeviceD0Entry; 578 579 PFN_WDF_DEVICE_D0_ENTRY_POST_INTERRUPTS_ENABLED EvtDeviceD0EntryPostInterruptsEnabled; 580 581 PFN_WDF_DEVICE_D0_EXIT EvtDeviceD0Exit; 582 583 PFN_WDF_DEVICE_D0_EXIT_PRE_INTERRUPTS_DISABLED EvtDeviceD0ExitPreInterruptsDisabled; 584 585 PFN_WDF_DEVICE_PREPARE_HARDWARE EvtDevicePrepareHardware; 586 587 PFN_WDF_DEVICE_RELEASE_HARDWARE EvtDeviceReleaseHardware; 588 589 PFN_WDF_DEVICE_SELF_MANAGED_IO_CLEANUP EvtDeviceSelfManagedIoCleanup; 590 591 PFN_WDF_DEVICE_SELF_MANAGED_IO_FLUSH EvtDeviceSelfManagedIoFlush; 592 593 PFN_WDF_DEVICE_SELF_MANAGED_IO_INIT EvtDeviceSelfManagedIoInit; 594 595 PFN_WDF_DEVICE_SELF_MANAGED_IO_SUSPEND EvtDeviceSelfManagedIoSuspend; 596 597 PFN_WDF_DEVICE_SELF_MANAGED_IO_RESTART EvtDeviceSelfManagedIoRestart; 598 599 PFN_WDF_DEVICE_SURPRISE_REMOVAL EvtDeviceSurpriseRemoval; 600 601 PFN_WDF_DEVICE_QUERY_REMOVE EvtDeviceQueryRemove; 602 603 PFN_WDF_DEVICE_QUERY_STOP EvtDeviceQueryStop; 604 605 PFN_WDF_DEVICE_USAGE_NOTIFICATION EvtDeviceUsageNotification; 606 607 PFN_WDF_DEVICE_RELATIONS_QUERY EvtDeviceRelationsQuery; 608 609 } WDF_PNPPOWER_EVENT_CALLBACKS_V1_0, *PWDF_PNPPOWER_EVENT_CALLBACKS_V1_0; 610 611 typedef struct _WDF_POWER_POLICY_EVENT_CALLBACKS_V1_0 { 612 // 613 // Size of this structure in bytes 614 // 615 ULONG Size; 616 617 PFN_WDF_DEVICE_ARM_WAKE_FROM_S0 EvtDeviceArmWakeFromS0; 618 619 PFN_WDF_DEVICE_DISARM_WAKE_FROM_S0 EvtDeviceDisarmWakeFromS0; 620 621 PFN_WDF_DEVICE_WAKE_FROM_S0_TRIGGERED EvtDeviceWakeFromS0Triggered; 622 623 PFN_WDF_DEVICE_ARM_WAKE_FROM_SX EvtDeviceArmWakeFromSx; 624 625 PFN_WDF_DEVICE_DISARM_WAKE_FROM_SX EvtDeviceDisarmWakeFromSx; 626 627 PFN_WDF_DEVICE_WAKE_FROM_SX_TRIGGERED EvtDeviceWakeFromSxTriggered; 628 629 } WDF_POWER_POLICY_EVENT_CALLBACKS_V1_0, *PWDF_POWER_POLICY_EVENT_CALLBACKS_V1_0; 630 631 typedef struct _WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_V1_0 { 632 // 633 // Size of this structure in bytes 634 // 635 ULONG Size; 636 637 // 638 // Indicates whether the device can wake itself up while the machine is in 639 // S0. 640 // 641 WDF_POWER_POLICY_S0_IDLE_CAPABILITIES IdleCaps; 642 643 // 644 // The low power state in which the device will be placed when it is idled 645 // out while the machine is in S0. 646 // 647 DEVICE_POWER_STATE DxState; 648 649 // 650 // Amount of time the device must be idle before idling out. Timeout is in 651 // milliseconds. 652 // 653 ULONG IdleTimeout; 654 655 // 656 // Inidcates whether a user can control the idle policy of the device. 657 // By default, a user is allowed to change the policy. 658 // 659 WDF_POWER_POLICY_S0_IDLE_USER_CONTROL UserControlOfIdleSettings; 660 661 // 662 // If WdfTrue, idling out while the machine is in S0 will be enabled. 663 // 664 // If WdfFalse, idling out will be disabled. 665 // 666 // If WdfUseDefault, the idling out will be enabled. If 667 // UserControlOfIdleSettings is set to IdleAllowUserControl, the user's 668 // settings will override the default. 669 // 670 WDF_TRI_STATE Enabled; 671 672 } WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_V1_0, *PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_V1_0; 673 674 typedef struct _WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS_V1_0 { 675 // 676 // Size of this structure in bytes 677 // 678 ULONG Size; 679 680 // 681 // The low power state in which the device will be placed when it is armed 682 // for wake from Sx. 683 // 684 DEVICE_POWER_STATE DxState; 685 686 // 687 // Inidcates whether a user can control the idle policy of the device. 688 // By default, a user is allowed to change the policy. 689 // 690 WDF_POWER_POLICY_SX_WAKE_USER_CONTROL UserControlOfWakeSettings; 691 692 // 693 // If WdfTrue, arming the device for wake while the machine is in Sx is 694 // enabled. 695 // 696 // If WdfFalse, arming the device for wake while the machine is in Sx is 697 // disabled. 698 // 699 // If WdfUseDefault, arming will be enabled. If UserControlOfWakeSettings 700 // is set to WakeAllowUserControl, the user's settings will override the 701 // default. 702 // 703 WDF_TRI_STATE Enabled; 704 705 } WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS_V1_0, *PWDF_DEVICE_POWER_POLICY_WAKE_SETTINGS_V1_0; 706 707 typedef struct _WDF_DEVICE_STATE_V1_0 { 708 // 709 // Size of this structure in bytes 710 // 711 ULONG Size; 712 713 // 714 // If set to WdfTrue, the device will be disabled 715 // 716 WDF_TRI_STATE Disabled; 717 718 // 719 // If set to WdfTrue, the device will not be displayed in device manager. 720 // Once hidden, the device cannot be unhidden. 721 // 722 WDF_TRI_STATE DontDisplayInUI; 723 724 // 725 // If set to WdfTrue, the device is reporting itself as failed. If set 726 // in conjuction with ResourcesChanged to WdfTrue, the device will receive 727 // a PnP stop and then a new PnP start device. 728 // 729 WDF_TRI_STATE Failed; 730 731 // 732 // If set to WdfTrue, the device cannot be subsequently disabled. 733 // 734 WDF_TRI_STATE NotDisableable; 735 736 737 738 739 // 740 // 741 // If set to WdfTrue, the device stack will be torn down. 742 // 743 WDF_TRI_STATE Removed; 744 745 // 746 // If set to WdfTrue, the device will be sent another PnP start. If the 747 // Failed field is set to WdfTrue as well, a PnP stop will be sent before 748 // the start. 749 // 750 WDF_TRI_STATE ResourcesChanged; 751 752 } WDF_DEVICE_STATE_V1_0, *PWDF_DEVICE_STATE_V1_0; 753 754 typedef struct _WDF_DEVICE_PNP_CAPABILITIES_V1_0 { 755 // 756 // Size of the structure in bytes 757 // 758 ULONG Size; 759 760 // 761 // NOTE: To mark a PDO as raw, call WdfPdoInitAssignRawDevice 762 // 763 // 764 WDF_TRI_STATE LockSupported; 765 766 WDF_TRI_STATE EjectSupported; 767 768 WDF_TRI_STATE Removable; 769 770 WDF_TRI_STATE DockDevice; 771 772 WDF_TRI_STATE UniqueID; 773 774 WDF_TRI_STATE SilentInstall; 775 776 WDF_TRI_STATE SurpriseRemovalOK; 777 778 WDF_TRI_STATE HardwareDisabled; 779 780 WDF_TRI_STATE NoDisplayInUI; 781 782 // 783 // Default values of -1 indicate not to set this value 784 // 785 ULONG Address; 786 787 ULONG UINumber; 788 789 } WDF_DEVICE_PNP_CAPABILITIES_V1_0, *PWDF_DEVICE_PNP_CAPABILITIES_V1_0; 790 791 typedef struct _WDF_DEVICE_POWER_CAPABILITIES_V1_0 { 792 // 793 // Size of the structure in bytes 794 // 795 ULONG Size; 796 797 WDF_TRI_STATE DeviceD1; 798 799 WDF_TRI_STATE DeviceD2; 800 801 WDF_TRI_STATE WakeFromD0; 802 803 WDF_TRI_STATE WakeFromD1; 804 805 WDF_TRI_STATE WakeFromD2; 806 807 WDF_TRI_STATE WakeFromD3; 808 809 // 810 // Default value PowerDeviceMaximum indicates not to set this value 811 // 812 DEVICE_POWER_STATE DeviceState[PowerSystemMaximum]; 813 814 // 815 // Default value PowerDeviceMaximum, PowerSystemMaximum indicates not to 816 // set this value. 817 // 818 DEVICE_POWER_STATE DeviceWake; 819 820 SYSTEM_POWER_STATE SystemWake; 821 822 // 823 // Default values of -1 indicate not to set this value 824 // 825 ULONG D1Latency; 826 827 ULONG D2Latency; 828 829 ULONG D3Latency; 830 831 // 832 // Ideal Dx state for the device to be put into when the machine moves into 833 // Sx and the device is not armed for wake. By default, the default will be 834 // placed into D3. If IdealDxStateForSx is lighter then 835 // DeviceState[Sx], then DeviceState[Sx] will be used as the Dx state. 836 // 837 DEVICE_POWER_STATE IdealDxStateForSx; 838 839 } WDF_DEVICE_POWER_CAPABILITIES_V1_0, *PWDF_DEVICE_POWER_CAPABILITIES_V1_0; 840 841 // End of versioning of structures for wdfDevice.h 842 843 // 844 // Versioning of structures for wdfDmaEnabler.h 845 // 846 typedef struct _WDF_DMA_ENABLER_CONFIG_V1_0 { 847 // 848 // Size of this structure in bytes 849 // 850 ULONG Size; 851 852 // 853 // One of the above WDF_DMA_PROFILES 854 // 855 WDF_DMA_PROFILE Profile; 856 857 // 858 // Maximum DMA Transfer handled in bytes. 859 // 860 size_t MaximumLength; 861 862 // 863 // The various DMA PnP/Power event callbacks 864 // 865 PFN_WDF_DMA_ENABLER_FILL EvtDmaEnablerFill; 866 867 PFN_WDF_DMA_ENABLER_FLUSH EvtDmaEnablerFlush; 868 869 PFN_WDF_DMA_ENABLER_DISABLE EvtDmaEnablerDisable; 870 871 PFN_WDF_DMA_ENABLER_ENABLE EvtDmaEnablerEnable; 872 873 PFN_WDF_DMA_ENABLER_SELFMANAGED_IO_START EvtDmaEnablerSelfManagedIoStart; 874 875 PFN_WDF_DMA_ENABLER_SELFMANAGED_IO_STOP EvtDmaEnablerSelfManagedIoStop; 876 877 } WDF_DMA_ENABLER_CONFIG_V1_0, *PWDF_DMA_ENABLER_CONFIG_V1_0; 878 879 // End of versioning of structures for wdfDmaEnabler.h 880 881 // 882 // Versioning of structures for wdfDmaTransaction.h 883 // 884 // End of versioning of structures for wdfDmaTransaction.h 885 886 // 887 // Versioning of structures for wdfdpc.h 888 // 889 typedef struct _WDF_DPC_CONFIG_V1_0 { 890 ULONG Size; 891 892 PFN_WDF_DPC EvtDpcFunc; 893 894 // 895 // If this is TRUE, the DPC will automatically serialize 896 // with the event callback handlers of its Parent Object. 897 // 898 // Parent Object's callback constraints should be compatible 899 // with the DPC (DISPATCH_LEVEL), or the request will fail. 900 // 901 BOOLEAN AutomaticSerialization; 902 903 } WDF_DPC_CONFIG_V1_0, *PWDF_DPC_CONFIG_V1_0; 904 905 // End of versioning of structures for wdfdpc.h 906 907 // 908 // Versioning of structures for wdfdriver.h 909 // 910 typedef struct _WDF_DRIVER_CONFIG_V1_0 { 911 // 912 // Size of this structure in bytes 913 // 914 ULONG Size; 915 916 // 917 // Event callbacks 918 // 919 PFN_WDF_DRIVER_DEVICE_ADD EvtDriverDeviceAdd; 920 921 PFN_WDF_DRIVER_UNLOAD EvtDriverUnload; 922 923 // 924 // Combination of WDF_DRIVER_INIT_FLAGS values 925 // 926 ULONG DriverInitFlags; 927 928 } WDF_DRIVER_CONFIG_V1_0, *PWDF_DRIVER_CONFIG_V1_0; 929 930 typedef struct _WDF_DRIVER_VERSION_AVAILABLE_PARAMS_V1_0 { 931 // 932 // Size of the structure in bytes 933 // 934 ULONG Size; 935 936 // 937 // Major Version requested 938 // 939 ULONG MajorVersion; 940 941 // 942 // Minor Version requested 943 // 944 ULONG MinorVersion; 945 946 } WDF_DRIVER_VERSION_AVAILABLE_PARAMS_V1_0, *PWDF_DRIVER_VERSION_AVAILABLE_PARAMS_V1_0; 947 948 // End of versioning of structures for wdfdriver.h 949 950 // 951 // Versioning of structures for wdffdo.h 952 // 953 typedef struct _WDF_FDO_EVENT_CALLBACKS_V1_0 { 954 // 955 // Size of this structure in bytes 956 // 957 ULONG Size; 958 959 PFN_WDF_DEVICE_FILTER_RESOURCE_REQUIREMENTS EvtDeviceFilterAddResourceRequirements; 960 961 PFN_WDF_DEVICE_FILTER_RESOURCE_REQUIREMENTS EvtDeviceFilterRemoveResourceRequirements; 962 963 PFN_WDF_DEVICE_REMOVE_ADDED_RESOURCES EvtDeviceRemoveAddedResources; 964 965 } WDF_FDO_EVENT_CALLBACKS_V1_0, *PWDF_FDO_EVENT_CALLBACKS_V1_0; 966 967 // End of versioning of structures for wdffdo.h 968 969 // 970 // Versioning of structures for wdffileobject.h 971 // 972 // End of versioning of structures for wdffileobject.h 973 974 // 975 // Versioning of structures for wdfGlobals.h 976 // 977 typedef struct _WDF_DRIVER_GLOBALS_V1_0 { 978 // backpointer to the handle for this driver 979 WDFDRIVER Driver; 980 981 // Flags indicated by the driver during create 982 ULONG DriverFlags; 983 984 // Tag generated by WDF for the driver. Tag used by allocations made on 985 // behalf of the driver by WDF. 986 ULONG DriverTag; 987 988 CHAR DriverName[WDF_DRIVER_GLOBALS_NAME_LEN]; 989 990 // If TRUE, the stub code will capture DriverObject->DriverUnload and insert 991 // itself first in the unload chain. If FALSE, DriverUnload is left alone 992 // (but WDF will not be notified of unload and there will be no auto cleanup). 993 BOOLEAN DisplaceDriverUnload; 994 995 } WDF_DRIVER_GLOBALS_V1_0, *PWDF_DRIVER_GLOBALS_V1_0; 996 997 // End of versioning of structures for wdfGlobals.h 998 999 // 1000 // Versioning of structures for wdfinstaller.h 1001 // 1002 // End of versioning of structures for wdfinstaller.h 1003 1004 // 1005 // Versioning of structures for wdfinterrupt.h 1006 // 1007 // 1008 // Interrupt Configuration Structure 1009 // 1010 typedef struct _WDF_INTERRUPT_CONFIG_V1_0 { 1011 ULONG Size; 1012 1013 // 1014 // If this interrupt is to be synchronized with other interrupt(s) assigned 1015 // to the same WDFDEVICE, create a WDFSPINLOCK and assign it to each of the 1016 // WDFINTERRUPTs config. 1017 // 1018 WDFSPINLOCK SpinLock; 1019 1020 WDF_TRI_STATE ShareVector; 1021 1022 BOOLEAN FloatingSave; 1023 1024 // 1025 // Automatic Serialization of the DpcForIsr 1026 // 1027 BOOLEAN AutomaticSerialization; 1028 1029 // Event Callbacks 1030 PFN_WDF_INTERRUPT_ISR EvtInterruptIsr; 1031 1032 PFN_WDF_INTERRUPT_DPC EvtInterruptDpc; 1033 1034 PFN_WDF_INTERRUPT_ENABLE EvtInterruptEnable; 1035 1036 PFN_WDF_INTERRUPT_DISABLE EvtInterruptDisable; 1037 1038 } WDF_INTERRUPT_CONFIG_V1_0, *PWDF_INTERRUPT_CONFIG_V1_0; 1039 1040 typedef struct _WDF_INTERRUPT_INFO_V1_0 { 1041 // 1042 // Size of this structure in bytes 1043 // 1044 ULONG Size; 1045 1046 PHYSICAL_ADDRESS MessageAddress; 1047 1048 KAFFINITY TargetProcessorSet; 1049 1050 ULONG MessageData; 1051 1052 ULONG MessageNumber; 1053 1054 ULONG Vector; 1055 1056 KIRQL Irql; 1057 1058 KINTERRUPT_MODE Mode; 1059 1060 WDF_INTERRUPT_POLARITY Polarity; 1061 1062 BOOLEAN MessageSignaled; 1063 1064 // CM_SHARE_DISPOSITION 1065 UCHAR ShareDisposition; 1066 1067 } WDF_INTERRUPT_INFO_V1_0, *PWDF_INTERRUPT_INFO_V1_0; 1068 1069 // End of versioning of structures for wdfinterrupt.h 1070 1071 // 1072 // Versioning of structures for wdfio.h 1073 // 1074 // 1075 // This is the structure used to configure an IoQueue and 1076 // register callback events to it. 1077 // 1078 // 1079 typedef struct _WDF_IO_QUEUE_CONFIG_V1_0 { 1080 ULONG Size; 1081 1082 WDF_IO_QUEUE_DISPATCH_TYPE DispatchType; 1083 1084 WDF_TRI_STATE PowerManaged; 1085 1086 BOOLEAN AllowZeroLengthRequests; 1087 1088 BOOLEAN DefaultQueue; 1089 1090 PFN_WDF_IO_QUEUE_IO_DEFAULT EvtIoDefault; 1091 1092 PFN_WDF_IO_QUEUE_IO_READ EvtIoRead; 1093 1094 PFN_WDF_IO_QUEUE_IO_WRITE EvtIoWrite; 1095 1096 PFN_WDF_IO_QUEUE_IO_DEVICE_CONTROL EvtIoDeviceControl; 1097 1098 PFN_WDF_IO_QUEUE_IO_INTERNAL_DEVICE_CONTROL EvtIoInternalDeviceControl; 1099 1100 PFN_WDF_IO_QUEUE_IO_STOP EvtIoStop; 1101 1102 PFN_WDF_IO_QUEUE_IO_RESUME EvtIoResume; 1103 1104 PFN_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE EvtIoCanceledOnQueue; 1105 1106 } WDF_IO_QUEUE_CONFIG_V1_0, *PWDF_IO_QUEUE_CONFIG_V1_0; 1107 1108 // End of versioning of structures for wdfio.h 1109 1110 // 1111 // Versioning of structures for wdfIoTarget.h 1112 // 1113 typedef struct _WDF_IO_TARGET_OPEN_PARAMS_V1_0 { 1114 // 1115 // Size of this structure in bytes 1116 // 1117 ULONG Size; 1118 1119 // 1120 // Indicates which fields of this structure are going to be used in 1121 // creating the WDFIOTARGET. 1122 // 1123 WDF_IO_TARGET_OPEN_TYPE Type; 1124 1125 // 1126 // Notification when the target is being queried for removal. 1127 // If !NT_SUCCESS is returned, the query will fail and the target will 1128 // remain opened. 1129 // 1130 PFN_WDF_IO_TARGET_QUERY_REMOVE EvtIoTargetQueryRemove; 1131 1132 // 1133 // The previous query remove has been canceled and the target can now be 1134 // reopened. 1135 // 1136 PFN_WDF_IO_TARGET_REMOVE_CANCELED EvtIoTargetRemoveCanceled; 1137 1138 // 1139 // The query remove has succeeded and the target is now removed from the 1140 // system. 1141 // 1142 PFN_WDF_IO_TARGET_REMOVE_COMPLETE EvtIoTargetRemoveComplete; 1143 1144 // ========== WdfIoTargetOpenUseExistingDevice begin ========== 1145 // 1146 // The device object to send requests to 1147 // 1148 PDEVICE_OBJECT TargetDeviceObject; 1149 1150 // 1151 // File object representing the TargetDeviceObject. The PFILE_OBJECT will 1152 // be passed as a parameter in all requests sent to the resulting 1153 // WDFIOTARGET. 1154 // 1155 PFILE_OBJECT TargetFileObject; 1156 1157 // ========== WdfIoTargetOpenUseExistingDevice end ========== 1158 // 1159 // ========== WdfIoTargetOpenByName begin ========== 1160 // 1161 // Name of the device to open. 1162 // 1163 UNICODE_STRING TargetDeviceName; 1164 1165 // 1166 // The access desired on the device being opened up, ie WDM FILE_XXX_ACCESS 1167 // such as FILE_ANY_ACCESS, FILE_SPECIAL_ACCESS, FILE_READ_ACCESS, or 1168 // FILE_WRITE_ACCESS or you can use values such as GENERIC_READ, 1169 // GENERIC_WRITE, or GENERIC_ALL. 1170 // 1171 ACCESS_MASK DesiredAccess; 1172 1173 // 1174 // Share access desired on the target being opened, ie WDM FILE_SHARE_XXX 1175 // values such as FILE_SHARE_READ, FILE_SHARE_WRITE, FILE_SHARE_DELETE. 1176 // 1177 // A zero value means exclusive access to the target. 1178 // 1179 ULONG ShareAccess; 1180 1181 // 1182 // File attributes, see ZwCreateFile in the DDK for a list of valid 1183 // values and their meaning. 1184 // 1185 ULONG FileAttributes; 1186 1187 // 1188 // Create disposition, see ZwCreateFile in the DDK for a list of valid 1189 // values and their meaning. 1190 // 1191 ULONG CreateDisposition; 1192 1193 // 1194 // Options for opening the device, see CreateOptions for ZwCreateFile in the 1195 // DDK for a list of valid values and their meaning. 1196 // 1197 ULONG CreateOptions; 1198 1199 PVOID EaBuffer; 1200 1201 ULONG EaBufferLength; 1202 1203 PLONGLONG AllocationSize; 1204 1205 // ========== WdfIoTargetOpenByName end ========== 1206 // 1207 // 1208 // On return for a create by name, this will contain one of the following 1209 // values: FILE_CREATED, FILE_OPENED, FILE_OVERWRITTEN, FILE_SUPERSEDED, 1210 // FILE_EXISTS, FILE_DOES_NOT_EXIST 1211 // 1212 ULONG FileInformation; 1213 1214 } WDF_IO_TARGET_OPEN_PARAMS_V1_0, *PWDF_IO_TARGET_OPEN_PARAMS_V1_0; 1215 1216 // End of versioning of structures for wdfIoTarget.h 1217 1218 // 1219 // Versioning of structures for wdfMemory.h 1220 // 1221 typedef struct _WDFMEMORY_OFFSET_V1_0 { 1222 // 1223 // Offset into the WDFMEMORY that the operation should start at. 1224 // 1225 size_t BufferOffset; 1226 1227 // 1228 // Number of bytes that the operation should access. If 0, the entire 1229 // length of the WDFMEMORY buffer will be used in the operation or ignored 1230 // depending on the API. 1231 // 1232 size_t BufferLength; 1233 1234 } WDFMEMORY_OFFSET_V1_0, *PWDFMEMORY_OFFSET_V1_0; 1235 1236 typedef struct _WDF_MEMORY_DESCRIPTOR_V1_0 { 1237 1238 1239 1240 WDF_MEMORY_DESCRIPTOR_TYPE Type; 1241 1242 union { 1243 struct { 1244 PVOID Buffer; 1245 1246 ULONG Length; 1247 1248 } BufferType; 1249 1250 struct { 1251 PMDL Mdl; 1252 1253 ULONG BufferLength; 1254 1255 } MdlType; 1256 1257 struct { 1258 WDFMEMORY Memory; 1259 1260 PWDFMEMORY_OFFSET_V1_0 Offsets; 1261 1262 } HandleType; 1263 1264 } u; 1265 1266 } WDF_MEMORY_DESCRIPTOR_V1_0, *PWDF_MEMORY_DESCRIPTOR_V1_0; 1267 1268 // End of versioning of structures for wdfMemory.h 1269 1270 // 1271 // Versioning of structures for wdfMiniport.h 1272 // 1273 // End of versioning of structures for wdfMiniport.h 1274 1275 // 1276 // Versioning of structures for wdfObject.h 1277 // 1278 typedef struct _WDF_OBJECT_ATTRIBUTES_V1_0 { 1279 // 1280 // Size in bytes of this structure 1281 // 1282 ULONG Size; 1283 1284 // 1285 // Function to call when the object is deleted 1286 // 1287 PFN_WDF_OBJECT_CONTEXT_CLEANUP EvtCleanupCallback; 1288 1289 // 1290 // Function to call when the objects memory is destroyed when the 1291 // the last reference count goes to zero 1292 // 1293 PFN_WDF_OBJECT_CONTEXT_DESTROY EvtDestroyCallback; 1294 1295 // 1296 // Execution level constraints for Object 1297 // 1298 WDF_EXECUTION_LEVEL ExecutionLevel; 1299 1300 // 1301 // Synchronization level constraint for Object 1302 // 1303 WDF_SYNCHRONIZATION_SCOPE SynchronizationScope; 1304 1305 // 1306 // Optional Parent Object 1307 // 1308 WDFOBJECT ParentObject; 1309 1310 // 1311 // Overrides the size of the context allocated as specified by 1312 // ContextTypeInfo->ContextSize 1313 // 1314 size_t ContextSizeOverride; 1315 1316 // 1317 // Pointer to the type information to be associated with the object 1318 // 1319 PCWDF_OBJECT_CONTEXT_TYPE_INFO_V1_0 ContextTypeInfo; 1320 1321 } WDF_OBJECT_ATTRIBUTES_V1_0, *PWDF_OBJECT_ATTRIBUTES_V1_0; 1322 1323 // 1324 // Since C does not have strong type checking we must invent our own 1325 // 1326 typedef struct _WDF_OBJECT_CONTEXT_TYPE_INFO_V1_0 { 1327 // 1328 // The size of this structure in bytes 1329 // 1330 ULONG Size; 1331 1332 // 1333 // String representation of the context's type name, i.e. "DEVICE_CONTEXT" 1334 // 1335 PCHAR ContextName; 1336 1337 // 1338 // The size of the context in bytes. This will be the size of the context 1339 // associated with the handle unless 1340 // WDF_OBJECT_ATTRIBUTES::ContextSizeOverride is specified. 1341 // 1342 size_t ContextSize; 1343 1344 } WDF_OBJECT_CONTEXT_TYPE_INFO_V1_0, *PWDF_OBJECT_CONTEXT_TYPE_INFO_V1_0; 1345 1346 // End of versioning of structures for wdfObject.h 1347 1348 // 1349 // Versioning of structures for wdfpdo.h 1350 // 1351 typedef struct _WDF_PDO_EVENT_CALLBACKS_V1_0 { 1352 // 1353 // The size of this structure in bytes 1354 // 1355 ULONG Size; 1356 1357 // 1358 // Called in response to IRP_MN_QUERY_RESOURCES 1359 // 1360 PFN_WDF_DEVICE_RESOURCES_QUERY EvtDeviceResourcesQuery; 1361 1362 // 1363 // Called in response to IRP_MN_QUERY_RESOURCE_REQUIREMENTS 1364 // 1365 PFN_WDF_DEVICE_RESOURCE_REQUIREMENTS_QUERY EvtDeviceResourceRequirementsQuery; 1366 1367 // 1368 // Called in response to IRP_MN_EJECT 1369 // 1370 PFN_WDF_DEVICE_EJECT EvtDeviceEject; 1371 1372 // 1373 // Called in response to IRP_MN_SET_LOCK 1374 // 1375 PFN_WDF_DEVICE_SET_LOCK EvtDeviceSetLock; 1376 1377 // 1378 // Called in response to the power policy owner sending a wait wake to the 1379 // PDO. Bus generic arming shoulding occur here. 1380 // 1381 PFN_WDF_DEVICE_ENABLE_WAKE_AT_BUS EvtDeviceEnableWakeAtBus; 1382 1383 // 1384 // Called in response to the power policy owner sending a wait wake to the 1385 // PDO. Bus generic disarming shoulding occur here. 1386 // 1387 PFN_WDF_DEVICE_DISABLE_WAKE_AT_BUS EvtDeviceDisableWakeAtBus; 1388 1389 } WDF_PDO_EVENT_CALLBACKS_V1_0, *PWDF_PDO_EVENT_CALLBACKS_V1_0; 1390 1391 // End of versioning of structures for wdfpdo.h 1392 1393 // 1394 // Versioning of structures for wdfpool.h 1395 // 1396 // End of versioning of structures for wdfpool.h 1397 1398 // 1399 // Versioning of structures for wdfqueryinterface.h 1400 // 1401 typedef struct _WDF_QUERY_INTERFACE_CONFIG_V1_0 { 1402 // 1403 // Size of this structure in bytes. 1404 // 1405 ULONG Size; 1406 1407 // 1408 // Interface to be returned to the caller. Optional if BehaviorType is set 1409 // to WdfQueryInterfaceTypePassThrough or ImportInterface is set to TRUE. 1410 // 1411 PINTERFACE Interface; 1412 1413 // 1414 // The GUID identifying the interface 1415 // 1416 CONST GUID * InterfaceType; 1417 1418 // 1419 // Valid only for PDOs. The framework will allocate a new request and 1420 // forward it down the parent's device stack. 1421 // 1422 BOOLEAN SendQueryToParentStack; 1423 1424 1425 1426 1427 // 1428 // 1429 // Driver supplied callback which is called after some basic interface 1430 // validation has been performed (size, version, and guid checking). This 1431 // is an optional parameter and may be NULL unless ImportInterface is 1432 // specified. 1433 // 1434 // If the callback returns !NT_SUCCESS, this error will be returned to the 1435 // caller and the query interface will fail. 1436 // 1437 // In this callback, the caller is free to modify the ExposedInterface in 1438 // any manner of its choosing. For instance, the callback may change any 1439 // field in the interface. The callback may also alloate a dynamic context 1440 // to be associated with the interface; the InterfaceReference and 1441 // InterfaceDereference functions may also be overridden. 1442 // 1443 // If ImportInterface is set to TRUE, then this is a required field and the 1444 // callback must initialize the interface (the framework will leave the 1445 // ExposedInterface buffer exactly as it received it) since the framework 1446 // has no way of knowing which fields to fill in and which to leave alone. 1447 // 1448 PFN_WDF_DEVICE_PROCESS_QUERY_INTERFACE_REQUEST EvtDeviceProcessQueryInterfaceRequest; 1449 1450 // 1451 // If TRUE, the interface provided by the caller contains data that the 1452 // driver is interested in. By setting to this field to TRUE, the 1453 // EvtDeviceProcessQueryInterfaceRequest callback must initialize the 1454 // ExposedInterface. 1455 // 1456 // If FALSE, the entire ExposedInterface is initialized through a memory 1457 // copy before the EvtDeviceProcessQueryInterfaceRequest is called. 1458 // 1459 BOOLEAN ImportInterface; 1460 1461 } WDF_QUERY_INTERFACE_CONFIG_V1_0, *PWDF_QUERY_INTERFACE_CONFIG_V1_0; 1462 1463 // End of versioning of structures for wdfqueryinterface.h 1464 1465 // 1466 // Versioning of structures for wdfregistry.h 1467 // 1468 // End of versioning of structures for wdfregistry.h 1469 1470 // 1471 // Versioning of structures for wdfrequest.h 1472 // 1473 // 1474 // This parameters structure allows general access to a requests parameters 1475 // 1476 typedef struct _WDF_REQUEST_PARAMETERS_V1_0 { 1477 USHORT Size; 1478 1479 UCHAR MinorFunction; 1480 1481 WDF_REQUEST_TYPE Type; 1482 1483 // 1484 // The following user parameters are based on the service that is being 1485 // invoked. Drivers and file systems can determine which set to use based 1486 // on the above major and minor function codes. 1487 // 1488 union { 1489 // 1490 // System service parameters for: Create 1491 // 1492 // 1493 struct { 1494 PIO_SECURITY_CONTEXT SecurityContext; 1495 1496 ULONG Options; 1497 1498 USHORT POINTER_ALIGNMENT FileAttributes; 1499 1500 USHORT ShareAccess; 1501 1502 ULONG POINTER_ALIGNMENT EaLength; 1503 1504 } Create; 1505 1506 // 1507 // System service parameters for: Read 1508 // 1509 // 1510 struct { 1511 size_t Length; 1512 1513 ULONG POINTER_ALIGNMENT Key; 1514 1515 LONGLONG DeviceOffset; 1516 1517 } Read; 1518 1519 // 1520 // System service parameters for: Write 1521 // 1522 // 1523 struct { 1524 size_t Length; 1525 1526 ULONG POINTER_ALIGNMENT Key; 1527 1528 LONGLONG DeviceOffset; 1529 1530 } Write; 1531 1532 // 1533 // System service parameters for: Device Control 1534 // 1535 // Note that the user's output buffer is stored in the UserBuffer field 1536 // and the user's input buffer is stored in the SystemBuffer field. 1537 // 1538 // 1539 struct { 1540 size_t OutputBufferLength; 1541 1542 size_t POINTER_ALIGNMENT InputBufferLength; 1543 1544 ULONG POINTER_ALIGNMENT IoControlCode; 1545 1546 PVOID Type3InputBuffer; 1547 1548 } DeviceIoControl; 1549 1550 struct { 1551 PVOID Arg1; 1552 1553 PVOID Arg2; 1554 1555 ULONG POINTER_ALIGNMENT IoControlCode; 1556 1557 PVOID Arg4; 1558 1559 } Others; 1560 1561 } Parameters; 1562 1563 } WDF_REQUEST_PARAMETERS_V1_0, *PWDF_REQUEST_PARAMETERS_V1_0; 1564 1565 typedef struct _WDF_REQUEST_COMPLETION_PARAMS_V1_0 { 1566 // 1567 // Size of the structure in bytes 1568 // 1569 ULONG Size; 1570 1571 WDF_REQUEST_TYPE Type; 1572 1573 IO_STATUS_BLOCK IoStatus; 1574 1575 union { 1576 struct { 1577 WDFMEMORY Buffer; 1578 1579 size_t Length; 1580 1581 size_t Offset; 1582 1583 } Write; 1584 1585 struct { 1586 WDFMEMORY Buffer; 1587 1588 size_t Length; 1589 1590 size_t Offset; 1591 1592 } Read; 1593 1594 struct { 1595 ULONG IoControlCode; 1596 1597 struct { 1598 WDFMEMORY Buffer; 1599 1600 size_t Offset; 1601 1602 } Input; 1603 1604 struct { 1605 WDFMEMORY Buffer; 1606 1607 size_t Offset; 1608 1609 size_t Length; 1610 1611 } Output; 1612 1613 } Ioctl; 1614 1615 struct { 1616 union { 1617 PVOID Ptr; 1618 1619 ULONG_PTR Value; 1620 1621 } Argument1; 1622 1623 union { 1624 PVOID Ptr; 1625 1626 ULONG_PTR Value; 1627 1628 } Argument2; 1629 1630 union { 1631 PVOID Ptr; 1632 1633 ULONG_PTR Value; 1634 1635 } Argument3; 1636 1637 union { 1638 PVOID Ptr; 1639 1640 ULONG_PTR Value; 1641 1642 } Argument4; 1643 1644 } Others; 1645 1646 struct { 1647 PWDF_USB_REQUEST_COMPLETION_PARAMS_V1_0 Completion; 1648 1649 } Usb; 1650 1651 } Parameters; 1652 1653 } WDF_REQUEST_COMPLETION_PARAMS_V1_0, *PWDF_REQUEST_COMPLETION_PARAMS_V1_0; 1654 1655 typedef struct _WDF_REQUEST_REUSE_PARAMS_V1_0 { 1656 // 1657 // Size of this structure in bytes 1658 // 1659 ULONG Size; 1660 1661 // 1662 // Bit field combination of WDF_REQUEST_REUSE_Xxx values 1663 // 1664 ULONG Flags; 1665 1666 // 1667 // The new status of the request. 1668 // 1669 NTSTATUS Status; 1670 1671 // 1672 // New PIRP to be contained in the WDFREQUEST. Setting a new PIRP value 1673 // is only valid for WDFREQUESTs created by WdfRequestCreateFromIrp where 1674 // RequestFreesIrp == FALSE. No other WDFREQUESTs (presented by the 1675 // I/O queue for instance) may have their IRPs changed. 1676 // 1677 PIRP NewIrp; 1678 1679 } WDF_REQUEST_REUSE_PARAMS_V1_0, *PWDF_REQUEST_REUSE_PARAMS_V1_0; 1680 1681 typedef struct _WDF_REQUEST_SEND_OPTIONS_V1_0 { 1682 // 1683 // Size of the structure in bytes 1684 // 1685 ULONG Size; 1686 1687 // 1688 // Bit field combination of values from the WDF_REQUEST_SEND_OPTIONS_FLAGS 1689 // enumeration 1690 // 1691 ULONG Flags; 1692 1693 // 1694 // Valid when WDF_REQUEST_SEND_OPTION_TIMEOUT is set 1695 // 1696 LONGLONG Timeout; 1697 1698 } WDF_REQUEST_SEND_OPTIONS_V1_0, *PWDF_REQUEST_SEND_OPTIONS_V1_0; 1699 1700 // End of versioning of structures for wdfrequest.h 1701 1702 // 1703 // Versioning of structures for wdfresource.h 1704 // 1705 // End of versioning of structures for wdfresource.h 1706 1707 // 1708 // Versioning of structures for wdfstring.h 1709 // 1710 // End of versioning of structures for wdfstring.h 1711 1712 // 1713 // Versioning of structures for wdfsync.h 1714 // 1715 // End of versioning of structures for wdfsync.h 1716 1717 // 1718 // Versioning of structures for wdftimer.h 1719 // 1720 typedef struct _WDF_TIMER_CONFIG_V1_0 { 1721 ULONG Size; 1722 1723 PFN_WDF_TIMER EvtTimerFunc; 1724 1725 LONG Period; 1726 1727 // 1728 // If this is TRUE, the Timer will automatically serialize 1729 // with the event callback handlers of its Parent Object. 1730 // 1731 // Parent Object's callback constraints should be compatible 1732 // with the Timer DPC (DISPATCH_LEVEL), or the request will fail. 1733 // 1734 BOOLEAN AutomaticSerialization; 1735 1736 } WDF_TIMER_CONFIG_V1_0, *PWDF_TIMER_CONFIG_V1_0; 1737 1738 // End of versioning of structures for wdftimer.h 1739 1740 // 1741 // Versioning of structures for wdftypes.h 1742 // 1743 // End of versioning of structures for wdftypes.h 1744 1745 // 1746 // Versioning of structures for wdfUsb.h 1747 // 1748 typedef struct _WDF_USB_REQUEST_COMPLETION_PARAMS_V1_0 { 1749 USBD_STATUS UsbdStatus; 1750 1751 WDF_USB_REQUEST_TYPE Type; 1752 1753 union { 1754 struct { 1755 WDFMEMORY Buffer; 1756 1757 USHORT LangID; 1758 1759 UCHAR StringIndex; 1760 1761 // 1762 // If STATUS_BUFFER_OVERFLOW is returned, this field will contain the 1763 // number of bytes required to retrieve the entire string. 1764 // 1765 UCHAR RequiredSize; 1766 1767 } DeviceString; 1768 1769 struct { 1770 WDFMEMORY Buffer; 1771 1772 WDF_USB_CONTROL_SETUP_PACKET SetupPacket; 1773 1774 ULONG Length; 1775 1776 } DeviceControlTransfer; 1777 1778 struct { 1779 WDFMEMORY Buffer; 1780 1781 } DeviceUrb; 1782 1783 struct { 1784 WDFMEMORY Buffer; 1785 1786 size_t Length; 1787 1788 size_t Offset; 1789 1790 } PipeWrite; 1791 1792 struct { 1793 WDFMEMORY Buffer; 1794 1795 size_t Length; 1796 1797 size_t Offset; 1798 1799 } PipeRead; 1800 1801 struct { 1802 WDFMEMORY Buffer; 1803 1804 } PipeUrb; 1805 1806 } Parameters; 1807 1808 } WDF_USB_REQUEST_COMPLETION_PARAMS_V1_0, *PWDF_USB_REQUEST_COMPLETION_PARAMS_V1_0; 1809 1810 typedef struct _WDF_USB_CONTINUOUS_READER_CONFIG_V1_0 { 1811 // 1812 // Size of the string in bytes 1813 // 1814 ULONG Size; 1815 1816 // 1817 // Number of bytes to send ask for from the usb device. 1818 // 1819 size_t TransferLength; 1820 1821 // 1822 // Number of bytes to allocate before the requested transfer length 1823 // 1824 size_t HeaderLength; 1825 1826 // 1827 // Number of bytes to allocate after the requested transfer length 1828 // 1829 size_t TrailerLength; 1830 1831 // 1832 // Number of reads to send to the device at once. If zero is specified, the 1833 // default will be used. 1834 // 1835 UCHAR NumPendingReads; 1836 1837 // 1838 // Optional attributes to apply to each WDFMEMORY allocated for each read 1839 // 1840 PWDF_OBJECT_ATTRIBUTES_V1_0 BufferAttributes; 1841 1842 // 1843 // Event callback invoked when a read is completed 1844 // 1845 PFN_WDF_USB_READER_COMPLETION_ROUTINE EvtUsbTargetPipeReadComplete; 1846 1847 // 1848 // Context to be passed to EvtUsbTargetPipeReadComplete 1849 // 1850 WDFCONTEXT EvtUsbTargetPipeReadCompleteContext; 1851 1852 // 1853 // Event callback invoked when a reader fails. If TRUE is returned, the 1854 // readers are restarted. 1855 // 1856 PFN_WDF_USB_READERS_FAILED EvtUsbTargetPipeReadersFailed; 1857 1858 } WDF_USB_CONTINUOUS_READER_CONFIG_V1_0, *PWDF_USB_CONTINUOUS_READER_CONFIG_V1_0; 1859 1860 1861 1862 1863 typedef struct _WDF_USB_DEVICE_INFORMATION_V1_0 { 1864 // 1865 // Size of this structure in bytes 1866 // 1867 ULONG Size; 1868 1869 // 1870 // USBD version information 1871 // 1872 USBD_VERSION_INFORMATION UsbdVersionInformation; 1873 1874 // 1875 // Usb controller port capabilities 1876 // 1877 ULONG HcdPortCapabilities; 1878 1879 // 1880 // Bitfield of WDF_USB_DEVICE_TRAITS values 1881 // 1882 ULONG Traits; 1883 1884 } WDF_USB_DEVICE_INFORMATION_V1_0, *PWDF_USB_DEVICE_INFORMATION_V1_0; 1885 1886 typedef struct _WDF_USB_INTERFACE_SETTING_PAIR_V1_0 { 1887 // 1888 // Interface to select 1889 // 1890 WDFUSBINTERFACE UsbInterface; 1891 1892 // 1893 // Setting to select on UsbInterface 1894 // 1895 UCHAR SettingIndex; 1896 1897 } WDF_USB_INTERFACE_SETTING_PAIR_V1_0, *PWDF_USB_INTERFACE_SETTING_PAIR_V1_0; 1898 1899 typedef struct _WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_V1_0 { 1900 // 1901 // Size of the structure in bytes 1902 // 1903 ULONG Size; 1904 1905 // 1906 // Type of select config, one of WdfUsbTargetDeviceSelectConfigType values 1907 // 1908 WdfUsbTargetDeviceSelectConfigType Type; 1909 1910 union { 1911 struct { 1912 // 1913 // Configuration descriptor to use 1914 // 1915 PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor; 1916 1917 // 1918 // Array of interface descriptors pointers. 1919 // 1920 PUSB_INTERFACE_DESCRIPTOR * InterfaceDescriptors; 1921 1922 // 1923 // Number of elements in the InterfaceDescrtiptors pointer array. 1924 // 1925 ULONG NumInterfaceDescriptors; 1926 1927 } Descriptor; 1928 1929 struct { 1930 // 1931 // Preallocated select config URB formatted by the caller. 1932 // Will be used, as supplied without modification, as the select 1933 // config request. 1934 // 1935 PURB Urb; 1936 1937 } Urb; 1938 1939 struct { 1940 // 1941 // Number of pipes configured on the single after. This value is 1942 // returned to the caller after a succssful call. 1943 // 1944 UCHAR NumberConfiguredPipes; 1945 1946 // 1947 // The interface which was configred. This value is returned to the 1948 // caller after a successful call. 1949 // 1950 WDFUSBINTERFACE ConfiguredUsbInterface; 1951 1952 } SingleInterface; 1953 1954 struct { 1955 // 1956 // Number of interface pairs in the Pairs array 1957 // 1958 UCHAR NumberInterfaces; 1959 1960 // 1961 // Array of interface + settings 1962 // 1963 PWDF_USB_INTERFACE_SETTING_PAIR_V1_0 Pairs; 1964 1965 // 1966 // Number of interfaces which were configured after a successful call 1967 // 1968 UCHAR NumberOfConfiguredInterfaces; 1969 1970 } MultiInterface; 1971 1972 } Types; 1973 1974 } WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_V1_0, *PWDF_USB_DEVICE_SELECT_CONFIG_PARAMS_V1_0; 1975 1976 typedef struct _WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_V1_0 { 1977 // 1978 // Size of this data structure in bytes 1979 // 1980 ULONG Size; 1981 1982 // 1983 // Type of select interface as indicated by one of the 1984 // WdfUsbTargetDeviceSelectSettingType values. 1985 // 1986 WdfUsbTargetDeviceSelectSettingType Type; 1987 1988 union { 1989 struct { 1990 // 1991 // Interface descriptor that will be used in the interface selection 1992 // 1993 PUSB_INTERFACE_DESCRIPTOR InterfaceDescriptor; 1994 1995 } Descriptor; 1996 1997 struct { 1998 // 1999 // The setting index of the WDFUSBINTERFACE to use 2000 // 2001 UCHAR SettingIndex; 2002 2003 } Interface; 2004 2005 struct { 2006 // 2007 // Preformatted select interface URB which will be used in the 2008 // select interface request. 2009 // 2010 PURB Urb; 2011 2012 } Urb; 2013 2014 } Types; 2015 2016 } WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_V1_0, *PWDF_USB_INTERFACE_SELECT_SETTING_PARAMS_V1_0; 2017 2018 typedef struct _WDF_USB_PIPE_INFORMATION_V1_0 { 2019 // 2020 // Size of the structure in bytes 2021 // 2022 ULONG Size; 2023 2024 // 2025 // Maximum packet size this device is capable of 2026 // 2027 ULONG MaximumPacketSize; 2028 2029 // 2030 // Raw endpoint address of the device as described by its descriptor 2031 // 2032 UCHAR EndpointAddress; 2033 2034 // 2035 // Polling interval 2036 // 2037 UCHAR Interval; 2038 2039 // 2040 // Which alternate setting this structure is relevant for 2041 // 2042 UCHAR SettingIndex; 2043 2044 // 2045 // The type of the pipe 2046 WDF_USB_PIPE_TYPE PipeType; 2047 2048 // 2049 // Maximum size of one transfer which should be sent to the host controller 2050 // 2051 ULONG MaximumTransferSize; 2052 2053 } WDF_USB_PIPE_INFORMATION_V1_0, *PWDF_USB_PIPE_INFORMATION_V1_0; 2054 2055 // End of versioning of structures for wdfUsb.h 2056 2057 // 2058 // Versioning of structures for wdfverifier.h 2059 // 2060 // End of versioning of structures for wdfverifier.h 2061 2062 // 2063 // Versioning of structures for wdfWMI.h 2064 // 2065 typedef struct _WDF_WMI_PROVIDER_CONFIG_V1_0 { 2066 // 2067 // Size of this structure in bytes 2068 // 2069 ULONG Size; 2070 2071 // 2072 // The GUID being registered 2073 // 2074 GUID Guid; 2075 2076 // 2077 // Combination of values from the enum WDF_WMI_PROVIDER_FLAGS 2078 // 2079 ULONG Flags; 2080 2081 // 2082 // Minimum expected buffer size for query and set instance requests. 2083 // Ignored if WdfWmiProviderEventOnly is set in Flags. 2084 // 2085 ULONG MinInstanceBufferSize; 2086 2087 // 2088 // Callback when caller is opening a provider which ha been marked as 2089 // expensive or when a caller is interested in events. 2090 // 2091 PFN_WDF_WMI_PROVIDER_FUNCTION_CONTROL EvtWmiProviderFunctionControl; 2092 2093 } WDF_WMI_PROVIDER_CONFIG_V1_0, *PWDF_WMI_PROVIDER_CONFIG_V1_0; 2094 2095 typedef struct _WDF_WMI_INSTANCE_CONFIG_V1_0 { 2096 // 2097 // Size of the structure in bytes 2098 // 2099 ULONG Size; 2100 2101 // 2102 // Optional parameter. If NULL, ProviderConfig must be set to a valid pointer 2103 // value. If specified, indicates the provider to create an instance for. 2104 // 2105 WDFWMIPROVIDER Provider; 2106 2107 // 2108 // Optional parameter. If NULL, Provider must be set to a valid handle 2109 // value. If specifeid, indicates the configuration for a provider to be 2110 // created and for this instance to be associated with. 2111 // 2112 PWDF_WMI_PROVIDER_CONFIG_V1_0 ProviderConfig; 2113 2114 // 2115 // If the Provider is configured as read only and this field is set to TRUE, 2116 // the EvtWmiInstanceQueryInstance is ignored and WDF will blindly copy the 2117 // context associated with this instance (using RtlCopyMemory, with no locks 2118 // held) into the query buffer. 2119 // 2120 BOOLEAN UseContextForQuery; 2121 2122 // 2123 // If TRUE, the instance will be registered as well as created. 2124 // 2125 BOOLEAN Register; 2126 2127 // 2128 // Callback when caller wants to query the entire data item's buffer. 2129 // 2130 PFN_WDF_WMI_INSTANCE_QUERY_INSTANCE EvtWmiInstanceQueryInstance; 2131 2132 // 2133 // Callback when caller wants to set the entire data item's buffer. 2134 // 2135 PFN_WDF_WMI_INSTANCE_SET_INSTANCE EvtWmiInstanceSetInstance; 2136 2137 // 2138 // Callback when caller wants to set a single field in the data item's buffer 2139 // 2140 PFN_WDF_WMI_INSTANCE_SET_ITEM EvtWmiInstanceSetItem; 2141 2142 // 2143 // Callback when caller wants to execute a method on the data item. 2144 // 2145 PFN_WDF_WMI_INSTANCE_EXECUTE_METHOD EvtWmiInstanceExecuteMethod; 2146 2147 } WDF_WMI_INSTANCE_CONFIG_V1_0, *PWDF_WMI_INSTANCE_CONFIG_V1_0; 2148 2149 // End of versioning of structures for wdfWMI.h 2150 2151 // 2152 // Versioning of structures for wdfworkitem.h 2153 // 2154 typedef struct _WDF_WORKITEM_CONFIG_V1_0 { 2155 ULONG Size; 2156 2157 PFN_WDF_WORKITEM EvtWorkItemFunc; 2158 2159 // 2160 // If this is TRUE, the workitem will automatically serialize 2161 // with the event callback handlers of its Parent Object. 2162 // 2163 // Parent Object's callback constraints should be compatible 2164 // with the work item (PASSIVE_LEVEL), or the request will fail. 2165 // 2166 BOOLEAN AutomaticSerialization; 2167 2168 } WDF_WORKITEM_CONFIG_V1_0, *PWDF_WORKITEM_CONFIG_V1_0; 2169 2170 // End of versioning of structures for wdfworkitem.h 2171 2172 2173 #endif // _WDF_V1_0_TYPES_H_ 2174