xref: /reactos/sdk/lib/drivers/wdf/kmdf/inc/private/wdf17.h (revision c8d07514)
1 //
2 //    Copyright (C) Microsoft.  All rights reserved.
3 //
4 #ifndef _WDF_V1_7_TYPES_H_
5 #define _WDF_V1_7_TYPES_H_
6 
7 
8 typedef enum _WDFFUNCENUM_V1_7 {
9     WdfFunctionTableNumEntries_V1_7 = 387,
10 } WDFFUNCENUM_V1_7;
11 
12 typedef struct _WDF_POWER_ROUTINE_TIMED_OUT_DATA_V1_7 *PWDF_POWER_ROUTINE_TIMED_OUT_DATA_V1_7;
13 typedef const struct _WDF_POWER_ROUTINE_TIMED_OUT_DATA_V1_7 *PCWDF_POWER_ROUTINE_TIMED_OUT_DATA_V1_7;
14 typedef struct _WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA_V1_7 *PWDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA_V1_7;
15 typedef const struct _WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA_V1_7 *PCWDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA_V1_7;
16 typedef struct _WDF_QUEUE_FATAL_ERROR_DATA_V1_7 *PWDF_QUEUE_FATAL_ERROR_DATA_V1_7;
17 typedef const struct _WDF_QUEUE_FATAL_ERROR_DATA_V1_7 *PCWDF_QUEUE_FATAL_ERROR_DATA_V1_7;
18 typedef struct _WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER_V1_7 *PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER_V1_7;
19 typedef const struct _WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER_V1_7 *PCWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER_V1_7;
20 typedef struct _WDF_CHILD_ADDRESS_DESCRIPTION_HEADER_V1_7 *PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER_V1_7;
21 typedef const struct _WDF_CHILD_ADDRESS_DESCRIPTION_HEADER_V1_7 *PCWDF_CHILD_ADDRESS_DESCRIPTION_HEADER_V1_7;
22 typedef struct _WDF_CHILD_RETRIEVE_INFO_V1_7 *PWDF_CHILD_RETRIEVE_INFO_V1_7;
23 typedef const struct _WDF_CHILD_RETRIEVE_INFO_V1_7 *PCWDF_CHILD_RETRIEVE_INFO_V1_7;
24 typedef struct _WDF_CHILD_LIST_CONFIG_V1_7 *PWDF_CHILD_LIST_CONFIG_V1_7;
25 typedef const struct _WDF_CHILD_LIST_CONFIG_V1_7 *PCWDF_CHILD_LIST_CONFIG_V1_7;
26 typedef struct _WDF_CHILD_LIST_ITERATOR_V1_7 *PWDF_CHILD_LIST_ITERATOR_V1_7;
27 typedef const struct _WDF_CHILD_LIST_ITERATOR_V1_7 *PCWDF_CHILD_LIST_ITERATOR_V1_7;
28 typedef struct _WDF_CLASS_EXTENSION_DESCRIPTOR_V1_7 *PWDF_CLASS_EXTENSION_DESCRIPTOR_V1_7;
29 typedef const struct _WDF_CLASS_EXTENSION_DESCRIPTOR_V1_7 *PCWDF_CLASS_EXTENSION_DESCRIPTOR_V1_7;
30 typedef struct _WDF_COMMON_BUFFER_CONFIG_V1_7 *PWDF_COMMON_BUFFER_CONFIG_V1_7;
31 typedef const struct _WDF_COMMON_BUFFER_CONFIG_V1_7 *PCWDF_COMMON_BUFFER_CONFIG_V1_7;
32 typedef struct _WDF_FILEOBJECT_CONFIG_V1_7 *PWDF_FILEOBJECT_CONFIG_V1_7;
33 typedef const struct _WDF_FILEOBJECT_CONFIG_V1_7 *PCWDF_FILEOBJECT_CONFIG_V1_7;
34 typedef struct _WDF_DEVICE_PNP_NOTIFICATION_DATA_V1_7 *PWDF_DEVICE_PNP_NOTIFICATION_DATA_V1_7;
35 typedef const struct _WDF_DEVICE_PNP_NOTIFICATION_DATA_V1_7 *PCWDF_DEVICE_PNP_NOTIFICATION_DATA_V1_7;
36 typedef struct _WDF_DEVICE_POWER_NOTIFICATION_DATA_V1_7 *PWDF_DEVICE_POWER_NOTIFICATION_DATA_V1_7;
37 typedef const struct _WDF_DEVICE_POWER_NOTIFICATION_DATA_V1_7 *PCWDF_DEVICE_POWER_NOTIFICATION_DATA_V1_7;
38 typedef struct _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA_V1_7 *PWDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA_V1_7;
39 typedef const struct _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA_V1_7 *PCWDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA_V1_7;
40 typedef struct _WDF_PNPPOWER_EVENT_CALLBACKS_V1_7 *PWDF_PNPPOWER_EVENT_CALLBACKS_V1_7;
41 typedef const struct _WDF_PNPPOWER_EVENT_CALLBACKS_V1_7 *PCWDF_PNPPOWER_EVENT_CALLBACKS_V1_7;
42 typedef struct _WDF_POWER_POLICY_EVENT_CALLBACKS_V1_7 *PWDF_POWER_POLICY_EVENT_CALLBACKS_V1_7;
43 typedef const struct _WDF_POWER_POLICY_EVENT_CALLBACKS_V1_7 *PCWDF_POWER_POLICY_EVENT_CALLBACKS_V1_7;
44 typedef struct _WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_V1_7 *PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_V1_7;
45 typedef const struct _WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_V1_7 *PCWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_V1_7;
46 typedef struct _WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS_V1_7 *PWDF_DEVICE_POWER_POLICY_WAKE_SETTINGS_V1_7;
47 typedef const struct _WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS_V1_7 *PCWDF_DEVICE_POWER_POLICY_WAKE_SETTINGS_V1_7;
48 typedef struct _WDF_DEVICE_STATE_V1_7 *PWDF_DEVICE_STATE_V1_7;
49 typedef const struct _WDF_DEVICE_STATE_V1_7 *PCWDF_DEVICE_STATE_V1_7;
50 typedef struct _WDF_DEVICE_PNP_CAPABILITIES_V1_7 *PWDF_DEVICE_PNP_CAPABILITIES_V1_7;
51 typedef const struct _WDF_DEVICE_PNP_CAPABILITIES_V1_7 *PCWDF_DEVICE_PNP_CAPABILITIES_V1_7;
52 typedef struct _WDF_DEVICE_POWER_CAPABILITIES_V1_7 *PWDF_DEVICE_POWER_CAPABILITIES_V1_7;
53 typedef const struct _WDF_DEVICE_POWER_CAPABILITIES_V1_7 *PCWDF_DEVICE_POWER_CAPABILITIES_V1_7;
54 typedef struct _WDF_DMA_ENABLER_CONFIG_V1_7 *PWDF_DMA_ENABLER_CONFIG_V1_7;
55 typedef const struct _WDF_DMA_ENABLER_CONFIG_V1_7 *PCWDF_DMA_ENABLER_CONFIG_V1_7;
56 typedef struct _WDF_DPC_CONFIG_V1_7 *PWDF_DPC_CONFIG_V1_7;
57 typedef const struct _WDF_DPC_CONFIG_V1_7 *PCWDF_DPC_CONFIG_V1_7;
58 typedef struct _WDF_DRIVER_CONFIG_V1_7 *PWDF_DRIVER_CONFIG_V1_7;
59 typedef const struct _WDF_DRIVER_CONFIG_V1_7 *PCWDF_DRIVER_CONFIG_V1_7;
60 typedef struct _WDF_DRIVER_VERSION_AVAILABLE_PARAMS_V1_7 *PWDF_DRIVER_VERSION_AVAILABLE_PARAMS_V1_7;
61 typedef const struct _WDF_DRIVER_VERSION_AVAILABLE_PARAMS_V1_7 *PCWDF_DRIVER_VERSION_AVAILABLE_PARAMS_V1_7;
62 typedef struct _WDF_FDO_EVENT_CALLBACKS_V1_7 *PWDF_FDO_EVENT_CALLBACKS_V1_7;
63 typedef const struct _WDF_FDO_EVENT_CALLBACKS_V1_7 *PCWDF_FDO_EVENT_CALLBACKS_V1_7;
64 typedef struct _WDF_DRIVER_GLOBALS_V1_7 *PWDF_DRIVER_GLOBALS_V1_7;
65 typedef const struct _WDF_DRIVER_GLOBALS_V1_7 *PCWDF_DRIVER_GLOBALS_V1_7;
66 typedef struct _WDF_INTERRUPT_CONFIG_V1_7 *PWDF_INTERRUPT_CONFIG_V1_7;
67 typedef const struct _WDF_INTERRUPT_CONFIG_V1_7 *PCWDF_INTERRUPT_CONFIG_V1_7;
68 typedef struct _WDF_INTERRUPT_INFO_V1_7 *PWDF_INTERRUPT_INFO_V1_7;
69 typedef const struct _WDF_INTERRUPT_INFO_V1_7 *PCWDF_INTERRUPT_INFO_V1_7;
70 typedef struct _WDF_IO_QUEUE_CONFIG_V1_7 *PWDF_IO_QUEUE_CONFIG_V1_7;
71 typedef const struct _WDF_IO_QUEUE_CONFIG_V1_7 *PCWDF_IO_QUEUE_CONFIG_V1_7;
72 typedef struct _WDF_IO_TARGET_OPEN_PARAMS_V1_7 *PWDF_IO_TARGET_OPEN_PARAMS_V1_7;
73 typedef const struct _WDF_IO_TARGET_OPEN_PARAMS_V1_7 *PCWDF_IO_TARGET_OPEN_PARAMS_V1_7;
74 typedef struct _WDFMEMORY_OFFSET_V1_7 *PWDFMEMORY_OFFSET_V1_7;
75 typedef const struct _WDFMEMORY_OFFSET_V1_7 *PCWDFMEMORY_OFFSET_V1_7;
76 typedef struct _WDF_MEMORY_DESCRIPTOR_V1_7 *PWDF_MEMORY_DESCRIPTOR_V1_7;
77 typedef const struct _WDF_MEMORY_DESCRIPTOR_V1_7 *PCWDF_MEMORY_DESCRIPTOR_V1_7;
78 typedef struct _WDF_OBJECT_ATTRIBUTES_V1_7 *PWDF_OBJECT_ATTRIBUTES_V1_7;
79 typedef const struct _WDF_OBJECT_ATTRIBUTES_V1_7 *PCWDF_OBJECT_ATTRIBUTES_V1_7;
80 typedef struct _WDF_OBJECT_CONTEXT_TYPE_INFO_V1_7 *PWDF_OBJECT_CONTEXT_TYPE_INFO_V1_7;
81 typedef const struct _WDF_OBJECT_CONTEXT_TYPE_INFO_V1_7 *PCWDF_OBJECT_CONTEXT_TYPE_INFO_V1_7;
82 typedef struct _WDF_PDO_EVENT_CALLBACKS_V1_7 *PWDF_PDO_EVENT_CALLBACKS_V1_7;
83 typedef const struct _WDF_PDO_EVENT_CALLBACKS_V1_7 *PCWDF_PDO_EVENT_CALLBACKS_V1_7;
84 typedef struct _WDF_QUERY_INTERFACE_CONFIG_V1_7 *PWDF_QUERY_INTERFACE_CONFIG_V1_7;
85 typedef const struct _WDF_QUERY_INTERFACE_CONFIG_V1_7 *PCWDF_QUERY_INTERFACE_CONFIG_V1_7;
86 typedef struct _WDF_REQUEST_PARAMETERS_V1_7 *PWDF_REQUEST_PARAMETERS_V1_7;
87 typedef const struct _WDF_REQUEST_PARAMETERS_V1_7 *PCWDF_REQUEST_PARAMETERS_V1_7;
88 typedef struct _WDF_REQUEST_COMPLETION_PARAMS_V1_7 *PWDF_REQUEST_COMPLETION_PARAMS_V1_7;
89 typedef const struct _WDF_REQUEST_COMPLETION_PARAMS_V1_7 *PCWDF_REQUEST_COMPLETION_PARAMS_V1_7;
90 typedef struct _WDF_REQUEST_REUSE_PARAMS_V1_7 *PWDF_REQUEST_REUSE_PARAMS_V1_7;
91 typedef const struct _WDF_REQUEST_REUSE_PARAMS_V1_7 *PCWDF_REQUEST_REUSE_PARAMS_V1_7;
92 typedef struct _WDF_REQUEST_SEND_OPTIONS_V1_7 *PWDF_REQUEST_SEND_OPTIONS_V1_7;
93 typedef const struct _WDF_REQUEST_SEND_OPTIONS_V1_7 *PCWDF_REQUEST_SEND_OPTIONS_V1_7;
94 typedef struct _WDF_TIMER_CONFIG_V1_7 *PWDF_TIMER_CONFIG_V1_7;
95 typedef const struct _WDF_TIMER_CONFIG_V1_7 *PCWDF_TIMER_CONFIG_V1_7;
96 typedef struct _WDF_USB_REQUEST_COMPLETION_PARAMS_V1_7 *PWDF_USB_REQUEST_COMPLETION_PARAMS_V1_7;
97 typedef const struct _WDF_USB_REQUEST_COMPLETION_PARAMS_V1_7 *PCWDF_USB_REQUEST_COMPLETION_PARAMS_V1_7;
98 typedef struct _WDF_USB_CONTINUOUS_READER_CONFIG_V1_7 *PWDF_USB_CONTINUOUS_READER_CONFIG_V1_7;
99 typedef const struct _WDF_USB_CONTINUOUS_READER_CONFIG_V1_7 *PCWDF_USB_CONTINUOUS_READER_CONFIG_V1_7;
100 typedef struct _WDF_USB_DEVICE_INFORMATION_V1_7 *PWDF_USB_DEVICE_INFORMATION_V1_7;
101 typedef const struct _WDF_USB_DEVICE_INFORMATION_V1_7 *PCWDF_USB_DEVICE_INFORMATION_V1_7;
102 typedef struct _WDF_USB_INTERFACE_SETTING_PAIR_V1_7 *PWDF_USB_INTERFACE_SETTING_PAIR_V1_7;
103 typedef const struct _WDF_USB_INTERFACE_SETTING_PAIR_V1_7 *PCWDF_USB_INTERFACE_SETTING_PAIR_V1_7;
104 typedef struct _WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_V1_7 *PWDF_USB_DEVICE_SELECT_CONFIG_PARAMS_V1_7;
105 typedef const struct _WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_V1_7 *PCWDF_USB_DEVICE_SELECT_CONFIG_PARAMS_V1_7;
106 typedef struct _WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_V1_7 *PWDF_USB_INTERFACE_SELECT_SETTING_PARAMS_V1_7;
107 typedef const struct _WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_V1_7 *PCWDF_USB_INTERFACE_SELECT_SETTING_PARAMS_V1_7;
108 typedef struct _WDF_USB_PIPE_INFORMATION_V1_7 *PWDF_USB_PIPE_INFORMATION_V1_7;
109 typedef const struct _WDF_USB_PIPE_INFORMATION_V1_7 *PCWDF_USB_PIPE_INFORMATION_V1_7;
110 typedef struct _WDF_WMI_PROVIDER_CONFIG_V1_7 *PWDF_WMI_PROVIDER_CONFIG_V1_7;
111 typedef const struct _WDF_WMI_PROVIDER_CONFIG_V1_7 *PCWDF_WMI_PROVIDER_CONFIG_V1_7;
112 typedef struct _WDF_WMI_INSTANCE_CONFIG_V1_7 *PWDF_WMI_INSTANCE_CONFIG_V1_7;
113 typedef const struct _WDF_WMI_INSTANCE_CONFIG_V1_7 *PCWDF_WMI_INSTANCE_CONFIG_V1_7;
114 typedef struct _WDF_WORKITEM_CONFIG_V1_7 *PWDF_WORKITEM_CONFIG_V1_7;
115 typedef const struct _WDF_WORKITEM_CONFIG_V1_7 *PCWDF_WORKITEM_CONFIG_V1_7;
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_7 {
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_7;
157 
158 typedef struct _WDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA_V1_7 {
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_7, *PWDF_REQUEST_FATAL_ERROR_INFORMATION_LENGTH_MISMATCH_DATA_V1_7;
170 
171 typedef struct _WDF_QUEUE_FATAL_ERROR_DATA_V1_7 {
172     WDFQUEUE Queue;
173 
174     WDFREQUEST Request;
175 
176     NTSTATUS Status;
177 
178 } WDF_QUEUE_FATAL_ERROR_DATA_V1_7, *PWDF_QUEUE_FATAL_ERROR_DATA_V1_7;
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_7 {
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_7, *PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER_V1_7;
195 
196 typedef struct _WDF_CHILD_ADDRESS_DESCRIPTION_HEADER_V1_7 {
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_7, *PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER_V1_7;
206 
207 typedef struct _WDF_CHILD_RETRIEVE_INFO_V1_7 {
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_7 IdentificationDescription;
217 
218     //
219     // Optional pointer when passed in, copied into upon success
220     //
221     PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER_V1_7 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_7, *PWDF_CHILD_RETRIEVE_INFO_V1_7;
235 
236 typedef struct _WDF_CHILD_LIST_CONFIG_V1_7 {
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_7, *PWDF_CHILD_LIST_CONFIG_V1_7;
328 
329 typedef struct _WDF_CHILD_LIST_ITERATOR_V1_7 {
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_7, *PWDF_CHILD_LIST_ITERATOR_V1_7;
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_7 {
355     PCWDF_CLASS_EXTENSION_DESCRIPTOR_V1_7   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_7, *PWDF_CLASS_EXTENSION_DESCRIPTOR_V1_7;
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_7 {
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_7, *PWDF_COMMON_BUFFER_CONFIG_V1_7;
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_7 {
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_7, *PWDF_FILEOBJECT_CONFIG_V1_7;
450 
451 typedef struct _WDF_DEVICE_PNP_NOTIFICATION_DATA_V1_7 {
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_7;
495 
496 typedef struct _WDF_DEVICE_POWER_NOTIFICATION_DATA_V1_7 {
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_7;
540 
541 typedef struct _WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA_V1_7 {
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_7;
585 
586 typedef struct _WDF_PNPPOWER_EVENT_CALLBACKS_V1_7 {
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_7, *PWDF_PNPPOWER_EVENT_CALLBACKS_V1_7;
625 
626 typedef struct _WDF_POWER_POLICY_EVENT_CALLBACKS_V1_7 {
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     PFN_WDF_DEVICE_ARM_WAKE_FROM_SX_WITH_REASON EvtDeviceArmWakeFromSxWithReason;
645 
646 } WDF_POWER_POLICY_EVENT_CALLBACKS_V1_7, *PWDF_POWER_POLICY_EVENT_CALLBACKS_V1_7;
647 
648 typedef struct _WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_V1_7 {
649     //
650     // Size of this structure in bytes
651     //
652     ULONG Size;
653 
654     //
655     // Indicates whether the device can wake itself up while the machine is in
656     // S0.
657     //
658     WDF_POWER_POLICY_S0_IDLE_CAPABILITIES IdleCaps;
659 
660     //
661     // The low power state in which the device will be placed when it is idled
662     // out while the machine is in S0.
663     //
664     DEVICE_POWER_STATE DxState;
665 
666     //
667     // Amount of time the device must be idle before idling out.  Timeout is in
668     // milliseconds.
669     //
670     ULONG IdleTimeout;
671 
672     //
673     // Inidcates whether a user can control the idle policy of the device.
674     // By default, a user is allowed to change the policy.
675     //
676     WDF_POWER_POLICY_S0_IDLE_USER_CONTROL UserControlOfIdleSettings;
677 
678     //
679     // If WdfTrue, idling out while the machine is in S0 will be enabled.
680     //
681     // If WdfFalse, idling out will be disabled.
682     //
683     // If WdfUseDefault, the idling out will be enabled.  If
684     // UserControlOfIdleSettings is set to IdleAllowUserControl, the user's
685     // settings will override the default.
686     //
687     WDF_TRI_STATE Enabled;
688 
689 } WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_V1_7, *PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_V1_7;
690 
691 typedef struct _WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS_V1_7 {
692     //
693     // Size of this structure in bytes
694     //
695     ULONG Size;
696 
697     //
698     // The low power state in which the device will be placed when it is armed
699     // for wake from Sx.
700     //
701     DEVICE_POWER_STATE DxState;
702 
703     //
704     // Inidcates whether a user can control the idle policy of the device.
705     // By default, a user is allowed to change the policy.
706     //
707     WDF_POWER_POLICY_SX_WAKE_USER_CONTROL UserControlOfWakeSettings;
708 
709     //
710     // If WdfTrue, arming the device for wake while the machine is in Sx is
711     // enabled.
712     //
713     // If WdfFalse, arming the device for wake while the machine is in Sx is
714     // disabled.
715     //
716     // If WdfUseDefault, arming will be enabled.  If UserControlOfWakeSettings
717     // is set to WakeAllowUserControl, the user's settings will override the
718     // default.
719     //
720     WDF_TRI_STATE Enabled;
721 
722     //
723     // If set to TRUE, arming the parent device can depend on whether there
724     // is atleast one child device armed for wake.
725     //
726     // If set to FALSE, arming of the parent device will be independent of
727     // whether any of the child devices are armed for wake.
728     //
729     BOOLEAN ArmForWakeIfChildrenAreArmedForWake;
730 
731     //
732     // Indicates that whenever the parent device completes the wake irp
733     // successfully, the status needs to be also propagated to the child
734     // devices.  This helps in tracking which devices were responsible for
735     // waking the system.
736     //
737     BOOLEAN IndicateChildWakeOnParentWake;
738 
739 } WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS_V1_7, *PWDF_DEVICE_POWER_POLICY_WAKE_SETTINGS_V1_7;
740 
741 typedef struct _WDF_DEVICE_STATE_V1_7 {
742     //
743     // Size of this structure in bytes
744     //
745     ULONG Size;
746 
747     //
748     // If set to WdfTrue, the device will be disabled
749     //
750     WDF_TRI_STATE Disabled;
751 
752     //
753     // If set to WdfTrue, the device will not be displayed in device manager.
754     // Once hidden, the device cannot be unhidden.
755     //
756     WDF_TRI_STATE DontDisplayInUI;
757 
758     //
759     // If set to WdfTrue, the device is reporting itself as failed.  If set
760     // in conjuction with ResourcesChanged to WdfTrue, the device will receive
761     // a PnP stop and then a new PnP start device.
762     //
763     WDF_TRI_STATE Failed;
764 
765     //
766     // If set to WdfTrue, the device cannot be subsequently disabled.
767     //
768     WDF_TRI_STATE NotDisableable;
769 
770 
771 
772 
773     //
774     //
775     // If set to WdfTrue, the device stack will be torn down.
776     //
777     WDF_TRI_STATE Removed;
778 
779     //
780     // If set to WdfTrue, the device will be sent another PnP start.  If the
781     // Failed field is set to WdfTrue as well, a PnP stop will be sent before
782     // the start.
783     //
784     WDF_TRI_STATE ResourcesChanged;
785 
786 } WDF_DEVICE_STATE_V1_7, *PWDF_DEVICE_STATE_V1_7;
787 
788 typedef struct _WDF_DEVICE_PNP_CAPABILITIES_V1_7 {
789     //
790     // Size of the structure in bytes
791     //
792     ULONG Size;
793 
794     //
795     // NOTE: To mark a PDO as raw, call WdfPdoInitAssignRawDevice
796     //
797     //
798     WDF_TRI_STATE LockSupported;
799 
800     WDF_TRI_STATE EjectSupported;
801 
802     WDF_TRI_STATE Removable;
803 
804     WDF_TRI_STATE DockDevice;
805 
806     WDF_TRI_STATE UniqueID;
807 
808     WDF_TRI_STATE SilentInstall;
809 
810     WDF_TRI_STATE SurpriseRemovalOK;
811 
812     WDF_TRI_STATE HardwareDisabled;
813 
814     WDF_TRI_STATE NoDisplayInUI;
815 
816     //
817     // Default values of -1 indicate not to set this value
818     //
819     ULONG Address;
820 
821     ULONG UINumber;
822 
823 } WDF_DEVICE_PNP_CAPABILITIES_V1_7, *PWDF_DEVICE_PNP_CAPABILITIES_V1_7;
824 
825 typedef struct _WDF_DEVICE_POWER_CAPABILITIES_V1_7 {
826     //
827     // Size of the structure in bytes
828     //
829     ULONG Size;
830 
831     WDF_TRI_STATE DeviceD1;
832 
833     WDF_TRI_STATE DeviceD2;
834 
835     WDF_TRI_STATE WakeFromD0;
836 
837     WDF_TRI_STATE WakeFromD1;
838 
839     WDF_TRI_STATE WakeFromD2;
840 
841     WDF_TRI_STATE WakeFromD3;
842 
843     //
844     // Default value PowerDeviceMaximum indicates not to set this value
845     //
846     DEVICE_POWER_STATE DeviceState[PowerSystemMaximum];
847 
848     //
849     // Default value PowerDeviceMaximum, PowerSystemMaximum indicates not to
850     // set this value.
851     //
852     DEVICE_POWER_STATE DeviceWake;
853 
854     SYSTEM_POWER_STATE SystemWake;
855 
856     //
857     // Default values of -1 indicate not to set this value
858     //
859     ULONG D1Latency;
860 
861     ULONG D2Latency;
862 
863     ULONG D3Latency;
864 
865     //
866     // Ideal Dx state for the device to be put into when the machine moves into
867     // Sx and the device is not armed for wake.  By default, the default will be
868     // placed into D3.  If IdealDxStateForSx is lighter then
869     // DeviceState[Sx], then DeviceState[Sx] will be used as the Dx state.
870     //
871     DEVICE_POWER_STATE IdealDxStateForSx;
872 
873 } WDF_DEVICE_POWER_CAPABILITIES_V1_7, *PWDF_DEVICE_POWER_CAPABILITIES_V1_7;
874 
875 // End of versioning of structures for wdfDevice.h
876 
877 //
878 // Versioning of structures for wdfDmaEnabler.h
879 //
880 typedef struct _WDF_DMA_ENABLER_CONFIG_V1_7 {
881     //
882     // Size of this structure in bytes
883     //
884     ULONG                Size;
885 
886     //
887     // One of the above WDF_DMA_PROFILES
888     //
889     WDF_DMA_PROFILE      Profile;
890 
891     //
892     // Maximum DMA Transfer handled in bytes.
893     //
894     size_t               MaximumLength;
895 
896     //
897     // The various DMA PnP/Power event callbacks
898     //
899     PFN_WDF_DMA_ENABLER_FILL                  EvtDmaEnablerFill;
900 
901     PFN_WDF_DMA_ENABLER_FLUSH                 EvtDmaEnablerFlush;
902 
903     PFN_WDF_DMA_ENABLER_DISABLE               EvtDmaEnablerDisable;
904 
905     PFN_WDF_DMA_ENABLER_ENABLE                EvtDmaEnablerEnable;
906 
907     PFN_WDF_DMA_ENABLER_SELFMANAGED_IO_START  EvtDmaEnablerSelfManagedIoStart;
908 
909     PFN_WDF_DMA_ENABLER_SELFMANAGED_IO_STOP   EvtDmaEnablerSelfManagedIoStop;
910 
911 } WDF_DMA_ENABLER_CONFIG_V1_7, *PWDF_DMA_ENABLER_CONFIG_V1_7;
912 
913 // End of versioning of structures for wdfDmaEnabler.h
914 
915 //
916 // Versioning of structures for wdfDmaTransaction.h
917 //
918 // End of versioning of structures for wdfDmaTransaction.h
919 
920 //
921 // Versioning of structures for wdfdpc.h
922 //
923 typedef struct _WDF_DPC_CONFIG_V1_7 {
924     ULONG       Size;
925 
926     PFN_WDF_DPC EvtDpcFunc;
927 
928     //
929     // If this is TRUE, the DPC will automatically serialize
930     // with the event callback handlers of its Parent Object.
931     //
932     // Parent Object's callback constraints should be compatible
933     // with the DPC (DISPATCH_LEVEL), or the request will fail.
934     //
935     BOOLEAN     AutomaticSerialization;
936 
937 } WDF_DPC_CONFIG_V1_7, *PWDF_DPC_CONFIG_V1_7;
938 
939 // End of versioning of structures for wdfdpc.h
940 
941 //
942 // Versioning of structures for wdfdriver.h
943 //
944 typedef struct _WDF_DRIVER_CONFIG_V1_7 {
945     //
946     // Size of this structure in bytes
947     //
948     ULONG Size;
949 
950     //
951     // Event callbacks
952     //
953     PFN_WDF_DRIVER_DEVICE_ADD EvtDriverDeviceAdd;
954 
955     PFN_WDF_DRIVER_UNLOAD    EvtDriverUnload;
956 
957     //
958     // Combination of WDF_DRIVER_INIT_FLAGS values
959     //
960     ULONG DriverInitFlags;
961 
962     //
963     // Pool tag to use for all allocations made by the framework on behalf of
964     // the client driver.
965     //
966     ULONG DriverPoolTag;
967 
968 } WDF_DRIVER_CONFIG_V1_7, *PWDF_DRIVER_CONFIG_V1_7;
969 
970 typedef struct _WDF_DRIVER_VERSION_AVAILABLE_PARAMS_V1_7 {
971     //
972     // Size of the structure in bytes
973     //
974     ULONG Size;
975 
976     //
977     // Major Version requested
978     //
979     ULONG MajorVersion;
980 
981     //
982     // Minor Version requested
983     //
984     ULONG MinorVersion;
985 
986 } WDF_DRIVER_VERSION_AVAILABLE_PARAMS_V1_7, *PWDF_DRIVER_VERSION_AVAILABLE_PARAMS_V1_7;
987 
988 // End of versioning of structures for wdfdriver.h
989 
990 //
991 // Versioning of structures for wdffdo.h
992 //
993 typedef struct _WDF_FDO_EVENT_CALLBACKS_V1_7 {
994     //
995     // Size of this structure in bytes
996     //
997     ULONG Size;
998 
999     PFN_WDF_DEVICE_FILTER_RESOURCE_REQUIREMENTS EvtDeviceFilterAddResourceRequirements;
1000 
1001     PFN_WDF_DEVICE_FILTER_RESOURCE_REQUIREMENTS EvtDeviceFilterRemoveResourceRequirements;
1002 
1003     PFN_WDF_DEVICE_REMOVE_ADDED_RESOURCES EvtDeviceRemoveAddedResources;
1004 
1005 } WDF_FDO_EVENT_CALLBACKS_V1_7, *PWDF_FDO_EVENT_CALLBACKS_V1_7;
1006 
1007 // End of versioning of structures for wdffdo.h
1008 
1009 //
1010 // Versioning of structures for wdffileobject.h
1011 //
1012 // End of versioning of structures for wdffileobject.h
1013 
1014 //
1015 // Versioning of structures for wdfGlobals.h
1016 //
1017 typedef struct _WDF_DRIVER_GLOBALS_V1_7 {
1018     // backpointer to the handle for this driver
1019     WDFDRIVER Driver;
1020 
1021     // Flags indicated by the driver during create
1022     ULONG DriverFlags;
1023 
1024     // Tag generated by WDF for the driver.  Tag used by allocations made on
1025     // behalf of the driver by WDF.
1026     ULONG DriverTag;
1027 
1028     CHAR DriverName[WDF_DRIVER_GLOBALS_NAME_LEN];
1029 
1030     // If TRUE, the stub code will capture DriverObject->DriverUnload and insert
1031     // itself first in the unload chain.  If FALSE, DriverUnload is left alone
1032     // (but WDF will not be notified of unload and there will be no auto cleanup).
1033     BOOLEAN DisplaceDriverUnload;
1034 
1035 } WDF_DRIVER_GLOBALS_V1_7, *PWDF_DRIVER_GLOBALS_V1_7;
1036 
1037 // End of versioning of structures for wdfGlobals.h
1038 
1039 //
1040 // Versioning of structures for wdfinstaller.h
1041 //
1042 // End of versioning of structures for wdfinstaller.h
1043 
1044 //
1045 // Versioning of structures for wdfinterrupt.h
1046 //
1047 //
1048 // Interrupt Configuration Structure
1049 //
1050 typedef struct _WDF_INTERRUPT_CONFIG_V1_7 {
1051     ULONG              Size;
1052 
1053     //
1054     // If this interrupt is to be synchronized with other interrupt(s) assigned
1055     // to the same WDFDEVICE, create a WDFSPINLOCK and assign it to each of the
1056     // WDFINTERRUPTs config.
1057     //
1058     WDFSPINLOCK        SpinLock;
1059 
1060     WDF_TRI_STATE      ShareVector;
1061 
1062     BOOLEAN            FloatingSave;
1063 
1064     //
1065     // Automatic Serialization of the DpcForIsr
1066     //
1067     BOOLEAN            AutomaticSerialization;
1068 
1069     // Event Callbacks
1070     PFN_WDF_INTERRUPT_ISR         EvtInterruptIsr;
1071 
1072     PFN_WDF_INTERRUPT_DPC         EvtInterruptDpc;
1073 
1074     PFN_WDF_INTERRUPT_ENABLE      EvtInterruptEnable;
1075 
1076     PFN_WDF_INTERRUPT_DISABLE     EvtInterruptDisable;
1077 
1078 } WDF_INTERRUPT_CONFIG_V1_7, *PWDF_INTERRUPT_CONFIG_V1_7;
1079 
1080 typedef struct _WDF_INTERRUPT_INFO_V1_7 {
1081     //
1082     // Size of this structure in bytes
1083     //
1084     ULONG                  Size;
1085 
1086     ULONG64                Reserved1;
1087 
1088     KAFFINITY              TargetProcessorSet;
1089 
1090     ULONG                  Reserved2;
1091 
1092     ULONG                  MessageNumber;
1093 
1094     ULONG                  Vector;
1095 
1096     KIRQL                  Irql;
1097 
1098     KINTERRUPT_MODE        Mode;
1099 
1100     WDF_INTERRUPT_POLARITY Polarity;
1101 
1102     BOOLEAN                MessageSignaled;
1103 
1104     // CM_SHARE_DISPOSITION
1105     UCHAR                  ShareDisposition;
1106 
1107 } WDF_INTERRUPT_INFO_V1_7, *PWDF_INTERRUPT_INFO_V1_7;
1108 
1109 // End of versioning of structures for wdfinterrupt.h
1110 
1111 //
1112 // Versioning of structures for wdfio.h
1113 //
1114 //
1115 // This is the structure used to configure an IoQueue and
1116 // register callback events to it.
1117 //
1118 //
1119 typedef struct _WDF_IO_QUEUE_CONFIG_V1_7 {
1120     ULONG                                       Size;
1121 
1122     WDF_IO_QUEUE_DISPATCH_TYPE                  DispatchType;
1123 
1124     WDF_TRI_STATE                               PowerManaged;
1125 
1126     BOOLEAN                                     AllowZeroLengthRequests;
1127 
1128     BOOLEAN                                     DefaultQueue;
1129 
1130     PFN_WDF_IO_QUEUE_IO_DEFAULT                 EvtIoDefault;
1131 
1132     PFN_WDF_IO_QUEUE_IO_READ                    EvtIoRead;
1133 
1134     PFN_WDF_IO_QUEUE_IO_WRITE                   EvtIoWrite;
1135 
1136     PFN_WDF_IO_QUEUE_IO_DEVICE_CONTROL          EvtIoDeviceControl;
1137 
1138     PFN_WDF_IO_QUEUE_IO_INTERNAL_DEVICE_CONTROL EvtIoInternalDeviceControl;
1139 
1140     PFN_WDF_IO_QUEUE_IO_STOP                    EvtIoStop;
1141 
1142     PFN_WDF_IO_QUEUE_IO_RESUME                  EvtIoResume;
1143 
1144     PFN_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE       EvtIoCanceledOnQueue;
1145 
1146 } WDF_IO_QUEUE_CONFIG_V1_7, *PWDF_IO_QUEUE_CONFIG_V1_7;
1147 
1148 // End of versioning of structures for wdfio.h
1149 
1150 //
1151 // Versioning of structures for wdfIoTarget.h
1152 //
1153 typedef struct _WDF_IO_TARGET_OPEN_PARAMS_V1_7 {
1154     //
1155     // Size of this structure in bytes
1156     //
1157     ULONG Size;
1158 
1159     //
1160     // Indicates which fields of this structure are going to be used in
1161     // creating the WDFIOTARGET.
1162     //
1163     WDF_IO_TARGET_OPEN_TYPE Type;
1164 
1165     //
1166     // Notification when the target is being queried for removal.
1167     // If !NT_SUCCESS is returned, the query will fail and the target will
1168     // remain opened.
1169     //
1170     PFN_WDF_IO_TARGET_QUERY_REMOVE EvtIoTargetQueryRemove;
1171 
1172     //
1173     // The previous query remove has been canceled and the target can now be
1174     // reopened.
1175     //
1176     PFN_WDF_IO_TARGET_REMOVE_CANCELED EvtIoTargetRemoveCanceled;
1177 
1178     //
1179     // The query remove has succeeded and the target is now removed from the
1180     // system.
1181     //
1182     PFN_WDF_IO_TARGET_REMOVE_COMPLETE EvtIoTargetRemoveComplete;
1183 
1184     // ========== WdfIoTargetOpenUseExistingDevice begin ==========
1185     //
1186     // The device object to send requests to
1187     //
1188     PDEVICE_OBJECT TargetDeviceObject;
1189 
1190     //
1191     // File object representing the TargetDeviceObject.  The PFILE_OBJECT will
1192     // be passed as a parameter in all requests sent to the resulting
1193     // WDFIOTARGET.
1194     //
1195     PFILE_OBJECT TargetFileObject;
1196 
1197     // ========== WdfIoTargetOpenUseExistingDevice end ==========
1198     //
1199     // ========== WdfIoTargetOpenByName begin ==========
1200     //
1201     // Name of the device to open.
1202     //
1203     UNICODE_STRING TargetDeviceName;
1204 
1205     //
1206     // The access desired on the device being opened up, ie WDM FILE_XXX_ACCESS
1207     // such as FILE_ANY_ACCESS, FILE_SPECIAL_ACCESS, FILE_READ_ACCESS, or
1208     // FILE_WRITE_ACCESS or you can use values such as GENERIC_READ,
1209     // GENERIC_WRITE, or GENERIC_ALL.
1210     //
1211     ACCESS_MASK DesiredAccess;
1212 
1213     //
1214     // Share access desired on the target being opened, ie WDM FILE_SHARE_XXX
1215     // values such as FILE_SHARE_READ, FILE_SHARE_WRITE, FILE_SHARE_DELETE.
1216     //
1217     // A zero value means exclusive access to the target.
1218     //
1219     ULONG ShareAccess;
1220 
1221     //
1222     // File  attributes, see ZwCreateFile in the DDK for a list of valid
1223     // values and their meaning.
1224     //
1225     ULONG FileAttributes;
1226 
1227     //
1228     // Create disposition, see ZwCreateFile in the DDK for a list of valid
1229     // values and their meaning.
1230     //
1231     ULONG CreateDisposition;
1232 
1233     //
1234     // Options for opening the device, see CreateOptions for ZwCreateFile in the
1235     // DDK for a list of valid values and their meaning.
1236     //
1237     ULONG CreateOptions;
1238 
1239     PVOID EaBuffer;
1240 
1241     ULONG EaBufferLength;
1242 
1243     PLONGLONG AllocationSize;
1244 
1245     // ========== WdfIoTargetOpenByName end ==========
1246     //
1247     //
1248     // On return for a create by name, this will contain one of the following
1249     // values:  FILE_CREATED, FILE_OPENED, FILE_OVERWRITTEN, FILE_SUPERSEDED,
1250     // FILE_EXISTS, FILE_DOES_NOT_EXIST
1251     //
1252     ULONG FileInformation;
1253 
1254 } WDF_IO_TARGET_OPEN_PARAMS_V1_7, *PWDF_IO_TARGET_OPEN_PARAMS_V1_7;
1255 
1256 // End of versioning of structures for wdfIoTarget.h
1257 
1258 //
1259 // Versioning of structures for wdfMemory.h
1260 //
1261 typedef struct _WDFMEMORY_OFFSET_V1_7 {
1262     //
1263     // Offset into the WDFMEMORY that the operation should start at.
1264     //
1265     size_t BufferOffset;
1266 
1267     //
1268     // Number of bytes that the operation should access.  If 0, the entire
1269     // length of the WDFMEMORY buffer will be used in the operation or ignored
1270     // depending on the API.
1271     //
1272     size_t BufferLength;
1273 
1274 } WDFMEMORY_OFFSET_V1_7, *PWDFMEMORY_OFFSET_V1_7;
1275 
1276 typedef struct _WDF_MEMORY_DESCRIPTOR_V1_7 {
1277 
1278 
1279 
1280     WDF_MEMORY_DESCRIPTOR_TYPE Type;
1281 
1282     union {
1283         struct {
1284             PVOID Buffer;
1285 
1286             ULONG Length;
1287 
1288         } BufferType;
1289 
1290         struct {
1291             PMDL Mdl;
1292 
1293             ULONG BufferLength;
1294 
1295         } MdlType;
1296 
1297         struct {
1298             WDFMEMORY Memory;
1299 
1300             PWDFMEMORY_OFFSET_V1_7 Offsets;
1301 
1302         } HandleType;
1303 
1304     } u;
1305 
1306 } WDF_MEMORY_DESCRIPTOR_V1_7, *PWDF_MEMORY_DESCRIPTOR_V1_7;
1307 
1308 // End of versioning of structures for wdfMemory.h
1309 
1310 //
1311 // Versioning of structures for wdfMiniport.h
1312 //
1313 // End of versioning of structures for wdfMiniport.h
1314 
1315 //
1316 // Versioning of structures for wdfObject.h
1317 //
1318 typedef struct _WDF_OBJECT_ATTRIBUTES_V1_7 {
1319     //
1320     // Size in bytes of this structure
1321     //
1322     ULONG Size;
1323 
1324     //
1325     // Function to call when the object is deleted
1326     //
1327     PFN_WDF_OBJECT_CONTEXT_CLEANUP EvtCleanupCallback;
1328 
1329     //
1330     // Function to call when the objects memory is destroyed when the
1331     // the last reference count goes to zero
1332     //
1333     PFN_WDF_OBJECT_CONTEXT_DESTROY EvtDestroyCallback;
1334 
1335     //
1336     // Execution level constraints for Object
1337     //
1338     WDF_EXECUTION_LEVEL            ExecutionLevel;
1339 
1340     //
1341     // Synchronization level constraint for Object
1342     //
1343     WDF_SYNCHRONIZATION_SCOPE        SynchronizationScope;
1344 
1345     //
1346     // Optional Parent Object
1347     //
1348     WDFOBJECT ParentObject;
1349 
1350     //
1351     // Overrides the size of the context allocated as specified by
1352     // ContextTypeInfo->ContextSize
1353     //
1354     size_t ContextSizeOverride;
1355 
1356     //
1357     // Pointer to the type information to be associated with the object
1358     //
1359     PCWDF_OBJECT_CONTEXT_TYPE_INFO_V1_7 ContextTypeInfo;
1360 
1361 } WDF_OBJECT_ATTRIBUTES_V1_7, *PWDF_OBJECT_ATTRIBUTES_V1_7;
1362 
1363 //
1364 // Since C does not have strong type checking we must invent our own
1365 //
1366 typedef struct _WDF_OBJECT_CONTEXT_TYPE_INFO_V1_7 {
1367     //
1368     // The size of this structure in bytes
1369     //
1370     ULONG Size;
1371 
1372     //
1373     // String representation of the context's type name, i.e. "DEVICE_CONTEXT"
1374     //
1375     PCHAR ContextName;
1376 
1377     //
1378     // The size of the context in bytes.  This will be the size of the context
1379     // associated with the handle unless
1380     // WDF_OBJECT_ATTRIBUTES::ContextSizeOverride is specified.
1381     //
1382     size_t ContextSize;
1383 
1384     //
1385     // If NULL, this structure is the unique type identifier for the context
1386     // type.  If != NULL, the UniqueType pointer value is the unique type id
1387     // for the context type.
1388     //
1389     PCWDF_OBJECT_CONTEXT_TYPE_INFO_V1_7 UniqueType;
1390 
1391     //
1392     // Function pointer to retrieve the context type information structure
1393     // pointer from the provider of the context type.  This function is invoked
1394     // by the client driver's entry point by the KMDF stub after all class
1395     // drivers are loaded and before DriverEntry is invoked.
1396     //
1397     PFN_GET_UNIQUE_CONTEXT_TYPE EvtDriverGetUniqueContextType;
1398 
1399 } WDF_OBJECT_CONTEXT_TYPE_INFO_V1_7, *PWDF_OBJECT_CONTEXT_TYPE_INFO_V1_7;
1400 
1401 // End of versioning of structures for wdfObject.h
1402 
1403 //
1404 // Versioning of structures for wdfpdo.h
1405 //
1406 typedef struct _WDF_PDO_EVENT_CALLBACKS_V1_7 {
1407     //
1408     // The size of this structure in bytes
1409     //
1410     ULONG Size;
1411 
1412     //
1413     // Called in response to IRP_MN_QUERY_RESOURCES
1414     //
1415     PFN_WDF_DEVICE_RESOURCES_QUERY EvtDeviceResourcesQuery;
1416 
1417     //
1418     // Called in response to IRP_MN_QUERY_RESOURCE_REQUIREMENTS
1419     //
1420     PFN_WDF_DEVICE_RESOURCE_REQUIREMENTS_QUERY EvtDeviceResourceRequirementsQuery;
1421 
1422     //
1423     // Called in response to IRP_MN_EJECT
1424     //
1425     PFN_WDF_DEVICE_EJECT EvtDeviceEject;
1426 
1427     //
1428     // Called in response to IRP_MN_SET_LOCK
1429     //
1430     PFN_WDF_DEVICE_SET_LOCK EvtDeviceSetLock;
1431 
1432     //
1433     // Called in response to the power policy owner sending a wait wake to the
1434     // PDO.  Bus generic arming shoulding occur here.
1435     //
1436     PFN_WDF_DEVICE_ENABLE_WAKE_AT_BUS       EvtDeviceEnableWakeAtBus;
1437 
1438     //
1439     // Called in response to the power policy owner sending a wait wake to the
1440     // PDO.  Bus generic disarming shoulding occur here.
1441     //
1442     PFN_WDF_DEVICE_DISABLE_WAKE_AT_BUS      EvtDeviceDisableWakeAtBus;
1443 
1444 } WDF_PDO_EVENT_CALLBACKS_V1_7, *PWDF_PDO_EVENT_CALLBACKS_V1_7;
1445 
1446 // End of versioning of structures for wdfpdo.h
1447 
1448 //
1449 // Versioning of structures for wdfpool.h
1450 //
1451 // End of versioning of structures for wdfpool.h
1452 
1453 //
1454 // Versioning of structures for wdfqueryinterface.h
1455 //
1456 typedef struct _WDF_QUERY_INTERFACE_CONFIG_V1_7 {
1457     //
1458     // Size of this structure in bytes.
1459     //
1460     ULONG Size;
1461 
1462     //
1463     // Interface to be returned to the caller.  Optional if BehaviorType is set
1464     // to WdfQueryInterfaceTypePassThrough or ImportInterface is set to TRUE.
1465     //
1466     PINTERFACE Interface;
1467 
1468     //
1469     // The GUID identifying the interface
1470     //
1471     CONST GUID * InterfaceType;
1472 
1473     //
1474     // Valid only for PDOs.  The framework will allocate a new request and
1475     // forward it down the parent's device stack.
1476     //
1477     BOOLEAN SendQueryToParentStack;
1478 
1479 
1480 
1481 
1482     //
1483     //
1484     // Driver supplied callback which is called after some basic interface
1485     // validation has been performed (size, version, and guid checking).  This
1486     // is an optional parameter and may be NULL unless ImportInterface is
1487     // specified.
1488     //
1489     // If the callback returns !NT_SUCCESS, this error will be returned to the
1490     // caller and the query interface will fail.
1491     //
1492     // In this callback, the caller is free to modify the ExposedInterface in
1493     // any manner of its choosing.  For instance, the callback may change any
1494     // field in the interface.  The callback may also alloate a dynamic context
1495     // to be associated with the interface; the InterfaceReference and
1496     // InterfaceDereference functions may also be overridden.
1497     //
1498     // If ImportInterface is set to TRUE, then this is a required field and the
1499     // callback must initialize the interface (the framework will leave the
1500     // ExposedInterface buffer exactly as it received it) since the framework
1501     // has no way of knowing which fields to fill in and which to leave alone.
1502     //
1503     PFN_WDF_DEVICE_PROCESS_QUERY_INTERFACE_REQUEST EvtDeviceProcessQueryInterfaceRequest;
1504 
1505     //
1506     // If TRUE, the interface provided by the caller contains data that the
1507     // driver is interested in.  By setting to this field to TRUE, the
1508     // EvtDeviceProcessQueryInterfaceRequest callback must initialize the
1509     // ExposedInterface.
1510     //
1511     // If FALSE, the entire ExposedInterface is initialized through a memory
1512     // copy before the EvtDeviceProcessQueryInterfaceRequest is called.
1513     //
1514     BOOLEAN ImportInterface;
1515 
1516 } WDF_QUERY_INTERFACE_CONFIG_V1_7, *PWDF_QUERY_INTERFACE_CONFIG_V1_7;
1517 
1518 // End of versioning of structures for wdfqueryinterface.h
1519 
1520 //
1521 // Versioning of structures for wdfregistry.h
1522 //
1523 // End of versioning of structures for wdfregistry.h
1524 
1525 //
1526 // Versioning of structures for wdfrequest.h
1527 //
1528 //
1529 // This parameters structure allows general access to a requests parameters
1530 //
1531 typedef struct _WDF_REQUEST_PARAMETERS_V1_7 {
1532     USHORT Size;
1533 
1534     UCHAR MinorFunction;
1535 
1536     WDF_REQUEST_TYPE Type;
1537 
1538     //
1539     // The following user parameters are based on the service that is being
1540     // invoked.  Drivers and file systems can determine which set to use based
1541     // on the above major and minor function codes.
1542     //
1543     union {
1544         //
1545         // System service parameters for:  Create
1546         //
1547         //
1548         struct {
1549             PIO_SECURITY_CONTEXT SecurityContext;
1550 
1551             ULONG Options;
1552 
1553             USHORT POINTER_ALIGNMENT FileAttributes;
1554 
1555             USHORT ShareAccess;
1556 
1557             ULONG POINTER_ALIGNMENT EaLength;
1558 
1559         } Create;
1560 
1561         //
1562         // System service parameters for:  Read
1563         //
1564         //
1565         struct {
1566             size_t Length;
1567 
1568             ULONG POINTER_ALIGNMENT Key;
1569 
1570             LONGLONG DeviceOffset;
1571 
1572         } Read;
1573 
1574         //
1575         // System service parameters for:  Write
1576         //
1577         //
1578         struct {
1579             size_t Length;
1580 
1581             ULONG POINTER_ALIGNMENT Key;
1582 
1583             LONGLONG DeviceOffset;
1584 
1585         } Write;
1586 
1587         //
1588         // System service parameters for:  Device Control
1589         //
1590         // Note that the user's output buffer is stored in the UserBuffer field
1591         // and the user's input buffer is stored in the SystemBuffer field.
1592         //
1593         //
1594         struct {
1595             size_t OutputBufferLength;
1596 
1597             size_t POINTER_ALIGNMENT InputBufferLength;
1598 
1599             ULONG POINTER_ALIGNMENT IoControlCode;
1600 
1601             PVOID Type3InputBuffer;
1602 
1603         } DeviceIoControl;
1604 
1605         struct {
1606             PVOID Arg1;
1607 
1608             PVOID  Arg2;
1609 
1610             ULONG POINTER_ALIGNMENT IoControlCode;
1611 
1612             PVOID Arg4;
1613 
1614         } Others;
1615 
1616     } Parameters;
1617 
1618 } WDF_REQUEST_PARAMETERS_V1_7, *PWDF_REQUEST_PARAMETERS_V1_7;
1619 
1620 typedef struct _WDF_REQUEST_COMPLETION_PARAMS_V1_7 {
1621     //
1622     // Size of the structure in bytes
1623     //
1624     ULONG Size;
1625 
1626     WDF_REQUEST_TYPE Type;
1627 
1628     IO_STATUS_BLOCK IoStatus;
1629 
1630     union {
1631         struct {
1632             WDFMEMORY Buffer;
1633 
1634             size_t Length;
1635 
1636             size_t Offset;
1637 
1638         } Write;
1639 
1640         struct {
1641             WDFMEMORY Buffer;
1642 
1643             size_t Length;
1644 
1645             size_t Offset;
1646 
1647         } Read;
1648 
1649         struct {
1650             ULONG IoControlCode;
1651 
1652             struct {
1653                 WDFMEMORY Buffer;
1654 
1655                 size_t Offset;
1656 
1657             } Input;
1658 
1659             struct {
1660                 WDFMEMORY Buffer;
1661 
1662                 size_t Offset;
1663 
1664                 size_t Length;
1665 
1666             } Output;
1667 
1668         } Ioctl;
1669 
1670         struct {
1671             union {
1672                 PVOID Ptr;
1673 
1674                 ULONG_PTR Value;
1675 
1676             } Argument1;
1677 
1678             union {
1679                 PVOID Ptr;
1680 
1681                 ULONG_PTR Value;
1682 
1683             } Argument2;
1684 
1685             union {
1686                 PVOID Ptr;
1687 
1688                 ULONG_PTR Value;
1689 
1690             } Argument3;
1691 
1692             union {
1693                 PVOID Ptr;
1694 
1695                 ULONG_PTR Value;
1696 
1697             } Argument4;
1698 
1699         } Others;
1700 
1701         struct {
1702             PWDF_USB_REQUEST_COMPLETION_PARAMS_V1_7 Completion;
1703 
1704         } Usb;
1705 
1706     } Parameters;
1707 
1708 } WDF_REQUEST_COMPLETION_PARAMS_V1_7, *PWDF_REQUEST_COMPLETION_PARAMS_V1_7;
1709 
1710 typedef struct _WDF_REQUEST_REUSE_PARAMS_V1_7 {
1711     //
1712     // Size of this structure in bytes
1713     //
1714     ULONG Size;
1715 
1716     //
1717     // Bit field combination of WDF_REQUEST_REUSE_Xxx values
1718     //
1719     ULONG Flags;
1720 
1721     //
1722     // The new status of the request.
1723     //
1724     NTSTATUS Status;
1725 
1726     //
1727     // New PIRP  to be contained in the WDFREQUEST.   Setting a new PIRP value
1728     // is only valid for WDFREQUESTs created by WdfRequestCreateFromIrp where
1729     // RequestFreesIrp == FALSE.  No other WDFREQUESTs (presented by the
1730     // I/O queue for instance) may have their IRPs changed.
1731     //
1732     PIRP NewIrp;
1733 
1734 } WDF_REQUEST_REUSE_PARAMS_V1_7, *PWDF_REQUEST_REUSE_PARAMS_V1_7;
1735 
1736 typedef struct _WDF_REQUEST_SEND_OPTIONS_V1_7 {
1737     //
1738     // Size of the structure in bytes
1739     //
1740     ULONG Size;
1741 
1742     //
1743     // Bit field combination of values from the WDF_REQUEST_SEND_OPTIONS_FLAGS
1744     // enumeration
1745     //
1746     ULONG Flags;
1747 
1748     //
1749     // Valid when WDF_REQUEST_SEND_OPTION_TIMEOUT is set
1750     //
1751     LONGLONG Timeout;
1752 
1753 } WDF_REQUEST_SEND_OPTIONS_V1_7, *PWDF_REQUEST_SEND_OPTIONS_V1_7;
1754 
1755 // End of versioning of structures for wdfrequest.h
1756 
1757 //
1758 // Versioning of structures for wdfresource.h
1759 //
1760 // End of versioning of structures for wdfresource.h
1761 
1762 //
1763 // Versioning of structures for wdfstring.h
1764 //
1765 // End of versioning of structures for wdfstring.h
1766 
1767 //
1768 // Versioning of structures for wdfsync.h
1769 //
1770 // End of versioning of structures for wdfsync.h
1771 
1772 //
1773 // Versioning of structures for wdftimer.h
1774 //
1775 typedef struct _WDF_TIMER_CONFIG_V1_7 {
1776     ULONG         Size;
1777 
1778     PFN_WDF_TIMER EvtTimerFunc;
1779 
1780     LONG          Period;
1781 
1782     //
1783     // If this is TRUE, the Timer will automatically serialize
1784     // with the event callback handlers of its Parent Object.
1785     //
1786     // Parent Object's callback constraints should be compatible
1787     // with the Timer DPC (DISPATCH_LEVEL), or the request will fail.
1788     //
1789     BOOLEAN       AutomaticSerialization;
1790 
1791 } WDF_TIMER_CONFIG_V1_7, *PWDF_TIMER_CONFIG_V1_7;
1792 
1793 // End of versioning of structures for wdftimer.h
1794 
1795 //
1796 // Versioning of structures for wdftypes.h
1797 //
1798 // End of versioning of structures for wdftypes.h
1799 
1800 //
1801 // Versioning of structures for wdfUsb.h
1802 //
1803 typedef struct _WDF_USB_REQUEST_COMPLETION_PARAMS_V1_7 {
1804     USBD_STATUS UsbdStatus;
1805 
1806     WDF_USB_REQUEST_TYPE Type;
1807 
1808     union {
1809         struct {
1810             WDFMEMORY Buffer;
1811 
1812             USHORT LangID;
1813 
1814             UCHAR StringIndex;
1815 
1816             //
1817             // If STATUS_BUFFER_OVERFLOW is returned, this field will contain the
1818             // number of bytes required to retrieve the entire string.
1819             //
1820             UCHAR RequiredSize;
1821 
1822         } DeviceString;
1823 
1824         struct {
1825             WDFMEMORY Buffer;
1826 
1827             WDF_USB_CONTROL_SETUP_PACKET SetupPacket;
1828 
1829             ULONG Length;
1830 
1831         } DeviceControlTransfer;
1832 
1833         struct {
1834             WDFMEMORY Buffer;
1835 
1836         } DeviceUrb;
1837 
1838         struct {
1839             WDFMEMORY Buffer;
1840 
1841             size_t Length;
1842 
1843             size_t Offset;
1844 
1845         } PipeWrite;
1846 
1847         struct {
1848             WDFMEMORY Buffer;
1849 
1850             size_t Length;
1851 
1852             size_t Offset;
1853 
1854         } PipeRead;
1855 
1856         struct {
1857             WDFMEMORY Buffer;
1858 
1859         } PipeUrb;
1860 
1861     } Parameters;
1862 
1863 } WDF_USB_REQUEST_COMPLETION_PARAMS_V1_7, *PWDF_USB_REQUEST_COMPLETION_PARAMS_V1_7;
1864 
1865 typedef struct _WDF_USB_CONTINUOUS_READER_CONFIG_V1_7 {
1866     //
1867     // Size of the string in bytes
1868     //
1869     ULONG Size;
1870 
1871     //
1872     // Number of bytes to send ask for from the usb device.
1873     //
1874     size_t TransferLength;
1875 
1876     //
1877     // Number of bytes to allocate before the requested transfer length
1878     //
1879     size_t HeaderLength;
1880 
1881     //
1882     // Number of bytes to allocate after the requested transfer length
1883     //
1884     size_t TrailerLength;
1885 
1886     //
1887     // Number of reads to send to the device at once.  If zero is specified, the
1888     // default will be used.
1889     //
1890     UCHAR NumPendingReads;
1891 
1892     //
1893     // Optional attributes to apply to each WDFMEMORY allocated for each read
1894     //
1895     PWDF_OBJECT_ATTRIBUTES_V1_7 BufferAttributes;
1896 
1897     //
1898     // Event callback invoked when a read is completed
1899     //
1900     PFN_WDF_USB_READER_COMPLETION_ROUTINE EvtUsbTargetPipeReadComplete;
1901 
1902     //
1903     // Context to be passed to EvtUsbTargetPipeReadComplete
1904     //
1905     WDFCONTEXT EvtUsbTargetPipeReadCompleteContext;
1906 
1907     //
1908     // Event callback invoked when a reader fails.  If TRUE is returned, the
1909     // readers are restarted.
1910     //
1911     PFN_WDF_USB_READERS_FAILED EvtUsbTargetPipeReadersFailed;
1912 
1913 } WDF_USB_CONTINUOUS_READER_CONFIG_V1_7, *PWDF_USB_CONTINUOUS_READER_CONFIG_V1_7;
1914 
1915 
1916 
1917 
1918 typedef struct _WDF_USB_DEVICE_INFORMATION_V1_7 {
1919     //
1920     // Size of this structure in bytes
1921     //
1922     ULONG Size;
1923 
1924     //
1925     // USBD version information
1926     //
1927     USBD_VERSION_INFORMATION UsbdVersionInformation;
1928 
1929     //
1930     // Usb controller port capabilities
1931     //
1932     ULONG HcdPortCapabilities;
1933 
1934     //
1935     // Bitfield of WDF_USB_DEVICE_TRAITS values
1936     //
1937     ULONG Traits;
1938 
1939 } WDF_USB_DEVICE_INFORMATION_V1_7, *PWDF_USB_DEVICE_INFORMATION_V1_7;
1940 
1941 typedef struct _WDF_USB_INTERFACE_SETTING_PAIR_V1_7 {
1942     //
1943     // Interface to select
1944     //
1945     WDFUSBINTERFACE UsbInterface;
1946 
1947     //
1948     // Setting to select on UsbInterface
1949     //
1950     UCHAR SettingIndex;
1951 
1952 } WDF_USB_INTERFACE_SETTING_PAIR_V1_7, *PWDF_USB_INTERFACE_SETTING_PAIR_V1_7;
1953 
1954 typedef struct _WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_V1_7 {
1955     //
1956     // Size of the structure in bytes
1957     //
1958     ULONG Size;
1959 
1960     //
1961     // Type of select config, one of WdfUsbTargetDeviceSelectConfigType values
1962     //
1963     WdfUsbTargetDeviceSelectConfigType Type;
1964 
1965     union {
1966         struct {
1967             //
1968             // Configuration descriptor to use
1969             //
1970             PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor;
1971 
1972             //
1973             // Array of interface descriptors pointers.
1974             //
1975             PUSB_INTERFACE_DESCRIPTOR * InterfaceDescriptors;
1976 
1977             //
1978             // Number of elements in the InterfaceDescrtiptors pointer array.
1979             //
1980             ULONG NumInterfaceDescriptors;
1981 
1982         } Descriptor;
1983 
1984         struct {
1985             //
1986             // Preallocated select config URB formatted by the caller.
1987             // Will be used, as supplied without modification, as the select
1988             // config request.
1989             //
1990             PURB Urb;
1991 
1992         } Urb;
1993 
1994         struct {
1995             //
1996             // Number of pipes configured on the single after.  This value is
1997             // returned to the caller after a succssful call.
1998             //
1999             UCHAR   NumberConfiguredPipes;
2000 
2001             //
2002             // The interface which was configred.  This value is returned to the
2003             // caller after a successful call.
2004             //
2005             WDFUSBINTERFACE ConfiguredUsbInterface;
2006 
2007         } SingleInterface;
2008 
2009         struct {
2010             //
2011             // Number of interface pairs in the Pairs array
2012             //
2013             UCHAR NumberInterfaces;
2014 
2015             //
2016             // Array of interface + settings
2017             //
2018             PWDF_USB_INTERFACE_SETTING_PAIR_V1_7 Pairs;
2019 
2020             //
2021             // Number of interfaces which were configured after a successful call
2022             //
2023             UCHAR NumberOfConfiguredInterfaces;
2024 
2025         } MultiInterface;
2026 
2027     } Types;
2028 
2029 } WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_V1_7, *PWDF_USB_DEVICE_SELECT_CONFIG_PARAMS_V1_7;
2030 
2031 typedef struct _WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_V1_7 {
2032     //
2033     // Size of this data structure in bytes
2034     //
2035     ULONG Size;
2036 
2037     //
2038     // Type of select interface as indicated by one of the
2039     // WdfUsbTargetDeviceSelectSettingType values.
2040     //
2041     WdfUsbTargetDeviceSelectSettingType Type;
2042 
2043     union {
2044         struct {
2045             //
2046             // Interface descriptor that will be used in the interface selection
2047             //
2048             PUSB_INTERFACE_DESCRIPTOR InterfaceDescriptor;
2049 
2050         } Descriptor;
2051 
2052         struct {
2053             //
2054             // The setting index of the WDFUSBINTERFACE to use
2055             //
2056             UCHAR SettingIndex;
2057 
2058         } Interface;
2059 
2060         struct {
2061             //
2062             // Preformatted select interface URB which will be used in the
2063             // select interface request.
2064             //
2065             PURB Urb;
2066 
2067         } Urb;
2068 
2069     } Types;
2070 
2071 } WDF_USB_INTERFACE_SELECT_SETTING_PARAMS_V1_7, *PWDF_USB_INTERFACE_SELECT_SETTING_PARAMS_V1_7;
2072 
2073 typedef struct _WDF_USB_PIPE_INFORMATION_V1_7 {
2074     //
2075     // Size of the structure in bytes
2076     //
2077     ULONG Size;
2078 
2079     //
2080     // Maximum packet size this device is capable of
2081     //
2082     ULONG MaximumPacketSize;
2083 
2084     //
2085     // Raw endpoint address of the device as described by its descriptor
2086     //
2087     UCHAR EndpointAddress;
2088 
2089     //
2090     // Polling interval
2091     //
2092     UCHAR Interval;
2093 
2094     //
2095     // Which alternate setting this structure is relevant for
2096     //
2097     UCHAR SettingIndex;
2098 
2099     //
2100     // The type of the pipe
2101     WDF_USB_PIPE_TYPE PipeType;
2102 
2103     //
2104     // Maximum size of one transfer which should be sent to the host controller
2105     //
2106     ULONG  MaximumTransferSize;
2107 
2108 } WDF_USB_PIPE_INFORMATION_V1_7, *PWDF_USB_PIPE_INFORMATION_V1_7;
2109 
2110 // End of versioning of structures for wdfUsb.h
2111 
2112 //
2113 // Versioning of structures for wdfverifier.h
2114 //
2115 // End of versioning of structures for wdfverifier.h
2116 
2117 //
2118 // Versioning of structures for wdfWMI.h
2119 //
2120 typedef struct _WDF_WMI_PROVIDER_CONFIG_V1_7 {
2121     //
2122     // Size of this structure in bytes
2123     //
2124     ULONG Size;
2125 
2126     //
2127     // The GUID being registered
2128     //
2129     GUID Guid;
2130 
2131     //
2132     // Combination of values from the enum WDF_WMI_PROVIDER_FLAGS
2133     //
2134     ULONG Flags;
2135 
2136     //
2137     // Minimum expected buffer size for query and set instance requests.
2138     // Ignored if WdfWmiProviderEventOnly is set in Flags.
2139     //
2140     ULONG MinInstanceBufferSize;
2141 
2142     //
2143     // Callback when caller is opening a provider which ha been marked as
2144     // expensive or when a caller is interested in events.
2145     //
2146     PFN_WDF_WMI_PROVIDER_FUNCTION_CONTROL EvtWmiProviderFunctionControl;
2147 
2148 } WDF_WMI_PROVIDER_CONFIG_V1_7, *PWDF_WMI_PROVIDER_CONFIG_V1_7;
2149 
2150 typedef struct _WDF_WMI_INSTANCE_CONFIG_V1_7 {
2151     //
2152     // Size of the structure in bytes
2153     //
2154     ULONG Size;
2155 
2156     //
2157     // Optional parameter.  If NULL, ProviderConfig must be set to a valid pointer
2158     // value.   If specified, indicates the provider to create an instance for.
2159     //
2160     WDFWMIPROVIDER Provider;
2161 
2162     //
2163     // Optional parameter.  If NULL, Provider must be set to a valid handle
2164     // value.  If specifeid, indicates the configuration for a provider to be
2165     // created and for this instance to be associated with.
2166     //
2167     PWDF_WMI_PROVIDER_CONFIG_V1_7 ProviderConfig;
2168 
2169     //
2170     // If the Provider is configured as read only and this field is set to TRUE,
2171     // the EvtWmiInstanceQueryInstance is ignored and WDF will blindly copy the
2172     // context associated with this instance (using RtlCopyMemory, with no locks
2173     // held) into the query buffer.
2174     //
2175     BOOLEAN UseContextForQuery;
2176 
2177     //
2178     // If TRUE, the instance will be registered as well as created.
2179     //
2180     BOOLEAN Register;
2181 
2182     //
2183     // Callback when caller wants to query the entire data item's buffer.
2184     //
2185     PFN_WDF_WMI_INSTANCE_QUERY_INSTANCE EvtWmiInstanceQueryInstance;
2186 
2187     //
2188     // Callback when caller wants to set the entire data item's buffer.
2189     //
2190     PFN_WDF_WMI_INSTANCE_SET_INSTANCE EvtWmiInstanceSetInstance;
2191 
2192     //
2193     // Callback when caller wants to set a single field in the data item's buffer
2194     //
2195     PFN_WDF_WMI_INSTANCE_SET_ITEM EvtWmiInstanceSetItem;
2196 
2197     //
2198     // Callback when caller wants to execute a method on the data item.
2199     //
2200     PFN_WDF_WMI_INSTANCE_EXECUTE_METHOD EvtWmiInstanceExecuteMethod;
2201 
2202 } WDF_WMI_INSTANCE_CONFIG_V1_7, *PWDF_WMI_INSTANCE_CONFIG_V1_7;
2203 
2204 // End of versioning of structures for wdfWMI.h
2205 
2206 //
2207 // Versioning of structures for wdfworkitem.h
2208 //
2209 typedef struct _WDF_WORKITEM_CONFIG_V1_7 {
2210     ULONG            Size;
2211 
2212     PFN_WDF_WORKITEM EvtWorkItemFunc;
2213 
2214     //
2215     // If this is TRUE, the workitem will automatically serialize
2216     // with the event callback handlers of its Parent Object.
2217     //
2218     // Parent Object's callback constraints should be compatible
2219     // with the work item (PASSIVE_LEVEL), or the request will fail.
2220     //
2221     BOOLEAN       AutomaticSerialization;
2222 
2223 } WDF_WORKITEM_CONFIG_V1_7, *PWDF_WORKITEM_CONFIG_V1_7;
2224 
2225 // End of versioning of structures for wdfworkitem.h
2226 
2227 
2228 #endif // _WDF_V1_7_TYPES_H_
2229