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