1 /*++
2 
3 Module Name: VfWdfDynamics.cpp
4 
5 Abstract:
6     Generated implementation for WDF API Verifier hooks
7 
8 Environment:
9     kernel mode only
10 
11 --*/
12 
13 
14 extern "C" {
15 #include <ntddk.h>
16 }
17 #include "vfpriv.hpp"
18 
19 
20 extern "C" {
21 extern WDFVERSION WdfVersion;
22 }
23 
24 #ifdef  ALLOC_PRAGMA
25 #pragma alloc_text(FX_ENHANCED_VERIFIER_SECTION_NAME,  \
26     VFWDFEXPORT(WdfChildListCreate), \
27     VFWDFEXPORT(WdfChildListGetDevice), \
28     VFWDFEXPORT(WdfChildListRetrievePdo), \
29     VFWDFEXPORT(WdfChildListRetrieveAddressDescription), \
30     VFWDFEXPORT(WdfChildListBeginScan), \
31     VFWDFEXPORT(WdfChildListEndScan), \
32     VFWDFEXPORT(WdfChildListBeginIteration), \
33     VFWDFEXPORT(WdfChildListRetrieveNextDevice), \
34     VFWDFEXPORT(WdfChildListEndIteration), \
35     VFWDFEXPORT(WdfChildListAddOrUpdateChildDescriptionAsPresent), \
36     VFWDFEXPORT(WdfChildListUpdateChildDescriptionAsMissing), \
37     VFWDFEXPORT(WdfChildListUpdateAllChildDescriptionsAsPresent), \
38     VFWDFEXPORT(WdfChildListRequestChildEject), \
39     VFWDFEXPORT(WdfCollectionCreate), \
40     VFWDFEXPORT(WdfCollectionGetCount), \
41     VFWDFEXPORT(WdfCollectionAdd), \
42     VFWDFEXPORT(WdfCollectionRemove), \
43     VFWDFEXPORT(WdfCollectionRemoveItem), \
44     VFWDFEXPORT(WdfCollectionGetItem), \
45     VFWDFEXPORT(WdfCollectionGetFirstItem), \
46     VFWDFEXPORT(WdfCollectionGetLastItem), \
47     VFWDFEXPORT(WdfCommonBufferCreate), \
48     VFWDFEXPORT(WdfCommonBufferCreateWithConfig), \
49     VFWDFEXPORT(WdfCommonBufferGetAlignedVirtualAddress), \
50     VFWDFEXPORT(WdfCommonBufferGetAlignedLogicalAddress), \
51     VFWDFEXPORT(WdfCommonBufferGetLength), \
52     VFWDFEXPORT(WdfControlDeviceInitAllocate), \
53     VFWDFEXPORT(WdfControlDeviceInitSetShutdownNotification), \
54     VFWDFEXPORT(WdfControlFinishInitializing), \
55     VFWDFEXPORT(WdfCxDeviceInitAllocate), \
56     VFWDFEXPORT(WdfCxDeviceInitAssignWdmIrpPreprocessCallback), \
57     VFWDFEXPORT(WdfCxDeviceInitSetIoInCallerContextCallback), \
58     VFWDFEXPORT(WdfCxDeviceInitSetRequestAttributes), \
59     VFWDFEXPORT(WdfCxDeviceInitSetFileObjectConfig), \
60     VFWDFEXPORT(WdfCxVerifierKeBugCheck), \
61     VFWDFEXPORT(WdfDeviceGetDeviceState), \
62     VFWDFEXPORT(WdfDeviceSetDeviceState), \
63     VFWDFEXPORT(WdfWdmDeviceGetWdfDeviceHandle), \
64     VFWDFEXPORT(WdfDeviceWdmGetDeviceObject), \
65     VFWDFEXPORT(WdfDeviceWdmGetAttachedDevice), \
66     VFWDFEXPORT(WdfDeviceWdmGetPhysicalDevice), \
67     VFWDFEXPORT(WdfDeviceWdmDispatchPreprocessedIrp), \
68     VFWDFEXPORT(WdfDeviceWdmDispatchIrp), \
69     VFWDFEXPORT(WdfDeviceWdmDispatchIrpToIoQueue), \
70     VFWDFEXPORT(WdfDeviceAddDependentUsageDeviceObject), \
71     VFWDFEXPORT(WdfDeviceRemoveDependentUsageDeviceObject), \
72     VFWDFEXPORT(WdfDeviceAddRemovalRelationsPhysicalDevice), \
73     VFWDFEXPORT(WdfDeviceRemoveRemovalRelationsPhysicalDevice), \
74     VFWDFEXPORT(WdfDeviceClearRemovalRelationsDevices), \
75     VFWDFEXPORT(WdfDeviceGetDriver), \
76     VFWDFEXPORT(WdfDeviceRetrieveDeviceName), \
77     VFWDFEXPORT(WdfDeviceAssignMofResourceName), \
78     VFWDFEXPORT(WdfDeviceGetIoTarget), \
79     VFWDFEXPORT(WdfDeviceGetDevicePnpState), \
80     VFWDFEXPORT(WdfDeviceGetDevicePowerState), \
81     VFWDFEXPORT(WdfDeviceGetDevicePowerPolicyState), \
82     VFWDFEXPORT(WdfDeviceAssignS0IdleSettings), \
83     VFWDFEXPORT(WdfDeviceAssignSxWakeSettings), \
84     VFWDFEXPORT(WdfDeviceOpenRegistryKey), \
85     VFWDFEXPORT(WdfDeviceOpenDevicemapKey), \
86     VFWDFEXPORT(WdfDeviceSetSpecialFileSupport), \
87     VFWDFEXPORT(WdfDeviceSetCharacteristics), \
88     VFWDFEXPORT(WdfDeviceGetCharacteristics), \
89     VFWDFEXPORT(WdfDeviceGetAlignmentRequirement), \
90     VFWDFEXPORT(WdfDeviceSetAlignmentRequirement), \
91     VFWDFEXPORT(WdfDeviceInitFree), \
92     VFWDFEXPORT(WdfDeviceInitSetPnpPowerEventCallbacks), \
93     VFWDFEXPORT(WdfDeviceInitSetPowerPolicyEventCallbacks), \
94     VFWDFEXPORT(WdfDeviceInitSetPowerPolicyOwnership), \
95     VFWDFEXPORT(WdfDeviceInitRegisterPnpStateChangeCallback), \
96     VFWDFEXPORT(WdfDeviceInitRegisterPowerStateChangeCallback), \
97     VFWDFEXPORT(WdfDeviceInitRegisterPowerPolicyStateChangeCallback), \
98     VFWDFEXPORT(WdfDeviceInitSetExclusive), \
99     VFWDFEXPORT(WdfDeviceInitSetIoType), \
100     VFWDFEXPORT(WdfDeviceInitSetPowerNotPageable), \
101     VFWDFEXPORT(WdfDeviceInitSetPowerPageable), \
102     VFWDFEXPORT(WdfDeviceInitSetPowerInrush), \
103     VFWDFEXPORT(WdfDeviceInitSetDeviceType), \
104     VFWDFEXPORT(WdfDeviceInitAssignName), \
105     VFWDFEXPORT(WdfDeviceInitAssignSDDLString), \
106     VFWDFEXPORT(WdfDeviceInitSetDeviceClass), \
107     VFWDFEXPORT(WdfDeviceInitSetCharacteristics), \
108     VFWDFEXPORT(WdfDeviceInitSetFileObjectConfig), \
109     VFWDFEXPORT(WdfDeviceInitSetRequestAttributes), \
110     VFWDFEXPORT(WdfDeviceInitAssignWdmIrpPreprocessCallback), \
111     VFWDFEXPORT(WdfDeviceInitSetIoInCallerContextCallback), \
112     VFWDFEXPORT(WdfDeviceInitSetRemoveLockOptions), \
113     VFWDFEXPORT(WdfDeviceCreate), \
114     VFWDFEXPORT(WdfDeviceSetStaticStopRemove), \
115     VFWDFEXPORT(WdfDeviceCreateDeviceInterface), \
116     VFWDFEXPORT(WdfDeviceSetDeviceInterfaceState), \
117     VFWDFEXPORT(WdfDeviceRetrieveDeviceInterfaceString), \
118     VFWDFEXPORT(WdfDeviceCreateSymbolicLink), \
119     VFWDFEXPORT(WdfDeviceQueryProperty), \
120     VFWDFEXPORT(WdfDeviceAllocAndQueryProperty), \
121     VFWDFEXPORT(WdfDeviceSetPnpCapabilities), \
122     VFWDFEXPORT(WdfDeviceSetPowerCapabilities), \
123     VFWDFEXPORT(WdfDeviceSetBusInformationForChildren), \
124     VFWDFEXPORT(WdfDeviceIndicateWakeStatus), \
125     VFWDFEXPORT(WdfDeviceSetFailed), \
126     VFWDFEXPORT(WdfDeviceStopIdleNoTrack), \
127     VFWDFEXPORT(WdfDeviceResumeIdleNoTrack), \
128     VFWDFEXPORT(WdfDeviceStopIdleActual), \
129     VFWDFEXPORT(WdfDeviceResumeIdleActual), \
130     VFWDFEXPORT(WdfDeviceGetFileObject), \
131     VFWDFEXPORT(WdfDeviceEnqueueRequest), \
132     VFWDFEXPORT(WdfDeviceGetDefaultQueue), \
133     VFWDFEXPORT(WdfDeviceConfigureRequestDispatching), \
134     VFWDFEXPORT(WdfDeviceConfigureWdmIrpDispatchCallback), \
135     VFWDFEXPORT(WdfDeviceGetSystemPowerAction), \
136     VFWDFEXPORT(WdfDeviceWdmAssignPowerFrameworkSettings), \
137     VFWDFEXPORT(WdfDeviceInitSetReleaseHardwareOrderOnFailure), \
138     VFWDFEXPORT(WdfDeviceInitSetIoTypeEx), \
139     VFWDFEXPORT(WdfDeviceQueryPropertyEx), \
140     VFWDFEXPORT(WdfDeviceAllocAndQueryPropertyEx), \
141     VFWDFEXPORT(WdfDeviceAssignProperty), \
142     VFWDFEXPORT(WdfDeviceGetSelfIoTarget), \
143     VFWDFEXPORT(WdfDeviceInitAllowSelfIoTarget), \
144     VFWDFEXPORT(WdfDmaEnablerCreate), \
145     VFWDFEXPORT(WdfDmaEnablerConfigureSystemProfile), \
146     VFWDFEXPORT(WdfDmaEnablerGetMaximumLength), \
147     VFWDFEXPORT(WdfDmaEnablerGetMaximumScatterGatherElements), \
148     VFWDFEXPORT(WdfDmaEnablerSetMaximumScatterGatherElements), \
149     VFWDFEXPORT(WdfDmaEnablerGetFragmentLength), \
150     VFWDFEXPORT(WdfDmaEnablerWdmGetDmaAdapter), \
151     VFWDFEXPORT(WdfDmaTransactionCreate), \
152     VFWDFEXPORT(WdfDmaTransactionInitialize), \
153     VFWDFEXPORT(WdfDmaTransactionInitializeUsingOffset), \
154     VFWDFEXPORT(WdfDmaTransactionInitializeUsingRequest), \
155     VFWDFEXPORT(WdfDmaTransactionExecute), \
156     VFWDFEXPORT(WdfDmaTransactionRelease), \
157     VFWDFEXPORT(WdfDmaTransactionDmaCompleted), \
158     VFWDFEXPORT(WdfDmaTransactionDmaCompletedWithLength), \
159     VFWDFEXPORT(WdfDmaTransactionDmaCompletedFinal), \
160     VFWDFEXPORT(WdfDmaTransactionGetBytesTransferred), \
161     VFWDFEXPORT(WdfDmaTransactionSetMaximumLength), \
162     VFWDFEXPORT(WdfDmaTransactionGetRequest), \
163     VFWDFEXPORT(WdfDmaTransactionGetCurrentDmaTransferLength), \
164     VFWDFEXPORT(WdfDmaTransactionGetDevice), \
165     VFWDFEXPORT(WdfDmaTransactionGetTransferInfo), \
166     VFWDFEXPORT(WdfDmaTransactionSetChannelConfigurationCallback), \
167     VFWDFEXPORT(WdfDmaTransactionSetTransferCompleteCallback), \
168     VFWDFEXPORT(WdfDmaTransactionSetImmediateExecution), \
169     VFWDFEXPORT(WdfDmaTransactionAllocateResources), \
170     VFWDFEXPORT(WdfDmaTransactionSetDeviceAddressOffset), \
171     VFWDFEXPORT(WdfDmaTransactionFreeResources), \
172     VFWDFEXPORT(WdfDmaTransactionCancel), \
173     VFWDFEXPORT(WdfDmaTransactionWdmGetTransferContext), \
174     VFWDFEXPORT(WdfDmaTransactionStopSystemTransfer), \
175     VFWDFEXPORT(WdfDpcCreate), \
176     VFWDFEXPORT(WdfDpcEnqueue), \
177     VFWDFEXPORT(WdfDpcCancel), \
178     VFWDFEXPORT(WdfDpcGetParentObject), \
179     VFWDFEXPORT(WdfDpcWdmGetDpc), \
180     VFWDFEXPORT(WdfDriverCreate), \
181     VFWDFEXPORT(WdfDriverGetRegistryPath), \
182     VFWDFEXPORT(WdfDriverWdmGetDriverObject), \
183     VFWDFEXPORT(WdfDriverOpenParametersRegistryKey), \
184     VFWDFEXPORT(WdfWdmDriverGetWdfDriverHandle), \
185     VFWDFEXPORT(WdfDriverRegisterTraceInfo), \
186     VFWDFEXPORT(WdfDriverRetrieveVersionString), \
187     VFWDFEXPORT(WdfDriverIsVersionAvailable), \
188     VFWDFEXPORT(WdfFdoInitWdmGetPhysicalDevice), \
189     VFWDFEXPORT(WdfFdoInitOpenRegistryKey), \
190     VFWDFEXPORT(WdfFdoInitQueryProperty), \
191     VFWDFEXPORT(WdfFdoInitAllocAndQueryProperty), \
192     VFWDFEXPORT(WdfFdoInitQueryPropertyEx), \
193     VFWDFEXPORT(WdfFdoInitAllocAndQueryPropertyEx), \
194     VFWDFEXPORT(WdfFdoInitSetEventCallbacks), \
195     VFWDFEXPORT(WdfFdoInitSetFilter), \
196     VFWDFEXPORT(WdfFdoInitSetDefaultChildListConfig), \
197     VFWDFEXPORT(WdfFdoQueryForInterface), \
198     VFWDFEXPORT(WdfFdoGetDefaultChildList), \
199     VFWDFEXPORT(WdfFdoAddStaticChild), \
200     VFWDFEXPORT(WdfFdoLockStaticChildListForIteration), \
201     VFWDFEXPORT(WdfFdoRetrieveNextStaticChild), \
202     VFWDFEXPORT(WdfFdoUnlockStaticChildListFromIteration), \
203     VFWDFEXPORT(WdfFileObjectGetFileName), \
204     VFWDFEXPORT(WdfFileObjectGetFlags), \
205     VFWDFEXPORT(WdfFileObjectGetDevice), \
206     VFWDFEXPORT(WdfFileObjectWdmGetFileObject), \
207     VFWDFEXPORT(WdfInterruptCreate), \
208     VFWDFEXPORT(WdfInterruptQueueDpcForIsr), \
209     VFWDFEXPORT(WdfInterruptQueueWorkItemForIsr), \
210     VFWDFEXPORT(WdfInterruptSynchronize), \
211     VFWDFEXPORT(WdfInterruptAcquireLock), \
212     VFWDFEXPORT(WdfInterruptReleaseLock), \
213     VFWDFEXPORT(WdfInterruptEnable), \
214     VFWDFEXPORT(WdfInterruptDisable), \
215     VFWDFEXPORT(WdfInterruptWdmGetInterrupt), \
216     VFWDFEXPORT(WdfInterruptGetInfo), \
217     VFWDFEXPORT(WdfInterruptSetPolicy), \
218     VFWDFEXPORT(WdfInterruptSetExtendedPolicy), \
219     VFWDFEXPORT(WdfInterruptGetDevice), \
220     VFWDFEXPORT(WdfInterruptTryToAcquireLock), \
221     VFWDFEXPORT(WdfInterruptReportActive), \
222     VFWDFEXPORT(WdfInterruptReportInactive), \
223     VFWDFEXPORT(WdfIoQueueCreate), \
224     VFWDFEXPORT(WdfIoQueueGetState), \
225     VFWDFEXPORT(WdfIoQueueStart), \
226     VFWDFEXPORT(WdfIoQueueStop), \
227     VFWDFEXPORT(WdfIoQueueStopSynchronously), \
228     VFWDFEXPORT(WdfIoQueueGetDevice), \
229     VFWDFEXPORT(WdfIoQueueRetrieveNextRequest), \
230     VFWDFEXPORT(WdfIoQueueRetrieveRequestByFileObject), \
231     VFWDFEXPORT(WdfIoQueueFindRequest), \
232     VFWDFEXPORT(WdfIoQueueRetrieveFoundRequest), \
233     VFWDFEXPORT(WdfIoQueueDrainSynchronously), \
234     VFWDFEXPORT(WdfIoQueueDrain), \
235     VFWDFEXPORT(WdfIoQueuePurgeSynchronously), \
236     VFWDFEXPORT(WdfIoQueuePurge), \
237     VFWDFEXPORT(WdfIoQueueReadyNotify), \
238     VFWDFEXPORT(WdfIoQueueAssignForwardProgressPolicy), \
239     VFWDFEXPORT(WdfIoQueueStopAndPurge), \
240     VFWDFEXPORT(WdfIoQueueStopAndPurgeSynchronously), \
241     VFWDFEXPORT(WdfIoTargetCreate), \
242     VFWDFEXPORT(WdfIoTargetOpen), \
243     VFWDFEXPORT(WdfIoTargetCloseForQueryRemove), \
244     VFWDFEXPORT(WdfIoTargetClose), \
245     VFWDFEXPORT(WdfIoTargetStart), \
246     VFWDFEXPORT(WdfIoTargetStop), \
247     VFWDFEXPORT(WdfIoTargetPurge), \
248     VFWDFEXPORT(WdfIoTargetGetState), \
249     VFWDFEXPORT(WdfIoTargetGetDevice), \
250     VFWDFEXPORT(WdfIoTargetQueryTargetProperty), \
251     VFWDFEXPORT(WdfIoTargetAllocAndQueryTargetProperty), \
252     VFWDFEXPORT(WdfIoTargetQueryForInterface), \
253     VFWDFEXPORT(WdfIoTargetWdmGetTargetDeviceObject), \
254     VFWDFEXPORT(WdfIoTargetWdmGetTargetPhysicalDevice), \
255     VFWDFEXPORT(WdfIoTargetWdmGetTargetFileObject), \
256     VFWDFEXPORT(WdfIoTargetWdmGetTargetFileHandle), \
257     VFWDFEXPORT(WdfIoTargetSendReadSynchronously), \
258     VFWDFEXPORT(WdfIoTargetFormatRequestForRead), \
259     VFWDFEXPORT(WdfIoTargetSendWriteSynchronously), \
260     VFWDFEXPORT(WdfIoTargetFormatRequestForWrite), \
261     VFWDFEXPORT(WdfIoTargetSendIoctlSynchronously), \
262     VFWDFEXPORT(WdfIoTargetFormatRequestForIoctl), \
263     VFWDFEXPORT(WdfIoTargetSendInternalIoctlSynchronously), \
264     VFWDFEXPORT(WdfIoTargetFormatRequestForInternalIoctl), \
265     VFWDFEXPORT(WdfIoTargetSendInternalIoctlOthersSynchronously), \
266     VFWDFEXPORT(WdfIoTargetFormatRequestForInternalIoctlOthers), \
267     VFWDFEXPORT(WdfIoTargetSelfAssignDefaultIoQueue), \
268     VFWDFEXPORT(WdfMemoryCreate), \
269     VFWDFEXPORT(WdfMemoryCreatePreallocated), \
270     VFWDFEXPORT(WdfMemoryGetBuffer), \
271     VFWDFEXPORT(WdfMemoryAssignBuffer), \
272     VFWDFEXPORT(WdfMemoryCopyToBuffer), \
273     VFWDFEXPORT(WdfMemoryCopyFromBuffer), \
274     VFWDFEXPORT(WdfLookasideListCreate), \
275     VFWDFEXPORT(WdfMemoryCreateFromLookaside), \
276     VFWDFEXPORT(WdfDeviceMiniportCreate), \
277     VFWDFEXPORT(WdfDriverMiniportUnload), \
278     VFWDFEXPORT(WdfObjectGetTypedContextWorker), \
279     VFWDFEXPORT(WdfObjectAllocateContext), \
280     VFWDFEXPORT(WdfObjectContextGetObject), \
281     VFWDFEXPORT(WdfObjectReferenceActual), \
282     VFWDFEXPORT(WdfObjectDereferenceActual), \
283     VFWDFEXPORT(WdfObjectCreate), \
284     VFWDFEXPORT(WdfObjectDelete), \
285     VFWDFEXPORT(WdfObjectQuery), \
286     VFWDFEXPORT(WdfPdoInitAllocate), \
287     VFWDFEXPORT(WdfPdoInitSetEventCallbacks), \
288     VFWDFEXPORT(WdfPdoInitAssignDeviceID), \
289     VFWDFEXPORT(WdfPdoInitAssignInstanceID), \
290     VFWDFEXPORT(WdfPdoInitAddHardwareID), \
291     VFWDFEXPORT(WdfPdoInitAddCompatibleID), \
292     VFWDFEXPORT(WdfPdoInitAssignContainerID), \
293     VFWDFEXPORT(WdfPdoInitAddDeviceText), \
294     VFWDFEXPORT(WdfPdoInitSetDefaultLocale), \
295     VFWDFEXPORT(WdfPdoInitAssignRawDevice), \
296     VFWDFEXPORT(WdfPdoInitAllowForwardingRequestToParent), \
297     VFWDFEXPORT(WdfPdoMarkMissing), \
298     VFWDFEXPORT(WdfPdoRequestEject), \
299     VFWDFEXPORT(WdfPdoGetParent), \
300     VFWDFEXPORT(WdfPdoRetrieveIdentificationDescription), \
301     VFWDFEXPORT(WdfPdoRetrieveAddressDescription), \
302     VFWDFEXPORT(WdfPdoUpdateAddressDescription), \
303     VFWDFEXPORT(WdfPdoAddEjectionRelationsPhysicalDevice), \
304     VFWDFEXPORT(WdfPdoRemoveEjectionRelationsPhysicalDevice), \
305     VFWDFEXPORT(WdfPdoClearEjectionRelationsDevices), \
306     VFWDFEXPORT(WdfDeviceAddQueryInterface), \
307     VFWDFEXPORT(WdfRegistryOpenKey), \
308     VFWDFEXPORT(WdfRegistryCreateKey), \
309     VFWDFEXPORT(WdfRegistryClose), \
310     VFWDFEXPORT(WdfRegistryWdmGetHandle), \
311     VFWDFEXPORT(WdfRegistryRemoveKey), \
312     VFWDFEXPORT(WdfRegistryRemoveValue), \
313     VFWDFEXPORT(WdfRegistryQueryValue), \
314     VFWDFEXPORT(WdfRegistryQueryMemory), \
315     VFWDFEXPORT(WdfRegistryQueryMultiString), \
316     VFWDFEXPORT(WdfRegistryQueryUnicodeString), \
317     VFWDFEXPORT(WdfRegistryQueryString), \
318     VFWDFEXPORT(WdfRegistryQueryULong), \
319     VFWDFEXPORT(WdfRegistryAssignValue), \
320     VFWDFEXPORT(WdfRegistryAssignMemory), \
321     VFWDFEXPORT(WdfRegistryAssignMultiString), \
322     VFWDFEXPORT(WdfRegistryAssignUnicodeString), \
323     VFWDFEXPORT(WdfRegistryAssignString), \
324     VFWDFEXPORT(WdfRegistryAssignULong), \
325     VFWDFEXPORT(WdfRequestCreate), \
326     VFWDFEXPORT(WdfRequestCreateFromIrp), \
327     VFWDFEXPORT(WdfRequestReuse), \
328     VFWDFEXPORT(WdfRequestChangeTarget), \
329     VFWDFEXPORT(WdfRequestFormatRequestUsingCurrentType), \
330     VFWDFEXPORT(WdfRequestWdmFormatUsingStackLocation), \
331     VFWDFEXPORT(WdfRequestSend), \
332     VFWDFEXPORT(WdfRequestGetStatus), \
333     VFWDFEXPORT(WdfRequestMarkCancelable), \
334     VFWDFEXPORT(WdfRequestMarkCancelableEx), \
335     VFWDFEXPORT(WdfRequestUnmarkCancelable), \
336     VFWDFEXPORT(WdfRequestIsCanceled), \
337     VFWDFEXPORT(WdfRequestCancelSentRequest), \
338     VFWDFEXPORT(WdfRequestIsFrom32BitProcess), \
339     VFWDFEXPORT(WdfRequestSetCompletionRoutine), \
340     VFWDFEXPORT(WdfRequestGetCompletionParams), \
341     VFWDFEXPORT(WdfRequestAllocateTimer), \
342     VFWDFEXPORT(WdfRequestComplete), \
343     VFWDFEXPORT(WdfRequestCompleteWithPriorityBoost), \
344     VFWDFEXPORT(WdfRequestCompleteWithInformation), \
345     VFWDFEXPORT(WdfRequestGetParameters), \
346     VFWDFEXPORT(WdfRequestRetrieveInputMemory), \
347     VFWDFEXPORT(WdfRequestRetrieveOutputMemory), \
348     VFWDFEXPORT(WdfRequestRetrieveInputBuffer), \
349     VFWDFEXPORT(WdfRequestRetrieveOutputBuffer), \
350     VFWDFEXPORT(WdfRequestRetrieveInputWdmMdl), \
351     VFWDFEXPORT(WdfRequestRetrieveOutputWdmMdl), \
352     VFWDFEXPORT(WdfRequestRetrieveUnsafeUserInputBuffer), \
353     VFWDFEXPORT(WdfRequestRetrieveUnsafeUserOutputBuffer), \
354     VFWDFEXPORT(WdfRequestSetInformation), \
355     VFWDFEXPORT(WdfRequestGetInformation), \
356     VFWDFEXPORT(WdfRequestGetFileObject), \
357     VFWDFEXPORT(WdfRequestProbeAndLockUserBufferForRead), \
358     VFWDFEXPORT(WdfRequestProbeAndLockUserBufferForWrite), \
359     VFWDFEXPORT(WdfRequestGetRequestorMode), \
360     VFWDFEXPORT(WdfRequestForwardToIoQueue), \
361     VFWDFEXPORT(WdfRequestGetIoQueue), \
362     VFWDFEXPORT(WdfRequestRequeue), \
363     VFWDFEXPORT(WdfRequestStopAcknowledge), \
364     VFWDFEXPORT(WdfRequestWdmGetIrp), \
365     VFWDFEXPORT(WdfRequestIsReserved), \
366     VFWDFEXPORT(WdfRequestForwardToParentDeviceIoQueue), \
367     VFWDFEXPORT(WdfIoResourceRequirementsListSetSlotNumber), \
368     VFWDFEXPORT(WdfIoResourceRequirementsListSetInterfaceType), \
369     VFWDFEXPORT(WdfIoResourceRequirementsListAppendIoResList), \
370     VFWDFEXPORT(WdfIoResourceRequirementsListInsertIoResList), \
371     VFWDFEXPORT(WdfIoResourceRequirementsListGetCount), \
372     VFWDFEXPORT(WdfIoResourceRequirementsListGetIoResList), \
373     VFWDFEXPORT(WdfIoResourceRequirementsListRemove), \
374     VFWDFEXPORT(WdfIoResourceRequirementsListRemoveByIoResList), \
375     VFWDFEXPORT(WdfIoResourceListCreate), \
376     VFWDFEXPORT(WdfIoResourceListAppendDescriptor), \
377     VFWDFEXPORT(WdfIoResourceListInsertDescriptor), \
378     VFWDFEXPORT(WdfIoResourceListUpdateDescriptor), \
379     VFWDFEXPORT(WdfIoResourceListGetCount), \
380     VFWDFEXPORT(WdfIoResourceListGetDescriptor), \
381     VFWDFEXPORT(WdfIoResourceListRemove), \
382     VFWDFEXPORT(WdfIoResourceListRemoveByDescriptor), \
383     VFWDFEXPORT(WdfCmResourceListAppendDescriptor), \
384     VFWDFEXPORT(WdfCmResourceListInsertDescriptor), \
385     VFWDFEXPORT(WdfCmResourceListGetCount), \
386     VFWDFEXPORT(WdfCmResourceListGetDescriptor), \
387     VFWDFEXPORT(WdfCmResourceListRemove), \
388     VFWDFEXPORT(WdfCmResourceListRemoveByDescriptor), \
389     VFWDFEXPORT(WdfStringCreate), \
390     VFWDFEXPORT(WdfStringGetUnicodeString), \
391     VFWDFEXPORT(WdfObjectAcquireLock), \
392     VFWDFEXPORT(WdfObjectReleaseLock), \
393     VFWDFEXPORT(WdfWaitLockCreate), \
394     VFWDFEXPORT(WdfWaitLockAcquire), \
395     VFWDFEXPORT(WdfWaitLockRelease), \
396     VFWDFEXPORT(WdfSpinLockCreate), \
397     VFWDFEXPORT(WdfSpinLockAcquire), \
398     VFWDFEXPORT(WdfSpinLockRelease), \
399     VFWDFEXPORT(WdfTimerCreate), \
400     VFWDFEXPORT(WdfTimerStart), \
401     VFWDFEXPORT(WdfTimerStop), \
402     VFWDFEXPORT(WdfTimerGetParentObject), \
403     VFWDFEXPORT(WdfUsbTargetDeviceCreate), \
404     VFWDFEXPORT(WdfUsbTargetDeviceCreateWithParameters), \
405     VFWDFEXPORT(WdfUsbTargetDeviceRetrieveInformation), \
406     VFWDFEXPORT(WdfUsbTargetDeviceGetDeviceDescriptor), \
407     VFWDFEXPORT(WdfUsbTargetDeviceRetrieveConfigDescriptor), \
408     VFWDFEXPORT(WdfUsbTargetDeviceQueryString), \
409     VFWDFEXPORT(WdfUsbTargetDeviceAllocAndQueryString), \
410     VFWDFEXPORT(WdfUsbTargetDeviceFormatRequestForString), \
411     VFWDFEXPORT(WdfUsbTargetDeviceGetNumInterfaces), \
412     VFWDFEXPORT(WdfUsbTargetDeviceSelectConfig), \
413     VFWDFEXPORT(WdfUsbTargetDeviceWdmGetConfigurationHandle), \
414     VFWDFEXPORT(WdfUsbTargetDeviceRetrieveCurrentFrameNumber), \
415     VFWDFEXPORT(WdfUsbTargetDeviceSendControlTransferSynchronously), \
416     VFWDFEXPORT(WdfUsbTargetDeviceFormatRequestForControlTransfer), \
417     VFWDFEXPORT(WdfUsbTargetDeviceIsConnectedSynchronous), \
418     VFWDFEXPORT(WdfUsbTargetDeviceResetPortSynchronously), \
419     VFWDFEXPORT(WdfUsbTargetDeviceCyclePortSynchronously), \
420     VFWDFEXPORT(WdfUsbTargetDeviceFormatRequestForCyclePort), \
421     VFWDFEXPORT(WdfUsbTargetDeviceSendUrbSynchronously), \
422     VFWDFEXPORT(WdfUsbTargetDeviceFormatRequestForUrb), \
423     VFWDFEXPORT(WdfUsbTargetDeviceQueryUsbCapability), \
424     VFWDFEXPORT(WdfUsbTargetDeviceCreateUrb), \
425     VFWDFEXPORT(WdfUsbTargetDeviceCreateIsochUrb), \
426     VFWDFEXPORT(WdfUsbTargetPipeGetInformation), \
427     VFWDFEXPORT(WdfUsbTargetPipeIsInEndpoint), \
428     VFWDFEXPORT(WdfUsbTargetPipeIsOutEndpoint), \
429     VFWDFEXPORT(WdfUsbTargetPipeGetType), \
430     VFWDFEXPORT(WdfUsbTargetPipeSetNoMaximumPacketSizeCheck), \
431     VFWDFEXPORT(WdfUsbTargetPipeWriteSynchronously), \
432     VFWDFEXPORT(WdfUsbTargetPipeFormatRequestForWrite), \
433     VFWDFEXPORT(WdfUsbTargetPipeReadSynchronously), \
434     VFWDFEXPORT(WdfUsbTargetPipeFormatRequestForRead), \
435     VFWDFEXPORT(WdfUsbTargetPipeConfigContinuousReader), \
436     VFWDFEXPORT(WdfUsbTargetPipeAbortSynchronously), \
437     VFWDFEXPORT(WdfUsbTargetPipeFormatRequestForAbort), \
438     VFWDFEXPORT(WdfUsbTargetPipeResetSynchronously), \
439     VFWDFEXPORT(WdfUsbTargetPipeFormatRequestForReset), \
440     VFWDFEXPORT(WdfUsbTargetPipeSendUrbSynchronously), \
441     VFWDFEXPORT(WdfUsbTargetPipeFormatRequestForUrb), \
442     VFWDFEXPORT(WdfUsbInterfaceGetInterfaceNumber), \
443     VFWDFEXPORT(WdfUsbInterfaceGetNumEndpoints), \
444     VFWDFEXPORT(WdfUsbInterfaceGetDescriptor), \
445     VFWDFEXPORT(WdfUsbInterfaceGetNumSettings), \
446     VFWDFEXPORT(WdfUsbInterfaceSelectSetting), \
447     VFWDFEXPORT(WdfUsbInterfaceGetEndpointInformation), \
448     VFWDFEXPORT(WdfUsbTargetDeviceGetInterface), \
449     VFWDFEXPORT(WdfUsbInterfaceGetConfiguredSettingIndex), \
450     VFWDFEXPORT(WdfUsbInterfaceGetNumConfiguredPipes), \
451     VFWDFEXPORT(WdfUsbInterfaceGetConfiguredPipe), \
452     VFWDFEXPORT(WdfUsbTargetPipeWdmGetPipeHandle), \
453     VFWDFEXPORT(WdfVerifierDbgBreakPoint), \
454     VFWDFEXPORT(WdfVerifierKeBugCheck), \
455     VFWDFEXPORT(WdfGetTriageInfo), \
456     VFWDFEXPORT(WdfWmiProviderCreate), \
457     VFWDFEXPORT(WdfWmiProviderGetDevice), \
458     VFWDFEXPORT(WdfWmiProviderIsEnabled), \
459     VFWDFEXPORT(WdfWmiProviderGetTracingHandle), \
460     VFWDFEXPORT(WdfWmiInstanceCreate), \
461     VFWDFEXPORT(WdfWmiInstanceRegister), \
462     VFWDFEXPORT(WdfWmiInstanceDeregister), \
463     VFWDFEXPORT(WdfWmiInstanceGetDevice), \
464     VFWDFEXPORT(WdfWmiInstanceGetProvider), \
465     VFWDFEXPORT(WdfWmiInstanceFireEvent), \
466     VFWDFEXPORT(WdfWorkItemCreate), \
467     VFWDFEXPORT(WdfWorkItemEnqueue), \
468     VFWDFEXPORT(WdfWorkItemGetParentObject), \
469     VFWDFEXPORT(WdfWorkItemFlush), \
470     )
471 #endif   // #pragma alloc_text
472 
473 _Must_inspect_result_
474 _IRQL_requires_max_(PASSIVE_LEVEL)
475 WDFAPI
476 NTSTATUS
477 VFWDFEXPORT(WdfChildListCreate)(
478     _In_
479     PWDF_DRIVER_GLOBALS DriverGlobals,
480     _In_
481     WDFDEVICE Device,
482     _In_
483     PWDF_CHILD_LIST_CONFIG Config,
484     _In_opt_
485     PWDF_OBJECT_ATTRIBUTES ChildListAttributes,
486     _Out_
487     WDFCHILDLIST* ChildList
488     )
489 {
490     PAGED_CODE_LOCKED();
491     return ((PFN_WDFCHILDLISTCREATE) WdfVersion.Functions.pfnWdfChildListCreate)(DriverGlobals, Device, Config, ChildListAttributes, ChildList);
492 }
493 
494 _IRQL_requires_max_(DISPATCH_LEVEL)
495 WDFAPI
496 WDFDEVICE
497 VFWDFEXPORT(WdfChildListGetDevice)(
498     _In_
499     PWDF_DRIVER_GLOBALS DriverGlobals,
500     _In_
501     WDFCHILDLIST ChildList
502     )
503 {
504     PAGED_CODE_LOCKED();
505     return ((PFN_WDFCHILDLISTGETDEVICE) WdfVersion.Functions.pfnWdfChildListGetDevice)(DriverGlobals, ChildList);
506 }
507 
508 _Must_inspect_result_
509 _IRQL_requires_max_(DISPATCH_LEVEL)
510 WDFAPI
511 WDFDEVICE
512 VFWDFEXPORT(WdfChildListRetrievePdo)(
513     _In_
514     PWDF_DRIVER_GLOBALS DriverGlobals,
515     _In_
516     WDFCHILDLIST ChildList,
517     _Inout_
518     PWDF_CHILD_RETRIEVE_INFO RetrieveInfo
519     )
520 {
521     PAGED_CODE_LOCKED();
522     return ((PFN_WDFCHILDLISTRETRIEVEPDO) WdfVersion.Functions.pfnWdfChildListRetrievePdo)(DriverGlobals, ChildList, RetrieveInfo);
523 }
524 
525 _Must_inspect_result_
526 _IRQL_requires_max_(DISPATCH_LEVEL)
527 WDFAPI
528 NTSTATUS
529 VFWDFEXPORT(WdfChildListRetrieveAddressDescription)(
530     _In_
531     PWDF_DRIVER_GLOBALS DriverGlobals,
532     _In_
533     WDFCHILDLIST ChildList,
534     _In_
535     PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription,
536     _Inout_
537     PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
538     )
539 {
540     PAGED_CODE_LOCKED();
541     return ((PFN_WDFCHILDLISTRETRIEVEADDRESSDESCRIPTION) WdfVersion.Functions.pfnWdfChildListRetrieveAddressDescription)(DriverGlobals, ChildList, IdentificationDescription, AddressDescription);
542 }
543 
544 _IRQL_requires_max_(DISPATCH_LEVEL)
545 WDFAPI
546 VOID
547 VFWDFEXPORT(WdfChildListBeginScan)(
548     _In_
549     PWDF_DRIVER_GLOBALS DriverGlobals,
550     _In_
551     WDFCHILDLIST ChildList
552     )
553 {
554     PAGED_CODE_LOCKED();
555     ((PFN_WDFCHILDLISTBEGINSCAN) WdfVersion.Functions.pfnWdfChildListBeginScan)(DriverGlobals, ChildList);
556 }
557 
558 _IRQL_requires_max_(DISPATCH_LEVEL)
559 WDFAPI
560 VOID
561 VFWDFEXPORT(WdfChildListEndScan)(
562     _In_
563     PWDF_DRIVER_GLOBALS DriverGlobals,
564     _In_
565     WDFCHILDLIST ChildList
566     )
567 {
568     PAGED_CODE_LOCKED();
569     ((PFN_WDFCHILDLISTENDSCAN) WdfVersion.Functions.pfnWdfChildListEndScan)(DriverGlobals, ChildList);
570 }
571 
572 _IRQL_requires_max_(DISPATCH_LEVEL)
573 WDFAPI
574 VOID
575 VFWDFEXPORT(WdfChildListBeginIteration)(
576     _In_
577     PWDF_DRIVER_GLOBALS DriverGlobals,
578     _In_
579     WDFCHILDLIST ChildList,
580     _In_
581     PWDF_CHILD_LIST_ITERATOR Iterator
582     )
583 {
584     PAGED_CODE_LOCKED();
585     ((PFN_WDFCHILDLISTBEGINITERATION) WdfVersion.Functions.pfnWdfChildListBeginIteration)(DriverGlobals, ChildList, Iterator);
586 }
587 
588 _Must_inspect_result_
589 _IRQL_requires_max_(DISPATCH_LEVEL)
590 WDFAPI
591 NTSTATUS
592 VFWDFEXPORT(WdfChildListRetrieveNextDevice)(
593     _In_
594     PWDF_DRIVER_GLOBALS DriverGlobals,
595     _In_
596     WDFCHILDLIST ChildList,
597     _In_
598     PWDF_CHILD_LIST_ITERATOR Iterator,
599     _Out_
600     WDFDEVICE* Device,
601     _Inout_opt_
602     PWDF_CHILD_RETRIEVE_INFO Info
603     )
604 {
605     PAGED_CODE_LOCKED();
606     return ((PFN_WDFCHILDLISTRETRIEVENEXTDEVICE) WdfVersion.Functions.pfnWdfChildListRetrieveNextDevice)(DriverGlobals, ChildList, Iterator, Device, Info);
607 }
608 
609 _IRQL_requires_max_(DISPATCH_LEVEL)
610 WDFAPI
611 VOID
612 VFWDFEXPORT(WdfChildListEndIteration)(
613     _In_
614     PWDF_DRIVER_GLOBALS DriverGlobals,
615     _In_
616     WDFCHILDLIST ChildList,
617     _In_
618     PWDF_CHILD_LIST_ITERATOR Iterator
619     )
620 {
621     PAGED_CODE_LOCKED();
622     ((PFN_WDFCHILDLISTENDITERATION) WdfVersion.Functions.pfnWdfChildListEndIteration)(DriverGlobals, ChildList, Iterator);
623 }
624 
625 _Must_inspect_result_
626 _IRQL_requires_max_(DISPATCH_LEVEL)
627 WDFAPI
628 NTSTATUS
629 VFWDFEXPORT(WdfChildListAddOrUpdateChildDescriptionAsPresent)(
630     _In_
631     PWDF_DRIVER_GLOBALS DriverGlobals,
632     _In_
633     WDFCHILDLIST ChildList,
634     _In_
635     PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription,
636     _In_opt_
637     PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
638     )
639 {
640     PAGED_CODE_LOCKED();
641     return ((PFN_WDFCHILDLISTADDORUPDATECHILDDESCRIPTIONASPRESENT) WdfVersion.Functions.pfnWdfChildListAddOrUpdateChildDescriptionAsPresent)(DriverGlobals, ChildList, IdentificationDescription, AddressDescription);
642 }
643 
644 _Must_inspect_result_
645 _IRQL_requires_max_(DISPATCH_LEVEL)
646 WDFAPI
647 NTSTATUS
648 VFWDFEXPORT(WdfChildListUpdateChildDescriptionAsMissing)(
649     _In_
650     PWDF_DRIVER_GLOBALS DriverGlobals,
651     _In_
652     WDFCHILDLIST ChildList,
653     _In_
654     PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription
655     )
656 {
657     PAGED_CODE_LOCKED();
658     return ((PFN_WDFCHILDLISTUPDATECHILDDESCRIPTIONASMISSING) WdfVersion.Functions.pfnWdfChildListUpdateChildDescriptionAsMissing)(DriverGlobals, ChildList, IdentificationDescription);
659 }
660 
661 _IRQL_requires_max_(DISPATCH_LEVEL)
662 WDFAPI
663 VOID
664 VFWDFEXPORT(WdfChildListUpdateAllChildDescriptionsAsPresent)(
665     _In_
666     PWDF_DRIVER_GLOBALS DriverGlobals,
667     _In_
668     WDFCHILDLIST ChildList
669     )
670 {
671     PAGED_CODE_LOCKED();
672     ((PFN_WDFCHILDLISTUPDATEALLCHILDDESCRIPTIONSASPRESENT) WdfVersion.Functions.pfnWdfChildListUpdateAllChildDescriptionsAsPresent)(DriverGlobals, ChildList);
673 }
674 
675 _IRQL_requires_max_(DISPATCH_LEVEL)
676 WDFAPI
677 BOOLEAN
678 VFWDFEXPORT(WdfChildListRequestChildEject)(
679     _In_
680     PWDF_DRIVER_GLOBALS DriverGlobals,
681     _In_
682     WDFCHILDLIST ChildList,
683     _In_
684     PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription
685     )
686 {
687     PAGED_CODE_LOCKED();
688     return ((PFN_WDFCHILDLISTREQUESTCHILDEJECT) WdfVersion.Functions.pfnWdfChildListRequestChildEject)(DriverGlobals, ChildList, IdentificationDescription);
689 }
690 
691 _Must_inspect_result_
692 _IRQL_requires_max_(DISPATCH_LEVEL)
693 WDFAPI
694 NTSTATUS
695 VFWDFEXPORT(WdfCollectionCreate)(
696     _In_
697     PWDF_DRIVER_GLOBALS DriverGlobals,
698     _In_opt_
699     PWDF_OBJECT_ATTRIBUTES CollectionAttributes,
700     _Out_
701     WDFCOLLECTION* Collection
702     )
703 {
704     PAGED_CODE_LOCKED();
705     return ((PFN_WDFCOLLECTIONCREATE) WdfVersion.Functions.pfnWdfCollectionCreate)(DriverGlobals, CollectionAttributes, Collection);
706 }
707 
708 _IRQL_requires_max_(DISPATCH_LEVEL)
709 WDFAPI
710 ULONG
711 VFWDFEXPORT(WdfCollectionGetCount)(
712     _In_
713     PWDF_DRIVER_GLOBALS DriverGlobals,
714     _In_
715     WDFCOLLECTION Collection
716     )
717 {
718     PAGED_CODE_LOCKED();
719     return ((PFN_WDFCOLLECTIONGETCOUNT) WdfVersion.Functions.pfnWdfCollectionGetCount)(DriverGlobals, Collection);
720 }
721 
722 _Must_inspect_result_
723 _IRQL_requires_max_(DISPATCH_LEVEL)
724 WDFAPI
725 NTSTATUS
726 VFWDFEXPORT(WdfCollectionAdd)(
727     _In_
728     PWDF_DRIVER_GLOBALS DriverGlobals,
729     _In_
730     WDFCOLLECTION Collection,
731     _In_
732     WDFOBJECT Object
733     )
734 {
735     PAGED_CODE_LOCKED();
736     return ((PFN_WDFCOLLECTIONADD) WdfVersion.Functions.pfnWdfCollectionAdd)(DriverGlobals, Collection, Object);
737 }
738 
739 _IRQL_requires_max_(DISPATCH_LEVEL)
740 WDFAPI
741 VOID
742 VFWDFEXPORT(WdfCollectionRemove)(
743     _In_
744     PWDF_DRIVER_GLOBALS DriverGlobals,
745     _In_
746     WDFCOLLECTION Collection,
747     _In_
748     WDFOBJECT Item
749     )
750 {
751     PAGED_CODE_LOCKED();
752     ((PFN_WDFCOLLECTIONREMOVE) WdfVersion.Functions.pfnWdfCollectionRemove)(DriverGlobals, Collection, Item);
753 }
754 
755 _IRQL_requires_max_(DISPATCH_LEVEL)
756 WDFAPI
757 VOID
758 VFWDFEXPORT(WdfCollectionRemoveItem)(
759     _In_
760     PWDF_DRIVER_GLOBALS DriverGlobals,
761     _In_
762     WDFCOLLECTION Collection,
763     _In_
764     ULONG Index
765     )
766 {
767     PAGED_CODE_LOCKED();
768     ((PFN_WDFCOLLECTIONREMOVEITEM) WdfVersion.Functions.pfnWdfCollectionRemoveItem)(DriverGlobals, Collection, Index);
769 }
770 
771 _IRQL_requires_max_(DISPATCH_LEVEL)
772 WDFAPI
773 WDFOBJECT
774 VFWDFEXPORT(WdfCollectionGetItem)(
775     _In_
776     PWDF_DRIVER_GLOBALS DriverGlobals,
777     _In_
778     WDFCOLLECTION Collection,
779     _In_
780     ULONG Index
781     )
782 {
783     PAGED_CODE_LOCKED();
784     return ((PFN_WDFCOLLECTIONGETITEM) WdfVersion.Functions.pfnWdfCollectionGetItem)(DriverGlobals, Collection, Index);
785 }
786 
787 _IRQL_requires_max_(DISPATCH_LEVEL)
788 WDFAPI
789 WDFOBJECT
790 VFWDFEXPORT(WdfCollectionGetFirstItem)(
791     _In_
792     PWDF_DRIVER_GLOBALS DriverGlobals,
793     _In_
794     WDFCOLLECTION Collection
795     )
796 {
797     PAGED_CODE_LOCKED();
798     return ((PFN_WDFCOLLECTIONGETFIRSTITEM) WdfVersion.Functions.pfnWdfCollectionGetFirstItem)(DriverGlobals, Collection);
799 }
800 
801 _IRQL_requires_max_(DISPATCH_LEVEL)
802 WDFAPI
803 WDFOBJECT
804 VFWDFEXPORT(WdfCollectionGetLastItem)(
805     _In_
806     PWDF_DRIVER_GLOBALS DriverGlobals,
807     _In_
808     WDFCOLLECTION Collection
809     )
810 {
811     PAGED_CODE_LOCKED();
812     return ((PFN_WDFCOLLECTIONGETLASTITEM) WdfVersion.Functions.pfnWdfCollectionGetLastItem)(DriverGlobals, Collection);
813 }
814 
815 _Must_inspect_result_
816 _IRQL_requires_max_(PASSIVE_LEVEL)
817 WDFAPI
818 NTSTATUS
819 VFWDFEXPORT(WdfCommonBufferCreate)(
820     _In_
821     PWDF_DRIVER_GLOBALS DriverGlobals,
822     _In_
823     WDFDMAENABLER DmaEnabler,
824     _In_
825     _When_(Length == 0, __drv_reportError(Length cannot be zero))
826     size_t Length,
827     _In_opt_
828     PWDF_OBJECT_ATTRIBUTES Attributes,
829     _Out_
830     WDFCOMMONBUFFER* CommonBuffer
831     )
832 {
833     PAGED_CODE_LOCKED();
834     return ((PFN_WDFCOMMONBUFFERCREATE) WdfVersion.Functions.pfnWdfCommonBufferCreate)(DriverGlobals, DmaEnabler, Length, Attributes, CommonBuffer);
835 }
836 
837 _Must_inspect_result_
838 _IRQL_requires_max_(PASSIVE_LEVEL)
839 WDFAPI
840 NTSTATUS
841 VFWDFEXPORT(WdfCommonBufferCreateWithConfig)(
842     _In_
843     PWDF_DRIVER_GLOBALS DriverGlobals,
844     _In_
845     WDFDMAENABLER DmaEnabler,
846     _In_
847     _When_(Length == 0, __drv_reportError(Length cannot be zero))
848     size_t Length,
849     _In_
850     PWDF_COMMON_BUFFER_CONFIG Config,
851     _In_opt_
852     PWDF_OBJECT_ATTRIBUTES Attributes,
853     _Out_
854     WDFCOMMONBUFFER* CommonBuffer
855     )
856 {
857     PAGED_CODE_LOCKED();
858     return ((PFN_WDFCOMMONBUFFERCREATEWITHCONFIG) WdfVersion.Functions.pfnWdfCommonBufferCreateWithConfig)(DriverGlobals, DmaEnabler, Length, Config, Attributes, CommonBuffer);
859 }
860 
861 _IRQL_requires_max_(DISPATCH_LEVEL)
862 WDFAPI
863 PVOID
864 VFWDFEXPORT(WdfCommonBufferGetAlignedVirtualAddress)(
865     _In_
866     PWDF_DRIVER_GLOBALS DriverGlobals,
867     _In_
868     WDFCOMMONBUFFER CommonBuffer
869     )
870 {
871     PAGED_CODE_LOCKED();
872     return ((PFN_WDFCOMMONBUFFERGETALIGNEDVIRTUALADDRESS) WdfVersion.Functions.pfnWdfCommonBufferGetAlignedVirtualAddress)(DriverGlobals, CommonBuffer);
873 }
874 
875 _IRQL_requires_max_(DISPATCH_LEVEL)
876 WDFAPI
877 PHYSICAL_ADDRESS
878 VFWDFEXPORT(WdfCommonBufferGetAlignedLogicalAddress)(
879     _In_
880     PWDF_DRIVER_GLOBALS DriverGlobals,
881     _In_
882     WDFCOMMONBUFFER CommonBuffer
883     )
884 {
885     PAGED_CODE_LOCKED();
886     return ((PFN_WDFCOMMONBUFFERGETALIGNEDLOGICALADDRESS) WdfVersion.Functions.pfnWdfCommonBufferGetAlignedLogicalAddress)(DriverGlobals, CommonBuffer);
887 }
888 
889 _IRQL_requires_max_(DISPATCH_LEVEL)
890 WDFAPI
891 size_t
892 VFWDFEXPORT(WdfCommonBufferGetLength)(
893     _In_
894     PWDF_DRIVER_GLOBALS DriverGlobals,
895     _In_
896     WDFCOMMONBUFFER CommonBuffer
897     )
898 {
899     PAGED_CODE_LOCKED();
900     return ((PFN_WDFCOMMONBUFFERGETLENGTH) WdfVersion.Functions.pfnWdfCommonBufferGetLength)(DriverGlobals, CommonBuffer);
901 }
902 
903 _Must_inspect_result_
904 _IRQL_requires_max_(PASSIVE_LEVEL)
905 WDFAPI
906 PWDFDEVICE_INIT
907 VFWDFEXPORT(WdfControlDeviceInitAllocate)(
908     _In_
909     PWDF_DRIVER_GLOBALS DriverGlobals,
910     _In_
911     WDFDRIVER Driver,
912     _In_
913     CONST UNICODE_STRING* SDDLString
914     )
915 {
916     PAGED_CODE_LOCKED();
917     return ((PFN_WDFCONTROLDEVICEINITALLOCATE) WdfVersion.Functions.pfnWdfControlDeviceInitAllocate)(DriverGlobals, Driver, SDDLString);
918 }
919 
920 _IRQL_requires_max_(PASSIVE_LEVEL)
921 WDFAPI
922 VOID
923 VFWDFEXPORT(WdfControlDeviceInitSetShutdownNotification)(
924     _In_
925     PWDF_DRIVER_GLOBALS DriverGlobals,
926     _In_
927     PWDFDEVICE_INIT DeviceInit,
928     _In_
929     PFN_WDF_DEVICE_SHUTDOWN_NOTIFICATION Notification,
930     _In_
931     UCHAR Flags
932     )
933 {
934     PAGED_CODE_LOCKED();
935     ((PFN_WDFCONTROLDEVICEINITSETSHUTDOWNNOTIFICATION) WdfVersion.Functions.pfnWdfControlDeviceInitSetShutdownNotification)(DriverGlobals, DeviceInit, Notification, Flags);
936 }
937 
938 _IRQL_requires_max_(DISPATCH_LEVEL)
939 WDFAPI
940 VOID
941 VFWDFEXPORT(WdfControlFinishInitializing)(
942     _In_
943     PWDF_DRIVER_GLOBALS DriverGlobals,
944     _In_
945     WDFDEVICE Device
946     )
947 {
948     PAGED_CODE_LOCKED();
949     ((PFN_WDFCONTROLFINISHINITIALIZING) WdfVersion.Functions.pfnWdfControlFinishInitializing)(DriverGlobals, Device);
950 }
951 
952 _Must_inspect_result_
953 _IRQL_requires_max_(PASSIVE_LEVEL)
954 WDFAPI
955 PWDFCXDEVICE_INIT
956 VFWDFEXPORT(WdfCxDeviceInitAllocate)(
957     _In_
958     PWDF_DRIVER_GLOBALS DriverGlobals,
959     _In_
960     PWDFDEVICE_INIT DeviceInit
961     )
962 {
963     PAGED_CODE_LOCKED();
964     return ((PFN_WDFCXDEVICEINITALLOCATE) WdfVersion.Functions.pfnWdfCxDeviceInitAllocate)(DriverGlobals, DeviceInit);
965 }
966 
967 _Must_inspect_result_
968 _IRQL_requires_max_(DISPATCH_LEVEL)
969 WDFAPI
970 NTSTATUS
971 VFWDFEXPORT(WdfCxDeviceInitAssignWdmIrpPreprocessCallback)(
972     _In_
973     PWDF_DRIVER_GLOBALS DriverGlobals,
974     _In_
975     PWDFCXDEVICE_INIT CxDeviceInit,
976     _In_
977     PFN_WDFCXDEVICE_WDM_IRP_PREPROCESS EvtCxDeviceWdmIrpPreprocess,
978     _In_
979     UCHAR MajorFunction,
980     _When_(NumMinorFunctions > 0, _In_reads_bytes_(NumMinorFunctions))
981     _When_(NumMinorFunctions == 0, _In_opt_)
982     PUCHAR MinorFunctions,
983     _In_
984     ULONG NumMinorFunctions
985     )
986 {
987     PAGED_CODE_LOCKED();
988     return ((PFN_WDFCXDEVICEINITASSIGNWDMIRPPREPROCESSCALLBACK) WdfVersion.Functions.pfnWdfCxDeviceInitAssignWdmIrpPreprocessCallback)(DriverGlobals, CxDeviceInit, EvtCxDeviceWdmIrpPreprocess, MajorFunction, MinorFunctions, NumMinorFunctions);
989 }
990 
991 _IRQL_requires_max_(DISPATCH_LEVEL)
992 WDFAPI
993 VOID
994 VFWDFEXPORT(WdfCxDeviceInitSetIoInCallerContextCallback)(
995     _In_
996     PWDF_DRIVER_GLOBALS DriverGlobals,
997     _In_
998     PWDFCXDEVICE_INIT CxDeviceInit,
999     _In_
1000     PFN_WDF_IO_IN_CALLER_CONTEXT EvtIoInCallerContext
1001     )
1002 {
1003     PAGED_CODE_LOCKED();
1004     ((PFN_WDFCXDEVICEINITSETIOINCALLERCONTEXTCALLBACK) WdfVersion.Functions.pfnWdfCxDeviceInitSetIoInCallerContextCallback)(DriverGlobals, CxDeviceInit, EvtIoInCallerContext);
1005 }
1006 
1007 _IRQL_requires_max_(DISPATCH_LEVEL)
1008 WDFAPI
1009 VOID
1010 VFWDFEXPORT(WdfCxDeviceInitSetRequestAttributes)(
1011     _In_
1012     PWDF_DRIVER_GLOBALS DriverGlobals,
1013     _In_
1014     PWDFCXDEVICE_INIT CxDeviceInit,
1015     _In_
1016     PWDF_OBJECT_ATTRIBUTES RequestAttributes
1017     )
1018 {
1019     PAGED_CODE_LOCKED();
1020     ((PFN_WDFCXDEVICEINITSETREQUESTATTRIBUTES) WdfVersion.Functions.pfnWdfCxDeviceInitSetRequestAttributes)(DriverGlobals, CxDeviceInit, RequestAttributes);
1021 }
1022 
1023 _IRQL_requires_max_(DISPATCH_LEVEL)
1024 WDFAPI
1025 VOID
1026 VFWDFEXPORT(WdfCxDeviceInitSetFileObjectConfig)(
1027     _In_
1028     PWDF_DRIVER_GLOBALS DriverGlobals,
1029     _In_
1030     PWDFCXDEVICE_INIT CxDeviceInit,
1031     _In_
1032     PWDFCX_FILEOBJECT_CONFIG CxFileObjectConfig,
1033     _In_opt_
1034     PWDF_OBJECT_ATTRIBUTES FileObjectAttributes
1035     )
1036 {
1037     PAGED_CODE_LOCKED();
1038     ((PFN_WDFCXDEVICEINITSETFILEOBJECTCONFIG) WdfVersion.Functions.pfnWdfCxDeviceInitSetFileObjectConfig)(DriverGlobals, CxDeviceInit, CxFileObjectConfig, FileObjectAttributes);
1039 }
1040 
1041 WDFAPI
1042 VOID
1043 VFWDFEXPORT(WdfCxVerifierKeBugCheck)(
1044     _In_
1045     PWDF_DRIVER_GLOBALS DriverGlobals,
1046     _In_opt_
1047     WDFOBJECT Object,
1048     _In_
1049     ULONG BugCheckCode,
1050     _In_
1051     ULONG_PTR BugCheckParameter1,
1052     _In_
1053     ULONG_PTR BugCheckParameter2,
1054     _In_
1055     ULONG_PTR BugCheckParameter3,
1056     _In_
1057     ULONG_PTR BugCheckParameter4
1058     )
1059 {
1060     PAGED_CODE_LOCKED();
1061     ((PFN_WDFCXVERIFIERKEBUGCHECK) WdfVersion.Functions.pfnWdfCxVerifierKeBugCheck)(DriverGlobals, Object, BugCheckCode, BugCheckParameter1, BugCheckParameter2, BugCheckParameter3, BugCheckParameter4);
1062 }
1063 
1064 _IRQL_requires_max_(DISPATCH_LEVEL)
1065 WDFAPI
1066 VOID
1067 VFWDFEXPORT(WdfDeviceGetDeviceState)(
1068     _In_
1069     PWDF_DRIVER_GLOBALS DriverGlobals,
1070     _In_
1071     WDFDEVICE Device,
1072     _Out_
1073     PWDF_DEVICE_STATE DeviceState
1074     )
1075 {
1076     PAGED_CODE_LOCKED();
1077     ((PFN_WDFDEVICEGETDEVICESTATE) WdfVersion.Functions.pfnWdfDeviceGetDeviceState)(DriverGlobals, Device, DeviceState);
1078 }
1079 
1080 _IRQL_requires_max_(DISPATCH_LEVEL)
1081 WDFAPI
1082 VOID
1083 VFWDFEXPORT(WdfDeviceSetDeviceState)(
1084     _In_
1085     PWDF_DRIVER_GLOBALS DriverGlobals,
1086     _In_
1087     WDFDEVICE Device,
1088     _In_
1089     PWDF_DEVICE_STATE DeviceState
1090     )
1091 {
1092     PAGED_CODE_LOCKED();
1093     ((PFN_WDFDEVICESETDEVICESTATE) WdfVersion.Functions.pfnWdfDeviceSetDeviceState)(DriverGlobals, Device, DeviceState);
1094 }
1095 
1096 _IRQL_requires_max_(DISPATCH_LEVEL)
1097 WDFAPI
1098 WDFDEVICE
1099 VFWDFEXPORT(WdfWdmDeviceGetWdfDeviceHandle)(
1100     _In_
1101     PWDF_DRIVER_GLOBALS DriverGlobals,
1102     _In_
1103     PDEVICE_OBJECT DeviceObject
1104     )
1105 {
1106     PAGED_CODE_LOCKED();
1107     return ((PFN_WDFWDMDEVICEGETWDFDEVICEHANDLE) WdfVersion.Functions.pfnWdfWdmDeviceGetWdfDeviceHandle)(DriverGlobals, DeviceObject);
1108 }
1109 
1110 _IRQL_requires_max_(DISPATCH_LEVEL)
1111 WDFAPI
1112 PDEVICE_OBJECT
1113 VFWDFEXPORT(WdfDeviceWdmGetDeviceObject)(
1114     _In_
1115     PWDF_DRIVER_GLOBALS DriverGlobals,
1116     _In_
1117     WDFDEVICE Device
1118     )
1119 {
1120     PAGED_CODE_LOCKED();
1121     return ((PFN_WDFDEVICEWDMGETDEVICEOBJECT) WdfVersion.Functions.pfnWdfDeviceWdmGetDeviceObject)(DriverGlobals, Device);
1122 }
1123 
1124 _IRQL_requires_max_(DISPATCH_LEVEL)
1125 WDFAPI
1126 PDEVICE_OBJECT
1127 VFWDFEXPORT(WdfDeviceWdmGetAttachedDevice)(
1128     _In_
1129     PWDF_DRIVER_GLOBALS DriverGlobals,
1130     _In_
1131     WDFDEVICE Device
1132     )
1133 {
1134     PAGED_CODE_LOCKED();
1135     return ((PFN_WDFDEVICEWDMGETATTACHEDDEVICE) WdfVersion.Functions.pfnWdfDeviceWdmGetAttachedDevice)(DriverGlobals, Device);
1136 }
1137 
1138 _IRQL_requires_max_(DISPATCH_LEVEL)
1139 WDFAPI
1140 PDEVICE_OBJECT
1141 VFWDFEXPORT(WdfDeviceWdmGetPhysicalDevice)(
1142     _In_
1143     PWDF_DRIVER_GLOBALS DriverGlobals,
1144     _In_
1145     WDFDEVICE Device
1146     )
1147 {
1148     PAGED_CODE_LOCKED();
1149     return ((PFN_WDFDEVICEWDMGETPHYSICALDEVICE) WdfVersion.Functions.pfnWdfDeviceWdmGetPhysicalDevice)(DriverGlobals, Device);
1150 }
1151 
1152 _Must_inspect_result_
1153 _IRQL_requires_max_(DISPATCH_LEVEL)
1154 WDFAPI
1155 NTSTATUS
1156 VFWDFEXPORT(WdfDeviceWdmDispatchPreprocessedIrp)(
1157     _In_
1158     PWDF_DRIVER_GLOBALS DriverGlobals,
1159     _In_
1160     WDFDEVICE Device,
1161     _In_
1162     PIRP Irp
1163     )
1164 {
1165     PAGED_CODE_LOCKED();
1166     return ((PFN_WDFDEVICEWDMDISPATCHPREPROCESSEDIRP) WdfVersion.Functions.pfnWdfDeviceWdmDispatchPreprocessedIrp)(DriverGlobals, Device, Irp);
1167 }
1168 
1169 _Must_inspect_result_
1170 _IRQL_requires_max_(DISPATCH_LEVEL)
1171 WDFAPI
1172 NTSTATUS
1173 VFWDFEXPORT(WdfDeviceWdmDispatchIrp)(
1174     _In_
1175     PWDF_DRIVER_GLOBALS DriverGlobals,
1176     _In_
1177     WDFDEVICE Device,
1178     _In_
1179     PIRP Irp,
1180     _In_
1181     WDFCONTEXT DispatchContext
1182     )
1183 {
1184     PAGED_CODE_LOCKED();
1185     return ((PFN_WDFDEVICEWDMDISPATCHIRP) WdfVersion.Functions.pfnWdfDeviceWdmDispatchIrp)(DriverGlobals, Device, Irp, DispatchContext);
1186 }
1187 
1188 _Must_inspect_result_
1189 _IRQL_requires_max_(DISPATCH_LEVEL)
1190 WDFAPI
1191 NTSTATUS
1192 VFWDFEXPORT(WdfDeviceWdmDispatchIrpToIoQueue)(
1193     _In_
1194     PWDF_DRIVER_GLOBALS DriverGlobals,
1195     _In_
1196     WDFDEVICE Device,
1197     _In_
1198     PIRP Irp,
1199     _In_
1200     WDFQUEUE Queue,
1201     _In_
1202     ULONG Flags
1203     )
1204 {
1205     PAGED_CODE_LOCKED();
1206     return ((PFN_WDFDEVICEWDMDISPATCHIRPTOIOQUEUE) WdfVersion.Functions.pfnWdfDeviceWdmDispatchIrpToIoQueue)(DriverGlobals, Device, Irp, Queue, Flags);
1207 }
1208 
1209 _Must_inspect_result_
1210 _IRQL_requires_max_(DISPATCH_LEVEL)
1211 WDFAPI
1212 NTSTATUS
1213 VFWDFEXPORT(WdfDeviceAddDependentUsageDeviceObject)(
1214     _In_
1215     PWDF_DRIVER_GLOBALS DriverGlobals,
1216     _In_
1217     WDFDEVICE Device,
1218     _In_
1219     PDEVICE_OBJECT DependentDevice
1220     )
1221 {
1222     PAGED_CODE_LOCKED();
1223     return ((PFN_WDFDEVICEADDDEPENDENTUSAGEDEVICEOBJECT) WdfVersion.Functions.pfnWdfDeviceAddDependentUsageDeviceObject)(DriverGlobals, Device, DependentDevice);
1224 }
1225 
1226 _IRQL_requires_max_(DISPATCH_LEVEL)
1227 WDFAPI
1228 VOID
1229 VFWDFEXPORT(WdfDeviceRemoveDependentUsageDeviceObject)(
1230     _In_
1231     PWDF_DRIVER_GLOBALS DriverGlobals,
1232     _In_
1233     WDFDEVICE Device,
1234     _In_
1235     PDEVICE_OBJECT DependentDevice
1236     )
1237 {
1238     PAGED_CODE_LOCKED();
1239     ((PFN_WDFDEVICEREMOVEDEPENDENTUSAGEDEVICEOBJECT) WdfVersion.Functions.pfnWdfDeviceRemoveDependentUsageDeviceObject)(DriverGlobals, Device, DependentDevice);
1240 }
1241 
1242 _Must_inspect_result_
1243 _IRQL_requires_max_(DISPATCH_LEVEL)
1244 WDFAPI
1245 NTSTATUS
1246 VFWDFEXPORT(WdfDeviceAddRemovalRelationsPhysicalDevice)(
1247     _In_
1248     PWDF_DRIVER_GLOBALS DriverGlobals,
1249     _In_
1250     WDFDEVICE Device,
1251     _In_
1252     PDEVICE_OBJECT PhysicalDevice
1253     )
1254 {
1255     PAGED_CODE_LOCKED();
1256     return ((PFN_WDFDEVICEADDREMOVALRELATIONSPHYSICALDEVICE) WdfVersion.Functions.pfnWdfDeviceAddRemovalRelationsPhysicalDevice)(DriverGlobals, Device, PhysicalDevice);
1257 }
1258 
1259 _IRQL_requires_max_(DISPATCH_LEVEL)
1260 WDFAPI
1261 VOID
1262 VFWDFEXPORT(WdfDeviceRemoveRemovalRelationsPhysicalDevice)(
1263     _In_
1264     PWDF_DRIVER_GLOBALS DriverGlobals,
1265     _In_
1266     WDFDEVICE Device,
1267     _In_
1268     PDEVICE_OBJECT PhysicalDevice
1269     )
1270 {
1271     PAGED_CODE_LOCKED();
1272     ((PFN_WDFDEVICEREMOVEREMOVALRELATIONSPHYSICALDEVICE) WdfVersion.Functions.pfnWdfDeviceRemoveRemovalRelationsPhysicalDevice)(DriverGlobals, Device, PhysicalDevice);
1273 }
1274 
1275 _IRQL_requires_max_(DISPATCH_LEVEL)
1276 WDFAPI
1277 VOID
1278 VFWDFEXPORT(WdfDeviceClearRemovalRelationsDevices)(
1279     _In_
1280     PWDF_DRIVER_GLOBALS DriverGlobals,
1281     _In_
1282     WDFDEVICE Device
1283     )
1284 {
1285     PAGED_CODE_LOCKED();
1286     ((PFN_WDFDEVICECLEARREMOVALRELATIONSDEVICES) WdfVersion.Functions.pfnWdfDeviceClearRemovalRelationsDevices)(DriverGlobals, Device);
1287 }
1288 
1289 _IRQL_requires_max_(DISPATCH_LEVEL)
1290 WDFAPI
1291 WDFDRIVER
1292 VFWDFEXPORT(WdfDeviceGetDriver)(
1293     _In_
1294     PWDF_DRIVER_GLOBALS DriverGlobals,
1295     _In_
1296     WDFDEVICE Device
1297     )
1298 {
1299     PAGED_CODE_LOCKED();
1300     return ((PFN_WDFDEVICEGETDRIVER) WdfVersion.Functions.pfnWdfDeviceGetDriver)(DriverGlobals, Device);
1301 }
1302 
1303 _Must_inspect_result_
1304 _IRQL_requires_max_(PASSIVE_LEVEL)
1305 WDFAPI
1306 NTSTATUS
1307 VFWDFEXPORT(WdfDeviceRetrieveDeviceName)(
1308     _In_
1309     PWDF_DRIVER_GLOBALS DriverGlobals,
1310     _In_
1311     WDFDEVICE Device,
1312     _In_
1313     WDFSTRING String
1314     )
1315 {
1316     PAGED_CODE_LOCKED();
1317     return ((PFN_WDFDEVICERETRIEVEDEVICENAME) WdfVersion.Functions.pfnWdfDeviceRetrieveDeviceName)(DriverGlobals, Device, String);
1318 }
1319 
1320 _Must_inspect_result_
1321 _IRQL_requires_max_(PASSIVE_LEVEL)
1322 WDFAPI
1323 NTSTATUS
1324 VFWDFEXPORT(WdfDeviceAssignMofResourceName)(
1325     _In_
1326     PWDF_DRIVER_GLOBALS DriverGlobals,
1327     _In_
1328     WDFDEVICE Device,
1329     _In_
1330     PCUNICODE_STRING MofResourceName
1331     )
1332 {
1333     PAGED_CODE_LOCKED();
1334     return ((PFN_WDFDEVICEASSIGNMOFRESOURCENAME) WdfVersion.Functions.pfnWdfDeviceAssignMofResourceName)(DriverGlobals, Device, MofResourceName);
1335 }
1336 
1337 _IRQL_requires_max_(DISPATCH_LEVEL)
1338 WDFAPI
1339 WDFIOTARGET
1340 VFWDFEXPORT(WdfDeviceGetIoTarget)(
1341     _In_
1342     PWDF_DRIVER_GLOBALS DriverGlobals,
1343     _In_
1344     WDFDEVICE Device
1345     )
1346 {
1347     PAGED_CODE_LOCKED();
1348     return ((PFN_WDFDEVICEGETIOTARGET) WdfVersion.Functions.pfnWdfDeviceGetIoTarget)(DriverGlobals, Device);
1349 }
1350 
1351 _IRQL_requires_max_(DISPATCH_LEVEL)
1352 WDFAPI
1353 WDF_DEVICE_PNP_STATE
1354 VFWDFEXPORT(WdfDeviceGetDevicePnpState)(
1355     _In_
1356     PWDF_DRIVER_GLOBALS DriverGlobals,
1357     _In_
1358     WDFDEVICE Device
1359     )
1360 {
1361     PAGED_CODE_LOCKED();
1362     return ((PFN_WDFDEVICEGETDEVICEPNPSTATE) WdfVersion.Functions.pfnWdfDeviceGetDevicePnpState)(DriverGlobals, Device);
1363 }
1364 
1365 _IRQL_requires_max_(DISPATCH_LEVEL)
1366 WDFAPI
1367 WDF_DEVICE_POWER_STATE
1368 VFWDFEXPORT(WdfDeviceGetDevicePowerState)(
1369     _In_
1370     PWDF_DRIVER_GLOBALS DriverGlobals,
1371     _In_
1372     WDFDEVICE Device
1373     )
1374 {
1375     PAGED_CODE_LOCKED();
1376     return ((PFN_WDFDEVICEGETDEVICEPOWERSTATE) WdfVersion.Functions.pfnWdfDeviceGetDevicePowerState)(DriverGlobals, Device);
1377 }
1378 
1379 _IRQL_requires_max_(DISPATCH_LEVEL)
1380 WDFAPI
1381 WDF_DEVICE_POWER_POLICY_STATE
1382 VFWDFEXPORT(WdfDeviceGetDevicePowerPolicyState)(
1383     _In_
1384     PWDF_DRIVER_GLOBALS DriverGlobals,
1385     _In_
1386     WDFDEVICE Device
1387     )
1388 {
1389     PAGED_CODE_LOCKED();
1390     return ((PFN_WDFDEVICEGETDEVICEPOWERPOLICYSTATE) WdfVersion.Functions.pfnWdfDeviceGetDevicePowerPolicyState)(DriverGlobals, Device);
1391 }
1392 
1393 _Must_inspect_result_
1394 _IRQL_requires_max_(DISPATCH_LEVEL)
1395 WDFAPI
1396 NTSTATUS
1397 VFWDFEXPORT(WdfDeviceAssignS0IdleSettings)(
1398     _In_
1399     PWDF_DRIVER_GLOBALS DriverGlobals,
1400     _In_
1401     WDFDEVICE Device,
1402     _In_
1403     PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS Settings
1404     )
1405 {
1406     PAGED_CODE_LOCKED();
1407     return ((PFN_WDFDEVICEASSIGNS0IDLESETTINGS) WdfVersion.Functions.pfnWdfDeviceAssignS0IdleSettings)(DriverGlobals, Device, Settings);
1408 }
1409 
1410 _Must_inspect_result_
1411 _IRQL_requires_max_(DISPATCH_LEVEL)
1412 WDFAPI
1413 NTSTATUS
1414 VFWDFEXPORT(WdfDeviceAssignSxWakeSettings)(
1415     _In_
1416     PWDF_DRIVER_GLOBALS DriverGlobals,
1417     _In_
1418     WDFDEVICE Device,
1419     _In_
1420     PWDF_DEVICE_POWER_POLICY_WAKE_SETTINGS Settings
1421     )
1422 {
1423     PAGED_CODE_LOCKED();
1424     return ((PFN_WDFDEVICEASSIGNSXWAKESETTINGS) WdfVersion.Functions.pfnWdfDeviceAssignSxWakeSettings)(DriverGlobals, Device, Settings);
1425 }
1426 
1427 _Must_inspect_result_
1428 _IRQL_requires_max_(PASSIVE_LEVEL)
1429 WDFAPI
1430 NTSTATUS
1431 VFWDFEXPORT(WdfDeviceOpenRegistryKey)(
1432     _In_
1433     PWDF_DRIVER_GLOBALS DriverGlobals,
1434     _In_
1435     WDFDEVICE Device,
1436     _In_
1437     ULONG DeviceInstanceKeyType,
1438     _In_
1439     ACCESS_MASK DesiredAccess,
1440     _In_opt_
1441     PWDF_OBJECT_ATTRIBUTES KeyAttributes,
1442     _Out_
1443     WDFKEY* Key
1444     )
1445 {
1446     PAGED_CODE_LOCKED();
1447     return ((PFN_WDFDEVICEOPENREGISTRYKEY) WdfVersion.Functions.pfnWdfDeviceOpenRegistryKey)(DriverGlobals, Device, DeviceInstanceKeyType, DesiredAccess, KeyAttributes, Key);
1448 }
1449 
1450 _Must_inspect_result_
1451 _IRQL_requires_max_(PASSIVE_LEVEL)
1452 WDFAPI
1453 NTSTATUS
1454 VFWDFEXPORT(WdfDeviceOpenDevicemapKey)(
1455     _In_
1456     PWDF_DRIVER_GLOBALS DriverGlobals,
1457     _In_
1458     WDFDEVICE Device,
1459     _In_
1460     PCUNICODE_STRING KeyName,
1461     _In_
1462     ACCESS_MASK DesiredAccess,
1463     _In_opt_
1464     PWDF_OBJECT_ATTRIBUTES KeyAttributes,
1465     _Out_
1466     WDFKEY* Key
1467     )
1468 {
1469     PAGED_CODE_LOCKED();
1470     return ((PFN_WDFDEVICEOPENDEVICEMAPKEY) WdfVersion.Functions.pfnWdfDeviceOpenDevicemapKey)(DriverGlobals, Device, KeyName, DesiredAccess, KeyAttributes, Key);
1471 }
1472 
1473 _IRQL_requires_max_(DISPATCH_LEVEL)
1474 WDFAPI
1475 VOID
1476 VFWDFEXPORT(WdfDeviceSetSpecialFileSupport)(
1477     _In_
1478     PWDF_DRIVER_GLOBALS DriverGlobals,
1479     _In_
1480     WDFDEVICE Device,
1481     _In_
1482     WDF_SPECIAL_FILE_TYPE FileType,
1483     _In_
1484     BOOLEAN FileTypeIsSupported
1485     )
1486 {
1487     PAGED_CODE_LOCKED();
1488     ((PFN_WDFDEVICESETSPECIALFILESUPPORT) WdfVersion.Functions.pfnWdfDeviceSetSpecialFileSupport)(DriverGlobals, Device, FileType, FileTypeIsSupported);
1489 }
1490 
1491 _IRQL_requires_max_(DISPATCH_LEVEL)
1492 WDFAPI
1493 VOID
1494 VFWDFEXPORT(WdfDeviceSetCharacteristics)(
1495     _In_
1496     PWDF_DRIVER_GLOBALS DriverGlobals,
1497     _In_
1498     WDFDEVICE Device,
1499     _In_
1500     ULONG DeviceCharacteristics
1501     )
1502 {
1503     PAGED_CODE_LOCKED();
1504     ((PFN_WDFDEVICESETCHARACTERISTICS) WdfVersion.Functions.pfnWdfDeviceSetCharacteristics)(DriverGlobals, Device, DeviceCharacteristics);
1505 }
1506 
1507 _IRQL_requires_max_(DISPATCH_LEVEL)
1508 WDFAPI
1509 ULONG
1510 VFWDFEXPORT(WdfDeviceGetCharacteristics)(
1511     _In_
1512     PWDF_DRIVER_GLOBALS DriverGlobals,
1513     _In_
1514     WDFDEVICE Device
1515     )
1516 {
1517     PAGED_CODE_LOCKED();
1518     return ((PFN_WDFDEVICEGETCHARACTERISTICS) WdfVersion.Functions.pfnWdfDeviceGetCharacteristics)(DriverGlobals, Device);
1519 }
1520 
1521 _IRQL_requires_max_(DISPATCH_LEVEL)
1522 WDFAPI
1523 ULONG
1524 VFWDFEXPORT(WdfDeviceGetAlignmentRequirement)(
1525     _In_
1526     PWDF_DRIVER_GLOBALS DriverGlobals,
1527     _In_
1528     WDFDEVICE Device
1529     )
1530 {
1531     PAGED_CODE_LOCKED();
1532     return ((PFN_WDFDEVICEGETALIGNMENTREQUIREMENT) WdfVersion.Functions.pfnWdfDeviceGetAlignmentRequirement)(DriverGlobals, Device);
1533 }
1534 
1535 _IRQL_requires_max_(DISPATCH_LEVEL)
1536 WDFAPI
1537 VOID
1538 VFWDFEXPORT(WdfDeviceSetAlignmentRequirement)(
1539     _In_
1540     PWDF_DRIVER_GLOBALS DriverGlobals,
1541     _In_
1542     WDFDEVICE Device,
1543     _In_
1544     ULONG AlignmentRequirement
1545     )
1546 {
1547     PAGED_CODE_LOCKED();
1548     ((PFN_WDFDEVICESETALIGNMENTREQUIREMENT) WdfVersion.Functions.pfnWdfDeviceSetAlignmentRequirement)(DriverGlobals, Device, AlignmentRequirement);
1549 }
1550 
1551 _IRQL_requires_max_(DISPATCH_LEVEL)
1552 WDFAPI
1553 VOID
1554 VFWDFEXPORT(WdfDeviceInitFree)(
1555     _In_
1556     PWDF_DRIVER_GLOBALS DriverGlobals,
1557     _In_
1558     PWDFDEVICE_INIT DeviceInit
1559     )
1560 {
1561     PAGED_CODE_LOCKED();
1562     ((PFN_WDFDEVICEINITFREE) WdfVersion.Functions.pfnWdfDeviceInitFree)(DriverGlobals, DeviceInit);
1563 }
1564 
1565 _IRQL_requires_max_(DISPATCH_LEVEL)
1566 WDFAPI
1567 VOID
1568 VFWDFEXPORT(WdfDeviceInitSetPnpPowerEventCallbacks)(
1569     _In_
1570     PWDF_DRIVER_GLOBALS DriverGlobals,
1571     _In_
1572     PWDFDEVICE_INIT DeviceInit,
1573     _In_
1574     PWDF_PNPPOWER_EVENT_CALLBACKS PnpPowerEventCallbacks
1575     )
1576 {
1577     PAGED_CODE_LOCKED();
1578     ((PFN_WDFDEVICEINITSETPNPPOWEREVENTCALLBACKS) WdfVersion.Functions.pfnWdfDeviceInitSetPnpPowerEventCallbacks)(DriverGlobals, DeviceInit, PnpPowerEventCallbacks);
1579 }
1580 
1581 _IRQL_requires_max_(DISPATCH_LEVEL)
1582 WDFAPI
1583 VOID
1584 VFWDFEXPORT(WdfDeviceInitSetPowerPolicyEventCallbacks)(
1585     _In_
1586     PWDF_DRIVER_GLOBALS DriverGlobals,
1587     _In_
1588     PWDFDEVICE_INIT DeviceInit,
1589     _In_
1590     PWDF_POWER_POLICY_EVENT_CALLBACKS PowerPolicyEventCallbacks
1591     )
1592 {
1593     PAGED_CODE_LOCKED();
1594     ((PFN_WDFDEVICEINITSETPOWERPOLICYEVENTCALLBACKS) WdfVersion.Functions.pfnWdfDeviceInitSetPowerPolicyEventCallbacks)(DriverGlobals, DeviceInit, PowerPolicyEventCallbacks);
1595 }
1596 
1597 _IRQL_requires_max_(DISPATCH_LEVEL)
1598 WDFAPI
1599 VOID
1600 VFWDFEXPORT(WdfDeviceInitSetPowerPolicyOwnership)(
1601     _In_
1602     PWDF_DRIVER_GLOBALS DriverGlobals,
1603     _In_
1604     PWDFDEVICE_INIT DeviceInit,
1605     _In_
1606     BOOLEAN IsPowerPolicyOwner
1607     )
1608 {
1609     PAGED_CODE_LOCKED();
1610     ((PFN_WDFDEVICEINITSETPOWERPOLICYOWNERSHIP) WdfVersion.Functions.pfnWdfDeviceInitSetPowerPolicyOwnership)(DriverGlobals, DeviceInit, IsPowerPolicyOwner);
1611 }
1612 
1613 _Must_inspect_result_
1614 _IRQL_requires_max_(PASSIVE_LEVEL)
1615 WDFAPI
1616 NTSTATUS
1617 VFWDFEXPORT(WdfDeviceInitRegisterPnpStateChangeCallback)(
1618     _In_
1619     PWDF_DRIVER_GLOBALS DriverGlobals,
1620     _In_
1621     PWDFDEVICE_INIT DeviceInit,
1622     _In_
1623     WDF_DEVICE_PNP_STATE PnpState,
1624     _In_
1625     PFN_WDF_DEVICE_PNP_STATE_CHANGE_NOTIFICATION EvtDevicePnpStateChange,
1626     _In_
1627     ULONG CallbackTypes
1628     )
1629 {
1630     PAGED_CODE_LOCKED();
1631     return ((PFN_WDFDEVICEINITREGISTERPNPSTATECHANGECALLBACK) WdfVersion.Functions.pfnWdfDeviceInitRegisterPnpStateChangeCallback)(DriverGlobals, DeviceInit, PnpState, EvtDevicePnpStateChange, CallbackTypes);
1632 }
1633 
1634 _Must_inspect_result_
1635 _IRQL_requires_max_(PASSIVE_LEVEL)
1636 WDFAPI
1637 NTSTATUS
1638 VFWDFEXPORT(WdfDeviceInitRegisterPowerStateChangeCallback)(
1639     _In_
1640     PWDF_DRIVER_GLOBALS DriverGlobals,
1641     _In_
1642     PWDFDEVICE_INIT DeviceInit,
1643     _In_
1644     WDF_DEVICE_POWER_STATE PowerState,
1645     _In_
1646     PFN_WDF_DEVICE_POWER_STATE_CHANGE_NOTIFICATION EvtDevicePowerStateChange,
1647     _In_
1648     ULONG CallbackTypes
1649     )
1650 {
1651     PAGED_CODE_LOCKED();
1652     return ((PFN_WDFDEVICEINITREGISTERPOWERSTATECHANGECALLBACK) WdfVersion.Functions.pfnWdfDeviceInitRegisterPowerStateChangeCallback)(DriverGlobals, DeviceInit, PowerState, EvtDevicePowerStateChange, CallbackTypes);
1653 }
1654 
1655 _Must_inspect_result_
1656 _IRQL_requires_max_(PASSIVE_LEVEL)
1657 WDFAPI
1658 NTSTATUS
1659 VFWDFEXPORT(WdfDeviceInitRegisterPowerPolicyStateChangeCallback)(
1660     _In_
1661     PWDF_DRIVER_GLOBALS DriverGlobals,
1662     _In_
1663     PWDFDEVICE_INIT DeviceInit,
1664     _In_
1665     WDF_DEVICE_POWER_POLICY_STATE PowerPolicyState,
1666     _In_
1667     PFN_WDF_DEVICE_POWER_POLICY_STATE_CHANGE_NOTIFICATION EvtDevicePowerPolicyStateChange,
1668     _In_
1669     ULONG CallbackTypes
1670     )
1671 {
1672     PAGED_CODE_LOCKED();
1673     return ((PFN_WDFDEVICEINITREGISTERPOWERPOLICYSTATECHANGECALLBACK) WdfVersion.Functions.pfnWdfDeviceInitRegisterPowerPolicyStateChangeCallback)(DriverGlobals, DeviceInit, PowerPolicyState, EvtDevicePowerPolicyStateChange, CallbackTypes);
1674 }
1675 
1676 _IRQL_requires_max_(DISPATCH_LEVEL)
1677 WDFAPI
1678 VOID
1679 VFWDFEXPORT(WdfDeviceInitSetExclusive)(
1680     _In_
1681     PWDF_DRIVER_GLOBALS DriverGlobals,
1682     _In_
1683     PWDFDEVICE_INIT DeviceInit,
1684     _In_
1685     BOOLEAN IsExclusive
1686     )
1687 {
1688     PAGED_CODE_LOCKED();
1689     ((PFN_WDFDEVICEINITSETEXCLUSIVE) WdfVersion.Functions.pfnWdfDeviceInitSetExclusive)(DriverGlobals, DeviceInit, IsExclusive);
1690 }
1691 
1692 _IRQL_requires_max_(DISPATCH_LEVEL)
1693 WDFAPI
1694 VOID
1695 VFWDFEXPORT(WdfDeviceInitSetIoType)(
1696     _In_
1697     PWDF_DRIVER_GLOBALS DriverGlobals,
1698     _In_
1699     PWDFDEVICE_INIT DeviceInit,
1700     _In_
1701     WDF_DEVICE_IO_TYPE IoType
1702     )
1703 {
1704     PAGED_CODE_LOCKED();
1705     ((PFN_WDFDEVICEINITSETIOTYPE) WdfVersion.Functions.pfnWdfDeviceInitSetIoType)(DriverGlobals, DeviceInit, IoType);
1706 }
1707 
1708 _IRQL_requires_max_(DISPATCH_LEVEL)
1709 WDFAPI
1710 VOID
1711 VFWDFEXPORT(WdfDeviceInitSetPowerNotPageable)(
1712     _In_
1713     PWDF_DRIVER_GLOBALS DriverGlobals,
1714     _In_
1715     PWDFDEVICE_INIT DeviceInit
1716     )
1717 {
1718     PAGED_CODE_LOCKED();
1719     ((PFN_WDFDEVICEINITSETPOWERNOTPAGEABLE) WdfVersion.Functions.pfnWdfDeviceInitSetPowerNotPageable)(DriverGlobals, DeviceInit);
1720 }
1721 
1722 _IRQL_requires_max_(DISPATCH_LEVEL)
1723 WDFAPI
1724 VOID
1725 VFWDFEXPORT(WdfDeviceInitSetPowerPageable)(
1726     _In_
1727     PWDF_DRIVER_GLOBALS DriverGlobals,
1728     _In_
1729     PWDFDEVICE_INIT DeviceInit
1730     )
1731 {
1732     PAGED_CODE_LOCKED();
1733     ((PFN_WDFDEVICEINITSETPOWERPAGEABLE) WdfVersion.Functions.pfnWdfDeviceInitSetPowerPageable)(DriverGlobals, DeviceInit);
1734 }
1735 
1736 _IRQL_requires_max_(DISPATCH_LEVEL)
1737 WDFAPI
1738 VOID
1739 VFWDFEXPORT(WdfDeviceInitSetPowerInrush)(
1740     _In_
1741     PWDF_DRIVER_GLOBALS DriverGlobals,
1742     _In_
1743     PWDFDEVICE_INIT DeviceInit
1744     )
1745 {
1746     PAGED_CODE_LOCKED();
1747     ((PFN_WDFDEVICEINITSETPOWERINRUSH) WdfVersion.Functions.pfnWdfDeviceInitSetPowerInrush)(DriverGlobals, DeviceInit);
1748 }
1749 
1750 _IRQL_requires_max_(DISPATCH_LEVEL)
1751 WDFAPI
1752 VOID
1753 VFWDFEXPORT(WdfDeviceInitSetDeviceType)(
1754     _In_
1755     PWDF_DRIVER_GLOBALS DriverGlobals,
1756     _In_
1757     PWDFDEVICE_INIT DeviceInit,
1758     _In_
1759     DEVICE_TYPE DeviceType
1760     )
1761 {
1762     PAGED_CODE_LOCKED();
1763     ((PFN_WDFDEVICEINITSETDEVICETYPE) WdfVersion.Functions.pfnWdfDeviceInitSetDeviceType)(DriverGlobals, DeviceInit, DeviceType);
1764 }
1765 
1766 _Must_inspect_result_
1767 _IRQL_requires_max_(PASSIVE_LEVEL)
1768 WDFAPI
1769 NTSTATUS
1770 VFWDFEXPORT(WdfDeviceInitAssignName)(
1771     _In_
1772     PWDF_DRIVER_GLOBALS DriverGlobals,
1773     _In_
1774     PWDFDEVICE_INIT DeviceInit,
1775     _In_opt_
1776     PCUNICODE_STRING DeviceName
1777     )
1778 {
1779     PAGED_CODE_LOCKED();
1780     return ((PFN_WDFDEVICEINITASSIGNNAME) WdfVersion.Functions.pfnWdfDeviceInitAssignName)(DriverGlobals, DeviceInit, DeviceName);
1781 }
1782 
1783 _Must_inspect_result_
1784 _IRQL_requires_max_(PASSIVE_LEVEL)
1785 WDFAPI
1786 NTSTATUS
1787 VFWDFEXPORT(WdfDeviceInitAssignSDDLString)(
1788     _In_
1789     PWDF_DRIVER_GLOBALS DriverGlobals,
1790     _In_
1791     PWDFDEVICE_INIT DeviceInit,
1792     _In_opt_
1793     PCUNICODE_STRING SDDLString
1794     )
1795 {
1796     PAGED_CODE_LOCKED();
1797     return ((PFN_WDFDEVICEINITASSIGNSDDLSTRING) WdfVersion.Functions.pfnWdfDeviceInitAssignSDDLString)(DriverGlobals, DeviceInit, SDDLString);
1798 }
1799 
1800 _IRQL_requires_max_(DISPATCH_LEVEL)
1801 WDFAPI
1802 VOID
1803 VFWDFEXPORT(WdfDeviceInitSetDeviceClass)(
1804     _In_
1805     PWDF_DRIVER_GLOBALS DriverGlobals,
1806     _In_
1807     PWDFDEVICE_INIT DeviceInit,
1808     _In_
1809     CONST GUID* DeviceClassGuid
1810     )
1811 {
1812     PAGED_CODE_LOCKED();
1813     ((PFN_WDFDEVICEINITSETDEVICECLASS) WdfVersion.Functions.pfnWdfDeviceInitSetDeviceClass)(DriverGlobals, DeviceInit, DeviceClassGuid);
1814 }
1815 
1816 _IRQL_requires_max_(DISPATCH_LEVEL)
1817 WDFAPI
1818 VOID
1819 VFWDFEXPORT(WdfDeviceInitSetCharacteristics)(
1820     _In_
1821     PWDF_DRIVER_GLOBALS DriverGlobals,
1822     _In_
1823     PWDFDEVICE_INIT DeviceInit,
1824     _In_
1825     ULONG DeviceCharacteristics,
1826     _In_
1827     BOOLEAN OrInValues
1828     )
1829 {
1830     PAGED_CODE_LOCKED();
1831     ((PFN_WDFDEVICEINITSETCHARACTERISTICS) WdfVersion.Functions.pfnWdfDeviceInitSetCharacteristics)(DriverGlobals, DeviceInit, DeviceCharacteristics, OrInValues);
1832 }
1833 
1834 _IRQL_requires_max_(DISPATCH_LEVEL)
1835 WDFAPI
1836 VOID
1837 VFWDFEXPORT(WdfDeviceInitSetFileObjectConfig)(
1838     _In_
1839     PWDF_DRIVER_GLOBALS DriverGlobals,
1840     _In_
1841     PWDFDEVICE_INIT DeviceInit,
1842     _In_
1843     PWDF_FILEOBJECT_CONFIG FileObjectConfig,
1844     _In_opt_
1845     PWDF_OBJECT_ATTRIBUTES FileObjectAttributes
1846     )
1847 {
1848     PAGED_CODE_LOCKED();
1849     ((PFN_WDFDEVICEINITSETFILEOBJECTCONFIG) WdfVersion.Functions.pfnWdfDeviceInitSetFileObjectConfig)(DriverGlobals, DeviceInit, FileObjectConfig, FileObjectAttributes);
1850 }
1851 
1852 _IRQL_requires_max_(DISPATCH_LEVEL)
1853 WDFAPI
1854 VOID
1855 VFWDFEXPORT(WdfDeviceInitSetRequestAttributes)(
1856     _In_
1857     PWDF_DRIVER_GLOBALS DriverGlobals,
1858     _In_
1859     PWDFDEVICE_INIT DeviceInit,
1860     _In_
1861     PWDF_OBJECT_ATTRIBUTES RequestAttributes
1862     )
1863 {
1864     PAGED_CODE_LOCKED();
1865     ((PFN_WDFDEVICEINITSETREQUESTATTRIBUTES) WdfVersion.Functions.pfnWdfDeviceInitSetRequestAttributes)(DriverGlobals, DeviceInit, RequestAttributes);
1866 }
1867 
1868 _Must_inspect_result_
1869 _IRQL_requires_max_(DISPATCH_LEVEL)
1870 WDFAPI
1871 NTSTATUS
1872 VFWDFEXPORT(WdfDeviceInitAssignWdmIrpPreprocessCallback)(
1873     _In_
1874     PWDF_DRIVER_GLOBALS DriverGlobals,
1875     _In_
1876     PWDFDEVICE_INIT DeviceInit,
1877     _In_
1878     PFN_WDFDEVICE_WDM_IRP_PREPROCESS EvtDeviceWdmIrpPreprocess,
1879     _In_
1880     UCHAR MajorFunction,
1881     _When_(NumMinorFunctions > 0, _In_reads_bytes_(NumMinorFunctions))
1882     _When_(NumMinorFunctions == 0, _In_opt_)
1883     PUCHAR MinorFunctions,
1884     _In_
1885     ULONG NumMinorFunctions
1886     )
1887 {
1888     PAGED_CODE_LOCKED();
1889 #pragma prefast(suppress: __WARNING_INVALID_PARAM_VALUE_3,"This is a verifier DDI hook routine. It just passes the caller parameters to original routine")
1890     return ((PFN_WDFDEVICEINITASSIGNWDMIRPPREPROCESSCALLBACK) WdfVersion.Functions.pfnWdfDeviceInitAssignWdmIrpPreprocessCallback)(DriverGlobals, DeviceInit, EvtDeviceWdmIrpPreprocess, MajorFunction, MinorFunctions, NumMinorFunctions);
1891 }
1892 
1893 _IRQL_requires_max_(DISPATCH_LEVEL)
1894 WDFAPI
1895 VOID
1896 VFWDFEXPORT(WdfDeviceInitSetIoInCallerContextCallback)(
1897     _In_
1898     PWDF_DRIVER_GLOBALS DriverGlobals,
1899     _In_
1900     PWDFDEVICE_INIT DeviceInit,
1901     _In_
1902     PFN_WDF_IO_IN_CALLER_CONTEXT EvtIoInCallerContext
1903     )
1904 {
1905     PAGED_CODE_LOCKED();
1906     ((PFN_WDFDEVICEINITSETIOINCALLERCONTEXTCALLBACK) WdfVersion.Functions.pfnWdfDeviceInitSetIoInCallerContextCallback)(DriverGlobals, DeviceInit, EvtIoInCallerContext);
1907 }
1908 
1909 _IRQL_requires_max_(DISPATCH_LEVEL)
1910 WDFAPI
1911 VOID
1912 VFWDFEXPORT(WdfDeviceInitSetRemoveLockOptions)(
1913     _In_
1914     PWDF_DRIVER_GLOBALS DriverGlobals,
1915     _In_
1916     PWDFDEVICE_INIT DeviceInit,
1917     _In_
1918     PWDF_REMOVE_LOCK_OPTIONS Options
1919     )
1920 {
1921     PAGED_CODE_LOCKED();
1922     ((PFN_WDFDEVICEINITSETREMOVELOCKOPTIONS) WdfVersion.Functions.pfnWdfDeviceInitSetRemoveLockOptions)(DriverGlobals, DeviceInit, Options);
1923 }
1924 
1925 _Must_inspect_result_
1926 _IRQL_requires_max_(PASSIVE_LEVEL)
1927 WDFAPI
1928 NTSTATUS
1929 VFWDFEXPORT(WdfDeviceCreate)(
1930     _In_
1931     PWDF_DRIVER_GLOBALS DriverGlobals,
1932     _Inout_
1933     PWDFDEVICE_INIT* DeviceInit,
1934     _In_opt_
1935     PWDF_OBJECT_ATTRIBUTES DeviceAttributes,
1936     _Out_
1937     WDFDEVICE* Device
1938     )
1939 {
1940     VF_HOOK_PROCESS_INFO hookInfo;
1941     NTSTATUS status;
1942 
1943     PAGED_CODE_LOCKED();
1944     RtlZeroMemory(&hookInfo, sizeof(VF_HOOK_PROCESS_INFO));
1945 
1946     status = AddEventHooksWdfDeviceCreate(
1947         &hookInfo,
1948         DriverGlobals,
1949         DeviceInit,
1950         DeviceAttributes,
1951         Device);
1952 
1953     UNREFERENCED_PARAMETER(status);
1954 
1955     if (hookInfo.DonotCallKmdfLib) {
1956         return hookInfo.DdiCallStatus;
1957     }
1958 
1959     return ((PFN_WDFDEVICECREATE) WdfVersion.Functions.pfnWdfDeviceCreate)(DriverGlobals, DeviceInit, DeviceAttributes, Device);
1960 }
1961 
1962 _IRQL_requires_max_(DISPATCH_LEVEL)
1963 WDFAPI
1964 VOID
1965 VFWDFEXPORT(WdfDeviceSetStaticStopRemove)(
1966     _In_
1967     PWDF_DRIVER_GLOBALS DriverGlobals,
1968     _In_
1969     WDFDEVICE Device,
1970     _In_
1971     BOOLEAN Stoppable
1972     )
1973 {
1974     PAGED_CODE_LOCKED();
1975     ((PFN_WDFDEVICESETSTATICSTOPREMOVE) WdfVersion.Functions.pfnWdfDeviceSetStaticStopRemove)(DriverGlobals, Device, Stoppable);
1976 }
1977 
1978 _Must_inspect_result_
1979 _IRQL_requires_max_(PASSIVE_LEVEL)
1980 WDFAPI
1981 NTSTATUS
1982 VFWDFEXPORT(WdfDeviceCreateDeviceInterface)(
1983     _In_
1984     PWDF_DRIVER_GLOBALS DriverGlobals,
1985     _In_
1986     WDFDEVICE Device,
1987     _In_
1988     CONST GUID* InterfaceClassGUID,
1989     _In_opt_
1990     PCUNICODE_STRING ReferenceString
1991     )
1992 {
1993     PAGED_CODE_LOCKED();
1994     return ((PFN_WDFDEVICECREATEDEVICEINTERFACE) WdfVersion.Functions.pfnWdfDeviceCreateDeviceInterface)(DriverGlobals, Device, InterfaceClassGUID, ReferenceString);
1995 }
1996 
1997 _IRQL_requires_max_(PASSIVE_LEVEL)
1998 WDFAPI
1999 VOID
2000 VFWDFEXPORT(WdfDeviceSetDeviceInterfaceState)(
2001     _In_
2002     PWDF_DRIVER_GLOBALS DriverGlobals,
2003     _In_
2004     WDFDEVICE Device,
2005     _In_
2006     CONST GUID* InterfaceClassGUID,
2007     _In_opt_
2008     PCUNICODE_STRING ReferenceString,
2009     _In_
2010     BOOLEAN IsInterfaceEnabled
2011     )
2012 {
2013     PAGED_CODE_LOCKED();
2014     ((PFN_WDFDEVICESETDEVICEINTERFACESTATE) WdfVersion.Functions.pfnWdfDeviceSetDeviceInterfaceState)(DriverGlobals, Device, InterfaceClassGUID, ReferenceString, IsInterfaceEnabled);
2015 }
2016 
2017 _Must_inspect_result_
2018 _IRQL_requires_max_(PASSIVE_LEVEL)
2019 WDFAPI
2020 NTSTATUS
2021 VFWDFEXPORT(WdfDeviceRetrieveDeviceInterfaceString)(
2022     _In_
2023     PWDF_DRIVER_GLOBALS DriverGlobals,
2024     _In_
2025     WDFDEVICE Device,
2026     _In_
2027     CONST GUID* InterfaceClassGUID,
2028     _In_opt_
2029     PCUNICODE_STRING ReferenceString,
2030     _In_
2031     WDFSTRING String
2032     )
2033 {
2034     PAGED_CODE_LOCKED();
2035     return ((PFN_WDFDEVICERETRIEVEDEVICEINTERFACESTRING) WdfVersion.Functions.pfnWdfDeviceRetrieveDeviceInterfaceString)(DriverGlobals, Device, InterfaceClassGUID, ReferenceString, String);
2036 }
2037 
2038 _Must_inspect_result_
2039 _IRQL_requires_max_(PASSIVE_LEVEL)
2040 WDFAPI
2041 NTSTATUS
2042 VFWDFEXPORT(WdfDeviceCreateSymbolicLink)(
2043     _In_
2044     PWDF_DRIVER_GLOBALS DriverGlobals,
2045     _In_
2046     WDFDEVICE Device,
2047     _In_
2048     PCUNICODE_STRING SymbolicLinkName
2049     )
2050 {
2051     PAGED_CODE_LOCKED();
2052     return ((PFN_WDFDEVICECREATESYMBOLICLINK) WdfVersion.Functions.pfnWdfDeviceCreateSymbolicLink)(DriverGlobals, Device, SymbolicLinkName);
2053 }
2054 
2055 _Must_inspect_result_
2056 _IRQL_requires_max_(PASSIVE_LEVEL)
2057 WDFAPI
2058 NTSTATUS
2059 VFWDFEXPORT(WdfDeviceQueryProperty)(
2060     _In_
2061     PWDF_DRIVER_GLOBALS DriverGlobals,
2062     _In_
2063     WDFDEVICE Device,
2064     _In_
2065     DEVICE_REGISTRY_PROPERTY DeviceProperty,
2066     _In_
2067     ULONG BufferLength,
2068     _Out_writes_bytes_all_(BufferLength)
2069     PVOID PropertyBuffer,
2070     _Out_
2071     PULONG ResultLength
2072     )
2073 {
2074     PAGED_CODE_LOCKED();
2075     return ((PFN_WDFDEVICEQUERYPROPERTY) WdfVersion.Functions.pfnWdfDeviceQueryProperty)(DriverGlobals, Device, DeviceProperty, BufferLength, PropertyBuffer, ResultLength);
2076 }
2077 
2078 _Must_inspect_result_
2079 _IRQL_requires_max_(PASSIVE_LEVEL)
2080 WDFAPI
2081 NTSTATUS
2082 VFWDFEXPORT(WdfDeviceAllocAndQueryProperty)(
2083     _In_
2084     PWDF_DRIVER_GLOBALS DriverGlobals,
2085     _In_
2086     WDFDEVICE Device,
2087     _In_
2088     DEVICE_REGISTRY_PROPERTY DeviceProperty,
2089     _In_
2090     _Strict_type_match_
2091     POOL_TYPE PoolType,
2092     _In_opt_
2093     PWDF_OBJECT_ATTRIBUTES PropertyMemoryAttributes,
2094     _Out_
2095     WDFMEMORY* PropertyMemory
2096     )
2097 {
2098     PAGED_CODE_LOCKED();
2099     return ((PFN_WDFDEVICEALLOCANDQUERYPROPERTY) WdfVersion.Functions.pfnWdfDeviceAllocAndQueryProperty)(DriverGlobals, Device, DeviceProperty, PoolType, PropertyMemoryAttributes, PropertyMemory);
2100 }
2101 
2102 _IRQL_requires_max_(DISPATCH_LEVEL)
2103 WDFAPI
2104 VOID
2105 VFWDFEXPORT(WdfDeviceSetPnpCapabilities)(
2106     _In_
2107     PWDF_DRIVER_GLOBALS DriverGlobals,
2108     _In_
2109     WDFDEVICE Device,
2110     _In_
2111     PWDF_DEVICE_PNP_CAPABILITIES PnpCapabilities
2112     )
2113 {
2114     PAGED_CODE_LOCKED();
2115     ((PFN_WDFDEVICESETPNPCAPABILITIES) WdfVersion.Functions.pfnWdfDeviceSetPnpCapabilities)(DriverGlobals, Device, PnpCapabilities);
2116 }
2117 
2118 _IRQL_requires_max_(DISPATCH_LEVEL)
2119 WDFAPI
2120 VOID
2121 VFWDFEXPORT(WdfDeviceSetPowerCapabilities)(
2122     _In_
2123     PWDF_DRIVER_GLOBALS DriverGlobals,
2124     _In_
2125     WDFDEVICE Device,
2126     _In_
2127     PWDF_DEVICE_POWER_CAPABILITIES PowerCapabilities
2128     )
2129 {
2130     PAGED_CODE_LOCKED();
2131     ((PFN_WDFDEVICESETPOWERCAPABILITIES) WdfVersion.Functions.pfnWdfDeviceSetPowerCapabilities)(DriverGlobals, Device, PowerCapabilities);
2132 }
2133 
2134 _IRQL_requires_max_(DISPATCH_LEVEL)
2135 WDFAPI
2136 VOID
2137 VFWDFEXPORT(WdfDeviceSetBusInformationForChildren)(
2138     _In_
2139     PWDF_DRIVER_GLOBALS DriverGlobals,
2140     _In_
2141     WDFDEVICE Device,
2142     _In_
2143     PPNP_BUS_INFORMATION BusInformation
2144     )
2145 {
2146     PAGED_CODE_LOCKED();
2147     ((PFN_WDFDEVICESETBUSINFORMATIONFORCHILDREN) WdfVersion.Functions.pfnWdfDeviceSetBusInformationForChildren)(DriverGlobals, Device, BusInformation);
2148 }
2149 
2150 _Must_inspect_result_
2151 _IRQL_requires_max_(DISPATCH_LEVEL)
2152 WDFAPI
2153 NTSTATUS
2154 VFWDFEXPORT(WdfDeviceIndicateWakeStatus)(
2155     _In_
2156     PWDF_DRIVER_GLOBALS DriverGlobals,
2157     _In_
2158     WDFDEVICE Device,
2159     _In_
2160     NTSTATUS WaitWakeStatus
2161     )
2162 {
2163     PAGED_CODE_LOCKED();
2164     return ((PFN_WDFDEVICEINDICATEWAKESTATUS) WdfVersion.Functions.pfnWdfDeviceIndicateWakeStatus)(DriverGlobals, Device, WaitWakeStatus);
2165 }
2166 
2167 _IRQL_requires_max_(DISPATCH_LEVEL)
2168 WDFAPI
2169 VOID
2170 VFWDFEXPORT(WdfDeviceSetFailed)(
2171     _In_
2172     PWDF_DRIVER_GLOBALS DriverGlobals,
2173     _In_
2174     WDFDEVICE Device,
2175     _In_
2176     WDF_DEVICE_FAILED_ACTION FailedAction
2177     )
2178 {
2179     PAGED_CODE_LOCKED();
2180     ((PFN_WDFDEVICESETFAILED) WdfVersion.Functions.pfnWdfDeviceSetFailed)(DriverGlobals, Device, FailedAction);
2181 }
2182 
2183 _Must_inspect_result_
2184 _When_(WaitForD0 == 0, _IRQL_requires_max_(DISPATCH_LEVEL))
2185 _When_(WaitForD0 != 0, _IRQL_requires_max_(PASSIVE_LEVEL))
2186 WDFAPI
2187 NTSTATUS
2188 VFWDFEXPORT(WdfDeviceStopIdleNoTrack)(
2189     _In_
2190     PWDF_DRIVER_GLOBALS DriverGlobals,
2191     _In_
2192     WDFDEVICE Device,
2193     _In_
2194     BOOLEAN WaitForD0
2195     )
2196 {
2197     PAGED_CODE_LOCKED();
2198     return ((PFN_WDFDEVICESTOPIDLENOTRACK) WdfVersion.Functions.pfnWdfDeviceStopIdleNoTrack)(DriverGlobals, Device, WaitForD0);
2199 }
2200 
2201 _IRQL_requires_max_(DISPATCH_LEVEL)
2202 WDFAPI
2203 VOID
2204 VFWDFEXPORT(WdfDeviceResumeIdleNoTrack)(
2205     _In_
2206     PWDF_DRIVER_GLOBALS DriverGlobals,
2207     _In_
2208     WDFDEVICE Device
2209     )
2210 {
2211     PAGED_CODE_LOCKED();
2212     ((PFN_WDFDEVICERESUMEIDLENOTRACK) WdfVersion.Functions.pfnWdfDeviceResumeIdleNoTrack)(DriverGlobals, Device);
2213 }
2214 
2215 _Must_inspect_result_
2216 _When_(WaitForD0 == 0, _IRQL_requires_max_(DISPATCH_LEVEL))
2217 _When_(WaitForD0 != 0, _IRQL_requires_max_(PASSIVE_LEVEL))
2218 WDFAPI
2219 NTSTATUS
2220 VFWDFEXPORT(WdfDeviceStopIdleActual)(
2221     _In_
2222     PWDF_DRIVER_GLOBALS DriverGlobals,
2223     _In_
2224     WDFDEVICE Device,
2225     _In_
2226     BOOLEAN WaitForD0,
2227     _In_opt_
2228     PVOID Tag,
2229     _In_
2230     LONG Line,
2231     _In_z_
2232     PCHAR File
2233     )
2234 {
2235     PAGED_CODE_LOCKED();
2236     return ((PFN_WDFDEVICESTOPIDLEACTUAL) WdfVersion.Functions.pfnWdfDeviceStopIdleActual)(DriverGlobals, Device, WaitForD0, Tag, Line, File);
2237 }
2238 
2239 _IRQL_requires_max_(DISPATCH_LEVEL)
2240 WDFAPI
2241 VOID
2242 VFWDFEXPORT(WdfDeviceResumeIdleActual)(
2243     _In_
2244     PWDF_DRIVER_GLOBALS DriverGlobals,
2245     _In_
2246     WDFDEVICE Device,
2247     _In_opt_
2248     PVOID Tag,
2249     _In_
2250     LONG Line,
2251     _In_z_
2252     PCHAR File
2253     )
2254 {
2255     PAGED_CODE_LOCKED();
2256     ((PFN_WDFDEVICERESUMEIDLEACTUAL) WdfVersion.Functions.pfnWdfDeviceResumeIdleActual)(DriverGlobals, Device, Tag, Line, File);
2257 }
2258 
2259 _IRQL_requires_max_(DISPATCH_LEVEL)
2260 WDFAPI
2261 WDFFILEOBJECT
2262 VFWDFEXPORT(WdfDeviceGetFileObject)(
2263     _In_
2264     PWDF_DRIVER_GLOBALS DriverGlobals,
2265     _In_
2266     WDFDEVICE Device,
2267     _In_
2268     PFILE_OBJECT FileObject
2269     )
2270 {
2271     PAGED_CODE_LOCKED();
2272     return ((PFN_WDFDEVICEGETFILEOBJECT) WdfVersion.Functions.pfnWdfDeviceGetFileObject)(DriverGlobals, Device, FileObject);
2273 }
2274 
2275 _Must_inspect_result_
2276 _IRQL_requires_max_(DISPATCH_LEVEL)
2277 WDFAPI
2278 NTSTATUS
2279 VFWDFEXPORT(WdfDeviceEnqueueRequest)(
2280     _In_
2281     PWDF_DRIVER_GLOBALS DriverGlobals,
2282     _In_
2283     WDFDEVICE Device,
2284     _In_
2285     WDFREQUEST Request
2286     )
2287 {
2288     PAGED_CODE_LOCKED();
2289     return ((PFN_WDFDEVICEENQUEUEREQUEST) WdfVersion.Functions.pfnWdfDeviceEnqueueRequest)(DriverGlobals, Device, Request);
2290 }
2291 
2292 _IRQL_requires_max_(DISPATCH_LEVEL)
2293 WDFAPI
2294 WDFQUEUE
2295 VFWDFEXPORT(WdfDeviceGetDefaultQueue)(
2296     _In_
2297     PWDF_DRIVER_GLOBALS DriverGlobals,
2298     _In_
2299     WDFDEVICE Device
2300     )
2301 {
2302     PAGED_CODE_LOCKED();
2303     return ((PFN_WDFDEVICEGETDEFAULTQUEUE) WdfVersion.Functions.pfnWdfDeviceGetDefaultQueue)(DriverGlobals, Device);
2304 }
2305 
2306 _Must_inspect_result_
2307 _IRQL_requires_max_(DISPATCH_LEVEL)
2308 WDFAPI
2309 NTSTATUS
2310 VFWDFEXPORT(WdfDeviceConfigureRequestDispatching)(
2311     _In_
2312     PWDF_DRIVER_GLOBALS DriverGlobals,
2313     _In_
2314     WDFDEVICE Device,
2315     _In_
2316     WDFQUEUE Queue,
2317     _In_
2318     _Strict_type_match_
2319     WDF_REQUEST_TYPE RequestType
2320     )
2321 {
2322     PAGED_CODE_LOCKED();
2323     return ((PFN_WDFDEVICECONFIGUREREQUESTDISPATCHING) WdfVersion.Functions.pfnWdfDeviceConfigureRequestDispatching)(DriverGlobals, Device, Queue, RequestType);
2324 }
2325 
2326 _Must_inspect_result_
2327 _IRQL_requires_max_(DISPATCH_LEVEL)
2328 WDFAPI
2329 NTSTATUS
2330 VFWDFEXPORT(WdfDeviceConfigureWdmIrpDispatchCallback)(
2331     _In_
2332     PWDF_DRIVER_GLOBALS DriverGlobals,
2333     _In_
2334     WDFDEVICE Device,
2335     _In_opt_
2336     WDFDRIVER Driver,
2337     _In_
2338     UCHAR MajorFunction,
2339     _In_
2340     PFN_WDFDEVICE_WDM_IRP_DISPATCH EvtDeviceWdmIrpDisptach,
2341     _In_opt_
2342     WDFCONTEXT DriverContext
2343     )
2344 {
2345     PAGED_CODE_LOCKED();
2346     return ((PFN_WDFDEVICECONFIGUREWDMIRPDISPATCHCALLBACK) WdfVersion.Functions.pfnWdfDeviceConfigureWdmIrpDispatchCallback)(DriverGlobals, Device, Driver, MajorFunction, EvtDeviceWdmIrpDisptach, DriverContext);
2347 }
2348 
2349 _IRQL_requires_max_(DISPATCH_LEVEL)
2350 WDFAPI
2351 POWER_ACTION
2352 VFWDFEXPORT(WdfDeviceGetSystemPowerAction)(
2353     _In_
2354     PWDF_DRIVER_GLOBALS DriverGlobals,
2355     _In_
2356     WDFDEVICE Device
2357     )
2358 {
2359     PAGED_CODE_LOCKED();
2360     return ((PFN_WDFDEVICEGETSYSTEMPOWERACTION) WdfVersion.Functions.pfnWdfDeviceGetSystemPowerAction)(DriverGlobals, Device);
2361 }
2362 
2363 _Must_inspect_result_
2364 _IRQL_requires_max_(PASSIVE_LEVEL)
2365 WDFAPI
2366 NTSTATUS
2367 VFWDFEXPORT(WdfDeviceWdmAssignPowerFrameworkSettings)(
2368     _In_
2369     PWDF_DRIVER_GLOBALS DriverGlobals,
2370     _In_
2371     WDFDEVICE Device,
2372     _In_
2373     PWDF_POWER_FRAMEWORK_SETTINGS PowerFrameworkSettings
2374     )
2375 {
2376     PAGED_CODE_LOCKED();
2377     return ((PFN_WDFDEVICEWDMASSIGNPOWERFRAMEWORKSETTINGS) WdfVersion.Functions.pfnWdfDeviceWdmAssignPowerFrameworkSettings)(DriverGlobals, Device, PowerFrameworkSettings);
2378 }
2379 
2380 _IRQL_requires_max_(DISPATCH_LEVEL)
2381 WDFAPI
2382 VOID
2383 VFWDFEXPORT(WdfDeviceInitSetReleaseHardwareOrderOnFailure)(
2384     _In_
2385     PWDF_DRIVER_GLOBALS DriverGlobals,
2386     _In_
2387     PWDFDEVICE_INIT DeviceInit,
2388     _In_
2389     WDF_RELEASE_HARDWARE_ORDER_ON_FAILURE ReleaseHardwareOrderOnFailure
2390     )
2391 {
2392     PAGED_CODE_LOCKED();
2393     ((PFN_WDFDEVICEINITSETRELEASEHARDWAREORDERONFAILURE) WdfVersion.Functions.pfnWdfDeviceInitSetReleaseHardwareOrderOnFailure)(DriverGlobals, DeviceInit, ReleaseHardwareOrderOnFailure);
2394 }
2395 
2396 _IRQL_requires_max_(PASSIVE_LEVEL)
2397 WDFAPI
2398 VOID
2399 VFWDFEXPORT(WdfDeviceInitSetIoTypeEx)(
2400     _In_
2401     PWDF_DRIVER_GLOBALS DriverGlobals,
2402     _In_
2403     PWDFDEVICE_INIT DeviceInit,
2404     _In_
2405     PWDF_IO_TYPE_CONFIG IoTypeConfig
2406     )
2407 {
2408     PAGED_CODE_LOCKED();
2409     ((PFN_WDFDEVICEINITSETIOTYPEEX) WdfVersion.Functions.pfnWdfDeviceInitSetIoTypeEx)(DriverGlobals, DeviceInit, IoTypeConfig);
2410 }
2411 
2412 _Must_inspect_result_
2413 _IRQL_requires_max_(APC_LEVEL)
2414 WDFAPI
2415 NTSTATUS
2416 VFWDFEXPORT(WdfDeviceQueryPropertyEx)(
2417     _In_
2418     PWDF_DRIVER_GLOBALS DriverGlobals,
2419     _In_
2420     WDFDEVICE Device,
2421     _In_
2422     PWDF_DEVICE_PROPERTY_DATA DeviceProperty,
2423     _In_
2424     ULONG BufferLength,
2425     _Out_
2426     PVOID PropertyBuffer,
2427     _Out_
2428     PULONG RequiredSize,
2429     _Out_
2430     PDEVPROPTYPE Type
2431     )
2432 {
2433     PAGED_CODE_LOCKED();
2434     return ((PFN_WDFDEVICEQUERYPROPERTYEX) WdfVersion.Functions.pfnWdfDeviceQueryPropertyEx)(DriverGlobals, Device, DeviceProperty, BufferLength, PropertyBuffer, RequiredSize, Type);
2435 }
2436 
2437 _Must_inspect_result_
2438 _IRQL_requires_max_(APC_LEVEL)
2439 WDFAPI
2440 NTSTATUS
2441 VFWDFEXPORT(WdfDeviceAllocAndQueryPropertyEx)(
2442     _In_
2443     PWDF_DRIVER_GLOBALS DriverGlobals,
2444     _In_
2445     WDFDEVICE Device,
2446     _In_
2447     PWDF_DEVICE_PROPERTY_DATA DeviceProperty,
2448     _In_
2449     _Strict_type_match_
2450     POOL_TYPE PoolType,
2451     _In_opt_
2452     PWDF_OBJECT_ATTRIBUTES PropertyMemoryAttributes,
2453     _Out_
2454     WDFMEMORY* PropertyMemory,
2455     _Out_
2456     PDEVPROPTYPE Type
2457     )
2458 {
2459     PAGED_CODE_LOCKED();
2460     return ((PFN_WDFDEVICEALLOCANDQUERYPROPERTYEX) WdfVersion.Functions.pfnWdfDeviceAllocAndQueryPropertyEx)(DriverGlobals, Device, DeviceProperty, PoolType, PropertyMemoryAttributes, PropertyMemory, Type);
2461 }
2462 
2463 _Must_inspect_result_
2464 _IRQL_requires_max_(APC_LEVEL)
2465 WDFAPI
2466 NTSTATUS
2467 VFWDFEXPORT(WdfDeviceAssignProperty)(
2468     _In_
2469     PWDF_DRIVER_GLOBALS DriverGlobals,
2470     _In_
2471     WDFDEVICE Device,
2472     _In_
2473     PWDF_DEVICE_PROPERTY_DATA DeviceProperty,
2474     _In_
2475     DEVPROPTYPE Type,
2476     _In_
2477     ULONG Size,
2478     _In_opt_
2479     PVOID Data
2480     )
2481 {
2482     PAGED_CODE_LOCKED();
2483     return ((PFN_WDFDEVICEASSIGNPROPERTY) WdfVersion.Functions.pfnWdfDeviceAssignProperty)(DriverGlobals, Device, DeviceProperty, Type, Size, Data);
2484 }
2485 
2486 _IRQL_requires_max_(DISPATCH_LEVEL)
2487 WDFAPI
2488 WDFIOTARGET
2489 VFWDFEXPORT(WdfDeviceGetSelfIoTarget)(
2490     _In_
2491     PWDF_DRIVER_GLOBALS DriverGlobals,
2492     _In_
2493     WDFDEVICE Device
2494     )
2495 {
2496     PAGED_CODE_LOCKED();
2497     return ((PFN_WDFDEVICEGETSELFIOTARGET) WdfVersion.Functions.pfnWdfDeviceGetSelfIoTarget)(DriverGlobals, Device);
2498 }
2499 
2500 _IRQL_requires_max_(DISPATCH_LEVEL)
2501 WDFAPI
2502 VOID
2503 VFWDFEXPORT(WdfDeviceInitAllowSelfIoTarget)(
2504     _In_
2505     PWDF_DRIVER_GLOBALS DriverGlobals,
2506     _In_
2507     PWDFDEVICE_INIT DeviceInit
2508     )
2509 {
2510     PAGED_CODE_LOCKED();
2511     ((PFN_WDFDEVICEINITALLOWSELFIOTARGET) WdfVersion.Functions.pfnWdfDeviceInitAllowSelfIoTarget)(DriverGlobals, DeviceInit);
2512 }
2513 
2514 _Must_inspect_result_
2515 _IRQL_requires_max_(PASSIVE_LEVEL)
2516 WDFAPI
2517 NTSTATUS
2518 VFWDFEXPORT(WdfDmaEnablerCreate)(
2519     _In_
2520     PWDF_DRIVER_GLOBALS DriverGlobals,
2521     _In_
2522     WDFDEVICE Device,
2523     _In_
2524     PWDF_DMA_ENABLER_CONFIG Config,
2525     _In_opt_
2526     PWDF_OBJECT_ATTRIBUTES Attributes,
2527     _Out_
2528     WDFDMAENABLER* DmaEnablerHandle
2529     )
2530 {
2531     PAGED_CODE_LOCKED();
2532     return ((PFN_WDFDMAENABLERCREATE) WdfVersion.Functions.pfnWdfDmaEnablerCreate)(DriverGlobals, Device, Config, Attributes, DmaEnablerHandle);
2533 }
2534 
2535 _Must_inspect_result_
2536 _IRQL_requires_max_(PASSIVE_LEVEL)
2537 WDFAPI
2538 NTSTATUS
2539 VFWDFEXPORT(WdfDmaEnablerConfigureSystemProfile)(
2540     _In_
2541     PWDF_DRIVER_GLOBALS DriverGlobals,
2542     _In_
2543     WDFDMAENABLER DmaEnabler,
2544     _In_
2545     PWDF_DMA_SYSTEM_PROFILE_CONFIG ProfileConfig,
2546     _In_
2547     WDF_DMA_DIRECTION ConfigDirection
2548     )
2549 {
2550     PAGED_CODE_LOCKED();
2551     return ((PFN_WDFDMAENABLERCONFIGURESYSTEMPROFILE) WdfVersion.Functions.pfnWdfDmaEnablerConfigureSystemProfile)(DriverGlobals, DmaEnabler, ProfileConfig, ConfigDirection);
2552 }
2553 
2554 _IRQL_requires_max_(DISPATCH_LEVEL)
2555 WDFAPI
2556 size_t
2557 VFWDFEXPORT(WdfDmaEnablerGetMaximumLength)(
2558     _In_
2559     PWDF_DRIVER_GLOBALS DriverGlobals,
2560     _In_
2561     WDFDMAENABLER DmaEnabler
2562     )
2563 {
2564     PAGED_CODE_LOCKED();
2565     return ((PFN_WDFDMAENABLERGETMAXIMUMLENGTH) WdfVersion.Functions.pfnWdfDmaEnablerGetMaximumLength)(DriverGlobals, DmaEnabler);
2566 }
2567 
2568 _IRQL_requires_max_(DISPATCH_LEVEL)
2569 WDFAPI
2570 size_t
2571 VFWDFEXPORT(WdfDmaEnablerGetMaximumScatterGatherElements)(
2572     _In_
2573     PWDF_DRIVER_GLOBALS DriverGlobals,
2574     _In_
2575     WDFDMAENABLER DmaEnabler
2576     )
2577 {
2578     PAGED_CODE_LOCKED();
2579     return ((PFN_WDFDMAENABLERGETMAXIMUMSCATTERGATHERELEMENTS) WdfVersion.Functions.pfnWdfDmaEnablerGetMaximumScatterGatherElements)(DriverGlobals, DmaEnabler);
2580 }
2581 
2582 _IRQL_requires_max_(PASSIVE_LEVEL)
2583 WDFAPI
2584 VOID
2585 VFWDFEXPORT(WdfDmaEnablerSetMaximumScatterGatherElements)(
2586     _In_
2587     PWDF_DRIVER_GLOBALS DriverGlobals,
2588     _In_
2589     WDFDMAENABLER DmaEnabler,
2590     _In_
2591     _When_(MaximumFragments == 0, __drv_reportError(MaximumFragments cannot be zero))
2592     size_t MaximumFragments
2593     )
2594 {
2595     PAGED_CODE_LOCKED();
2596     ((PFN_WDFDMAENABLERSETMAXIMUMSCATTERGATHERELEMENTS) WdfVersion.Functions.pfnWdfDmaEnablerSetMaximumScatterGatherElements)(DriverGlobals, DmaEnabler, MaximumFragments);
2597 }
2598 
2599 _IRQL_requires_max_(DISPATCH_LEVEL)
2600 WDFAPI
2601 size_t
2602 VFWDFEXPORT(WdfDmaEnablerGetFragmentLength)(
2603     _In_
2604     PWDF_DRIVER_GLOBALS DriverGlobals,
2605     _In_
2606     WDFDMAENABLER DmaEnabler,
2607     _In_
2608     WDF_DMA_DIRECTION DmaDirection
2609     )
2610 {
2611     PAGED_CODE_LOCKED();
2612     return ((PFN_WDFDMAENABLERGETFRAGMENTLENGTH) WdfVersion.Functions.pfnWdfDmaEnablerGetFragmentLength)(DriverGlobals, DmaEnabler, DmaDirection);
2613 }
2614 
2615 _IRQL_requires_max_(DISPATCH_LEVEL)
2616 WDFAPI
2617 PDMA_ADAPTER
2618 VFWDFEXPORT(WdfDmaEnablerWdmGetDmaAdapter)(
2619     _In_
2620     PWDF_DRIVER_GLOBALS DriverGlobals,
2621     _In_
2622     WDFDMAENABLER DmaEnabler,
2623     _In_
2624     WDF_DMA_DIRECTION DmaDirection
2625     )
2626 {
2627     PAGED_CODE_LOCKED();
2628     return ((PFN_WDFDMAENABLERWDMGETDMAADAPTER) WdfVersion.Functions.pfnWdfDmaEnablerWdmGetDmaAdapter)(DriverGlobals, DmaEnabler, DmaDirection);
2629 }
2630 
2631 _Must_inspect_result_
2632 _IRQL_requires_max_(DISPATCH_LEVEL)
2633 WDFAPI
2634 NTSTATUS
2635 VFWDFEXPORT(WdfDmaTransactionCreate)(
2636     _In_
2637     PWDF_DRIVER_GLOBALS DriverGlobals,
2638     _In_
2639     WDFDMAENABLER DmaEnabler,
2640     _In_opt_
2641     PWDF_OBJECT_ATTRIBUTES Attributes,
2642     _Out_
2643     WDFDMATRANSACTION* DmaTransaction
2644     )
2645 {
2646     PAGED_CODE_LOCKED();
2647     return ((PFN_WDFDMATRANSACTIONCREATE) WdfVersion.Functions.pfnWdfDmaTransactionCreate)(DriverGlobals, DmaEnabler, Attributes, DmaTransaction);
2648 }
2649 
2650 _Must_inspect_result_
2651 _IRQL_requires_max_(DISPATCH_LEVEL)
2652 WDFAPI
2653 NTSTATUS
2654 VFWDFEXPORT(WdfDmaTransactionInitialize)(
2655     _In_
2656     PWDF_DRIVER_GLOBALS DriverGlobals,
2657     _In_
2658     WDFDMATRANSACTION DmaTransaction,
2659     _In_
2660     PFN_WDF_PROGRAM_DMA EvtProgramDmaFunction,
2661     _In_
2662     WDF_DMA_DIRECTION DmaDirection,
2663     _In_
2664     PMDL Mdl,
2665     _In_
2666     PVOID VirtualAddress,
2667     _In_
2668     _When_(Length == 0, __drv_reportError(Length cannot be zero))
2669     size_t Length
2670     )
2671 {
2672     PAGED_CODE_LOCKED();
2673     return ((PFN_WDFDMATRANSACTIONINITIALIZE) WdfVersion.Functions.pfnWdfDmaTransactionInitialize)(DriverGlobals, DmaTransaction, EvtProgramDmaFunction, DmaDirection, Mdl, VirtualAddress, Length);
2674 }
2675 
2676 _Must_inspect_result_
2677 _IRQL_requires_max_(DISPATCH_LEVEL)
2678 WDFAPI
2679 NTSTATUS
2680 VFWDFEXPORT(WdfDmaTransactionInitializeUsingOffset)(
2681     _In_
2682     PWDF_DRIVER_GLOBALS DriverGlobals,
2683     _In_
2684     WDFDMATRANSACTION DmaTransaction,
2685     _In_
2686     PFN_WDF_PROGRAM_DMA EvtProgramDmaFunction,
2687     _In_
2688     WDF_DMA_DIRECTION DmaDirection,
2689     _In_
2690     PMDL Mdl,
2691     _In_
2692     size_t Offset,
2693     _In_
2694     _When_(Length == 0, __drv_reportError(Length cannot be zero))
2695     size_t Length
2696     )
2697 {
2698     PAGED_CODE_LOCKED();
2699     return ((PFN_WDFDMATRANSACTIONINITIALIZEUSINGOFFSET) WdfVersion.Functions.pfnWdfDmaTransactionInitializeUsingOffset)(DriverGlobals, DmaTransaction, EvtProgramDmaFunction, DmaDirection, Mdl, Offset, Length);
2700 }
2701 
2702 _Must_inspect_result_
2703 _IRQL_requires_max_(DISPATCH_LEVEL)
2704 WDFAPI
2705 NTSTATUS
2706 VFWDFEXPORT(WdfDmaTransactionInitializeUsingRequest)(
2707     _In_
2708     PWDF_DRIVER_GLOBALS DriverGlobals,
2709     _In_
2710     WDFDMATRANSACTION DmaTransaction,
2711     _In_
2712     WDFREQUEST Request,
2713     _In_
2714     PFN_WDF_PROGRAM_DMA EvtProgramDmaFunction,
2715     _In_
2716     WDF_DMA_DIRECTION DmaDirection
2717     )
2718 {
2719     PAGED_CODE_LOCKED();
2720     return ((PFN_WDFDMATRANSACTIONINITIALIZEUSINGREQUEST) WdfVersion.Functions.pfnWdfDmaTransactionInitializeUsingRequest)(DriverGlobals, DmaTransaction, Request, EvtProgramDmaFunction, DmaDirection);
2721 }
2722 
2723 _Must_inspect_result_
2724 _IRQL_requires_max_(DISPATCH_LEVEL)
2725 WDFAPI
2726 NTSTATUS
2727 VFWDFEXPORT(WdfDmaTransactionExecute)(
2728     _In_
2729     PWDF_DRIVER_GLOBALS DriverGlobals,
2730     _In_
2731     WDFDMATRANSACTION DmaTransaction,
2732     _In_opt_
2733     WDFCONTEXT Context
2734     )
2735 {
2736     PAGED_CODE_LOCKED();
2737     return ((PFN_WDFDMATRANSACTIONEXECUTE) WdfVersion.Functions.pfnWdfDmaTransactionExecute)(DriverGlobals, DmaTransaction, Context);
2738 }
2739 
2740 _Success_(TRUE)
2741 _IRQL_requires_max_(DISPATCH_LEVEL)
2742 WDFAPI
2743 NTSTATUS
2744 VFWDFEXPORT(WdfDmaTransactionRelease)(
2745     _In_
2746     PWDF_DRIVER_GLOBALS DriverGlobals,
2747     _In_
2748     WDFDMATRANSACTION DmaTransaction
2749     )
2750 {
2751     PAGED_CODE_LOCKED();
2752     return ((PFN_WDFDMATRANSACTIONRELEASE) WdfVersion.Functions.pfnWdfDmaTransactionRelease)(DriverGlobals, DmaTransaction);
2753 }
2754 
2755 _IRQL_requires_max_(DISPATCH_LEVEL)
2756 WDFAPI
2757 BOOLEAN
2758 VFWDFEXPORT(WdfDmaTransactionDmaCompleted)(
2759     _In_
2760     PWDF_DRIVER_GLOBALS DriverGlobals,
2761     _In_
2762     WDFDMATRANSACTION DmaTransaction,
2763     _Out_
2764     NTSTATUS* Status
2765     )
2766 {
2767     PAGED_CODE_LOCKED();
2768     return ((PFN_WDFDMATRANSACTIONDMACOMPLETED) WdfVersion.Functions.pfnWdfDmaTransactionDmaCompleted)(DriverGlobals, DmaTransaction, Status);
2769 }
2770 
2771 _IRQL_requires_max_(DISPATCH_LEVEL)
2772 WDFAPI
2773 BOOLEAN
2774 VFWDFEXPORT(WdfDmaTransactionDmaCompletedWithLength)(
2775     _In_
2776     PWDF_DRIVER_GLOBALS DriverGlobals,
2777     _In_
2778     WDFDMATRANSACTION DmaTransaction,
2779     _In_
2780     size_t TransferredLength,
2781     _Out_
2782     NTSTATUS* Status
2783     )
2784 {
2785     PAGED_CODE_LOCKED();
2786     return ((PFN_WDFDMATRANSACTIONDMACOMPLETEDWITHLENGTH) WdfVersion.Functions.pfnWdfDmaTransactionDmaCompletedWithLength)(DriverGlobals, DmaTransaction, TransferredLength, Status);
2787 }
2788 
2789 _IRQL_requires_max_(DISPATCH_LEVEL)
2790 WDFAPI
2791 BOOLEAN
2792 VFWDFEXPORT(WdfDmaTransactionDmaCompletedFinal)(
2793     _In_
2794     PWDF_DRIVER_GLOBALS DriverGlobals,
2795     _In_
2796     WDFDMATRANSACTION DmaTransaction,
2797     _In_
2798     size_t FinalTransferredLength,
2799     _Out_
2800     NTSTATUS* Status
2801     )
2802 {
2803     PAGED_CODE_LOCKED();
2804     return ((PFN_WDFDMATRANSACTIONDMACOMPLETEDFINAL) WdfVersion.Functions.pfnWdfDmaTransactionDmaCompletedFinal)(DriverGlobals, DmaTransaction, FinalTransferredLength, Status);
2805 }
2806 
2807 _IRQL_requires_max_(DISPATCH_LEVEL)
2808 WDFAPI
2809 size_t
2810 VFWDFEXPORT(WdfDmaTransactionGetBytesTransferred)(
2811     _In_
2812     PWDF_DRIVER_GLOBALS DriverGlobals,
2813     _In_
2814     WDFDMATRANSACTION DmaTransaction
2815     )
2816 {
2817     PAGED_CODE_LOCKED();
2818     return ((PFN_WDFDMATRANSACTIONGETBYTESTRANSFERRED) WdfVersion.Functions.pfnWdfDmaTransactionGetBytesTransferred)(DriverGlobals, DmaTransaction);
2819 }
2820 
2821 _IRQL_requires_max_(DISPATCH_LEVEL)
2822 WDFAPI
2823 VOID
2824 VFWDFEXPORT(WdfDmaTransactionSetMaximumLength)(
2825     _In_
2826     PWDF_DRIVER_GLOBALS DriverGlobals,
2827     _In_
2828     WDFDMATRANSACTION DmaTransaction,
2829     _In_
2830     size_t MaximumLength
2831     )
2832 {
2833     PAGED_CODE_LOCKED();
2834     ((PFN_WDFDMATRANSACTIONSETMAXIMUMLENGTH) WdfVersion.Functions.pfnWdfDmaTransactionSetMaximumLength)(DriverGlobals, DmaTransaction, MaximumLength);
2835 }
2836 
2837 _IRQL_requires_max_(DISPATCH_LEVEL)
2838 WDFAPI
2839 WDFREQUEST
2840 VFWDFEXPORT(WdfDmaTransactionGetRequest)(
2841     _In_
2842     PWDF_DRIVER_GLOBALS DriverGlobals,
2843     _In_
2844     WDFDMATRANSACTION DmaTransaction
2845     )
2846 {
2847     PAGED_CODE_LOCKED();
2848     return ((PFN_WDFDMATRANSACTIONGETREQUEST) WdfVersion.Functions.pfnWdfDmaTransactionGetRequest)(DriverGlobals, DmaTransaction);
2849 }
2850 
2851 _IRQL_requires_max_(DISPATCH_LEVEL)
2852 WDFAPI
2853 size_t
2854 VFWDFEXPORT(WdfDmaTransactionGetCurrentDmaTransferLength)(
2855     _In_
2856     PWDF_DRIVER_GLOBALS DriverGlobals,
2857     _In_
2858     WDFDMATRANSACTION DmaTransaction
2859     )
2860 {
2861     PAGED_CODE_LOCKED();
2862     return ((PFN_WDFDMATRANSACTIONGETCURRENTDMATRANSFERLENGTH) WdfVersion.Functions.pfnWdfDmaTransactionGetCurrentDmaTransferLength)(DriverGlobals, DmaTransaction);
2863 }
2864 
2865 _IRQL_requires_max_(DISPATCH_LEVEL)
2866 WDFAPI
2867 WDFDEVICE
2868 VFWDFEXPORT(WdfDmaTransactionGetDevice)(
2869     _In_
2870     PWDF_DRIVER_GLOBALS DriverGlobals,
2871     _In_
2872     WDFDMATRANSACTION DmaTransaction
2873     )
2874 {
2875     PAGED_CODE_LOCKED();
2876     return ((PFN_WDFDMATRANSACTIONGETDEVICE) WdfVersion.Functions.pfnWdfDmaTransactionGetDevice)(DriverGlobals, DmaTransaction);
2877 }
2878 
2879 _IRQL_requires_max_(DISPATCH_LEVEL)
2880 WDFAPI
2881 VOID
2882 VFWDFEXPORT(WdfDmaTransactionGetTransferInfo)(
2883     _In_
2884     PWDF_DRIVER_GLOBALS DriverGlobals,
2885     _In_
2886     WDFDMATRANSACTION DmaTransaction,
2887     _Out_opt_
2888     ULONG* MapRegisterCount,
2889     _Out_opt_
2890     ULONG* ScatterGatherElementCount
2891     )
2892 {
2893     PAGED_CODE_LOCKED();
2894     ((PFN_WDFDMATRANSACTIONGETTRANSFERINFO) WdfVersion.Functions.pfnWdfDmaTransactionGetTransferInfo)(DriverGlobals, DmaTransaction, MapRegisterCount, ScatterGatherElementCount);
2895 }
2896 
2897 _IRQL_requires_max_(DISPATCH_LEVEL)
2898 WDFAPI
2899 VOID
2900 VFWDFEXPORT(WdfDmaTransactionSetChannelConfigurationCallback)(
2901     _In_
2902     PWDF_DRIVER_GLOBALS DriverGlobals,
2903     _In_
2904     WDFDMATRANSACTION DmaTransaction,
2905     _In_opt_
2906     PFN_WDF_DMA_TRANSACTION_CONFIGURE_DMA_CHANNEL ConfigureRoutine,
2907     _In_opt_
2908     PVOID ConfigureContext
2909     )
2910 {
2911     PAGED_CODE_LOCKED();
2912     ((PFN_WDFDMATRANSACTIONSETCHANNELCONFIGURATIONCALLBACK) WdfVersion.Functions.pfnWdfDmaTransactionSetChannelConfigurationCallback)(DriverGlobals, DmaTransaction, ConfigureRoutine, ConfigureContext);
2913 }
2914 
2915 _IRQL_requires_max_(DISPATCH_LEVEL)
2916 WDFAPI
2917 VOID
2918 VFWDFEXPORT(WdfDmaTransactionSetTransferCompleteCallback)(
2919     _In_
2920     PWDF_DRIVER_GLOBALS DriverGlobals,
2921     _In_
2922     WDFDMATRANSACTION DmaTransaction,
2923     _In_opt_
2924     PFN_WDF_DMA_TRANSACTION_DMA_TRANSFER_COMPLETE DmaCompletionRoutine,
2925     _In_opt_
2926     PVOID DmaCompletionContext
2927     )
2928 {
2929     PAGED_CODE_LOCKED();
2930     ((PFN_WDFDMATRANSACTIONSETTRANSFERCOMPLETECALLBACK) WdfVersion.Functions.pfnWdfDmaTransactionSetTransferCompleteCallback)(DriverGlobals, DmaTransaction, DmaCompletionRoutine, DmaCompletionContext);
2931 }
2932 
2933 _IRQL_requires_max_(DISPATCH_LEVEL)
2934 WDFAPI
2935 VOID
2936 VFWDFEXPORT(WdfDmaTransactionSetImmediateExecution)(
2937     _In_
2938     PWDF_DRIVER_GLOBALS DriverGlobals,
2939     _In_
2940     WDFDMATRANSACTION DmaTransaction,
2941     _In_
2942     BOOLEAN UseImmediateExecution
2943     )
2944 {
2945     PAGED_CODE_LOCKED();
2946     ((PFN_WDFDMATRANSACTIONSETIMMEDIATEEXECUTION) WdfVersion.Functions.pfnWdfDmaTransactionSetImmediateExecution)(DriverGlobals, DmaTransaction, UseImmediateExecution);
2947 }
2948 
2949 _IRQL_requires_max_(DISPATCH_LEVEL)
2950 WDFAPI
2951 NTSTATUS
2952 VFWDFEXPORT(WdfDmaTransactionAllocateResources)(
2953     _In_
2954     PWDF_DRIVER_GLOBALS DriverGlobals,
2955     _In_
2956     WDFDMATRANSACTION DmaTransaction,
2957     _In_
2958     WDF_DMA_DIRECTION DmaDirection,
2959     _In_
2960     ULONG RequiredMapRegisters,
2961     _In_
2962     PFN_WDF_RESERVE_DMA EvtReserveDmaFunction,
2963     _In_
2964     PVOID EvtReserveDmaContext
2965     )
2966 {
2967     PAGED_CODE_LOCKED();
2968     return ((PFN_WDFDMATRANSACTIONALLOCATERESOURCES) WdfVersion.Functions.pfnWdfDmaTransactionAllocateResources)(DriverGlobals, DmaTransaction, DmaDirection, RequiredMapRegisters, EvtReserveDmaFunction, EvtReserveDmaContext);
2969 }
2970 
2971 _IRQL_requires_max_(DISPATCH_LEVEL)
2972 WDFAPI
2973 VOID
2974 VFWDFEXPORT(WdfDmaTransactionSetDeviceAddressOffset)(
2975     _In_
2976     PWDF_DRIVER_GLOBALS DriverGlobals,
2977     _In_
2978     WDFDMATRANSACTION DmaTransaction,
2979     _In_
2980     ULONG Offset
2981     )
2982 {
2983     PAGED_CODE_LOCKED();
2984     ((PFN_WDFDMATRANSACTIONSETDEVICEADDRESSOFFSET) WdfVersion.Functions.pfnWdfDmaTransactionSetDeviceAddressOffset)(DriverGlobals, DmaTransaction, Offset);
2985 }
2986 
2987 _IRQL_requires_max_(DISPATCH_LEVEL)
2988 WDFAPI
2989 VOID
2990 VFWDFEXPORT(WdfDmaTransactionFreeResources)(
2991     _In_
2992     PWDF_DRIVER_GLOBALS DriverGlobals,
2993     _In_
2994     WDFDMATRANSACTION DmaTransaction
2995     )
2996 {
2997     PAGED_CODE_LOCKED();
2998     ((PFN_WDFDMATRANSACTIONFREERESOURCES) WdfVersion.Functions.pfnWdfDmaTransactionFreeResources)(DriverGlobals, DmaTransaction);
2999 }
3000 
3001 _IRQL_requires_max_(DISPATCH_LEVEL)
3002 WDFAPI
3003 BOOLEAN
3004 VFWDFEXPORT(WdfDmaTransactionCancel)(
3005     _In_
3006     PWDF_DRIVER_GLOBALS DriverGlobals,
3007     _In_
3008     WDFDMATRANSACTION DmaTransaction
3009     )
3010 {
3011     PAGED_CODE_LOCKED();
3012     return ((PFN_WDFDMATRANSACTIONCANCEL) WdfVersion.Functions.pfnWdfDmaTransactionCancel)(DriverGlobals, DmaTransaction);
3013 }
3014 
3015 _IRQL_requires_max_(DISPATCH_LEVEL)
3016 WDFAPI
3017 PVOID
3018 VFWDFEXPORT(WdfDmaTransactionWdmGetTransferContext)(
3019     _In_
3020     PWDF_DRIVER_GLOBALS DriverGlobals,
3021     _In_
3022     WDFDMATRANSACTION DmaTransaction
3023     )
3024 {
3025     PAGED_CODE_LOCKED();
3026     return ((PFN_WDFDMATRANSACTIONWDMGETTRANSFERCONTEXT) WdfVersion.Functions.pfnWdfDmaTransactionWdmGetTransferContext)(DriverGlobals, DmaTransaction);
3027 }
3028 
3029 _IRQL_requires_max_(DISPATCH_LEVEL)
3030 WDFAPI
3031 VOID
3032 VFWDFEXPORT(WdfDmaTransactionStopSystemTransfer)(
3033     _In_
3034     PWDF_DRIVER_GLOBALS DriverGlobals,
3035     _In_
3036     WDFDMATRANSACTION DmaTransaction
3037     )
3038 {
3039     PAGED_CODE_LOCKED();
3040     ((PFN_WDFDMATRANSACTIONSTOPSYSTEMTRANSFER) WdfVersion.Functions.pfnWdfDmaTransactionStopSystemTransfer)(DriverGlobals, DmaTransaction);
3041 }
3042 
3043 _Must_inspect_result_
3044 _IRQL_requires_max_(DISPATCH_LEVEL)
3045 WDFAPI
3046 NTSTATUS
3047 VFWDFEXPORT(WdfDpcCreate)(
3048     _In_
3049     PWDF_DRIVER_GLOBALS DriverGlobals,
3050     _In_
3051     PWDF_DPC_CONFIG Config,
3052     _In_
3053     PWDF_OBJECT_ATTRIBUTES Attributes,
3054     _Out_
3055     WDFDPC* Dpc
3056     )
3057 {
3058     PAGED_CODE_LOCKED();
3059     return ((PFN_WDFDPCCREATE) WdfVersion.Functions.pfnWdfDpcCreate)(DriverGlobals, Config, Attributes, Dpc);
3060 }
3061 
3062 _IRQL_requires_max_(HIGH_LEVEL)
3063 WDFAPI
3064 BOOLEAN
3065 VFWDFEXPORT(WdfDpcEnqueue)(
3066     _In_
3067     PWDF_DRIVER_GLOBALS DriverGlobals,
3068     _In_
3069     WDFDPC Dpc
3070     )
3071 {
3072     PAGED_CODE_LOCKED();
3073     return ((PFN_WDFDPCENQUEUE) WdfVersion.Functions.pfnWdfDpcEnqueue)(DriverGlobals, Dpc);
3074 }
3075 
3076 _When_(Wait == __true, _IRQL_requires_max_(PASSIVE_LEVEL))
3077 _When_(Wait == __false, _IRQL_requires_max_(HIGH_LEVEL))
3078 WDFAPI
3079 BOOLEAN
3080 VFWDFEXPORT(WdfDpcCancel)(
3081     _In_
3082     PWDF_DRIVER_GLOBALS DriverGlobals,
3083     _In_
3084     WDFDPC Dpc,
3085     _In_
3086     BOOLEAN Wait
3087     )
3088 {
3089     PAGED_CODE_LOCKED();
3090     return ((PFN_WDFDPCCANCEL) WdfVersion.Functions.pfnWdfDpcCancel)(DriverGlobals, Dpc, Wait);
3091 }
3092 
3093 _IRQL_requires_max_(HIGH_LEVEL)
3094 WDFAPI
3095 WDFOBJECT
3096 VFWDFEXPORT(WdfDpcGetParentObject)(
3097     _In_
3098     PWDF_DRIVER_GLOBALS DriverGlobals,
3099     _In_
3100     WDFDPC Dpc
3101     )
3102 {
3103     PAGED_CODE_LOCKED();
3104     return ((PFN_WDFDPCGETPARENTOBJECT) WdfVersion.Functions.pfnWdfDpcGetParentObject)(DriverGlobals, Dpc);
3105 }
3106 
3107 _IRQL_requires_max_(HIGH_LEVEL)
3108 WDFAPI
3109 PKDPC
3110 VFWDFEXPORT(WdfDpcWdmGetDpc)(
3111     _In_
3112     PWDF_DRIVER_GLOBALS DriverGlobals,
3113     _In_
3114     WDFDPC Dpc
3115     )
3116 {
3117     PAGED_CODE_LOCKED();
3118     return ((PFN_WDFDPCWDMGETDPC) WdfVersion.Functions.pfnWdfDpcWdmGetDpc)(DriverGlobals, Dpc);
3119 }
3120 
3121 _Must_inspect_result_
3122 _IRQL_requires_max_(PASSIVE_LEVEL)
3123 WDFAPI
3124 NTSTATUS
3125 VFWDFEXPORT(WdfDriverCreate)(
3126     _In_
3127     PWDF_DRIVER_GLOBALS DriverGlobals,
3128     _In_
3129     PDRIVER_OBJECT DriverObject,
3130     _In_
3131     PCUNICODE_STRING RegistryPath,
3132     _In_opt_
3133     PWDF_OBJECT_ATTRIBUTES DriverAttributes,
3134     _In_
3135     PWDF_DRIVER_CONFIG DriverConfig,
3136     _Out_opt_
3137     WDFDRIVER* Driver
3138     )
3139 {
3140     PAGED_CODE_LOCKED();
3141     return ((PFN_WDFDRIVERCREATE) WdfVersion.Functions.pfnWdfDriverCreate)(DriverGlobals, DriverObject, RegistryPath, DriverAttributes, DriverConfig, Driver);
3142 }
3143 
3144 _IRQL_requires_max_(PASSIVE_LEVEL)
3145 WDFAPI
3146 PWSTR
3147 VFWDFEXPORT(WdfDriverGetRegistryPath)(
3148     _In_
3149     PWDF_DRIVER_GLOBALS DriverGlobals,
3150     _In_
3151     WDFDRIVER Driver
3152     )
3153 {
3154     PAGED_CODE_LOCKED();
3155     return ((PFN_WDFDRIVERGETREGISTRYPATH) WdfVersion.Functions.pfnWdfDriverGetRegistryPath)(DriverGlobals, Driver);
3156 }
3157 
3158 _IRQL_requires_max_(DISPATCH_LEVEL)
3159 WDFAPI
3160 PDRIVER_OBJECT
3161 VFWDFEXPORT(WdfDriverWdmGetDriverObject)(
3162     _In_
3163     PWDF_DRIVER_GLOBALS DriverGlobals,
3164     _In_
3165     WDFDRIVER Driver
3166     )
3167 {
3168     PAGED_CODE_LOCKED();
3169     return ((PFN_WDFDRIVERWDMGETDRIVEROBJECT) WdfVersion.Functions.pfnWdfDriverWdmGetDriverObject)(DriverGlobals, Driver);
3170 }
3171 
3172 _Must_inspect_result_
3173 _IRQL_requires_max_(PASSIVE_LEVEL)
3174 WDFAPI
3175 NTSTATUS
3176 VFWDFEXPORT(WdfDriverOpenParametersRegistryKey)(
3177     _In_
3178     PWDF_DRIVER_GLOBALS DriverGlobals,
3179     _In_
3180     WDFDRIVER Driver,
3181     _In_
3182     ACCESS_MASK DesiredAccess,
3183     _In_opt_
3184     PWDF_OBJECT_ATTRIBUTES KeyAttributes,
3185     _Out_
3186     WDFKEY* Key
3187     )
3188 {
3189     PAGED_CODE_LOCKED();
3190     return ((PFN_WDFDRIVEROPENPARAMETERSREGISTRYKEY) WdfVersion.Functions.pfnWdfDriverOpenParametersRegistryKey)(DriverGlobals, Driver, DesiredAccess, KeyAttributes, Key);
3191 }
3192 
3193 _IRQL_requires_max_(DISPATCH_LEVEL)
3194 WDFAPI
3195 WDFDRIVER
3196 VFWDFEXPORT(WdfWdmDriverGetWdfDriverHandle)(
3197     _In_
3198     PWDF_DRIVER_GLOBALS DriverGlobals,
3199     _In_
3200     PDRIVER_OBJECT DriverObject
3201     )
3202 {
3203     PAGED_CODE_LOCKED();
3204     return ((PFN_WDFWDMDRIVERGETWDFDRIVERHANDLE) WdfVersion.Functions.pfnWdfWdmDriverGetWdfDriverHandle)(DriverGlobals, DriverObject);
3205 }
3206 
3207 _Must_inspect_result_
3208 _IRQL_requires_max_(PASSIVE_LEVEL)
3209 WDFAPI
3210 NTSTATUS
3211 VFWDFEXPORT(WdfDriverRegisterTraceInfo)(
3212     _In_
3213     PWDF_DRIVER_GLOBALS DriverGlobals,
3214     _In_
3215     PDRIVER_OBJECT DriverObject,
3216     _In_
3217     PFN_WDF_TRACE_CALLBACK EvtTraceCallback,
3218     _In_
3219     PVOID ControlBlock
3220     )
3221 {
3222     PAGED_CODE_LOCKED();
3223     return ((PFN_WDFDRIVERREGISTERTRACEINFO) WdfVersion.Functions.pfnWdfDriverRegisterTraceInfo)(DriverGlobals, DriverObject, EvtTraceCallback, ControlBlock);
3224 }
3225 
3226 _Must_inspect_result_
3227 _IRQL_requires_max_(PASSIVE_LEVEL)
3228 WDFAPI
3229 NTSTATUS
3230 VFWDFEXPORT(WdfDriverRetrieveVersionString)(
3231     _In_
3232     PWDF_DRIVER_GLOBALS DriverGlobals,
3233     _In_
3234     WDFDRIVER Driver,
3235     _In_
3236     WDFSTRING String
3237     )
3238 {
3239     PAGED_CODE_LOCKED();
3240     return ((PFN_WDFDRIVERRETRIEVEVERSIONSTRING) WdfVersion.Functions.pfnWdfDriverRetrieveVersionString)(DriverGlobals, Driver, String);
3241 }
3242 
3243 _Must_inspect_result_
3244 _IRQL_requires_max_(PASSIVE_LEVEL)
3245 WDFAPI
3246 BOOLEAN
3247 VFWDFEXPORT(WdfDriverIsVersionAvailable)(
3248     _In_
3249     PWDF_DRIVER_GLOBALS DriverGlobals,
3250     _In_
3251     WDFDRIVER Driver,
3252     _In_
3253     PWDF_DRIVER_VERSION_AVAILABLE_PARAMS VersionAvailableParams
3254     )
3255 {
3256     PAGED_CODE_LOCKED();
3257     return ((PFN_WDFDRIVERISVERSIONAVAILABLE) WdfVersion.Functions.pfnWdfDriverIsVersionAvailable)(DriverGlobals, Driver, VersionAvailableParams);
3258 }
3259 
3260 _IRQL_requires_max_(DISPATCH_LEVEL)
3261 WDFAPI
3262 PDEVICE_OBJECT
3263 VFWDFEXPORT(WdfFdoInitWdmGetPhysicalDevice)(
3264     _In_
3265     PWDF_DRIVER_GLOBALS DriverGlobals,
3266     _In_
3267     PWDFDEVICE_INIT DeviceInit
3268     )
3269 {
3270     PAGED_CODE_LOCKED();
3271     return ((PFN_WDFFDOINITWDMGETPHYSICALDEVICE) WdfVersion.Functions.pfnWdfFdoInitWdmGetPhysicalDevice)(DriverGlobals, DeviceInit);
3272 }
3273 
3274 _Must_inspect_result_
3275 _IRQL_requires_max_(PASSIVE_LEVEL)
3276 WDFAPI
3277 NTSTATUS
3278 VFWDFEXPORT(WdfFdoInitOpenRegistryKey)(
3279     _In_
3280     PWDF_DRIVER_GLOBALS DriverGlobals,
3281     _In_
3282     PWDFDEVICE_INIT DeviceInit,
3283     _In_
3284     ULONG DeviceInstanceKeyType,
3285     _In_
3286     ACCESS_MASK DesiredAccess,
3287     _In_opt_
3288     PWDF_OBJECT_ATTRIBUTES KeyAttributes,
3289     _Out_
3290     WDFKEY* Key
3291     )
3292 {
3293     PAGED_CODE_LOCKED();
3294     return ((PFN_WDFFDOINITOPENREGISTRYKEY) WdfVersion.Functions.pfnWdfFdoInitOpenRegistryKey)(DriverGlobals, DeviceInit, DeviceInstanceKeyType, DesiredAccess, KeyAttributes, Key);
3295 }
3296 
3297 _Must_inspect_result_
3298 _IRQL_requires_max_(PASSIVE_LEVEL)
3299 WDFAPI
3300 NTSTATUS
3301 VFWDFEXPORT(WdfFdoInitQueryProperty)(
3302     _In_
3303     PWDF_DRIVER_GLOBALS DriverGlobals,
3304     _In_
3305     PWDFDEVICE_INIT DeviceInit,
3306     _In_
3307     DEVICE_REGISTRY_PROPERTY DeviceProperty,
3308     _In_
3309     ULONG BufferLength,
3310     _Out_writes_bytes_all_opt_(BufferLength)
3311     PVOID PropertyBuffer,
3312     _Out_
3313     PULONG ResultLength
3314     )
3315 {
3316     PAGED_CODE_LOCKED();
3317     return ((PFN_WDFFDOINITQUERYPROPERTY) WdfVersion.Functions.pfnWdfFdoInitQueryProperty)(DriverGlobals, DeviceInit, DeviceProperty, BufferLength, PropertyBuffer, ResultLength);
3318 }
3319 
3320 _Must_inspect_result_
3321 _IRQL_requires_max_(PASSIVE_LEVEL)
3322 WDFAPI
3323 NTSTATUS
3324 VFWDFEXPORT(WdfFdoInitAllocAndQueryProperty)(
3325     _In_
3326     PWDF_DRIVER_GLOBALS DriverGlobals,
3327     _In_
3328     PWDFDEVICE_INIT DeviceInit,
3329     _In_
3330     DEVICE_REGISTRY_PROPERTY DeviceProperty,
3331     _In_
3332     _Strict_type_match_
3333     POOL_TYPE PoolType,
3334     _In_opt_
3335     PWDF_OBJECT_ATTRIBUTES PropertyMemoryAttributes,
3336     _Out_
3337     WDFMEMORY* PropertyMemory
3338     )
3339 {
3340     PAGED_CODE_LOCKED();
3341     return ((PFN_WDFFDOINITALLOCANDQUERYPROPERTY) WdfVersion.Functions.pfnWdfFdoInitAllocAndQueryProperty)(DriverGlobals, DeviceInit, DeviceProperty, PoolType, PropertyMemoryAttributes, PropertyMemory);
3342 }
3343 
3344 _Must_inspect_result_
3345 _IRQL_requires_max_(PASSIVE_LEVEL)
3346 WDFAPI
3347 NTSTATUS
3348 VFWDFEXPORT(WdfFdoInitQueryPropertyEx)(
3349     _In_
3350     PWDF_DRIVER_GLOBALS DriverGlobals,
3351     _In_
3352     PWDFDEVICE_INIT DeviceInit,
3353     _In_
3354     PWDF_DEVICE_PROPERTY_DATA DeviceProperty,
3355     _In_
3356     ULONG BufferLength,
3357     _Out_
3358     PVOID PropertyBuffer,
3359     _Out_
3360     PULONG ResultLength,
3361     _Out_
3362     PDEVPROPTYPE Type
3363     )
3364 {
3365     PAGED_CODE_LOCKED();
3366     return ((PFN_WDFFDOINITQUERYPROPERTYEX) WdfVersion.Functions.pfnWdfFdoInitQueryPropertyEx)(DriverGlobals, DeviceInit, DeviceProperty, BufferLength, PropertyBuffer, ResultLength, Type);
3367 }
3368 
3369 _Must_inspect_result_
3370 _IRQL_requires_max_(PASSIVE_LEVEL)
3371 WDFAPI
3372 NTSTATUS
3373 VFWDFEXPORT(WdfFdoInitAllocAndQueryPropertyEx)(
3374     _In_
3375     PWDF_DRIVER_GLOBALS DriverGlobals,
3376     _In_
3377     PWDFDEVICE_INIT DeviceInit,
3378     _In_
3379     PWDF_DEVICE_PROPERTY_DATA DeviceProperty,
3380     _In_
3381     _Strict_type_match_
3382     POOL_TYPE PoolType,
3383     _In_opt_
3384     PWDF_OBJECT_ATTRIBUTES PropertyMemoryAttributes,
3385     _Out_
3386     WDFMEMORY* PropertyMemory,
3387     _Out_
3388     PDEVPROPTYPE Type
3389     )
3390 {
3391     PAGED_CODE_LOCKED();
3392     return ((PFN_WDFFDOINITALLOCANDQUERYPROPERTYEX) WdfVersion.Functions.pfnWdfFdoInitAllocAndQueryPropertyEx)(DriverGlobals, DeviceInit, DeviceProperty, PoolType, PropertyMemoryAttributes, PropertyMemory, Type);
3393 }
3394 
3395 _IRQL_requires_max_(PASSIVE_LEVEL)
3396 WDFAPI
3397 VOID
3398 VFWDFEXPORT(WdfFdoInitSetEventCallbacks)(
3399     _In_
3400     PWDF_DRIVER_GLOBALS DriverGlobals,
3401     _In_
3402     PWDFDEVICE_INIT DeviceInit,
3403     _In_
3404     PWDF_FDO_EVENT_CALLBACKS FdoEventCallbacks
3405     )
3406 {
3407     PAGED_CODE_LOCKED();
3408     ((PFN_WDFFDOINITSETEVENTCALLBACKS) WdfVersion.Functions.pfnWdfFdoInitSetEventCallbacks)(DriverGlobals, DeviceInit, FdoEventCallbacks);
3409 }
3410 
3411 _IRQL_requires_max_(PASSIVE_LEVEL)
3412 WDFAPI
3413 VOID
3414 VFWDFEXPORT(WdfFdoInitSetFilter)(
3415     _In_
3416     PWDF_DRIVER_GLOBALS DriverGlobals,
3417     _In_
3418     PWDFDEVICE_INIT DeviceInit
3419     )
3420 {
3421     PAGED_CODE_LOCKED();
3422     ((PFN_WDFFDOINITSETFILTER) WdfVersion.Functions.pfnWdfFdoInitSetFilter)(DriverGlobals, DeviceInit);
3423 }
3424 
3425 _IRQL_requires_max_(PASSIVE_LEVEL)
3426 WDFAPI
3427 VOID
3428 VFWDFEXPORT(WdfFdoInitSetDefaultChildListConfig)(
3429     _In_
3430     PWDF_DRIVER_GLOBALS DriverGlobals,
3431     _Inout_
3432     PWDFDEVICE_INIT DeviceInit,
3433     _In_
3434     PWDF_CHILD_LIST_CONFIG Config,
3435     _In_opt_
3436     PWDF_OBJECT_ATTRIBUTES DefaultChildListAttributes
3437     )
3438 {
3439     PAGED_CODE_LOCKED();
3440     ((PFN_WDFFDOINITSETDEFAULTCHILDLISTCONFIG) WdfVersion.Functions.pfnWdfFdoInitSetDefaultChildListConfig)(DriverGlobals, DeviceInit, Config, DefaultChildListAttributes);
3441 }
3442 
3443 _Must_inspect_result_
3444 _IRQL_requires_max_(PASSIVE_LEVEL)
3445 WDFAPI
3446 NTSTATUS
3447 VFWDFEXPORT(WdfFdoQueryForInterface)(
3448     _In_
3449     PWDF_DRIVER_GLOBALS DriverGlobals,
3450     _In_
3451     WDFDEVICE Fdo,
3452     _In_
3453     LPCGUID InterfaceType,
3454     _Out_
3455     PINTERFACE Interface,
3456     _In_
3457     USHORT Size,
3458     _In_
3459     USHORT Version,
3460     _In_opt_
3461     PVOID InterfaceSpecificData
3462     )
3463 {
3464     PAGED_CODE_LOCKED();
3465     return ((PFN_WDFFDOQUERYFORINTERFACE) WdfVersion.Functions.pfnWdfFdoQueryForInterface)(DriverGlobals, Fdo, InterfaceType, Interface, Size, Version, InterfaceSpecificData);
3466 }
3467 
3468 _IRQL_requires_max_(DISPATCH_LEVEL)
3469 WDFAPI
3470 WDFCHILDLIST
3471 VFWDFEXPORT(WdfFdoGetDefaultChildList)(
3472     _In_
3473     PWDF_DRIVER_GLOBALS DriverGlobals,
3474     _In_
3475     WDFDEVICE Fdo
3476     )
3477 {
3478     PAGED_CODE_LOCKED();
3479     return ((PFN_WDFFDOGETDEFAULTCHILDLIST) WdfVersion.Functions.pfnWdfFdoGetDefaultChildList)(DriverGlobals, Fdo);
3480 }
3481 
3482 _Must_inspect_result_
3483 _IRQL_requires_max_(DISPATCH_LEVEL)
3484 WDFAPI
3485 NTSTATUS
3486 VFWDFEXPORT(WdfFdoAddStaticChild)(
3487     _In_
3488     PWDF_DRIVER_GLOBALS DriverGlobals,
3489     _In_
3490     WDFDEVICE Fdo,
3491     _In_
3492     WDFDEVICE Child
3493     )
3494 {
3495     PAGED_CODE_LOCKED();
3496     return ((PFN_WDFFDOADDSTATICCHILD) WdfVersion.Functions.pfnWdfFdoAddStaticChild)(DriverGlobals, Fdo, Child);
3497 }
3498 
3499 _IRQL_requires_max_(DISPATCH_LEVEL)
3500 WDFAPI
3501 VOID
3502 VFWDFEXPORT(WdfFdoLockStaticChildListForIteration)(
3503     _In_
3504     PWDF_DRIVER_GLOBALS DriverGlobals,
3505     _In_
3506     WDFDEVICE Fdo
3507     )
3508 {
3509     PAGED_CODE_LOCKED();
3510     ((PFN_WDFFDOLOCKSTATICCHILDLISTFORITERATION) WdfVersion.Functions.pfnWdfFdoLockStaticChildListForIteration)(DriverGlobals, Fdo);
3511 }
3512 
3513 _Must_inspect_result_
3514 _IRQL_requires_max_(DISPATCH_LEVEL)
3515 WDFAPI
3516 WDFDEVICE
3517 VFWDFEXPORT(WdfFdoRetrieveNextStaticChild)(
3518     _In_
3519     PWDF_DRIVER_GLOBALS DriverGlobals,
3520     _In_
3521     WDFDEVICE Fdo,
3522     _In_opt_
3523     WDFDEVICE PreviousChild,
3524     _In_
3525     ULONG Flags
3526     )
3527 {
3528     PAGED_CODE_LOCKED();
3529     return ((PFN_WDFFDORETRIEVENEXTSTATICCHILD) WdfVersion.Functions.pfnWdfFdoRetrieveNextStaticChild)(DriverGlobals, Fdo, PreviousChild, Flags);
3530 }
3531 
3532 _IRQL_requires_max_(DISPATCH_LEVEL)
3533 WDFAPI
3534 VOID
3535 VFWDFEXPORT(WdfFdoUnlockStaticChildListFromIteration)(
3536     _In_
3537     PWDF_DRIVER_GLOBALS DriverGlobals,
3538     _In_
3539     WDFDEVICE Fdo
3540     )
3541 {
3542     PAGED_CODE_LOCKED();
3543     ((PFN_WDFFDOUNLOCKSTATICCHILDLISTFROMITERATION) WdfVersion.Functions.pfnWdfFdoUnlockStaticChildListFromIteration)(DriverGlobals, Fdo);
3544 }
3545 
3546 _IRQL_requires_max_(PASSIVE_LEVEL)
3547 WDFAPI
3548 PUNICODE_STRING
3549 VFWDFEXPORT(WdfFileObjectGetFileName)(
3550     _In_
3551     PWDF_DRIVER_GLOBALS DriverGlobals,
3552     _In_
3553     WDFFILEOBJECT FileObject
3554     )
3555 {
3556     PAGED_CODE_LOCKED();
3557     return ((PFN_WDFFILEOBJECTGETFILENAME) WdfVersion.Functions.pfnWdfFileObjectGetFileName)(DriverGlobals, FileObject);
3558 }
3559 
3560 _IRQL_requires_max_(DISPATCH_LEVEL)
3561 WDFAPI
3562 ULONG
3563 VFWDFEXPORT(WdfFileObjectGetFlags)(
3564     _In_
3565     PWDF_DRIVER_GLOBALS DriverGlobals,
3566     _In_
3567     WDFFILEOBJECT FileObject
3568     )
3569 {
3570     PAGED_CODE_LOCKED();
3571     return ((PFN_WDFFILEOBJECTGETFLAGS) WdfVersion.Functions.pfnWdfFileObjectGetFlags)(DriverGlobals, FileObject);
3572 }
3573 
3574 _IRQL_requires_max_(DISPATCH_LEVEL)
3575 WDFAPI
3576 WDFDEVICE
3577 VFWDFEXPORT(WdfFileObjectGetDevice)(
3578     _In_
3579     PWDF_DRIVER_GLOBALS DriverGlobals,
3580     _In_
3581     WDFFILEOBJECT FileObject
3582     )
3583 {
3584     PAGED_CODE_LOCKED();
3585     return ((PFN_WDFFILEOBJECTGETDEVICE) WdfVersion.Functions.pfnWdfFileObjectGetDevice)(DriverGlobals, FileObject);
3586 }
3587 
3588 _IRQL_requires_max_(DISPATCH_LEVEL)
3589 WDFAPI
3590 PFILE_OBJECT
3591 VFWDFEXPORT(WdfFileObjectWdmGetFileObject)(
3592     _In_
3593     PWDF_DRIVER_GLOBALS DriverGlobals,
3594     _In_
3595     WDFFILEOBJECT FileObject
3596     )
3597 {
3598     PAGED_CODE_LOCKED();
3599     return ((PFN_WDFFILEOBJECTWDMGETFILEOBJECT) WdfVersion.Functions.pfnWdfFileObjectWdmGetFileObject)(DriverGlobals, FileObject);
3600 }
3601 
3602 _Must_inspect_result_
3603 _IRQL_requires_max_(DISPATCH_LEVEL)
3604 WDFAPI
3605 NTSTATUS
3606 VFWDFEXPORT(WdfInterruptCreate)(
3607     _In_
3608     PWDF_DRIVER_GLOBALS DriverGlobals,
3609     _In_
3610     WDFDEVICE Device,
3611     _In_
3612     PWDF_INTERRUPT_CONFIG Configuration,
3613     _In_opt_
3614     PWDF_OBJECT_ATTRIBUTES Attributes,
3615     _Out_
3616     WDFINTERRUPT* Interrupt
3617     )
3618 {
3619     PAGED_CODE_LOCKED();
3620     return ((PFN_WDFINTERRUPTCREATE) WdfVersion.Functions.pfnWdfInterruptCreate)(DriverGlobals, Device, Configuration, Attributes, Interrupt);
3621 }
3622 
3623 WDFAPI
3624 BOOLEAN
3625 VFWDFEXPORT(WdfInterruptQueueDpcForIsr)(
3626     _In_
3627     PWDF_DRIVER_GLOBALS DriverGlobals,
3628     _In_
3629     WDFINTERRUPT Interrupt
3630     )
3631 {
3632     PAGED_CODE_LOCKED();
3633     return ((PFN_WDFINTERRUPTQUEUEDPCFORISR) WdfVersion.Functions.pfnWdfInterruptQueueDpcForIsr)(DriverGlobals, Interrupt);
3634 }
3635 
3636 WDFAPI
3637 BOOLEAN
3638 VFWDFEXPORT(WdfInterruptQueueWorkItemForIsr)(
3639     _In_
3640     PWDF_DRIVER_GLOBALS DriverGlobals,
3641     _In_
3642     WDFINTERRUPT Interrupt
3643     )
3644 {
3645     PAGED_CODE_LOCKED();
3646     return ((PFN_WDFINTERRUPTQUEUEWORKITEMFORISR) WdfVersion.Functions.pfnWdfInterruptQueueWorkItemForIsr)(DriverGlobals, Interrupt);
3647 }
3648 
3649 _IRQL_requires_max_(DISPATCH_LEVEL)
3650 WDFAPI
3651 BOOLEAN
3652 VFWDFEXPORT(WdfInterruptSynchronize)(
3653     _In_
3654     PWDF_DRIVER_GLOBALS DriverGlobals,
3655     _In_
3656     WDFINTERRUPT Interrupt,
3657     _In_
3658     PFN_WDF_INTERRUPT_SYNCHRONIZE Callback,
3659     _In_
3660     WDFCONTEXT Context
3661     )
3662 {
3663     PAGED_CODE_LOCKED();
3664     return ((PFN_WDFINTERRUPTSYNCHRONIZE) WdfVersion.Functions.pfnWdfInterruptSynchronize)(DriverGlobals, Interrupt, Callback, Context);
3665 }
3666 
3667 _IRQL_requires_max_(DISPATCH_LEVEL + 1)
3668 WDFAPI
3669 VOID
3670 VFWDFEXPORT(WdfInterruptAcquireLock)(
3671     _In_
3672     PWDF_DRIVER_GLOBALS DriverGlobals,
3673     _In_
3674     _Requires_lock_not_held_(_Curr_)
3675     _Acquires_lock_(_Curr_)
3676     WDFINTERRUPT Interrupt
3677     )
3678 {
3679     PAGED_CODE_LOCKED();
3680     ((PFN_WDFINTERRUPTACQUIRELOCK) WdfVersion.Functions.pfnWdfInterruptAcquireLock)(DriverGlobals, Interrupt);
3681 }
3682 
3683 _IRQL_requires_max_(DISPATCH_LEVEL + 1)
3684 WDFAPI
3685 VOID
3686 VFWDFEXPORT(WdfInterruptReleaseLock)(
3687     _In_
3688     PWDF_DRIVER_GLOBALS DriverGlobals,
3689     _In_
3690     _Requires_lock_held_(_Curr_)
3691     _Releases_lock_(_Curr_)
3692     WDFINTERRUPT Interrupt
3693     )
3694 {
3695     PAGED_CODE_LOCKED();
3696     ((PFN_WDFINTERRUPTRELEASELOCK) WdfVersion.Functions.pfnWdfInterruptReleaseLock)(DriverGlobals, Interrupt);
3697 }
3698 
3699 _IRQL_requires_max_(PASSIVE_LEVEL)
3700 WDFAPI
3701 VOID
3702 VFWDFEXPORT(WdfInterruptEnable)(
3703     _In_
3704     PWDF_DRIVER_GLOBALS DriverGlobals,
3705     _In_
3706     WDFINTERRUPT Interrupt
3707     )
3708 {
3709     PAGED_CODE_LOCKED();
3710     ((PFN_WDFINTERRUPTENABLE) WdfVersion.Functions.pfnWdfInterruptEnable)(DriverGlobals, Interrupt);
3711 }
3712 
3713 _IRQL_requires_max_(PASSIVE_LEVEL)
3714 WDFAPI
3715 VOID
3716 VFWDFEXPORT(WdfInterruptDisable)(
3717     _In_
3718     PWDF_DRIVER_GLOBALS DriverGlobals,
3719     _In_
3720     WDFINTERRUPT Interrupt
3721     )
3722 {
3723     PAGED_CODE_LOCKED();
3724     ((PFN_WDFINTERRUPTDISABLE) WdfVersion.Functions.pfnWdfInterruptDisable)(DriverGlobals, Interrupt);
3725 }
3726 
3727 _Must_inspect_result_
3728 WDFAPI
3729 PKINTERRUPT
3730 VFWDFEXPORT(WdfInterruptWdmGetInterrupt)(
3731     _In_
3732     PWDF_DRIVER_GLOBALS DriverGlobals,
3733     _In_
3734     WDFINTERRUPT Interrupt
3735     )
3736 {
3737     PAGED_CODE_LOCKED();
3738     return ((PFN_WDFINTERRUPTWDMGETINTERRUPT) WdfVersion.Functions.pfnWdfInterruptWdmGetInterrupt)(DriverGlobals, Interrupt);
3739 }
3740 
3741 _IRQL_requires_max_(DISPATCH_LEVEL)
3742 WDFAPI
3743 VOID
3744 VFWDFEXPORT(WdfInterruptGetInfo)(
3745     _In_
3746     PWDF_DRIVER_GLOBALS DriverGlobals,
3747     _In_
3748     WDFINTERRUPT Interrupt,
3749     _Out_
3750     PWDF_INTERRUPT_INFO Info
3751     )
3752 {
3753     PAGED_CODE_LOCKED();
3754     ((PFN_WDFINTERRUPTGETINFO) WdfVersion.Functions.pfnWdfInterruptGetInfo)(DriverGlobals, Interrupt, Info);
3755 }
3756 
3757 _IRQL_requires_max_(DISPATCH_LEVEL)
3758 WDFAPI
3759 VOID
3760 VFWDFEXPORT(WdfInterruptSetPolicy)(
3761     _In_
3762     PWDF_DRIVER_GLOBALS DriverGlobals,
3763     _In_
3764     WDFINTERRUPT Interrupt,
3765     _In_
3766     WDF_INTERRUPT_POLICY Policy,
3767     _In_
3768     WDF_INTERRUPT_PRIORITY Priority,
3769     _In_
3770     KAFFINITY TargetProcessorSet
3771     )
3772 {
3773     PAGED_CODE_LOCKED();
3774     ((PFN_WDFINTERRUPTSETPOLICY) WdfVersion.Functions.pfnWdfInterruptSetPolicy)(DriverGlobals, Interrupt, Policy, Priority, TargetProcessorSet);
3775 }
3776 
3777 _IRQL_requires_max_(DISPATCH_LEVEL)
3778 WDFAPI
3779 VOID
3780 VFWDFEXPORT(WdfInterruptSetExtendedPolicy)(
3781     _In_
3782     PWDF_DRIVER_GLOBALS DriverGlobals,
3783     _In_
3784     WDFINTERRUPT Interrupt,
3785     _In_
3786     PWDF_INTERRUPT_EXTENDED_POLICY PolicyAndGroup
3787     )
3788 {
3789     PAGED_CODE_LOCKED();
3790     ((PFN_WDFINTERRUPTSETEXTENDEDPOLICY) WdfVersion.Functions.pfnWdfInterruptSetExtendedPolicy)(DriverGlobals, Interrupt, PolicyAndGroup);
3791 }
3792 
3793 WDFAPI
3794 WDFDEVICE
3795 VFWDFEXPORT(WdfInterruptGetDevice)(
3796     _In_
3797     PWDF_DRIVER_GLOBALS DriverGlobals,
3798     _In_
3799     WDFINTERRUPT Interrupt
3800     )
3801 {
3802     PAGED_CODE_LOCKED();
3803     return ((PFN_WDFINTERRUPTGETDEVICE) WdfVersion.Functions.pfnWdfInterruptGetDevice)(DriverGlobals, Interrupt);
3804 }
3805 
3806 _Must_inspect_result_
3807 _Post_satisfies_(return == 1 || return == 0)
3808 _IRQL_requires_max_(PASSIVE_LEVEL)
3809 WDFAPI
3810 BOOLEAN
3811 VFWDFEXPORT(WdfInterruptTryToAcquireLock)(
3812     _In_
3813     PWDF_DRIVER_GLOBALS DriverGlobals,
3814     _In_
3815     _Requires_lock_not_held_(_Curr_)
3816     _When_(return!=0, _Acquires_lock_(_Curr_))
3817     WDFINTERRUPT Interrupt
3818     )
3819 {
3820     PAGED_CODE_LOCKED();
3821     return ((PFN_WDFINTERRUPTTRYTOACQUIRELOCK) WdfVersion.Functions.pfnWdfInterruptTryToAcquireLock)(DriverGlobals, Interrupt);
3822 }
3823 
3824 _IRQL_requires_max_(DISPATCH_LEVEL)
3825 WDFAPI
3826 VOID
3827 VFWDFEXPORT(WdfInterruptReportActive)(
3828     _In_
3829     PWDF_DRIVER_GLOBALS DriverGlobals,
3830     _In_
3831     WDFINTERRUPT Interrupt
3832     )
3833 {
3834     PAGED_CODE_LOCKED();
3835     ((PFN_WDFINTERRUPTREPORTACTIVE) WdfVersion.Functions.pfnWdfInterruptReportActive)(DriverGlobals, Interrupt);
3836 }
3837 
3838 _IRQL_requires_max_(DISPATCH_LEVEL)
3839 WDFAPI
3840 VOID
3841 VFWDFEXPORT(WdfInterruptReportInactive)(
3842     _In_
3843     PWDF_DRIVER_GLOBALS DriverGlobals,
3844     _In_
3845     WDFINTERRUPT Interrupt
3846     )
3847 {
3848     PAGED_CODE_LOCKED();
3849     ((PFN_WDFINTERRUPTREPORTINACTIVE) WdfVersion.Functions.pfnWdfInterruptReportInactive)(DriverGlobals, Interrupt);
3850 }
3851 
3852 _Must_inspect_result_
3853 _IRQL_requires_max_(DISPATCH_LEVEL)
3854 WDFAPI
3855 NTSTATUS
3856 VFWDFEXPORT(WdfIoQueueCreate)(
3857     _In_
3858     PWDF_DRIVER_GLOBALS DriverGlobals,
3859     _In_
3860     WDFDEVICE Device,
3861     _In_
3862     PWDF_IO_QUEUE_CONFIG Config,
3863     _In_opt_
3864     PWDF_OBJECT_ATTRIBUTES QueueAttributes,
3865     _Out_opt_
3866     WDFQUEUE* Queue
3867     )
3868 {
3869     VF_HOOK_PROCESS_INFO hookInfo;
3870     NTSTATUS status;
3871 
3872     PAGED_CODE_LOCKED();
3873     RtlZeroMemory(&hookInfo, sizeof(VF_HOOK_PROCESS_INFO));
3874 
3875     status = AddEventHooksWdfIoQueueCreate(
3876         &hookInfo,
3877         DriverGlobals,
3878         Device,
3879         Config,
3880         QueueAttributes,
3881         Queue);
3882 
3883     UNREFERENCED_PARAMETER(status);
3884 
3885     if (hookInfo.DonotCallKmdfLib) {
3886         return hookInfo.DdiCallStatus;
3887     }
3888 
3889     return ((PFN_WDFIOQUEUECREATE) WdfVersion.Functions.pfnWdfIoQueueCreate)(DriverGlobals, Device, Config, QueueAttributes, Queue);
3890 }
3891 
3892 _IRQL_requires_max_(DISPATCH_LEVEL)
3893 WDFAPI
3894 WDF_IO_QUEUE_STATE
3895 VFWDFEXPORT(WdfIoQueueGetState)(
3896     _In_
3897     PWDF_DRIVER_GLOBALS DriverGlobals,
3898     _In_
3899     WDFQUEUE Queue,
3900     _Out_opt_
3901     PULONG QueueRequests,
3902     _Out_opt_
3903     PULONG DriverRequests
3904     )
3905 {
3906     PAGED_CODE_LOCKED();
3907     return ((PFN_WDFIOQUEUEGETSTATE) WdfVersion.Functions.pfnWdfIoQueueGetState)(DriverGlobals, Queue, QueueRequests, DriverRequests);
3908 }
3909 
3910 _IRQL_requires_max_(DISPATCH_LEVEL)
3911 WDFAPI
3912 VOID
3913 VFWDFEXPORT(WdfIoQueueStart)(
3914     _In_
3915     PWDF_DRIVER_GLOBALS DriverGlobals,
3916     _In_
3917     WDFQUEUE Queue
3918     )
3919 {
3920     PAGED_CODE_LOCKED();
3921     ((PFN_WDFIOQUEUESTART) WdfVersion.Functions.pfnWdfIoQueueStart)(DriverGlobals, Queue);
3922 }
3923 
3924 _IRQL_requires_max_(DISPATCH_LEVEL)
3925 WDFAPI
3926 VOID
3927 VFWDFEXPORT(WdfIoQueueStop)(
3928     _In_
3929     PWDF_DRIVER_GLOBALS DriverGlobals,
3930     _In_
3931     WDFQUEUE Queue,
3932     _When_(Context != 0, _In_)
3933     _When_(Context == 0, _In_opt_)
3934     PFN_WDF_IO_QUEUE_STATE StopComplete,
3935     _When_(StopComplete != 0, _In_)
3936     _When_(StopComplete == 0, _In_opt_)
3937     WDFCONTEXT Context
3938     )
3939 {
3940     PAGED_CODE_LOCKED();
3941     ((PFN_WDFIOQUEUESTOP) WdfVersion.Functions.pfnWdfIoQueueStop)(DriverGlobals, Queue, StopComplete, Context);
3942 }
3943 
3944 _IRQL_requires_max_(PASSIVE_LEVEL)
3945 WDFAPI
3946 VOID
3947 VFWDFEXPORT(WdfIoQueueStopSynchronously)(
3948     _In_
3949     PWDF_DRIVER_GLOBALS DriverGlobals,
3950     _In_
3951     WDFQUEUE Queue
3952     )
3953 {
3954     PAGED_CODE_LOCKED();
3955     ((PFN_WDFIOQUEUESTOPSYNCHRONOUSLY) WdfVersion.Functions.pfnWdfIoQueueStopSynchronously)(DriverGlobals, Queue);
3956 }
3957 
3958 _IRQL_requires_max_(DISPATCH_LEVEL)
3959 WDFAPI
3960 WDFDEVICE
3961 VFWDFEXPORT(WdfIoQueueGetDevice)(
3962     _In_
3963     PWDF_DRIVER_GLOBALS DriverGlobals,
3964     _In_
3965     WDFQUEUE Queue
3966     )
3967 {
3968     PAGED_CODE_LOCKED();
3969     return ((PFN_WDFIOQUEUEGETDEVICE) WdfVersion.Functions.pfnWdfIoQueueGetDevice)(DriverGlobals, Queue);
3970 }
3971 
3972 _Must_inspect_result_
3973 _IRQL_requires_max_(DISPATCH_LEVEL)
3974 WDFAPI
3975 NTSTATUS
3976 VFWDFEXPORT(WdfIoQueueRetrieveNextRequest)(
3977     _In_
3978     PWDF_DRIVER_GLOBALS DriverGlobals,
3979     _In_
3980     WDFQUEUE Queue,
3981     _Out_
3982     WDFREQUEST* OutRequest
3983     )
3984 {
3985     PAGED_CODE_LOCKED();
3986     NTSTATUS rtn = ((PFN_WDFIOQUEUERETRIEVENEXTREQUEST) WdfVersion.Functions.pfnWdfIoQueueRetrieveNextRequest)(DriverGlobals, Queue, OutRequest);
3987     if (rtn == STATUS_SUCCESS) {
3988         PerfIoStart(*OutRequest);
3989     }
3990     return rtn;
3991 }
3992 
3993 _Must_inspect_result_
3994 _IRQL_requires_max_(DISPATCH_LEVEL)
3995 WDFAPI
3996 NTSTATUS
3997 VFWDFEXPORT(WdfIoQueueRetrieveRequestByFileObject)(
3998     _In_
3999     PWDF_DRIVER_GLOBALS DriverGlobals,
4000     _In_
4001     WDFQUEUE Queue,
4002     _In_
4003     WDFFILEOBJECT FileObject,
4004     _Out_
4005     WDFREQUEST* OutRequest
4006     )
4007 {
4008     PAGED_CODE_LOCKED();
4009     NTSTATUS rtn = ((PFN_WDFIOQUEUERETRIEVEREQUESTBYFILEOBJECT) WdfVersion.Functions.pfnWdfIoQueueRetrieveRequestByFileObject)(DriverGlobals, Queue, FileObject, OutRequest);
4010     if (rtn == STATUS_SUCCESS) {
4011         PerfIoStart(*OutRequest);
4012     }
4013     return rtn;
4014 }
4015 
4016 _Must_inspect_result_
4017 _IRQL_requires_max_(DISPATCH_LEVEL)
4018 WDFAPI
4019 NTSTATUS
4020 VFWDFEXPORT(WdfIoQueueFindRequest)(
4021     _In_
4022     PWDF_DRIVER_GLOBALS DriverGlobals,
4023     _In_
4024     WDFQUEUE Queue,
4025     _In_opt_
4026     WDFREQUEST FoundRequest,
4027     _In_opt_
4028     WDFFILEOBJECT FileObject,
4029     _Inout_opt_
4030     PWDF_REQUEST_PARAMETERS Parameters,
4031     _Out_
4032     WDFREQUEST* OutRequest
4033     )
4034 {
4035     PAGED_CODE_LOCKED();
4036     return ((PFN_WDFIOQUEUEFINDREQUEST) WdfVersion.Functions.pfnWdfIoQueueFindRequest)(DriverGlobals, Queue, FoundRequest, FileObject, Parameters, OutRequest);
4037 }
4038 
4039 _Must_inspect_result_
4040 _IRQL_requires_max_(DISPATCH_LEVEL)
4041 WDFAPI
4042 NTSTATUS
4043 VFWDFEXPORT(WdfIoQueueRetrieveFoundRequest)(
4044     _In_
4045     PWDF_DRIVER_GLOBALS DriverGlobals,
4046     _In_
4047     WDFQUEUE Queue,
4048     _In_
4049     WDFREQUEST FoundRequest,
4050     _Out_
4051     WDFREQUEST* OutRequest
4052     )
4053 {
4054     PAGED_CODE_LOCKED();
4055     NTSTATUS rtn = ((PFN_WDFIOQUEUERETRIEVEFOUNDREQUEST) WdfVersion.Functions.pfnWdfIoQueueRetrieveFoundRequest)(DriverGlobals, Queue, FoundRequest, OutRequest);
4056     if (rtn == STATUS_SUCCESS) {
4057         PerfIoStart(*OutRequest);
4058     }
4059     return rtn;
4060 }
4061 
4062 _IRQL_requires_max_(PASSIVE_LEVEL)
4063 WDFAPI
4064 VOID
4065 VFWDFEXPORT(WdfIoQueueDrainSynchronously)(
4066     _In_
4067     PWDF_DRIVER_GLOBALS DriverGlobals,
4068     _In_
4069     WDFQUEUE Queue
4070     )
4071 {
4072     PAGED_CODE_LOCKED();
4073     ((PFN_WDFIOQUEUEDRAINSYNCHRONOUSLY) WdfVersion.Functions.pfnWdfIoQueueDrainSynchronously)(DriverGlobals, Queue);
4074 }
4075 
4076 _IRQL_requires_max_(DISPATCH_LEVEL)
4077 WDFAPI
4078 VOID
4079 VFWDFEXPORT(WdfIoQueueDrain)(
4080     _In_
4081     PWDF_DRIVER_GLOBALS DriverGlobals,
4082     _In_
4083     WDFQUEUE Queue,
4084     _When_(Context != 0, _In_)
4085     _When_(Context == 0, _In_opt_)
4086     PFN_WDF_IO_QUEUE_STATE DrainComplete,
4087     _When_(DrainComplete != 0, _In_)
4088     _When_(DrainComplete == 0, _In_opt_)
4089     WDFCONTEXT Context
4090     )
4091 {
4092     PAGED_CODE_LOCKED();
4093     ((PFN_WDFIOQUEUEDRAIN) WdfVersion.Functions.pfnWdfIoQueueDrain)(DriverGlobals, Queue, DrainComplete, Context);
4094 }
4095 
4096 _IRQL_requires_max_(PASSIVE_LEVEL)
4097 WDFAPI
4098 VOID
4099 VFWDFEXPORT(WdfIoQueuePurgeSynchronously)(
4100     _In_
4101     PWDF_DRIVER_GLOBALS DriverGlobals,
4102     _In_
4103     WDFQUEUE Queue
4104     )
4105 {
4106     PAGED_CODE_LOCKED();
4107     ((PFN_WDFIOQUEUEPURGESYNCHRONOUSLY) WdfVersion.Functions.pfnWdfIoQueuePurgeSynchronously)(DriverGlobals, Queue);
4108 }
4109 
4110 _IRQL_requires_max_(DISPATCH_LEVEL)
4111 WDFAPI
4112 VOID
4113 VFWDFEXPORT(WdfIoQueuePurge)(
4114     _In_
4115     PWDF_DRIVER_GLOBALS DriverGlobals,
4116     _In_
4117     WDFQUEUE Queue,
4118     _When_(Context != 0, _In_)
4119     _When_(Context == 0, _In_opt_)
4120     PFN_WDF_IO_QUEUE_STATE PurgeComplete,
4121     _When_(PurgeComplete != 0, _In_)
4122     _When_(PurgeComplete == 0, _In_opt_)
4123     WDFCONTEXT Context
4124     )
4125 {
4126     PAGED_CODE_LOCKED();
4127     ((PFN_WDFIOQUEUEPURGE) WdfVersion.Functions.pfnWdfIoQueuePurge)(DriverGlobals, Queue, PurgeComplete, Context);
4128 }
4129 
4130 _Must_inspect_result_
4131 _IRQL_requires_max_(DISPATCH_LEVEL)
4132 WDFAPI
4133 NTSTATUS
4134 VFWDFEXPORT(WdfIoQueueReadyNotify)(
4135     _In_
4136     PWDF_DRIVER_GLOBALS DriverGlobals,
4137     _In_
4138     WDFQUEUE Queue,
4139     _In_opt_
4140     PFN_WDF_IO_QUEUE_STATE QueueReady,
4141     _In_opt_
4142     WDFCONTEXT Context
4143     )
4144 {
4145     PAGED_CODE_LOCKED();
4146     return ((PFN_WDFIOQUEUEREADYNOTIFY) WdfVersion.Functions.pfnWdfIoQueueReadyNotify)(DriverGlobals, Queue, QueueReady, Context);
4147 }
4148 
4149 _Must_inspect_result_
4150 _IRQL_requires_max_(PASSIVE_LEVEL)
4151 WDFAPI
4152 NTSTATUS
4153 VFWDFEXPORT(WdfIoQueueAssignForwardProgressPolicy)(
4154     _In_
4155     PWDF_DRIVER_GLOBALS DriverGlobals,
4156     _In_
4157     WDFQUEUE Queue,
4158     _In_
4159     PWDF_IO_QUEUE_FORWARD_PROGRESS_POLICY ForwardProgressPolicy
4160     )
4161 {
4162     PAGED_CODE_LOCKED();
4163     return ((PFN_WDFIOQUEUEASSIGNFORWARDPROGRESSPOLICY) WdfVersion.Functions.pfnWdfIoQueueAssignForwardProgressPolicy)(DriverGlobals, Queue, ForwardProgressPolicy);
4164 }
4165 
4166 _IRQL_requires_max_(DISPATCH_LEVEL)
4167 WDFAPI
4168 VOID
4169 VFWDFEXPORT(WdfIoQueueStopAndPurge)(
4170     _In_
4171     PWDF_DRIVER_GLOBALS DriverGlobals,
4172     _In_
4173     WDFQUEUE Queue,
4174     _When_(Context != 0, _In_)
4175     _When_(Context == 0, _In_opt_)
4176     PFN_WDF_IO_QUEUE_STATE StopAndPurgeComplete,
4177     _When_(StopAndPurgeComplete != 0, _In_)
4178     _When_(StopAndPurgeComplete == 0, _In_opt_)
4179     WDFCONTEXT Context
4180     )
4181 {
4182     PAGED_CODE_LOCKED();
4183     ((PFN_WDFIOQUEUESTOPANDPURGE) WdfVersion.Functions.pfnWdfIoQueueStopAndPurge)(DriverGlobals, Queue, StopAndPurgeComplete, Context);
4184 }
4185 
4186 _IRQL_requires_max_(PASSIVE_LEVEL)
4187 WDFAPI
4188 VOID
4189 VFWDFEXPORT(WdfIoQueueStopAndPurgeSynchronously)(
4190     _In_
4191     PWDF_DRIVER_GLOBALS DriverGlobals,
4192     _In_
4193     WDFQUEUE Queue
4194     )
4195 {
4196     PAGED_CODE_LOCKED();
4197     ((PFN_WDFIOQUEUESTOPANDPURGESYNCHRONOUSLY) WdfVersion.Functions.pfnWdfIoQueueStopAndPurgeSynchronously)(DriverGlobals, Queue);
4198 }
4199 
4200 _Must_inspect_result_
4201 _IRQL_requires_max_(PASSIVE_LEVEL)
4202 WDFAPI
4203 NTSTATUS
4204 VFWDFEXPORT(WdfIoTargetCreate)(
4205     _In_
4206     PWDF_DRIVER_GLOBALS DriverGlobals,
4207     _In_
4208     WDFDEVICE Device,
4209     _In_opt_
4210     PWDF_OBJECT_ATTRIBUTES IoTargetAttributes,
4211     _Out_
4212     WDFIOTARGET* IoTarget
4213     )
4214 {
4215     PAGED_CODE_LOCKED();
4216     return ((PFN_WDFIOTARGETCREATE) WdfVersion.Functions.pfnWdfIoTargetCreate)(DriverGlobals, Device, IoTargetAttributes, IoTarget);
4217 }
4218 
4219 _Must_inspect_result_
4220 _IRQL_requires_max_(PASSIVE_LEVEL)
4221 WDFAPI
4222 NTSTATUS
4223 VFWDFEXPORT(WdfIoTargetOpen)(
4224     _In_
4225     PWDF_DRIVER_GLOBALS DriverGlobals,
4226     _In_
4227     WDFIOTARGET IoTarget,
4228     _In_
4229     PWDF_IO_TARGET_OPEN_PARAMS OpenParams
4230     )
4231 {
4232     PAGED_CODE_LOCKED();
4233     return ((PFN_WDFIOTARGETOPEN) WdfVersion.Functions.pfnWdfIoTargetOpen)(DriverGlobals, IoTarget, OpenParams);
4234 }
4235 
4236 _IRQL_requires_max_(PASSIVE_LEVEL)
4237 WDFAPI
4238 VOID
4239 VFWDFEXPORT(WdfIoTargetCloseForQueryRemove)(
4240     _In_
4241     PWDF_DRIVER_GLOBALS DriverGlobals,
4242     _In_
4243     WDFIOTARGET IoTarget
4244     )
4245 {
4246     PAGED_CODE_LOCKED();
4247     ((PFN_WDFIOTARGETCLOSEFORQUERYREMOVE) WdfVersion.Functions.pfnWdfIoTargetCloseForQueryRemove)(DriverGlobals, IoTarget);
4248 }
4249 
4250 _IRQL_requires_max_(PASSIVE_LEVEL)
4251 WDFAPI
4252 VOID
4253 VFWDFEXPORT(WdfIoTargetClose)(
4254     _In_
4255     PWDF_DRIVER_GLOBALS DriverGlobals,
4256     _In_
4257     WDFIOTARGET IoTarget
4258     )
4259 {
4260     PAGED_CODE_LOCKED();
4261     ((PFN_WDFIOTARGETCLOSE) WdfVersion.Functions.pfnWdfIoTargetClose)(DriverGlobals, IoTarget);
4262 }
4263 
4264 _Must_inspect_result_
4265 _IRQL_requires_max_(DISPATCH_LEVEL)
4266 WDFAPI
4267 NTSTATUS
4268 VFWDFEXPORT(WdfIoTargetStart)(
4269     _In_
4270     PWDF_DRIVER_GLOBALS DriverGlobals,
4271     _In_
4272     WDFIOTARGET IoTarget
4273     )
4274 {
4275     PAGED_CODE_LOCKED();
4276     return ((PFN_WDFIOTARGETSTART) WdfVersion.Functions.pfnWdfIoTargetStart)(DriverGlobals, IoTarget);
4277 }
4278 
4279 _When_(Action == 3, _IRQL_requires_max_(DISPATCH_LEVEL))
4280 _When_(Action == 0 || Action == 1 || Action == 2, _IRQL_requires_max_(PASSIVE_LEVEL))
4281 WDFAPI
4282 VOID
4283 VFWDFEXPORT(WdfIoTargetStop)(
4284     _In_
4285     PWDF_DRIVER_GLOBALS DriverGlobals,
4286     _In_
4287     WDFIOTARGET IoTarget,
4288     _In_
4289     _Strict_type_match_
4290     WDF_IO_TARGET_SENT_IO_ACTION Action
4291     )
4292 {
4293     PAGED_CODE_LOCKED();
4294     ((PFN_WDFIOTARGETSTOP) WdfVersion.Functions.pfnWdfIoTargetStop)(DriverGlobals, IoTarget, Action);
4295 }
4296 
4297 _When_(Action == 2, _IRQL_requires_max_(DISPATCH_LEVEL))
4298 _When_(Action == 0 || Action == 1, _IRQL_requires_max_(PASSIVE_LEVEL))
4299 WDFAPI
4300 VOID
4301 VFWDFEXPORT(WdfIoTargetPurge)(
4302     _In_
4303     PWDF_DRIVER_GLOBALS DriverGlobals,
4304     _In_
4305     WDFIOTARGET IoTarget,
4306     _In_
4307     _Strict_type_match_
4308     WDF_IO_TARGET_PURGE_IO_ACTION Action
4309     )
4310 {
4311     PAGED_CODE_LOCKED();
4312     ((PFN_WDFIOTARGETPURGE) WdfVersion.Functions.pfnWdfIoTargetPurge)(DriverGlobals, IoTarget, Action);
4313 }
4314 
4315 _IRQL_requires_max_(DISPATCH_LEVEL)
4316 WDFAPI
4317 WDF_IO_TARGET_STATE
4318 VFWDFEXPORT(WdfIoTargetGetState)(
4319     _In_
4320     PWDF_DRIVER_GLOBALS DriverGlobals,
4321     _In_
4322     WDFIOTARGET IoTarget
4323     )
4324 {
4325     PAGED_CODE_LOCKED();
4326     return ((PFN_WDFIOTARGETGETSTATE) WdfVersion.Functions.pfnWdfIoTargetGetState)(DriverGlobals, IoTarget);
4327 }
4328 
4329 _IRQL_requires_max_(DISPATCH_LEVEL)
4330 WDFAPI
4331 WDFDEVICE
4332 VFWDFEXPORT(WdfIoTargetGetDevice)(
4333     _In_
4334     PWDF_DRIVER_GLOBALS DriverGlobals,
4335     _In_
4336     WDFIOTARGET IoTarget
4337     )
4338 {
4339     PAGED_CODE_LOCKED();
4340     return ((PFN_WDFIOTARGETGETDEVICE) WdfVersion.Functions.pfnWdfIoTargetGetDevice)(DriverGlobals, IoTarget);
4341 }
4342 
4343 _Must_inspect_result_
4344 _IRQL_requires_max_(PASSIVE_LEVEL)
4345 WDFAPI
4346 NTSTATUS
4347 VFWDFEXPORT(WdfIoTargetQueryTargetProperty)(
4348     _In_
4349     PWDF_DRIVER_GLOBALS DriverGlobals,
4350     _In_
4351     WDFIOTARGET IoTarget,
4352     _In_
4353     DEVICE_REGISTRY_PROPERTY DeviceProperty,
4354     _In_
4355     ULONG BufferLength,
4356     _When_(BufferLength != 0, _Out_writes_bytes_to_opt_(BufferLength, *ResultLength))
4357     _When_(BufferLength == 0, _Out_opt_)
4358     PVOID PropertyBuffer,
4359     _Deref_out_range_(<=,BufferLength)
4360     PULONG ResultLength
4361     )
4362 {
4363     PAGED_CODE_LOCKED();
4364 #pragma prefast(suppress: __WARNING_HIGH_PRIORITY_OVERFLOW_POSTCONDITION, "This is a verifier DDI hook routine and all it does is call original routine.")
4365     return ((PFN_WDFIOTARGETQUERYTARGETPROPERTY) WdfVersion.Functions.pfnWdfIoTargetQueryTargetProperty)(DriverGlobals, IoTarget, DeviceProperty, BufferLength, PropertyBuffer, ResultLength);
4366 }
4367 
4368 _Must_inspect_result_
4369 _IRQL_requires_max_(PASSIVE_LEVEL)
4370 WDFAPI
4371 NTSTATUS
4372 VFWDFEXPORT(WdfIoTargetAllocAndQueryTargetProperty)(
4373     _In_
4374     PWDF_DRIVER_GLOBALS DriverGlobals,
4375     _In_
4376     WDFIOTARGET IoTarget,
4377     _In_
4378     DEVICE_REGISTRY_PROPERTY DeviceProperty,
4379     _In_
4380     _Strict_type_match_
4381     POOL_TYPE PoolType,
4382     _In_opt_
4383     PWDF_OBJECT_ATTRIBUTES PropertyMemoryAttributes,
4384     _Out_
4385     WDFMEMORY* PropertyMemory
4386     )
4387 {
4388     PAGED_CODE_LOCKED();
4389     return ((PFN_WDFIOTARGETALLOCANDQUERYTARGETPROPERTY) WdfVersion.Functions.pfnWdfIoTargetAllocAndQueryTargetProperty)(DriverGlobals, IoTarget, DeviceProperty, PoolType, PropertyMemoryAttributes, PropertyMemory);
4390 }
4391 
4392 _Must_inspect_result_
4393 _IRQL_requires_max_(PASSIVE_LEVEL)
4394 WDFAPI
4395 NTSTATUS
4396 VFWDFEXPORT(WdfIoTargetQueryForInterface)(
4397     _In_
4398     PWDF_DRIVER_GLOBALS DriverGlobals,
4399     _In_
4400     WDFIOTARGET IoTarget,
4401     _In_
4402     LPCGUID InterfaceType,
4403     _Out_
4404     PINTERFACE Interface,
4405     _In_
4406     USHORT Size,
4407     _In_
4408     USHORT Version,
4409     _In_opt_
4410     PVOID InterfaceSpecificData
4411     )
4412 {
4413     PAGED_CODE_LOCKED();
4414     return ((PFN_WDFIOTARGETQUERYFORINTERFACE) WdfVersion.Functions.pfnWdfIoTargetQueryForInterface)(DriverGlobals, IoTarget, InterfaceType, Interface, Size, Version, InterfaceSpecificData);
4415 }
4416 
4417 _IRQL_requires_max_(DISPATCH_LEVEL)
4418 WDFAPI
4419 PDEVICE_OBJECT
4420 VFWDFEXPORT(WdfIoTargetWdmGetTargetDeviceObject)(
4421     _In_
4422     PWDF_DRIVER_GLOBALS DriverGlobals,
4423     _In_
4424     WDFIOTARGET IoTarget
4425     )
4426 {
4427     PAGED_CODE_LOCKED();
4428     return ((PFN_WDFIOTARGETWDMGETTARGETDEVICEOBJECT) WdfVersion.Functions.pfnWdfIoTargetWdmGetTargetDeviceObject)(DriverGlobals, IoTarget);
4429 }
4430 
4431 _IRQL_requires_max_(DISPATCH_LEVEL)
4432 WDFAPI
4433 PDEVICE_OBJECT
4434 VFWDFEXPORT(WdfIoTargetWdmGetTargetPhysicalDevice)(
4435     _In_
4436     PWDF_DRIVER_GLOBALS DriverGlobals,
4437     _In_
4438     WDFIOTARGET IoTarget
4439     )
4440 {
4441     PAGED_CODE_LOCKED();
4442     return ((PFN_WDFIOTARGETWDMGETTARGETPHYSICALDEVICE) WdfVersion.Functions.pfnWdfIoTargetWdmGetTargetPhysicalDevice)(DriverGlobals, IoTarget);
4443 }
4444 
4445 _IRQL_requires_max_(DISPATCH_LEVEL)
4446 WDFAPI
4447 PFILE_OBJECT
4448 VFWDFEXPORT(WdfIoTargetWdmGetTargetFileObject)(
4449     _In_
4450     PWDF_DRIVER_GLOBALS DriverGlobals,
4451     _In_
4452     WDFIOTARGET IoTarget
4453     )
4454 {
4455     PAGED_CODE_LOCKED();
4456     return ((PFN_WDFIOTARGETWDMGETTARGETFILEOBJECT) WdfVersion.Functions.pfnWdfIoTargetWdmGetTargetFileObject)(DriverGlobals, IoTarget);
4457 }
4458 
4459 _IRQL_requires_max_(DISPATCH_LEVEL)
4460 WDFAPI
4461 HANDLE
4462 VFWDFEXPORT(WdfIoTargetWdmGetTargetFileHandle)(
4463     _In_
4464     PWDF_DRIVER_GLOBALS DriverGlobals,
4465     _In_
4466     WDFIOTARGET IoTarget
4467     )
4468 {
4469     PAGED_CODE_LOCKED();
4470     return ((PFN_WDFIOTARGETWDMGETTARGETFILEHANDLE) WdfVersion.Functions.pfnWdfIoTargetWdmGetTargetFileHandle)(DriverGlobals, IoTarget);
4471 }
4472 
4473 _Must_inspect_result_
4474 _IRQL_requires_max_(PASSIVE_LEVEL)
4475 WDFAPI
4476 NTSTATUS
4477 VFWDFEXPORT(WdfIoTargetSendReadSynchronously)(
4478     _In_
4479     PWDF_DRIVER_GLOBALS DriverGlobals,
4480     _In_
4481     WDFIOTARGET IoTarget,
4482     _In_opt_
4483     WDFREQUEST Request,
4484     _In_opt_
4485     PWDF_MEMORY_DESCRIPTOR OutputBuffer,
4486     _In_opt_
4487     PLONGLONG DeviceOffset,
4488     _In_opt_
4489     PWDF_REQUEST_SEND_OPTIONS RequestOptions,
4490     _Out_opt_
4491     PULONG_PTR BytesRead
4492     )
4493 {
4494     PAGED_CODE_LOCKED();
4495     return ((PFN_WDFIOTARGETSENDREADSYNCHRONOUSLY) WdfVersion.Functions.pfnWdfIoTargetSendReadSynchronously)(DriverGlobals, IoTarget, Request, OutputBuffer, DeviceOffset, RequestOptions, BytesRead);
4496 }
4497 
4498 _Must_inspect_result_
4499 _IRQL_requires_max_(DISPATCH_LEVEL)
4500 WDFAPI
4501 NTSTATUS
4502 VFWDFEXPORT(WdfIoTargetFormatRequestForRead)(
4503     _In_
4504     PWDF_DRIVER_GLOBALS DriverGlobals,
4505     _In_
4506     WDFIOTARGET IoTarget,
4507     _In_
4508     WDFREQUEST Request,
4509     _In_opt_
4510     WDFMEMORY OutputBuffer,
4511     _In_opt_
4512     PWDFMEMORY_OFFSET OutputBufferOffset,
4513     _In_opt_
4514     PLONGLONG DeviceOffset
4515     )
4516 {
4517     PAGED_CODE_LOCKED();
4518     return ((PFN_WDFIOTARGETFORMATREQUESTFORREAD) WdfVersion.Functions.pfnWdfIoTargetFormatRequestForRead)(DriverGlobals, IoTarget, Request, OutputBuffer, OutputBufferOffset, DeviceOffset);
4519 }
4520 
4521 _Must_inspect_result_
4522 _IRQL_requires_max_(PASSIVE_LEVEL)
4523 WDFAPI
4524 NTSTATUS
4525 VFWDFEXPORT(WdfIoTargetSendWriteSynchronously)(
4526     _In_
4527     PWDF_DRIVER_GLOBALS DriverGlobals,
4528     _In_
4529     WDFIOTARGET IoTarget,
4530     _In_opt_
4531     WDFREQUEST Request,
4532     _In_opt_
4533     PWDF_MEMORY_DESCRIPTOR InputBuffer,
4534     _In_opt_
4535     PLONGLONG DeviceOffset,
4536     _In_opt_
4537     PWDF_REQUEST_SEND_OPTIONS RequestOptions,
4538     _Out_opt_
4539     PULONG_PTR BytesWritten
4540     )
4541 {
4542     PAGED_CODE_LOCKED();
4543     return ((PFN_WDFIOTARGETSENDWRITESYNCHRONOUSLY) WdfVersion.Functions.pfnWdfIoTargetSendWriteSynchronously)(DriverGlobals, IoTarget, Request, InputBuffer, DeviceOffset, RequestOptions, BytesWritten);
4544 }
4545 
4546 _Must_inspect_result_
4547 _IRQL_requires_max_(DISPATCH_LEVEL)
4548 WDFAPI
4549 NTSTATUS
4550 VFWDFEXPORT(WdfIoTargetFormatRequestForWrite)(
4551     _In_
4552     PWDF_DRIVER_GLOBALS DriverGlobals,
4553     _In_
4554     WDFIOTARGET IoTarget,
4555     _In_
4556     WDFREQUEST Request,
4557     _In_opt_
4558     WDFMEMORY InputBuffer,
4559     _In_opt_
4560     PWDFMEMORY_OFFSET InputBufferOffset,
4561     _In_opt_
4562     PLONGLONG DeviceOffset
4563     )
4564 {
4565     PAGED_CODE_LOCKED();
4566     return ((PFN_WDFIOTARGETFORMATREQUESTFORWRITE) WdfVersion.Functions.pfnWdfIoTargetFormatRequestForWrite)(DriverGlobals, IoTarget, Request, InputBuffer, InputBufferOffset, DeviceOffset);
4567 }
4568 
4569 _Must_inspect_result_
4570 _IRQL_requires_max_(PASSIVE_LEVEL)
4571 WDFAPI
4572 NTSTATUS
4573 VFWDFEXPORT(WdfIoTargetSendIoctlSynchronously)(
4574     _In_
4575     PWDF_DRIVER_GLOBALS DriverGlobals,
4576     _In_
4577     WDFIOTARGET IoTarget,
4578     _In_opt_
4579     WDFREQUEST Request,
4580     _In_
4581     ULONG IoctlCode,
4582     _In_opt_
4583     PWDF_MEMORY_DESCRIPTOR InputBuffer,
4584     _In_opt_
4585     PWDF_MEMORY_DESCRIPTOR OutputBuffer,
4586     _In_opt_
4587     PWDF_REQUEST_SEND_OPTIONS RequestOptions,
4588     _Out_opt_
4589     PULONG_PTR BytesReturned
4590     )
4591 {
4592     PAGED_CODE_LOCKED();
4593     return ((PFN_WDFIOTARGETSENDIOCTLSYNCHRONOUSLY) WdfVersion.Functions.pfnWdfIoTargetSendIoctlSynchronously)(DriverGlobals, IoTarget, Request, IoctlCode, InputBuffer, OutputBuffer, RequestOptions, BytesReturned);
4594 }
4595 
4596 _Must_inspect_result_
4597 _IRQL_requires_max_(DISPATCH_LEVEL)
4598 WDFAPI
4599 NTSTATUS
4600 VFWDFEXPORT(WdfIoTargetFormatRequestForIoctl)(
4601     _In_
4602     PWDF_DRIVER_GLOBALS DriverGlobals,
4603     _In_
4604     WDFIOTARGET IoTarget,
4605     _In_
4606     WDFREQUEST Request,
4607     _In_
4608     ULONG IoctlCode,
4609     _In_opt_
4610     WDFMEMORY InputBuffer,
4611     _In_opt_
4612     PWDFMEMORY_OFFSET InputBufferOffset,
4613     _In_opt_
4614     WDFMEMORY OutputBuffer,
4615     _In_opt_
4616     PWDFMEMORY_OFFSET OutputBufferOffset
4617     )
4618 {
4619     PAGED_CODE_LOCKED();
4620     return ((PFN_WDFIOTARGETFORMATREQUESTFORIOCTL) WdfVersion.Functions.pfnWdfIoTargetFormatRequestForIoctl)(DriverGlobals, IoTarget, Request, IoctlCode, InputBuffer, InputBufferOffset, OutputBuffer, OutputBufferOffset);
4621 }
4622 
4623 _Must_inspect_result_
4624 _IRQL_requires_max_(PASSIVE_LEVEL)
4625 WDFAPI
4626 NTSTATUS
4627 VFWDFEXPORT(WdfIoTargetSendInternalIoctlSynchronously)(
4628     _In_
4629     PWDF_DRIVER_GLOBALS DriverGlobals,
4630     _In_
4631     WDFIOTARGET IoTarget,
4632     _In_opt_
4633     WDFREQUEST Request,
4634     _In_
4635     ULONG IoctlCode,
4636     _In_opt_
4637     PWDF_MEMORY_DESCRIPTOR InputBuffer,
4638     _In_opt_
4639     PWDF_MEMORY_DESCRIPTOR OutputBuffer,
4640     _In_opt_
4641     PWDF_REQUEST_SEND_OPTIONS RequestOptions,
4642     _Out_opt_
4643     PULONG_PTR BytesReturned
4644     )
4645 {
4646     PAGED_CODE_LOCKED();
4647     return ((PFN_WDFIOTARGETSENDINTERNALIOCTLSYNCHRONOUSLY) WdfVersion.Functions.pfnWdfIoTargetSendInternalIoctlSynchronously)(DriverGlobals, IoTarget, Request, IoctlCode, InputBuffer, OutputBuffer, RequestOptions, BytesReturned);
4648 }
4649 
4650 _Must_inspect_result_
4651 _IRQL_requires_max_(DISPATCH_LEVEL)
4652 WDFAPI
4653 NTSTATUS
4654 VFWDFEXPORT(WdfIoTargetFormatRequestForInternalIoctl)(
4655     _In_
4656     PWDF_DRIVER_GLOBALS DriverGlobals,
4657     _In_
4658     WDFIOTARGET IoTarget,
4659     _In_
4660     WDFREQUEST Request,
4661     _In_
4662     ULONG IoctlCode,
4663     _In_opt_
4664     WDFMEMORY InputBuffer,
4665     _In_opt_
4666     PWDFMEMORY_OFFSET InputBufferOffset,
4667     _In_opt_
4668     WDFMEMORY OutputBuffer,
4669     _In_opt_
4670     PWDFMEMORY_OFFSET OutputBufferOffset
4671     )
4672 {
4673     PAGED_CODE_LOCKED();
4674     return ((PFN_WDFIOTARGETFORMATREQUESTFORINTERNALIOCTL) WdfVersion.Functions.pfnWdfIoTargetFormatRequestForInternalIoctl)(DriverGlobals, IoTarget, Request, IoctlCode, InputBuffer, InputBufferOffset, OutputBuffer, OutputBufferOffset);
4675 }
4676 
4677 _Must_inspect_result_
4678 _IRQL_requires_max_(PASSIVE_LEVEL)
4679 WDFAPI
4680 NTSTATUS
4681 VFWDFEXPORT(WdfIoTargetSendInternalIoctlOthersSynchronously)(
4682     _In_
4683     PWDF_DRIVER_GLOBALS DriverGlobals,
4684     _In_
4685     WDFIOTARGET IoTarget,
4686     _In_opt_
4687     WDFREQUEST Request,
4688     _In_
4689     ULONG IoctlCode,
4690     _In_opt_
4691     PWDF_MEMORY_DESCRIPTOR OtherArg1,
4692     _In_opt_
4693     PWDF_MEMORY_DESCRIPTOR OtherArg2,
4694     _In_opt_
4695     PWDF_MEMORY_DESCRIPTOR OtherArg4,
4696     _In_opt_
4697     PWDF_REQUEST_SEND_OPTIONS RequestOptions,
4698     _Out_opt_
4699     PULONG_PTR BytesReturned
4700     )
4701 {
4702     PAGED_CODE_LOCKED();
4703     return ((PFN_WDFIOTARGETSENDINTERNALIOCTLOTHERSSYNCHRONOUSLY) WdfVersion.Functions.pfnWdfIoTargetSendInternalIoctlOthersSynchronously)(DriverGlobals, IoTarget, Request, IoctlCode, OtherArg1, OtherArg2, OtherArg4, RequestOptions, BytesReturned);
4704 }
4705 
4706 _Must_inspect_result_
4707 _IRQL_requires_max_(DISPATCH_LEVEL)
4708 WDFAPI
4709 NTSTATUS
4710 VFWDFEXPORT(WdfIoTargetFormatRequestForInternalIoctlOthers)(
4711     _In_
4712     PWDF_DRIVER_GLOBALS DriverGlobals,
4713     _In_
4714     WDFIOTARGET IoTarget,
4715     _In_
4716     WDFREQUEST Request,
4717     _In_
4718     ULONG IoctlCode,
4719     _In_opt_
4720     WDFMEMORY OtherArg1,
4721     _In_opt_
4722     PWDFMEMORY_OFFSET OtherArg1Offset,
4723     _In_opt_
4724     WDFMEMORY OtherArg2,
4725     _In_opt_
4726     PWDFMEMORY_OFFSET OtherArg2Offset,
4727     _In_opt_
4728     WDFMEMORY OtherArg4,
4729     _In_opt_
4730     PWDFMEMORY_OFFSET OtherArg4Offset
4731     )
4732 {
4733     PAGED_CODE_LOCKED();
4734     return ((PFN_WDFIOTARGETFORMATREQUESTFORINTERNALIOCTLOTHERS) WdfVersion.Functions.pfnWdfIoTargetFormatRequestForInternalIoctlOthers)(DriverGlobals, IoTarget, Request, IoctlCode, OtherArg1, OtherArg1Offset, OtherArg2, OtherArg2Offset, OtherArg4, OtherArg4Offset);
4735 }
4736 
4737 _IRQL_requires_max_(DISPATCH_LEVEL)
4738 WDFAPI
4739 NTSTATUS
4740 VFWDFEXPORT(WdfIoTargetSelfAssignDefaultIoQueue)(
4741     _In_
4742     PWDF_DRIVER_GLOBALS DriverGlobals,
4743     _In_
4744     WDFIOTARGET IoTarget,
4745     _In_
4746     WDFQUEUE Queue
4747     )
4748 {
4749     PAGED_CODE_LOCKED();
4750     return ((PFN_WDFIOTARGETSELFASSIGNDEFAULTIOQUEUE) WdfVersion.Functions.pfnWdfIoTargetSelfAssignDefaultIoQueue)(DriverGlobals, IoTarget, Queue);
4751 }
4752 
4753 _Must_inspect_result_
4754 _When_(PoolType == 1 || PoolType == 257, _IRQL_requires_max_(APC_LEVEL))
4755 _When_(PoolType == 0 || PoolType == 256, _IRQL_requires_max_(DISPATCH_LEVEL))
4756 WDFAPI
4757 NTSTATUS
4758 VFWDFEXPORT(WdfMemoryCreate)(
4759     _In_
4760     PWDF_DRIVER_GLOBALS DriverGlobals,
4761     _In_opt_
4762     PWDF_OBJECT_ATTRIBUTES Attributes,
4763     _In_
4764     _Strict_type_match_
4765     POOL_TYPE PoolType,
4766     _In_opt_
4767     ULONG PoolTag,
4768     _In_
4769     _When_(BufferSize == 0, __drv_reportError(BufferSize cannot be zero))
4770     size_t BufferSize,
4771     _Out_
4772     WDFMEMORY* Memory,
4773     _Outptr_opt_result_bytebuffer_(BufferSize)
4774     PVOID* Buffer
4775     )
4776 {
4777     PAGED_CODE_LOCKED();
4778     return ((PFN_WDFMEMORYCREATE) WdfVersion.Functions.pfnWdfMemoryCreate)(DriverGlobals, Attributes, PoolType, PoolTag, BufferSize, Memory, Buffer);
4779 }
4780 
4781 _Must_inspect_result_
4782 _IRQL_requires_max_(DISPATCH_LEVEL)
4783 WDFAPI
4784 NTSTATUS
4785 VFWDFEXPORT(WdfMemoryCreatePreallocated)(
4786     _In_
4787     PWDF_DRIVER_GLOBALS DriverGlobals,
4788     _In_opt_
4789     PWDF_OBJECT_ATTRIBUTES Attributes,
4790     _In_ __drv_aliasesMem
4791     PVOID Buffer,
4792     _In_
4793     _When_(BufferSize == 0, __drv_reportError(BufferSize cannot be zero))
4794     size_t BufferSize,
4795     _Out_
4796     WDFMEMORY* Memory
4797     )
4798 {
4799     PAGED_CODE_LOCKED();
4800     return ((PFN_WDFMEMORYCREATEPREALLOCATED) WdfVersion.Functions.pfnWdfMemoryCreatePreallocated)(DriverGlobals, Attributes, Buffer, BufferSize, Memory);
4801 }
4802 
4803 _IRQL_requires_max_(DISPATCH_LEVEL)
4804 WDFAPI
4805 PVOID
4806 VFWDFEXPORT(WdfMemoryGetBuffer)(
4807     _In_
4808     PWDF_DRIVER_GLOBALS DriverGlobals,
4809     _In_
4810     WDFMEMORY Memory,
4811     _Out_opt_
4812     size_t* BufferSize
4813     )
4814 {
4815     PAGED_CODE_LOCKED();
4816     return ((PFN_WDFMEMORYGETBUFFER) WdfVersion.Functions.pfnWdfMemoryGetBuffer)(DriverGlobals, Memory, BufferSize);
4817 }
4818 
4819 _Must_inspect_result_
4820 _IRQL_requires_max_(DISPATCH_LEVEL)
4821 WDFAPI
4822 NTSTATUS
4823 VFWDFEXPORT(WdfMemoryAssignBuffer)(
4824     _In_
4825     PWDF_DRIVER_GLOBALS DriverGlobals,
4826     _In_
4827     WDFMEMORY Memory,
4828     _Pre_notnull_ _Pre_writable_byte_size_(BufferSize)
4829     PVOID Buffer,
4830     _In_
4831     _When_(BufferSize == 0, __drv_reportError(BufferSize cannot be zero))
4832     size_t BufferSize
4833     )
4834 {
4835     PAGED_CODE_LOCKED();
4836     return ((PFN_WDFMEMORYASSIGNBUFFER) WdfVersion.Functions.pfnWdfMemoryAssignBuffer)(DriverGlobals, Memory, Buffer, BufferSize);
4837 }
4838 
4839 _Must_inspect_result_
4840 _IRQL_requires_max_(DISPATCH_LEVEL)
4841 WDFAPI
4842 NTSTATUS
4843 VFWDFEXPORT(WdfMemoryCopyToBuffer)(
4844     _In_
4845     PWDF_DRIVER_GLOBALS DriverGlobals,
4846     _In_
4847     WDFMEMORY SourceMemory,
4848     _In_
4849     size_t SourceOffset,
4850     _Out_writes_bytes_( NumBytesToCopyTo )
4851     PVOID Buffer,
4852     _In_
4853     _When_(NumBytesToCopyTo == 0, __drv_reportError(NumBytesToCopyTo cannot be zero))
4854     size_t NumBytesToCopyTo
4855     )
4856 {
4857     PAGED_CODE_LOCKED();
4858     return ((PFN_WDFMEMORYCOPYTOBUFFER) WdfVersion.Functions.pfnWdfMemoryCopyToBuffer)(DriverGlobals, SourceMemory, SourceOffset, Buffer, NumBytesToCopyTo);
4859 }
4860 
4861 _Must_inspect_result_
4862 _IRQL_requires_max_(DISPATCH_LEVEL)
4863 WDFAPI
4864 NTSTATUS
4865 VFWDFEXPORT(WdfMemoryCopyFromBuffer)(
4866     _In_
4867     PWDF_DRIVER_GLOBALS DriverGlobals,
4868     _In_
4869     WDFMEMORY DestinationMemory,
4870     _In_
4871     size_t DestinationOffset,
4872     _In_
4873     PVOID Buffer,
4874     _In_
4875     _When_(NumBytesToCopyFrom == 0, __drv_reportError(NumBytesToCopyFrom cannot be zero))
4876     size_t NumBytesToCopyFrom
4877     )
4878 {
4879     PAGED_CODE_LOCKED();
4880     return ((PFN_WDFMEMORYCOPYFROMBUFFER) WdfVersion.Functions.pfnWdfMemoryCopyFromBuffer)(DriverGlobals, DestinationMemory, DestinationOffset, Buffer, NumBytesToCopyFrom);
4881 }
4882 
4883 _Must_inspect_result_
4884 _When_(PoolType == 1 || PoolType == 257, _IRQL_requires_max_(APC_LEVEL))
4885 _When_(PoolType == 0 || PoolType == 256, _IRQL_requires_max_(DISPATCH_LEVEL))
4886 WDFAPI
4887 NTSTATUS
4888 VFWDFEXPORT(WdfLookasideListCreate)(
4889     _In_
4890     PWDF_DRIVER_GLOBALS DriverGlobals,
4891     _In_opt_
4892     PWDF_OBJECT_ATTRIBUTES LookasideAttributes,
4893     _In_
4894     _When_(BufferSize == 0, __drv_reportError(BufferSize cannot be zero))
4895     size_t BufferSize,
4896     _In_
4897     _Strict_type_match_
4898     POOL_TYPE PoolType,
4899     _In_opt_
4900     PWDF_OBJECT_ATTRIBUTES MemoryAttributes,
4901     _In_opt_
4902     ULONG PoolTag,
4903     _Out_
4904     WDFLOOKASIDE* Lookaside
4905     )
4906 {
4907     PAGED_CODE_LOCKED();
4908     return ((PFN_WDFLOOKASIDELISTCREATE) WdfVersion.Functions.pfnWdfLookasideListCreate)(DriverGlobals, LookasideAttributes, BufferSize, PoolType, MemoryAttributes, PoolTag, Lookaside);
4909 }
4910 
4911 _Must_inspect_result_
4912 _IRQL_requires_max_(DISPATCH_LEVEL)
4913 WDFAPI
4914 NTSTATUS
4915 VFWDFEXPORT(WdfMemoryCreateFromLookaside)(
4916     _In_
4917     PWDF_DRIVER_GLOBALS DriverGlobals,
4918     _In_
4919     WDFLOOKASIDE Lookaside,
4920     _Out_
4921     WDFMEMORY* Memory
4922     )
4923 {
4924     PAGED_CODE_LOCKED();
4925     return ((PFN_WDFMEMORYCREATEFROMLOOKASIDE) WdfVersion.Functions.pfnWdfMemoryCreateFromLookaside)(DriverGlobals, Lookaside, Memory);
4926 }
4927 
4928 _Must_inspect_result_
4929 _IRQL_requires_max_(PASSIVE_LEVEL)
4930 WDFAPI
4931 NTSTATUS
4932 VFWDFEXPORT(WdfDeviceMiniportCreate)(
4933     _In_
4934     PWDF_DRIVER_GLOBALS DriverGlobals,
4935     _In_
4936     WDFDRIVER Driver,
4937     _In_opt_
4938     PWDF_OBJECT_ATTRIBUTES Attributes,
4939     _In_
4940     PDEVICE_OBJECT DeviceObject,
4941     _In_opt_
4942     PDEVICE_OBJECT AttachedDeviceObject,
4943     _In_opt_
4944     PDEVICE_OBJECT Pdo,
4945     _Out_
4946     WDFDEVICE* Device
4947     )
4948 {
4949     PAGED_CODE_LOCKED();
4950     return ((PFN_WDFDEVICEMINIPORTCREATE) WdfVersion.Functions.pfnWdfDeviceMiniportCreate)(DriverGlobals, Driver, Attributes, DeviceObject, AttachedDeviceObject, Pdo, Device);
4951 }
4952 
4953 WDFAPI
4954 VOID
4955 VFWDFEXPORT(WdfDriverMiniportUnload)(
4956     _In_
4957     PWDF_DRIVER_GLOBALS DriverGlobals,
4958     _In_
4959     WDFDRIVER Driver
4960     )
4961 {
4962     PAGED_CODE_LOCKED();
4963     ((PFN_WDFDRIVERMINIPORTUNLOAD) WdfVersion.Functions.pfnWdfDriverMiniportUnload)(DriverGlobals, Driver);
4964 }
4965 
4966 WDFAPI
4967 PVOID
4968 FASTCALL
4969 VFWDFEXPORT(WdfObjectGetTypedContextWorker)(
4970     _In_
4971     PWDF_DRIVER_GLOBALS DriverGlobals,
4972     _In_
4973     WDFOBJECT Handle,
4974     _In_
4975     PCWDF_OBJECT_CONTEXT_TYPE_INFO TypeInfo
4976     )
4977 {
4978     PAGED_CODE_LOCKED();
4979     return ((PFN_WDFOBJECTGETTYPEDCONTEXTWORKER) WdfVersion.Functions.pfnWdfObjectGetTypedContextWorker)(DriverGlobals, Handle, TypeInfo);
4980 }
4981 
4982 WDFAPI
4983 NTSTATUS
4984 VFWDFEXPORT(WdfObjectAllocateContext)(
4985     _In_
4986     PWDF_DRIVER_GLOBALS DriverGlobals,
4987     _In_
4988     WDFOBJECT Handle,
4989     _In_
4990     PWDF_OBJECT_ATTRIBUTES ContextAttributes,
4991     _Outptr_opt_
4992     PVOID* Context
4993     )
4994 {
4995     PAGED_CODE_LOCKED();
4996     return ((PFN_WDFOBJECTALLOCATECONTEXT) WdfVersion.Functions.pfnWdfObjectAllocateContext)(DriverGlobals, Handle, ContextAttributes, Context);
4997 }
4998 
4999 WDFAPI
5000 WDFOBJECT
5001 FASTCALL
5002 VFWDFEXPORT(WdfObjectContextGetObject)(
5003     _In_
5004     PWDF_DRIVER_GLOBALS DriverGlobals,
5005     _In_
5006     PVOID ContextPointer
5007     )
5008 {
5009     PAGED_CODE_LOCKED();
5010     return ((PFN_WDFOBJECTCONTEXTGETOBJECT) WdfVersion.Functions.pfnWdfObjectContextGetObject)(DriverGlobals, ContextPointer);
5011 }
5012 
5013 WDFAPI
5014 VOID
5015 VFWDFEXPORT(WdfObjectReferenceActual)(
5016     _In_
5017     PWDF_DRIVER_GLOBALS DriverGlobals,
5018     _In_
5019     WDFOBJECT Handle,
5020     _In_opt_
5021     PVOID Tag,
5022     _In_
5023     LONG Line,
5024     _In_z_
5025     PCHAR File
5026     )
5027 {
5028     PAGED_CODE_LOCKED();
5029     ((PFN_WDFOBJECTREFERENCEACTUAL) WdfVersion.Functions.pfnWdfObjectReferenceActual)(DriverGlobals, Handle, Tag, Line, File);
5030 }
5031 
5032 WDFAPI
5033 VOID
5034 VFWDFEXPORT(WdfObjectDereferenceActual)(
5035     _In_
5036     PWDF_DRIVER_GLOBALS DriverGlobals,
5037     _In_
5038     WDFOBJECT Handle,
5039     _In_opt_
5040     PVOID Tag,
5041     _In_
5042     LONG Line,
5043     _In_z_
5044     PCHAR File
5045     )
5046 {
5047     PAGED_CODE_LOCKED();
5048     ((PFN_WDFOBJECTDEREFERENCEACTUAL) WdfVersion.Functions.pfnWdfObjectDereferenceActual)(DriverGlobals, Handle, Tag, Line, File);
5049 }
5050 
5051 _Must_inspect_result_
5052 _IRQL_requires_max_(DISPATCH_LEVEL)
5053 WDFAPI
5054 NTSTATUS
5055 VFWDFEXPORT(WdfObjectCreate)(
5056     _In_
5057     PWDF_DRIVER_GLOBALS DriverGlobals,
5058     _In_opt_
5059     PWDF_OBJECT_ATTRIBUTES Attributes,
5060     _Out_
5061     WDFOBJECT* Object
5062     )
5063 {
5064     PAGED_CODE_LOCKED();
5065     return ((PFN_WDFOBJECTCREATE) WdfVersion.Functions.pfnWdfObjectCreate)(DriverGlobals, Attributes, Object);
5066 }
5067 
5068 _IRQL_requires_max_(DISPATCH_LEVEL)
5069 WDFAPI
5070 VOID
5071 VFWDFEXPORT(WdfObjectDelete)(
5072     _In_
5073     PWDF_DRIVER_GLOBALS DriverGlobals,
5074     _In_
5075     WDFOBJECT Object
5076     )
5077 {
5078     PAGED_CODE_LOCKED();
5079     ((PFN_WDFOBJECTDELETE) WdfVersion.Functions.pfnWdfObjectDelete)(DriverGlobals, Object);
5080 }
5081 
5082 _Must_inspect_result_
5083 _IRQL_requires_max_(DISPATCH_LEVEL)
5084 WDFAPI
5085 NTSTATUS
5086 VFWDFEXPORT(WdfObjectQuery)(
5087     _In_
5088     PWDF_DRIVER_GLOBALS DriverGlobals,
5089     _In_
5090     WDFOBJECT Object,
5091     _In_
5092     CONST GUID* Guid,
5093     _In_
5094     ULONG QueryBufferLength,
5095     _Out_writes_bytes_(QueryBufferLength)
5096     PVOID QueryBuffer
5097     )
5098 {
5099     PAGED_CODE_LOCKED();
5100     return ((PFN_WDFOBJECTQUERY) WdfVersion.Functions.pfnWdfObjectQuery)(DriverGlobals, Object, Guid, QueryBufferLength, QueryBuffer);
5101 }
5102 
5103 _Must_inspect_result_
5104 _IRQL_requires_max_(PASSIVE_LEVEL)
5105 WDFAPI
5106 PWDFDEVICE_INIT
5107 VFWDFEXPORT(WdfPdoInitAllocate)(
5108     _In_
5109     PWDF_DRIVER_GLOBALS DriverGlobals,
5110     _In_
5111     WDFDEVICE ParentDevice
5112     )
5113 {
5114     PAGED_CODE_LOCKED();
5115     return ((PFN_WDFPDOINITALLOCATE) WdfVersion.Functions.pfnWdfPdoInitAllocate)(DriverGlobals, ParentDevice);
5116 }
5117 
5118 _IRQL_requires_max_(PASSIVE_LEVEL)
5119 WDFAPI
5120 VOID
5121 VFWDFEXPORT(WdfPdoInitSetEventCallbacks)(
5122     _In_
5123     PWDF_DRIVER_GLOBALS DriverGlobals,
5124     _In_
5125     PWDFDEVICE_INIT DeviceInit,
5126     _In_
5127     PWDF_PDO_EVENT_CALLBACKS DispatchTable
5128     )
5129 {
5130     PAGED_CODE_LOCKED();
5131     ((PFN_WDFPDOINITSETEVENTCALLBACKS) WdfVersion.Functions.pfnWdfPdoInitSetEventCallbacks)(DriverGlobals, DeviceInit, DispatchTable);
5132 }
5133 
5134 _Must_inspect_result_
5135 _IRQL_requires_max_(PASSIVE_LEVEL)
5136 WDFAPI
5137 NTSTATUS
5138 VFWDFEXPORT(WdfPdoInitAssignDeviceID)(
5139     _In_
5140     PWDF_DRIVER_GLOBALS DriverGlobals,
5141     _In_
5142     PWDFDEVICE_INIT DeviceInit,
5143     _In_
5144     PCUNICODE_STRING DeviceID
5145     )
5146 {
5147     PAGED_CODE_LOCKED();
5148     return ((PFN_WDFPDOINITASSIGNDEVICEID) WdfVersion.Functions.pfnWdfPdoInitAssignDeviceID)(DriverGlobals, DeviceInit, DeviceID);
5149 }
5150 
5151 _Must_inspect_result_
5152 _IRQL_requires_max_(PASSIVE_LEVEL)
5153 WDFAPI
5154 NTSTATUS
5155 VFWDFEXPORT(WdfPdoInitAssignInstanceID)(
5156     _In_
5157     PWDF_DRIVER_GLOBALS DriverGlobals,
5158     _In_
5159     PWDFDEVICE_INIT DeviceInit,
5160     _In_
5161     PCUNICODE_STRING InstanceID
5162     )
5163 {
5164     PAGED_CODE_LOCKED();
5165     return ((PFN_WDFPDOINITASSIGNINSTANCEID) WdfVersion.Functions.pfnWdfPdoInitAssignInstanceID)(DriverGlobals, DeviceInit, InstanceID);
5166 }
5167 
5168 _Must_inspect_result_
5169 _IRQL_requires_max_(PASSIVE_LEVEL)
5170 WDFAPI
5171 NTSTATUS
5172 VFWDFEXPORT(WdfPdoInitAddHardwareID)(
5173     _In_
5174     PWDF_DRIVER_GLOBALS DriverGlobals,
5175     _In_
5176     PWDFDEVICE_INIT DeviceInit,
5177     _In_
5178     PCUNICODE_STRING HardwareID
5179     )
5180 {
5181     PAGED_CODE_LOCKED();
5182     return ((PFN_WDFPDOINITADDHARDWAREID) WdfVersion.Functions.pfnWdfPdoInitAddHardwareID)(DriverGlobals, DeviceInit, HardwareID);
5183 }
5184 
5185 _Must_inspect_result_
5186 _IRQL_requires_max_(PASSIVE_LEVEL)
5187 WDFAPI
5188 NTSTATUS
5189 VFWDFEXPORT(WdfPdoInitAddCompatibleID)(
5190     _In_
5191     PWDF_DRIVER_GLOBALS DriverGlobals,
5192     _In_
5193     PWDFDEVICE_INIT DeviceInit,
5194     _In_
5195     PCUNICODE_STRING CompatibleID
5196     )
5197 {
5198     PAGED_CODE_LOCKED();
5199     return ((PFN_WDFPDOINITADDCOMPATIBLEID) WdfVersion.Functions.pfnWdfPdoInitAddCompatibleID)(DriverGlobals, DeviceInit, CompatibleID);
5200 }
5201 
5202 _Must_inspect_result_
5203 _IRQL_requires_max_(PASSIVE_LEVEL)
5204 WDFAPI
5205 NTSTATUS
5206 VFWDFEXPORT(WdfPdoInitAssignContainerID)(
5207     _In_
5208     PWDF_DRIVER_GLOBALS DriverGlobals,
5209     _In_
5210     PWDFDEVICE_INIT DeviceInit,
5211     _In_
5212     PCUNICODE_STRING ContainerID
5213     )
5214 {
5215     PAGED_CODE_LOCKED();
5216     return ((PFN_WDFPDOINITASSIGNCONTAINERID) WdfVersion.Functions.pfnWdfPdoInitAssignContainerID)(DriverGlobals, DeviceInit, ContainerID);
5217 }
5218 
5219 _Must_inspect_result_
5220 _IRQL_requires_max_(PASSIVE_LEVEL)
5221 WDFAPI
5222 NTSTATUS
5223 VFWDFEXPORT(WdfPdoInitAddDeviceText)(
5224     _In_
5225     PWDF_DRIVER_GLOBALS DriverGlobals,
5226     _In_
5227     PWDFDEVICE_INIT DeviceInit,
5228     _In_
5229     PCUNICODE_STRING DeviceDescription,
5230     _In_
5231     PCUNICODE_STRING DeviceLocation,
5232     _In_
5233     LCID LocaleId
5234     )
5235 {
5236     PAGED_CODE_LOCKED();
5237     return ((PFN_WDFPDOINITADDDEVICETEXT) WdfVersion.Functions.pfnWdfPdoInitAddDeviceText)(DriverGlobals, DeviceInit, DeviceDescription, DeviceLocation, LocaleId);
5238 }
5239 
5240 _IRQL_requires_max_(PASSIVE_LEVEL)
5241 WDFAPI
5242 VOID
5243 VFWDFEXPORT(WdfPdoInitSetDefaultLocale)(
5244     _In_
5245     PWDF_DRIVER_GLOBALS DriverGlobals,
5246     _In_
5247     PWDFDEVICE_INIT DeviceInit,
5248     _In_
5249     LCID LocaleId
5250     )
5251 {
5252     PAGED_CODE_LOCKED();
5253     ((PFN_WDFPDOINITSETDEFAULTLOCALE) WdfVersion.Functions.pfnWdfPdoInitSetDefaultLocale)(DriverGlobals, DeviceInit, LocaleId);
5254 }
5255 
5256 _Must_inspect_result_
5257 _IRQL_requires_max_(PASSIVE_LEVEL)
5258 WDFAPI
5259 NTSTATUS
5260 VFWDFEXPORT(WdfPdoInitAssignRawDevice)(
5261     _In_
5262     PWDF_DRIVER_GLOBALS DriverGlobals,
5263     _In_
5264     PWDFDEVICE_INIT DeviceInit,
5265     _In_
5266     CONST GUID* DeviceClassGuid
5267     )
5268 {
5269     PAGED_CODE_LOCKED();
5270     return ((PFN_WDFPDOINITASSIGNRAWDEVICE) WdfVersion.Functions.pfnWdfPdoInitAssignRawDevice)(DriverGlobals, DeviceInit, DeviceClassGuid);
5271 }
5272 
5273 _IRQL_requires_max_(PASSIVE_LEVEL)
5274 WDFAPI
5275 VOID
5276 VFWDFEXPORT(WdfPdoInitAllowForwardingRequestToParent)(
5277     _In_
5278     PWDF_DRIVER_GLOBALS DriverGlobals,
5279     _In_
5280     PWDFDEVICE_INIT DeviceInit
5281     )
5282 {
5283     PAGED_CODE_LOCKED();
5284     ((PFN_WDFPDOINITALLOWFORWARDINGREQUESTTOPARENT) WdfVersion.Functions.pfnWdfPdoInitAllowForwardingRequestToParent)(DriverGlobals, DeviceInit);
5285 }
5286 
5287 _Must_inspect_result_
5288 _IRQL_requires_max_(DISPATCH_LEVEL)
5289 WDFAPI
5290 NTSTATUS
5291 VFWDFEXPORT(WdfPdoMarkMissing)(
5292     _In_
5293     PWDF_DRIVER_GLOBALS DriverGlobals,
5294     _In_
5295     WDFDEVICE Device
5296     )
5297 {
5298     PAGED_CODE_LOCKED();
5299     return ((PFN_WDFPDOMARKMISSING) WdfVersion.Functions.pfnWdfPdoMarkMissing)(DriverGlobals, Device);
5300 }
5301 
5302 _IRQL_requires_max_(DISPATCH_LEVEL)
5303 WDFAPI
5304 VOID
5305 VFWDFEXPORT(WdfPdoRequestEject)(
5306     _In_
5307     PWDF_DRIVER_GLOBALS DriverGlobals,
5308     _In_
5309     WDFDEVICE Device
5310     )
5311 {
5312     PAGED_CODE_LOCKED();
5313     ((PFN_WDFPDOREQUESTEJECT) WdfVersion.Functions.pfnWdfPdoRequestEject)(DriverGlobals, Device);
5314 }
5315 
5316 _IRQL_requires_max_(DISPATCH_LEVEL)
5317 WDFAPI
5318 WDFDEVICE
5319 VFWDFEXPORT(WdfPdoGetParent)(
5320     _In_
5321     PWDF_DRIVER_GLOBALS DriverGlobals,
5322     _In_
5323     WDFDEVICE Device
5324     )
5325 {
5326     PAGED_CODE_LOCKED();
5327     return ((PFN_WDFPDOGETPARENT) WdfVersion.Functions.pfnWdfPdoGetParent)(DriverGlobals, Device);
5328 }
5329 
5330 _Must_inspect_result_
5331 _IRQL_requires_max_(DISPATCH_LEVEL)
5332 WDFAPI
5333 NTSTATUS
5334 VFWDFEXPORT(WdfPdoRetrieveIdentificationDescription)(
5335     _In_
5336     PWDF_DRIVER_GLOBALS DriverGlobals,
5337     _In_
5338     WDFDEVICE Device,
5339     _Inout_
5340     PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription
5341     )
5342 {
5343     PAGED_CODE_LOCKED();
5344     return ((PFN_WDFPDORETRIEVEIDENTIFICATIONDESCRIPTION) WdfVersion.Functions.pfnWdfPdoRetrieveIdentificationDescription)(DriverGlobals, Device, IdentificationDescription);
5345 }
5346 
5347 _Must_inspect_result_
5348 _IRQL_requires_max_(DISPATCH_LEVEL)
5349 WDFAPI
5350 NTSTATUS
5351 VFWDFEXPORT(WdfPdoRetrieveAddressDescription)(
5352     _In_
5353     PWDF_DRIVER_GLOBALS DriverGlobals,
5354     _In_
5355     WDFDEVICE Device,
5356     _Inout_
5357     PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
5358     )
5359 {
5360     PAGED_CODE_LOCKED();
5361     return ((PFN_WDFPDORETRIEVEADDRESSDESCRIPTION) WdfVersion.Functions.pfnWdfPdoRetrieveAddressDescription)(DriverGlobals, Device, AddressDescription);
5362 }
5363 
5364 _Must_inspect_result_
5365 _IRQL_requires_max_(DISPATCH_LEVEL)
5366 WDFAPI
5367 NTSTATUS
5368 VFWDFEXPORT(WdfPdoUpdateAddressDescription)(
5369     _In_
5370     PWDF_DRIVER_GLOBALS DriverGlobals,
5371     _In_
5372     WDFDEVICE Device,
5373     _Inout_
5374     PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
5375     )
5376 {
5377     PAGED_CODE_LOCKED();
5378     return ((PFN_WDFPDOUPDATEADDRESSDESCRIPTION) WdfVersion.Functions.pfnWdfPdoUpdateAddressDescription)(DriverGlobals, Device, AddressDescription);
5379 }
5380 
5381 _Must_inspect_result_
5382 _IRQL_requires_max_(DISPATCH_LEVEL)
5383 WDFAPI
5384 NTSTATUS
5385 VFWDFEXPORT(WdfPdoAddEjectionRelationsPhysicalDevice)(
5386     _In_
5387     PWDF_DRIVER_GLOBALS DriverGlobals,
5388     _In_
5389     WDFDEVICE Device,
5390     _In_
5391     PDEVICE_OBJECT PhysicalDevice
5392     )
5393 {
5394     PAGED_CODE_LOCKED();
5395     return ((PFN_WDFPDOADDEJECTIONRELATIONSPHYSICALDEVICE) WdfVersion.Functions.pfnWdfPdoAddEjectionRelationsPhysicalDevice)(DriverGlobals, Device, PhysicalDevice);
5396 }
5397 
5398 _IRQL_requires_max_(DISPATCH_LEVEL)
5399 WDFAPI
5400 VOID
5401 VFWDFEXPORT(WdfPdoRemoveEjectionRelationsPhysicalDevice)(
5402     _In_
5403     PWDF_DRIVER_GLOBALS DriverGlobals,
5404     _In_
5405     WDFDEVICE Device,
5406     _In_
5407     PDEVICE_OBJECT PhysicalDevice
5408     )
5409 {
5410     PAGED_CODE_LOCKED();
5411     ((PFN_WDFPDOREMOVEEJECTIONRELATIONSPHYSICALDEVICE) WdfVersion.Functions.pfnWdfPdoRemoveEjectionRelationsPhysicalDevice)(DriverGlobals, Device, PhysicalDevice);
5412 }
5413 
5414 _IRQL_requires_max_(DISPATCH_LEVEL)
5415 WDFAPI
5416 VOID
5417 VFWDFEXPORT(WdfPdoClearEjectionRelationsDevices)(
5418     _In_
5419     PWDF_DRIVER_GLOBALS DriverGlobals,
5420     _In_
5421     WDFDEVICE Device
5422     )
5423 {
5424     PAGED_CODE_LOCKED();
5425     ((PFN_WDFPDOCLEAREJECTIONRELATIONSDEVICES) WdfVersion.Functions.pfnWdfPdoClearEjectionRelationsDevices)(DriverGlobals, Device);
5426 }
5427 
5428 _Must_inspect_result_
5429 _IRQL_requires_max_(PASSIVE_LEVEL)
5430 WDFAPI
5431 NTSTATUS
5432 VFWDFEXPORT(WdfDeviceAddQueryInterface)(
5433     _In_
5434     PWDF_DRIVER_GLOBALS DriverGlobals,
5435     _In_
5436     WDFDEVICE Device,
5437     _In_
5438     PWDF_QUERY_INTERFACE_CONFIG InterfaceConfig
5439     )
5440 {
5441     PAGED_CODE_LOCKED();
5442     return ((PFN_WDFDEVICEADDQUERYINTERFACE) WdfVersion.Functions.pfnWdfDeviceAddQueryInterface)(DriverGlobals, Device, InterfaceConfig);
5443 }
5444 
5445 _Must_inspect_result_
5446 _IRQL_requires_max_(PASSIVE_LEVEL)
5447 WDFAPI
5448 NTSTATUS
5449 VFWDFEXPORT(WdfRegistryOpenKey)(
5450     _In_
5451     PWDF_DRIVER_GLOBALS DriverGlobals,
5452     _In_opt_
5453     WDFKEY ParentKey,
5454     _In_
5455     PCUNICODE_STRING KeyName,
5456     _In_
5457     ACCESS_MASK DesiredAccess,
5458     _In_opt_
5459     PWDF_OBJECT_ATTRIBUTES KeyAttributes,
5460     _Out_
5461     WDFKEY* Key
5462     )
5463 {
5464     PAGED_CODE_LOCKED();
5465     return ((PFN_WDFREGISTRYOPENKEY) WdfVersion.Functions.pfnWdfRegistryOpenKey)(DriverGlobals, ParentKey, KeyName, DesiredAccess, KeyAttributes, Key);
5466 }
5467 
5468 _Must_inspect_result_
5469 _IRQL_requires_max_(PASSIVE_LEVEL)
5470 WDFAPI
5471 NTSTATUS
5472 VFWDFEXPORT(WdfRegistryCreateKey)(
5473     _In_
5474     PWDF_DRIVER_GLOBALS DriverGlobals,
5475     _In_opt_
5476     WDFKEY ParentKey,
5477     _In_
5478     PCUNICODE_STRING KeyName,
5479     _In_
5480     ACCESS_MASK DesiredAccess,
5481     _In_
5482     ULONG CreateOptions,
5483     _Out_opt_
5484     PULONG CreateDisposition,
5485     _In_opt_
5486     PWDF_OBJECT_ATTRIBUTES KeyAttributes,
5487     _Out_
5488     WDFKEY* Key
5489     )
5490 {
5491     PAGED_CODE_LOCKED();
5492     return ((PFN_WDFREGISTRYCREATEKEY) WdfVersion.Functions.pfnWdfRegistryCreateKey)(DriverGlobals, ParentKey, KeyName, DesiredAccess, CreateOptions, CreateDisposition, KeyAttributes, Key);
5493 }
5494 
5495 _IRQL_requires_max_(PASSIVE_LEVEL)
5496 WDFAPI
5497 VOID
5498 VFWDFEXPORT(WdfRegistryClose)(
5499     _In_
5500     PWDF_DRIVER_GLOBALS DriverGlobals,
5501     _In_
5502     WDFKEY Key
5503     )
5504 {
5505     PAGED_CODE_LOCKED();
5506     ((PFN_WDFREGISTRYCLOSE) WdfVersion.Functions.pfnWdfRegistryClose)(DriverGlobals, Key);
5507 }
5508 
5509 _IRQL_requires_max_(PASSIVE_LEVEL)
5510 WDFAPI
5511 HANDLE
5512 VFWDFEXPORT(WdfRegistryWdmGetHandle)(
5513     _In_
5514     PWDF_DRIVER_GLOBALS DriverGlobals,
5515     _In_
5516     WDFKEY Key
5517     )
5518 {
5519     PAGED_CODE_LOCKED();
5520     return ((PFN_WDFREGISTRYWDMGETHANDLE) WdfVersion.Functions.pfnWdfRegistryWdmGetHandle)(DriverGlobals, Key);
5521 }
5522 
5523 _Must_inspect_result_
5524 _IRQL_requires_max_(PASSIVE_LEVEL)
5525 WDFAPI
5526 NTSTATUS
5527 VFWDFEXPORT(WdfRegistryRemoveKey)(
5528     _In_
5529     PWDF_DRIVER_GLOBALS DriverGlobals,
5530     _In_
5531     WDFKEY Key
5532     )
5533 {
5534     PAGED_CODE_LOCKED();
5535     return ((PFN_WDFREGISTRYREMOVEKEY) WdfVersion.Functions.pfnWdfRegistryRemoveKey)(DriverGlobals, Key);
5536 }
5537 
5538 _Must_inspect_result_
5539 _IRQL_requires_max_(PASSIVE_LEVEL)
5540 WDFAPI
5541 NTSTATUS
5542 VFWDFEXPORT(WdfRegistryRemoveValue)(
5543     _In_
5544     PWDF_DRIVER_GLOBALS DriverGlobals,
5545     _In_
5546     WDFKEY Key,
5547     _In_
5548     PCUNICODE_STRING ValueName
5549     )
5550 {
5551     PAGED_CODE_LOCKED();
5552     return ((PFN_WDFREGISTRYREMOVEVALUE) WdfVersion.Functions.pfnWdfRegistryRemoveValue)(DriverGlobals, Key, ValueName);
5553 }
5554 
5555 _Must_inspect_result_
5556 _IRQL_requires_max_(PASSIVE_LEVEL)
5557 WDFAPI
5558 NTSTATUS
5559 VFWDFEXPORT(WdfRegistryQueryValue)(
5560     _In_
5561     PWDF_DRIVER_GLOBALS DriverGlobals,
5562     _In_
5563     WDFKEY Key,
5564     _In_
5565     PCUNICODE_STRING ValueName,
5566     _In_
5567     ULONG ValueLength,
5568     _Out_writes_bytes_opt_( ValueLength)
5569     PVOID Value,
5570     _Out_opt_
5571     PULONG ValueLengthQueried,
5572     _Out_opt_
5573     PULONG ValueType
5574     )
5575 {
5576     PAGED_CODE_LOCKED();
5577     return ((PFN_WDFREGISTRYQUERYVALUE) WdfVersion.Functions.pfnWdfRegistryQueryValue)(DriverGlobals, Key, ValueName, ValueLength, Value, ValueLengthQueried, ValueType);
5578 }
5579 
5580 _Must_inspect_result_
5581 _IRQL_requires_max_(PASSIVE_LEVEL)
5582 WDFAPI
5583 NTSTATUS
5584 VFWDFEXPORT(WdfRegistryQueryMemory)(
5585     _In_
5586     PWDF_DRIVER_GLOBALS DriverGlobals,
5587     _In_
5588     WDFKEY Key,
5589     _In_
5590     PCUNICODE_STRING ValueName,
5591     _In_
5592     _Strict_type_match_
5593     POOL_TYPE PoolType,
5594     _In_opt_
5595     PWDF_OBJECT_ATTRIBUTES MemoryAttributes,
5596     _Out_
5597     WDFMEMORY* Memory,
5598     _Out_opt_
5599     PULONG ValueType
5600     )
5601 {
5602     PAGED_CODE_LOCKED();
5603     return ((PFN_WDFREGISTRYQUERYMEMORY) WdfVersion.Functions.pfnWdfRegistryQueryMemory)(DriverGlobals, Key, ValueName, PoolType, MemoryAttributes, Memory, ValueType);
5604 }
5605 
5606 _Must_inspect_result_
5607 _IRQL_requires_max_(PASSIVE_LEVEL)
5608 WDFAPI
5609 NTSTATUS
5610 VFWDFEXPORT(WdfRegistryQueryMultiString)(
5611     _In_
5612     PWDF_DRIVER_GLOBALS DriverGlobals,
5613     _In_
5614     WDFKEY Key,
5615     _In_
5616     PCUNICODE_STRING ValueName,
5617     _In_opt_
5618     PWDF_OBJECT_ATTRIBUTES StringsAttributes,
5619     _In_
5620     WDFCOLLECTION Collection
5621     )
5622 {
5623     PAGED_CODE_LOCKED();
5624     return ((PFN_WDFREGISTRYQUERYMULTISTRING) WdfVersion.Functions.pfnWdfRegistryQueryMultiString)(DriverGlobals, Key, ValueName, StringsAttributes, Collection);
5625 }
5626 
5627 _Must_inspect_result_
5628 _IRQL_requires_max_(PASSIVE_LEVEL)
5629 WDFAPI
5630 NTSTATUS
5631 VFWDFEXPORT(WdfRegistryQueryUnicodeString)(
5632     _In_
5633     PWDF_DRIVER_GLOBALS DriverGlobals,
5634     _In_
5635     WDFKEY Key,
5636     _In_
5637     PCUNICODE_STRING ValueName,
5638     _Out_opt_
5639     PUSHORT ValueByteLength,
5640     _Inout_opt_
5641     PUNICODE_STRING Value
5642     )
5643 {
5644     PAGED_CODE_LOCKED();
5645     return ((PFN_WDFREGISTRYQUERYUNICODESTRING) WdfVersion.Functions.pfnWdfRegistryQueryUnicodeString)(DriverGlobals, Key, ValueName, ValueByteLength, Value);
5646 }
5647 
5648 _Must_inspect_result_
5649 _IRQL_requires_max_(PASSIVE_LEVEL)
5650 WDFAPI
5651 NTSTATUS
5652 VFWDFEXPORT(WdfRegistryQueryString)(
5653     _In_
5654     PWDF_DRIVER_GLOBALS DriverGlobals,
5655     _In_
5656     WDFKEY Key,
5657     _In_
5658     PCUNICODE_STRING ValueName,
5659     _In_
5660     WDFSTRING String
5661     )
5662 {
5663     PAGED_CODE_LOCKED();
5664     return ((PFN_WDFREGISTRYQUERYSTRING) WdfVersion.Functions.pfnWdfRegistryQueryString)(DriverGlobals, Key, ValueName, String);
5665 }
5666 
5667 _Must_inspect_result_
5668 _IRQL_requires_max_(PASSIVE_LEVEL)
5669 WDFAPI
5670 NTSTATUS
5671 VFWDFEXPORT(WdfRegistryQueryULong)(
5672     _In_
5673     PWDF_DRIVER_GLOBALS DriverGlobals,
5674     _In_
5675     WDFKEY Key,
5676     _In_
5677     PCUNICODE_STRING ValueName,
5678     _Out_
5679     PULONG Value
5680     )
5681 {
5682     PAGED_CODE_LOCKED();
5683     return ((PFN_WDFREGISTRYQUERYULONG) WdfVersion.Functions.pfnWdfRegistryQueryULong)(DriverGlobals, Key, ValueName, Value);
5684 }
5685 
5686 _Must_inspect_result_
5687 _IRQL_requires_max_(PASSIVE_LEVEL)
5688 WDFAPI
5689 NTSTATUS
5690 VFWDFEXPORT(WdfRegistryAssignValue)(
5691     _In_
5692     PWDF_DRIVER_GLOBALS DriverGlobals,
5693     _In_
5694     WDFKEY Key,
5695     _In_
5696     PCUNICODE_STRING ValueName,
5697     _In_
5698     ULONG ValueType,
5699     _In_
5700     ULONG ValueLength,
5701     _In_reads_( ValueLength)
5702     PVOID Value
5703     )
5704 {
5705     PAGED_CODE_LOCKED();
5706     return ((PFN_WDFREGISTRYASSIGNVALUE) WdfVersion.Functions.pfnWdfRegistryAssignValue)(DriverGlobals, Key, ValueName, ValueType, ValueLength, Value);
5707 }
5708 
5709 _Must_inspect_result_
5710 _IRQL_requires_max_(PASSIVE_LEVEL)
5711 WDFAPI
5712 NTSTATUS
5713 VFWDFEXPORT(WdfRegistryAssignMemory)(
5714     _In_
5715     PWDF_DRIVER_GLOBALS DriverGlobals,
5716     _In_
5717     WDFKEY Key,
5718     _In_
5719     PCUNICODE_STRING ValueName,
5720     _In_
5721     ULONG ValueType,
5722     _In_
5723     WDFMEMORY Memory,
5724     _In_opt_
5725     PWDFMEMORY_OFFSET MemoryOffsets
5726     )
5727 {
5728     PAGED_CODE_LOCKED();
5729     return ((PFN_WDFREGISTRYASSIGNMEMORY) WdfVersion.Functions.pfnWdfRegistryAssignMemory)(DriverGlobals, Key, ValueName, ValueType, Memory, MemoryOffsets);
5730 }
5731 
5732 _Must_inspect_result_
5733 _IRQL_requires_max_(PASSIVE_LEVEL)
5734 WDFAPI
5735 NTSTATUS
5736 VFWDFEXPORT(WdfRegistryAssignMultiString)(
5737     _In_
5738     PWDF_DRIVER_GLOBALS DriverGlobals,
5739     _In_
5740     WDFKEY Key,
5741     _In_
5742     PCUNICODE_STRING ValueName,
5743     _In_
5744     WDFCOLLECTION StringsCollection
5745     )
5746 {
5747     PAGED_CODE_LOCKED();
5748     return ((PFN_WDFREGISTRYASSIGNMULTISTRING) WdfVersion.Functions.pfnWdfRegistryAssignMultiString)(DriverGlobals, Key, ValueName, StringsCollection);
5749 }
5750 
5751 _Must_inspect_result_
5752 _IRQL_requires_max_(PASSIVE_LEVEL)
5753 WDFAPI
5754 NTSTATUS
5755 VFWDFEXPORT(WdfRegistryAssignUnicodeString)(
5756     _In_
5757     PWDF_DRIVER_GLOBALS DriverGlobals,
5758     _In_
5759     WDFKEY Key,
5760     _In_
5761     PCUNICODE_STRING ValueName,
5762     _In_
5763     PCUNICODE_STRING Value
5764     )
5765 {
5766     PAGED_CODE_LOCKED();
5767     return ((PFN_WDFREGISTRYASSIGNUNICODESTRING) WdfVersion.Functions.pfnWdfRegistryAssignUnicodeString)(DriverGlobals, Key, ValueName, Value);
5768 }
5769 
5770 _Must_inspect_result_
5771 _IRQL_requires_max_(PASSIVE_LEVEL)
5772 WDFAPI
5773 NTSTATUS
5774 VFWDFEXPORT(WdfRegistryAssignString)(
5775     _In_
5776     PWDF_DRIVER_GLOBALS DriverGlobals,
5777     _In_
5778     WDFKEY Key,
5779     _In_
5780     PCUNICODE_STRING ValueName,
5781     _In_
5782     WDFSTRING String
5783     )
5784 {
5785     PAGED_CODE_LOCKED();
5786     return ((PFN_WDFREGISTRYASSIGNSTRING) WdfVersion.Functions.pfnWdfRegistryAssignString)(DriverGlobals, Key, ValueName, String);
5787 }
5788 
5789 _Must_inspect_result_
5790 _IRQL_requires_max_(PASSIVE_LEVEL)
5791 WDFAPI
5792 NTSTATUS
5793 VFWDFEXPORT(WdfRegistryAssignULong)(
5794     _In_
5795     PWDF_DRIVER_GLOBALS DriverGlobals,
5796     _In_
5797     WDFKEY Key,
5798     _In_
5799     PCUNICODE_STRING ValueName,
5800     _In_
5801     ULONG Value
5802     )
5803 {
5804     PAGED_CODE_LOCKED();
5805     return ((PFN_WDFREGISTRYASSIGNULONG) WdfVersion.Functions.pfnWdfRegistryAssignULong)(DriverGlobals, Key, ValueName, Value);
5806 }
5807 
5808 _Must_inspect_result_
5809 _IRQL_requires_max_(DISPATCH_LEVEL)
5810 WDFAPI
5811 NTSTATUS
5812 VFWDFEXPORT(WdfRequestCreate)(
5813     _In_
5814     PWDF_DRIVER_GLOBALS DriverGlobals,
5815     _In_opt_
5816     PWDF_OBJECT_ATTRIBUTES RequestAttributes,
5817     _In_opt_
5818     WDFIOTARGET IoTarget,
5819     _Out_
5820     WDFREQUEST* Request
5821     )
5822 {
5823     PAGED_CODE_LOCKED();
5824     return ((PFN_WDFREQUESTCREATE) WdfVersion.Functions.pfnWdfRequestCreate)(DriverGlobals, RequestAttributes, IoTarget, Request);
5825 }
5826 
5827 _Must_inspect_result_
5828 _IRQL_requires_max_(DISPATCH_LEVEL)
5829 WDFAPI
5830 NTSTATUS
5831 VFWDFEXPORT(WdfRequestCreateFromIrp)(
5832     _In_
5833     PWDF_DRIVER_GLOBALS DriverGlobals,
5834     _In_opt_
5835     PWDF_OBJECT_ATTRIBUTES RequestAttributes,
5836     _In_
5837     PIRP Irp,
5838     _In_
5839     BOOLEAN RequestFreesIrp,
5840     _Out_
5841     WDFREQUEST* Request
5842     )
5843 {
5844     PAGED_CODE_LOCKED();
5845     return ((PFN_WDFREQUESTCREATEFROMIRP) WdfVersion.Functions.pfnWdfRequestCreateFromIrp)(DriverGlobals, RequestAttributes, Irp, RequestFreesIrp, Request);
5846 }
5847 
5848 _IRQL_requires_max_(DISPATCH_LEVEL)
5849 WDFAPI
5850 NTSTATUS
5851 VFWDFEXPORT(WdfRequestReuse)(
5852     _In_
5853     PWDF_DRIVER_GLOBALS DriverGlobals,
5854     _In_
5855     WDFREQUEST Request,
5856     _In_
5857     PWDF_REQUEST_REUSE_PARAMS ReuseParams
5858     )
5859 {
5860     PAGED_CODE_LOCKED();
5861     return ((PFN_WDFREQUESTREUSE) WdfVersion.Functions.pfnWdfRequestReuse)(DriverGlobals, Request, ReuseParams);
5862 }
5863 
5864 _Must_inspect_result_
5865 _IRQL_requires_max_(DISPATCH_LEVEL)
5866 WDFAPI
5867 NTSTATUS
5868 VFWDFEXPORT(WdfRequestChangeTarget)(
5869     _In_
5870     PWDF_DRIVER_GLOBALS DriverGlobals,
5871     _In_
5872     WDFREQUEST Request,
5873     _In_
5874     WDFIOTARGET IoTarget
5875     )
5876 {
5877     PAGED_CODE_LOCKED();
5878     return ((PFN_WDFREQUESTCHANGETARGET) WdfVersion.Functions.pfnWdfRequestChangeTarget)(DriverGlobals, Request, IoTarget);
5879 }
5880 
5881 _IRQL_requires_max_(DISPATCH_LEVEL)
5882 WDFAPI
5883 VOID
5884 VFWDFEXPORT(WdfRequestFormatRequestUsingCurrentType)(
5885     _In_
5886     PWDF_DRIVER_GLOBALS DriverGlobals,
5887     _In_
5888     WDFREQUEST Request
5889     )
5890 {
5891     PAGED_CODE_LOCKED();
5892     ((PFN_WDFREQUESTFORMATREQUESTUSINGCURRENTTYPE) WdfVersion.Functions.pfnWdfRequestFormatRequestUsingCurrentType)(DriverGlobals, Request);
5893 }
5894 
5895 _IRQL_requires_max_(DISPATCH_LEVEL)
5896 WDFAPI
5897 VOID
5898 VFWDFEXPORT(WdfRequestWdmFormatUsingStackLocation)(
5899     _In_
5900     PWDF_DRIVER_GLOBALS DriverGlobals,
5901     _In_
5902     WDFREQUEST Request,
5903     _In_
5904     PIO_STACK_LOCATION Stack
5905     )
5906 {
5907     PAGED_CODE_LOCKED();
5908     ((PFN_WDFREQUESTWDMFORMATUSINGSTACKLOCATION) WdfVersion.Functions.pfnWdfRequestWdmFormatUsingStackLocation)(DriverGlobals, Request, Stack);
5909 }
5910 
5911 _IRQL_requires_max_(DISPATCH_LEVEL)
5912 _When_(Options->Flags & WDF_REQUEST_SEND_OPTION_SYNCHRONOUS == 0, _Must_inspect_result_)
5913 WDFAPI
5914 BOOLEAN
5915 VFWDFEXPORT(WdfRequestSend)(
5916     _In_
5917     PWDF_DRIVER_GLOBALS DriverGlobals,
5918     _In_
5919     WDFREQUEST Request,
5920     _In_
5921     WDFIOTARGET Target,
5922     _In_opt_
5923     PWDF_REQUEST_SEND_OPTIONS Options
5924     )
5925 {
5926     PAGED_CODE_LOCKED();
5927     return ((PFN_WDFREQUESTSEND) WdfVersion.Functions.pfnWdfRequestSend)(DriverGlobals, Request, Target, Options);
5928 }
5929 
5930 _Must_inspect_result_
5931 _IRQL_requires_max_(DISPATCH_LEVEL)
5932 WDFAPI
5933 NTSTATUS
5934 VFWDFEXPORT(WdfRequestGetStatus)(
5935     _In_
5936     PWDF_DRIVER_GLOBALS DriverGlobals,
5937     _In_
5938     WDFREQUEST Request
5939     )
5940 {
5941     PAGED_CODE_LOCKED();
5942     return ((PFN_WDFREQUESTGETSTATUS) WdfVersion.Functions.pfnWdfRequestGetStatus)(DriverGlobals, Request);
5943 }
5944 
5945 _IRQL_requires_max_(DISPATCH_LEVEL)
5946 WDFAPI
5947 VOID
5948 VFWDFEXPORT(WdfRequestMarkCancelable)(
5949     _In_
5950     PWDF_DRIVER_GLOBALS DriverGlobals,
5951     _In_
5952     WDFREQUEST Request,
5953     _In_
5954     PFN_WDF_REQUEST_CANCEL EvtRequestCancel
5955     )
5956 {
5957     PAGED_CODE_LOCKED();
5958     ((PFN_WDFREQUESTMARKCANCELABLE) WdfVersion.Functions.pfnWdfRequestMarkCancelable)(DriverGlobals, Request, EvtRequestCancel);
5959 }
5960 
5961 _Must_inspect_result_
5962 _IRQL_requires_max_(DISPATCH_LEVEL)
5963 WDFAPI
5964 NTSTATUS
5965 VFWDFEXPORT(WdfRequestMarkCancelableEx)(
5966     _In_
5967     PWDF_DRIVER_GLOBALS DriverGlobals,
5968     _In_
5969     WDFREQUEST Request,
5970     _In_
5971     PFN_WDF_REQUEST_CANCEL EvtRequestCancel
5972     )
5973 {
5974     PAGED_CODE_LOCKED();
5975     return ((PFN_WDFREQUESTMARKCANCELABLEEX) WdfVersion.Functions.pfnWdfRequestMarkCancelableEx)(DriverGlobals, Request, EvtRequestCancel);
5976 }
5977 
5978 _Must_inspect_result_
5979 _IRQL_requires_max_(DISPATCH_LEVEL)
5980 WDFAPI
5981 NTSTATUS
5982 VFWDFEXPORT(WdfRequestUnmarkCancelable)(
5983     _In_
5984     PWDF_DRIVER_GLOBALS DriverGlobals,
5985     _In_
5986     WDFREQUEST Request
5987     )
5988 {
5989     PAGED_CODE_LOCKED();
5990     return ((PFN_WDFREQUESTUNMARKCANCELABLE) WdfVersion.Functions.pfnWdfRequestUnmarkCancelable)(DriverGlobals, Request);
5991 }
5992 
5993 _Must_inspect_result_
5994 _IRQL_requires_max_(DISPATCH_LEVEL)
5995 WDFAPI
5996 BOOLEAN
5997 VFWDFEXPORT(WdfRequestIsCanceled)(
5998     _In_
5999     PWDF_DRIVER_GLOBALS DriverGlobals,
6000     _In_
6001     WDFREQUEST Request
6002     )
6003 {
6004     PAGED_CODE_LOCKED();
6005     return ((PFN_WDFREQUESTISCANCELED) WdfVersion.Functions.pfnWdfRequestIsCanceled)(DriverGlobals, Request);
6006 }
6007 
6008 _IRQL_requires_max_(DISPATCH_LEVEL)
6009 WDFAPI
6010 BOOLEAN
6011 VFWDFEXPORT(WdfRequestCancelSentRequest)(
6012     _In_
6013     PWDF_DRIVER_GLOBALS DriverGlobals,
6014     _In_
6015     WDFREQUEST Request
6016     )
6017 {
6018     PAGED_CODE_LOCKED();
6019     return ((PFN_WDFREQUESTCANCELSENTREQUEST) WdfVersion.Functions.pfnWdfRequestCancelSentRequest)(DriverGlobals, Request);
6020 }
6021 
6022 _Must_inspect_result_
6023 _IRQL_requires_max_(APC_LEVEL)
6024 WDFAPI
6025 BOOLEAN
6026 VFWDFEXPORT(WdfRequestIsFrom32BitProcess)(
6027     _In_
6028     PWDF_DRIVER_GLOBALS DriverGlobals,
6029     _In_
6030     WDFREQUEST Request
6031     )
6032 {
6033     PAGED_CODE_LOCKED();
6034     return ((PFN_WDFREQUESTISFROM32BITPROCESS) WdfVersion.Functions.pfnWdfRequestIsFrom32BitProcess)(DriverGlobals, Request);
6035 }
6036 
6037 _IRQL_requires_max_(DISPATCH_LEVEL)
6038 WDFAPI
6039 VOID
6040 VFWDFEXPORT(WdfRequestSetCompletionRoutine)(
6041     _In_
6042     PWDF_DRIVER_GLOBALS DriverGlobals,
6043     _In_
6044     WDFREQUEST Request,
6045     _In_opt_
6046     PFN_WDF_REQUEST_COMPLETION_ROUTINE CompletionRoutine,
6047     _In_opt_ __drv_aliasesMem
6048     WDFCONTEXT CompletionContext
6049     )
6050 {
6051     PAGED_CODE_LOCKED();
6052     ((PFN_WDFREQUESTSETCOMPLETIONROUTINE) WdfVersion.Functions.pfnWdfRequestSetCompletionRoutine)(DriverGlobals, Request, CompletionRoutine, CompletionContext);
6053 }
6054 
6055 _IRQL_requires_max_(DISPATCH_LEVEL)
6056 WDFAPI
6057 VOID
6058 VFWDFEXPORT(WdfRequestGetCompletionParams)(
6059     _In_
6060     PWDF_DRIVER_GLOBALS DriverGlobals,
6061     _In_
6062     WDFREQUEST Request,
6063     _Out_
6064     PWDF_REQUEST_COMPLETION_PARAMS Params
6065     )
6066 {
6067     PAGED_CODE_LOCKED();
6068     ((PFN_WDFREQUESTGETCOMPLETIONPARAMS) WdfVersion.Functions.pfnWdfRequestGetCompletionParams)(DriverGlobals, Request, Params);
6069 }
6070 
6071 _Must_inspect_result_
6072 _IRQL_requires_max_(DISPATCH_LEVEL)
6073 WDFAPI
6074 NTSTATUS
6075 VFWDFEXPORT(WdfRequestAllocateTimer)(
6076     _In_
6077     PWDF_DRIVER_GLOBALS DriverGlobals,
6078     _In_
6079     WDFREQUEST Request
6080     )
6081 {
6082     PAGED_CODE_LOCKED();
6083     return ((PFN_WDFREQUESTALLOCATETIMER) WdfVersion.Functions.pfnWdfRequestAllocateTimer)(DriverGlobals, Request);
6084 }
6085 
6086 _IRQL_requires_max_(DISPATCH_LEVEL)
6087 WDFAPI
6088 VOID
6089 VFWDFEXPORT(WdfRequestComplete)(
6090     _In_
6091     PWDF_DRIVER_GLOBALS DriverGlobals,
6092     _In_
6093     WDFREQUEST Request,
6094     _In_
6095     NTSTATUS Status
6096     )
6097 {
6098     PAGED_CODE_LOCKED();
6099     PerfIoComplete(Request);
6100     ((PFN_WDFREQUESTCOMPLETE) WdfVersion.Functions.pfnWdfRequestComplete)(DriverGlobals, Request, Status);
6101 }
6102 
6103 _IRQL_requires_max_(DISPATCH_LEVEL)
6104 WDFAPI
6105 VOID
6106 VFWDFEXPORT(WdfRequestCompleteWithPriorityBoost)(
6107     _In_
6108     PWDF_DRIVER_GLOBALS DriverGlobals,
6109     _In_
6110     WDFREQUEST Request,
6111     _In_
6112     NTSTATUS Status,
6113     _In_
6114     CCHAR PriorityBoost
6115     )
6116 {
6117     PAGED_CODE_LOCKED();
6118     PerfIoComplete(Request);
6119     ((PFN_WDFREQUESTCOMPLETEWITHPRIORITYBOOST) WdfVersion.Functions.pfnWdfRequestCompleteWithPriorityBoost)(DriverGlobals, Request, Status, PriorityBoost);
6120 }
6121 
6122 _IRQL_requires_max_(DISPATCH_LEVEL)
6123 WDFAPI
6124 VOID
6125 VFWDFEXPORT(WdfRequestCompleteWithInformation)(
6126     _In_
6127     PWDF_DRIVER_GLOBALS DriverGlobals,
6128     _In_
6129     WDFREQUEST Request,
6130     _In_
6131     NTSTATUS Status,
6132     _In_
6133     ULONG_PTR Information
6134     )
6135 {
6136     PAGED_CODE_LOCKED();
6137     PerfIoComplete(Request);
6138     ((PFN_WDFREQUESTCOMPLETEWITHINFORMATION) WdfVersion.Functions.pfnWdfRequestCompleteWithInformation)(DriverGlobals, Request, Status, Information);
6139 }
6140 
6141 _IRQL_requires_max_(DISPATCH_LEVEL)
6142 WDFAPI
6143 VOID
6144 VFWDFEXPORT(WdfRequestGetParameters)(
6145     _In_
6146     PWDF_DRIVER_GLOBALS DriverGlobals,
6147     _In_
6148     WDFREQUEST Request,
6149     _Out_
6150     PWDF_REQUEST_PARAMETERS Parameters
6151     )
6152 {
6153     PAGED_CODE_LOCKED();
6154     ((PFN_WDFREQUESTGETPARAMETERS) WdfVersion.Functions.pfnWdfRequestGetParameters)(DriverGlobals, Request, Parameters);
6155 }
6156 
6157 _Must_inspect_result_
6158 _IRQL_requires_max_(DISPATCH_LEVEL)
6159 WDFAPI
6160 NTSTATUS
6161 VFWDFEXPORT(WdfRequestRetrieveInputMemory)(
6162     _In_
6163     PWDF_DRIVER_GLOBALS DriverGlobals,
6164     _In_
6165     WDFREQUEST Request,
6166     _Out_
6167     WDFMEMORY* Memory
6168     )
6169 {
6170     PAGED_CODE_LOCKED();
6171     return ((PFN_WDFREQUESTRETRIEVEINPUTMEMORY) WdfVersion.Functions.pfnWdfRequestRetrieveInputMemory)(DriverGlobals, Request, Memory);
6172 }
6173 
6174 _Must_inspect_result_
6175 _IRQL_requires_max_(DISPATCH_LEVEL)
6176 WDFAPI
6177 NTSTATUS
6178 VFWDFEXPORT(WdfRequestRetrieveOutputMemory)(
6179     _In_
6180     PWDF_DRIVER_GLOBALS DriverGlobals,
6181     _In_
6182     WDFREQUEST Request,
6183     _Out_
6184     WDFMEMORY* Memory
6185     )
6186 {
6187     PAGED_CODE_LOCKED();
6188     return ((PFN_WDFREQUESTRETRIEVEOUTPUTMEMORY) WdfVersion.Functions.pfnWdfRequestRetrieveOutputMemory)(DriverGlobals, Request, Memory);
6189 }
6190 
6191 _Must_inspect_result_
6192 _IRQL_requires_max_(DISPATCH_LEVEL)
6193 WDFAPI
6194 NTSTATUS
6195 VFWDFEXPORT(WdfRequestRetrieveInputBuffer)(
6196     _In_
6197     PWDF_DRIVER_GLOBALS DriverGlobals,
6198     _In_
6199     WDFREQUEST Request,
6200     _In_
6201     size_t MinimumRequiredLength,
6202     _Outptr_result_bytebuffer_(*Length)
6203     PVOID* Buffer,
6204     _Out_opt_
6205     size_t* Length
6206     )
6207 {
6208     PAGED_CODE_LOCKED();
6209     return ((PFN_WDFREQUESTRETRIEVEINPUTBUFFER) WdfVersion.Functions.pfnWdfRequestRetrieveInputBuffer)(DriverGlobals, Request, MinimumRequiredLength, Buffer, Length);
6210 }
6211 
6212 _Must_inspect_result_
6213 _IRQL_requires_max_(DISPATCH_LEVEL)
6214 WDFAPI
6215 NTSTATUS
6216 VFWDFEXPORT(WdfRequestRetrieveOutputBuffer)(
6217     _In_
6218     PWDF_DRIVER_GLOBALS DriverGlobals,
6219     _In_
6220     WDFREQUEST Request,
6221     _In_
6222     size_t MinimumRequiredSize,
6223     _Outptr_result_bytebuffer_(*Length)
6224     PVOID* Buffer,
6225     _Out_opt_
6226     size_t* Length
6227     )
6228 {
6229     PAGED_CODE_LOCKED();
6230     return ((PFN_WDFREQUESTRETRIEVEOUTPUTBUFFER) WdfVersion.Functions.pfnWdfRequestRetrieveOutputBuffer)(DriverGlobals, Request, MinimumRequiredSize, Buffer, Length);
6231 }
6232 
6233 _Must_inspect_result_
6234 _IRQL_requires_max_(DISPATCH_LEVEL)
6235 WDFAPI
6236 NTSTATUS
6237 VFWDFEXPORT(WdfRequestRetrieveInputWdmMdl)(
6238     _In_
6239     PWDF_DRIVER_GLOBALS DriverGlobals,
6240     _In_
6241     WDFREQUEST Request,
6242     _Outptr_
6243     PMDL* Mdl
6244     )
6245 {
6246     PAGED_CODE_LOCKED();
6247     return ((PFN_WDFREQUESTRETRIEVEINPUTWDMMDL) WdfVersion.Functions.pfnWdfRequestRetrieveInputWdmMdl)(DriverGlobals, Request, Mdl);
6248 }
6249 
6250 _Must_inspect_result_
6251 _IRQL_requires_max_(DISPATCH_LEVEL)
6252 WDFAPI
6253 NTSTATUS
6254 VFWDFEXPORT(WdfRequestRetrieveOutputWdmMdl)(
6255     _In_
6256     PWDF_DRIVER_GLOBALS DriverGlobals,
6257     _In_
6258     WDFREQUEST Request,
6259     _Outptr_
6260     PMDL* Mdl
6261     )
6262 {
6263     PAGED_CODE_LOCKED();
6264     return ((PFN_WDFREQUESTRETRIEVEOUTPUTWDMMDL) WdfVersion.Functions.pfnWdfRequestRetrieveOutputWdmMdl)(DriverGlobals, Request, Mdl);
6265 }
6266 
6267 _Must_inspect_result_
6268 _IRQL_requires_max_(PASSIVE_LEVEL)
6269 WDFAPI
6270 NTSTATUS
6271 VFWDFEXPORT(WdfRequestRetrieveUnsafeUserInputBuffer)(
6272     _In_
6273     PWDF_DRIVER_GLOBALS DriverGlobals,
6274     _In_
6275     WDFREQUEST Request,
6276     _In_
6277     size_t MinimumRequiredLength,
6278     _Outptr_result_bytebuffer_maybenull_(*Length)
6279     PVOID* InputBuffer,
6280     _Out_opt_
6281     size_t* Length
6282     )
6283 {
6284     PAGED_CODE_LOCKED();
6285     return ((PFN_WDFREQUESTRETRIEVEUNSAFEUSERINPUTBUFFER) WdfVersion.Functions.pfnWdfRequestRetrieveUnsafeUserInputBuffer)(DriverGlobals, Request, MinimumRequiredLength, InputBuffer, Length);
6286 }
6287 
6288 _Must_inspect_result_
6289 _IRQL_requires_max_(PASSIVE_LEVEL)
6290 WDFAPI
6291 NTSTATUS
6292 VFWDFEXPORT(WdfRequestRetrieveUnsafeUserOutputBuffer)(
6293     _In_
6294     PWDF_DRIVER_GLOBALS DriverGlobals,
6295     _In_
6296     WDFREQUEST Request,
6297     _In_
6298     size_t MinimumRequiredLength,
6299     _Outptr_result_bytebuffer_maybenull_(*Length)
6300     PVOID* OutputBuffer,
6301     _Out_opt_
6302     size_t* Length
6303     )
6304 {
6305     PAGED_CODE_LOCKED();
6306     return ((PFN_WDFREQUESTRETRIEVEUNSAFEUSEROUTPUTBUFFER) WdfVersion.Functions.pfnWdfRequestRetrieveUnsafeUserOutputBuffer)(DriverGlobals, Request, MinimumRequiredLength, OutputBuffer, Length);
6307 }
6308 
6309 _IRQL_requires_max_(DISPATCH_LEVEL)
6310 WDFAPI
6311 VOID
6312 VFWDFEXPORT(WdfRequestSetInformation)(
6313     _In_
6314     PWDF_DRIVER_GLOBALS DriverGlobals,
6315     _In_
6316     WDFREQUEST Request,
6317     _In_
6318     ULONG_PTR Information
6319     )
6320 {
6321     PAGED_CODE_LOCKED();
6322     ((PFN_WDFREQUESTSETINFORMATION) WdfVersion.Functions.pfnWdfRequestSetInformation)(DriverGlobals, Request, Information);
6323 }
6324 
6325 _IRQL_requires_max_(DISPATCH_LEVEL)
6326 WDFAPI
6327 ULONG_PTR
6328 VFWDFEXPORT(WdfRequestGetInformation)(
6329     _In_
6330     PWDF_DRIVER_GLOBALS DriverGlobals,
6331     _In_
6332     WDFREQUEST Request
6333     )
6334 {
6335     PAGED_CODE_LOCKED();
6336     return ((PFN_WDFREQUESTGETINFORMATION) WdfVersion.Functions.pfnWdfRequestGetInformation)(DriverGlobals, Request);
6337 }
6338 
6339 _IRQL_requires_max_(DISPATCH_LEVEL)
6340 WDFAPI
6341 WDFFILEOBJECT
6342 VFWDFEXPORT(WdfRequestGetFileObject)(
6343     _In_
6344     PWDF_DRIVER_GLOBALS DriverGlobals,
6345     _In_
6346     WDFREQUEST Request
6347     )
6348 {
6349     PAGED_CODE_LOCKED();
6350     return ((PFN_WDFREQUESTGETFILEOBJECT) WdfVersion.Functions.pfnWdfRequestGetFileObject)(DriverGlobals, Request);
6351 }
6352 
6353 _Must_inspect_result_
6354 _IRQL_requires_max_(PASSIVE_LEVEL)
6355 WDFAPI
6356 NTSTATUS
6357 VFWDFEXPORT(WdfRequestProbeAndLockUserBufferForRead)(
6358     _In_
6359     PWDF_DRIVER_GLOBALS DriverGlobals,
6360     _In_
6361     WDFREQUEST Request,
6362     _In_reads_bytes_(Length)
6363     PVOID Buffer,
6364     _In_
6365     size_t Length,
6366     _Out_
6367     WDFMEMORY* MemoryObject
6368     )
6369 {
6370     PAGED_CODE_LOCKED();
6371     return ((PFN_WDFREQUESTPROBEANDLOCKUSERBUFFERFORREAD) WdfVersion.Functions.pfnWdfRequestProbeAndLockUserBufferForRead)(DriverGlobals, Request, Buffer, Length, MemoryObject);
6372 }
6373 
6374 _Must_inspect_result_
6375 _IRQL_requires_max_(PASSIVE_LEVEL)
6376 WDFAPI
6377 NTSTATUS
6378 VFWDFEXPORT(WdfRequestProbeAndLockUserBufferForWrite)(
6379     _In_
6380     PWDF_DRIVER_GLOBALS DriverGlobals,
6381     _In_
6382     WDFREQUEST Request,
6383     _In_reads_bytes_(Length)
6384     PVOID Buffer,
6385     _In_
6386     size_t Length,
6387     _Out_
6388     WDFMEMORY* MemoryObject
6389     )
6390 {
6391     PAGED_CODE_LOCKED();
6392     return ((PFN_WDFREQUESTPROBEANDLOCKUSERBUFFERFORWRITE) WdfVersion.Functions.pfnWdfRequestProbeAndLockUserBufferForWrite)(DriverGlobals, Request, Buffer, Length, MemoryObject);
6393 }
6394 
6395 _IRQL_requires_max_(DISPATCH_LEVEL)
6396 WDFAPI
6397 KPROCESSOR_MODE
6398 VFWDFEXPORT(WdfRequestGetRequestorMode)(
6399     _In_
6400     PWDF_DRIVER_GLOBALS DriverGlobals,
6401     _In_
6402     WDFREQUEST Request
6403     )
6404 {
6405     PAGED_CODE_LOCKED();
6406     return ((PFN_WDFREQUESTGETREQUESTORMODE) WdfVersion.Functions.pfnWdfRequestGetRequestorMode)(DriverGlobals, Request);
6407 }
6408 
6409 _Must_inspect_result_
6410 _IRQL_requires_max_(DISPATCH_LEVEL)
6411 WDFAPI
6412 NTSTATUS
6413 VFWDFEXPORT(WdfRequestForwardToIoQueue)(
6414     _In_
6415     PWDF_DRIVER_GLOBALS DriverGlobals,
6416     _In_
6417     WDFREQUEST Request,
6418     _In_
6419     WDFQUEUE DestinationQueue
6420     )
6421 {
6422     PAGED_CODE_LOCKED();
6423     return ((PFN_WDFREQUESTFORWARDTOIOQUEUE) WdfVersion.Functions.pfnWdfRequestForwardToIoQueue)(DriverGlobals, Request, DestinationQueue);
6424 }
6425 
6426 _IRQL_requires_max_(DISPATCH_LEVEL)
6427 WDFAPI
6428 WDFQUEUE
6429 VFWDFEXPORT(WdfRequestGetIoQueue)(
6430     _In_
6431     PWDF_DRIVER_GLOBALS DriverGlobals,
6432     _In_
6433     WDFREQUEST Request
6434     )
6435 {
6436     PAGED_CODE_LOCKED();
6437     return ((PFN_WDFREQUESTGETIOQUEUE) WdfVersion.Functions.pfnWdfRequestGetIoQueue)(DriverGlobals, Request);
6438 }
6439 
6440 _Must_inspect_result_
6441 _IRQL_requires_max_(DISPATCH_LEVEL)
6442 WDFAPI
6443 NTSTATUS
6444 VFWDFEXPORT(WdfRequestRequeue)(
6445     _In_
6446     PWDF_DRIVER_GLOBALS DriverGlobals,
6447     _In_
6448     WDFREQUEST Request
6449     )
6450 {
6451     PAGED_CODE_LOCKED();
6452     return ((PFN_WDFREQUESTREQUEUE) WdfVersion.Functions.pfnWdfRequestRequeue)(DriverGlobals, Request);
6453 }
6454 
6455 _IRQL_requires_max_(DISPATCH_LEVEL)
6456 WDFAPI
6457 VOID
6458 VFWDFEXPORT(WdfRequestStopAcknowledge)(
6459     _In_
6460     PWDF_DRIVER_GLOBALS DriverGlobals,
6461     _In_
6462     WDFREQUEST Request,
6463     _In_
6464     BOOLEAN Requeue
6465     )
6466 {
6467     PAGED_CODE_LOCKED();
6468     ((PFN_WDFREQUESTSTOPACKNOWLEDGE) WdfVersion.Functions.pfnWdfRequestStopAcknowledge)(DriverGlobals, Request, Requeue);
6469 }
6470 
6471 _IRQL_requires_max_(DISPATCH_LEVEL)
6472 WDFAPI
6473 PIRP
6474 VFWDFEXPORT(WdfRequestWdmGetIrp)(
6475     _In_
6476     PWDF_DRIVER_GLOBALS DriverGlobals,
6477     _In_
6478     WDFREQUEST Request
6479     )
6480 {
6481     PAGED_CODE_LOCKED();
6482     return ((PFN_WDFREQUESTWDMGETIRP) WdfVersion.Functions.pfnWdfRequestWdmGetIrp)(DriverGlobals, Request);
6483 }
6484 
6485 _IRQL_requires_max_(DISPATCH_LEVEL)
6486 WDFAPI
6487 BOOLEAN
6488 VFWDFEXPORT(WdfRequestIsReserved)(
6489     _In_
6490     PWDF_DRIVER_GLOBALS DriverGlobals,
6491     _In_
6492     WDFREQUEST Request
6493     )
6494 {
6495     PAGED_CODE_LOCKED();
6496     return ((PFN_WDFREQUESTISRESERVED) WdfVersion.Functions.pfnWdfRequestIsReserved)(DriverGlobals, Request);
6497 }
6498 
6499 _Must_inspect_result_
6500 _IRQL_requires_max_(DISPATCH_LEVEL)
6501 WDFAPI
6502 NTSTATUS
6503 VFWDFEXPORT(WdfRequestForwardToParentDeviceIoQueue)(
6504     _In_
6505     PWDF_DRIVER_GLOBALS DriverGlobals,
6506     _In_
6507     WDFREQUEST Request,
6508     _In_
6509     WDFQUEUE ParentDeviceQueue,
6510     _In_
6511     PWDF_REQUEST_FORWARD_OPTIONS ForwardOptions
6512     )
6513 {
6514     PAGED_CODE_LOCKED();
6515     return ((PFN_WDFREQUESTFORWARDTOPARENTDEVICEIOQUEUE) WdfVersion.Functions.pfnWdfRequestForwardToParentDeviceIoQueue)(DriverGlobals, Request, ParentDeviceQueue, ForwardOptions);
6516 }
6517 
6518 _IRQL_requires_max_(DISPATCH_LEVEL)
6519 WDFAPI
6520 VOID
6521 VFWDFEXPORT(WdfIoResourceRequirementsListSetSlotNumber)(
6522     _In_
6523     PWDF_DRIVER_GLOBALS DriverGlobals,
6524     _In_
6525     WDFIORESREQLIST RequirementsList,
6526     _In_
6527     ULONG SlotNumber
6528     )
6529 {
6530     PAGED_CODE_LOCKED();
6531     ((PFN_WDFIORESOURCEREQUIREMENTSLISTSETSLOTNUMBER) WdfVersion.Functions.pfnWdfIoResourceRequirementsListSetSlotNumber)(DriverGlobals, RequirementsList, SlotNumber);
6532 }
6533 
6534 _IRQL_requires_max_(DISPATCH_LEVEL)
6535 WDFAPI
6536 VOID
6537 VFWDFEXPORT(WdfIoResourceRequirementsListSetInterfaceType)(
6538     _In_
6539     PWDF_DRIVER_GLOBALS DriverGlobals,
6540     _In_
6541     WDFIORESREQLIST RequirementsList,
6542     _In_
6543     _Strict_type_match_
6544     INTERFACE_TYPE InterfaceType
6545     )
6546 {
6547     PAGED_CODE_LOCKED();
6548     ((PFN_WDFIORESOURCEREQUIREMENTSLISTSETINTERFACETYPE) WdfVersion.Functions.pfnWdfIoResourceRequirementsListSetInterfaceType)(DriverGlobals, RequirementsList, InterfaceType);
6549 }
6550 
6551 _Must_inspect_result_
6552 _IRQL_requires_max_(DISPATCH_LEVEL)
6553 WDFAPI
6554 NTSTATUS
6555 VFWDFEXPORT(WdfIoResourceRequirementsListAppendIoResList)(
6556     _In_
6557     PWDF_DRIVER_GLOBALS DriverGlobals,
6558     _In_
6559     WDFIORESREQLIST RequirementsList,
6560     _In_
6561     WDFIORESLIST IoResList
6562     )
6563 {
6564     PAGED_CODE_LOCKED();
6565     return ((PFN_WDFIORESOURCEREQUIREMENTSLISTAPPENDIORESLIST) WdfVersion.Functions.pfnWdfIoResourceRequirementsListAppendIoResList)(DriverGlobals, RequirementsList, IoResList);
6566 }
6567 
6568 _Must_inspect_result_
6569 _IRQL_requires_max_(DISPATCH_LEVEL)
6570 WDFAPI
6571 NTSTATUS
6572 VFWDFEXPORT(WdfIoResourceRequirementsListInsertIoResList)(
6573     _In_
6574     PWDF_DRIVER_GLOBALS DriverGlobals,
6575     _In_
6576     WDFIORESREQLIST RequirementsList,
6577     _In_
6578     WDFIORESLIST IoResList,
6579     _In_
6580     ULONG Index
6581     )
6582 {
6583     PAGED_CODE_LOCKED();
6584     return ((PFN_WDFIORESOURCEREQUIREMENTSLISTINSERTIORESLIST) WdfVersion.Functions.pfnWdfIoResourceRequirementsListInsertIoResList)(DriverGlobals, RequirementsList, IoResList, Index);
6585 }
6586 
6587 _IRQL_requires_max_(DISPATCH_LEVEL)
6588 WDFAPI
6589 ULONG
6590 VFWDFEXPORT(WdfIoResourceRequirementsListGetCount)(
6591     _In_
6592     PWDF_DRIVER_GLOBALS DriverGlobals,
6593     _In_
6594     WDFIORESREQLIST RequirementsList
6595     )
6596 {
6597     PAGED_CODE_LOCKED();
6598     return ((PFN_WDFIORESOURCEREQUIREMENTSLISTGETCOUNT) WdfVersion.Functions.pfnWdfIoResourceRequirementsListGetCount)(DriverGlobals, RequirementsList);
6599 }
6600 
6601 _IRQL_requires_max_(DISPATCH_LEVEL)
6602 WDFAPI
6603 WDFIORESLIST
6604 VFWDFEXPORT(WdfIoResourceRequirementsListGetIoResList)(
6605     _In_
6606     PWDF_DRIVER_GLOBALS DriverGlobals,
6607     _In_
6608     WDFIORESREQLIST RequirementsList,
6609     _In_
6610     ULONG Index
6611     )
6612 {
6613     PAGED_CODE_LOCKED();
6614     return ((PFN_WDFIORESOURCEREQUIREMENTSLISTGETIORESLIST) WdfVersion.Functions.pfnWdfIoResourceRequirementsListGetIoResList)(DriverGlobals, RequirementsList, Index);
6615 }
6616 
6617 _IRQL_requires_max_(DISPATCH_LEVEL)
6618 WDFAPI
6619 VOID
6620 VFWDFEXPORT(WdfIoResourceRequirementsListRemove)(
6621     _In_
6622     PWDF_DRIVER_GLOBALS DriverGlobals,
6623     _In_
6624     WDFIORESREQLIST RequirementsList,
6625     _In_
6626     ULONG Index
6627     )
6628 {
6629     PAGED_CODE_LOCKED();
6630     ((PFN_WDFIORESOURCEREQUIREMENTSLISTREMOVE) WdfVersion.Functions.pfnWdfIoResourceRequirementsListRemove)(DriverGlobals, RequirementsList, Index);
6631 }
6632 
6633 _IRQL_requires_max_(DISPATCH_LEVEL)
6634 WDFAPI
6635 VOID
6636 VFWDFEXPORT(WdfIoResourceRequirementsListRemoveByIoResList)(
6637     _In_
6638     PWDF_DRIVER_GLOBALS DriverGlobals,
6639     _In_
6640     WDFIORESREQLIST RequirementsList,
6641     _In_
6642     WDFIORESLIST IoResList
6643     )
6644 {
6645     PAGED_CODE_LOCKED();
6646     ((PFN_WDFIORESOURCEREQUIREMENTSLISTREMOVEBYIORESLIST) WdfVersion.Functions.pfnWdfIoResourceRequirementsListRemoveByIoResList)(DriverGlobals, RequirementsList, IoResList);
6647 }
6648 
6649 _Must_inspect_result_
6650 _IRQL_requires_max_(DISPATCH_LEVEL)
6651 WDFAPI
6652 NTSTATUS
6653 VFWDFEXPORT(WdfIoResourceListCreate)(
6654     _In_
6655     PWDF_DRIVER_GLOBALS DriverGlobals,
6656     _In_
6657     WDFIORESREQLIST RequirementsList,
6658     _In_opt_
6659     PWDF_OBJECT_ATTRIBUTES Attributes,
6660     _Out_
6661     WDFIORESLIST* ResourceList
6662     )
6663 {
6664     PAGED_CODE_LOCKED();
6665     return ((PFN_WDFIORESOURCELISTCREATE) WdfVersion.Functions.pfnWdfIoResourceListCreate)(DriverGlobals, RequirementsList, Attributes, ResourceList);
6666 }
6667 
6668 _Must_inspect_result_
6669 _IRQL_requires_max_(DISPATCH_LEVEL)
6670 WDFAPI
6671 NTSTATUS
6672 VFWDFEXPORT(WdfIoResourceListAppendDescriptor)(
6673     _In_
6674     PWDF_DRIVER_GLOBALS DriverGlobals,
6675     _In_
6676     WDFIORESLIST ResourceList,
6677     _In_
6678     PIO_RESOURCE_DESCRIPTOR Descriptor
6679     )
6680 {
6681     PAGED_CODE_LOCKED();
6682     return ((PFN_WDFIORESOURCELISTAPPENDDESCRIPTOR) WdfVersion.Functions.pfnWdfIoResourceListAppendDescriptor)(DriverGlobals, ResourceList, Descriptor);
6683 }
6684 
6685 _Must_inspect_result_
6686 _IRQL_requires_max_(DISPATCH_LEVEL)
6687 WDFAPI
6688 NTSTATUS
6689 VFWDFEXPORT(WdfIoResourceListInsertDescriptor)(
6690     _In_
6691     PWDF_DRIVER_GLOBALS DriverGlobals,
6692     _In_
6693     WDFIORESLIST ResourceList,
6694     _In_
6695     PIO_RESOURCE_DESCRIPTOR Descriptor,
6696     _In_
6697     ULONG Index
6698     )
6699 {
6700     PAGED_CODE_LOCKED();
6701     return ((PFN_WDFIORESOURCELISTINSERTDESCRIPTOR) WdfVersion.Functions.pfnWdfIoResourceListInsertDescriptor)(DriverGlobals, ResourceList, Descriptor, Index);
6702 }
6703 
6704 _IRQL_requires_max_(DISPATCH_LEVEL)
6705 WDFAPI
6706 VOID
6707 VFWDFEXPORT(WdfIoResourceListUpdateDescriptor)(
6708     _In_
6709     PWDF_DRIVER_GLOBALS DriverGlobals,
6710     _In_
6711     WDFIORESLIST ResourceList,
6712     _In_
6713     PIO_RESOURCE_DESCRIPTOR Descriptor,
6714     _In_
6715     ULONG Index
6716     )
6717 {
6718     PAGED_CODE_LOCKED();
6719     ((PFN_WDFIORESOURCELISTUPDATEDESCRIPTOR) WdfVersion.Functions.pfnWdfIoResourceListUpdateDescriptor)(DriverGlobals, ResourceList, Descriptor, Index);
6720 }
6721 
6722 _IRQL_requires_max_(DISPATCH_LEVEL)
6723 WDFAPI
6724 ULONG
6725 VFWDFEXPORT(WdfIoResourceListGetCount)(
6726     _In_
6727     PWDF_DRIVER_GLOBALS DriverGlobals,
6728     _In_
6729     WDFIORESLIST ResourceList
6730     )
6731 {
6732     PAGED_CODE_LOCKED();
6733     return ((PFN_WDFIORESOURCELISTGETCOUNT) WdfVersion.Functions.pfnWdfIoResourceListGetCount)(DriverGlobals, ResourceList);
6734 }
6735 
6736 _IRQL_requires_max_(DISPATCH_LEVEL)
6737 WDFAPI
6738 PIO_RESOURCE_DESCRIPTOR
6739 VFWDFEXPORT(WdfIoResourceListGetDescriptor)(
6740     _In_
6741     PWDF_DRIVER_GLOBALS DriverGlobals,
6742     _In_
6743     WDFIORESLIST ResourceList,
6744     _In_
6745     ULONG Index
6746     )
6747 {
6748     PAGED_CODE_LOCKED();
6749     return ((PFN_WDFIORESOURCELISTGETDESCRIPTOR) WdfVersion.Functions.pfnWdfIoResourceListGetDescriptor)(DriverGlobals, ResourceList, Index);
6750 }
6751 
6752 _IRQL_requires_max_(DISPATCH_LEVEL)
6753 WDFAPI
6754 VOID
6755 VFWDFEXPORT(WdfIoResourceListRemove)(
6756     _In_
6757     PWDF_DRIVER_GLOBALS DriverGlobals,
6758     _In_
6759     WDFIORESLIST ResourceList,
6760     _In_
6761     ULONG Index
6762     )
6763 {
6764     PAGED_CODE_LOCKED();
6765     ((PFN_WDFIORESOURCELISTREMOVE) WdfVersion.Functions.pfnWdfIoResourceListRemove)(DriverGlobals, ResourceList, Index);
6766 }
6767 
6768 _IRQL_requires_max_(DISPATCH_LEVEL)
6769 WDFAPI
6770 VOID
6771 VFWDFEXPORT(WdfIoResourceListRemoveByDescriptor)(
6772     _In_
6773     PWDF_DRIVER_GLOBALS DriverGlobals,
6774     _In_
6775     WDFIORESLIST ResourceList,
6776     _In_
6777     PIO_RESOURCE_DESCRIPTOR Descriptor
6778     )
6779 {
6780     PAGED_CODE_LOCKED();
6781     ((PFN_WDFIORESOURCELISTREMOVEBYDESCRIPTOR) WdfVersion.Functions.pfnWdfIoResourceListRemoveByDescriptor)(DriverGlobals, ResourceList, Descriptor);
6782 }
6783 
6784 _Must_inspect_result_
6785 _IRQL_requires_max_(DISPATCH_LEVEL)
6786 WDFAPI
6787 NTSTATUS
6788 VFWDFEXPORT(WdfCmResourceListAppendDescriptor)(
6789     _In_
6790     PWDF_DRIVER_GLOBALS DriverGlobals,
6791     _In_
6792     WDFCMRESLIST List,
6793     _In_
6794     PCM_PARTIAL_RESOURCE_DESCRIPTOR Descriptor
6795     )
6796 {
6797     PAGED_CODE_LOCKED();
6798     return ((PFN_WDFCMRESOURCELISTAPPENDDESCRIPTOR) WdfVersion.Functions.pfnWdfCmResourceListAppendDescriptor)(DriverGlobals, List, Descriptor);
6799 }
6800 
6801 _Must_inspect_result_
6802 _IRQL_requires_max_(DISPATCH_LEVEL)
6803 WDFAPI
6804 NTSTATUS
6805 VFWDFEXPORT(WdfCmResourceListInsertDescriptor)(
6806     _In_
6807     PWDF_DRIVER_GLOBALS DriverGlobals,
6808     _In_
6809     WDFCMRESLIST List,
6810     _In_
6811     PCM_PARTIAL_RESOURCE_DESCRIPTOR Descriptor,
6812     _In_
6813     ULONG Index
6814     )
6815 {
6816     PAGED_CODE_LOCKED();
6817     return ((PFN_WDFCMRESOURCELISTINSERTDESCRIPTOR) WdfVersion.Functions.pfnWdfCmResourceListInsertDescriptor)(DriverGlobals, List, Descriptor, Index);
6818 }
6819 
6820 _IRQL_requires_max_(DISPATCH_LEVEL)
6821 WDFAPI
6822 ULONG
6823 VFWDFEXPORT(WdfCmResourceListGetCount)(
6824     _In_
6825     PWDF_DRIVER_GLOBALS DriverGlobals,
6826     _In_
6827     WDFCMRESLIST List
6828     )
6829 {
6830     PAGED_CODE_LOCKED();
6831     return ((PFN_WDFCMRESOURCELISTGETCOUNT) WdfVersion.Functions.pfnWdfCmResourceListGetCount)(DriverGlobals, List);
6832 }
6833 
6834 _IRQL_requires_max_(DISPATCH_LEVEL)
6835 WDFAPI
6836 PCM_PARTIAL_RESOURCE_DESCRIPTOR
6837 VFWDFEXPORT(WdfCmResourceListGetDescriptor)(
6838     _In_
6839     PWDF_DRIVER_GLOBALS DriverGlobals,
6840     _In_
6841     WDFCMRESLIST List,
6842     _In_
6843     ULONG Index
6844     )
6845 {
6846     PAGED_CODE_LOCKED();
6847     return ((PFN_WDFCMRESOURCELISTGETDESCRIPTOR) WdfVersion.Functions.pfnWdfCmResourceListGetDescriptor)(DriverGlobals, List, Index);
6848 }
6849 
6850 _IRQL_requires_max_(DISPATCH_LEVEL)
6851 WDFAPI
6852 VOID
6853 VFWDFEXPORT(WdfCmResourceListRemove)(
6854     _In_
6855     PWDF_DRIVER_GLOBALS DriverGlobals,
6856     _In_
6857     WDFCMRESLIST List,
6858     _In_
6859     ULONG Index
6860     )
6861 {
6862     PAGED_CODE_LOCKED();
6863     ((PFN_WDFCMRESOURCELISTREMOVE) WdfVersion.Functions.pfnWdfCmResourceListRemove)(DriverGlobals, List, Index);
6864 }
6865 
6866 _IRQL_requires_max_(DISPATCH_LEVEL)
6867 WDFAPI
6868 VOID
6869 VFWDFEXPORT(WdfCmResourceListRemoveByDescriptor)(
6870     _In_
6871     PWDF_DRIVER_GLOBALS DriverGlobals,
6872     _In_
6873     WDFCMRESLIST List,
6874     _In_
6875     PCM_PARTIAL_RESOURCE_DESCRIPTOR Descriptor
6876     )
6877 {
6878     PAGED_CODE_LOCKED();
6879     ((PFN_WDFCMRESOURCELISTREMOVEBYDESCRIPTOR) WdfVersion.Functions.pfnWdfCmResourceListRemoveByDescriptor)(DriverGlobals, List, Descriptor);
6880 }
6881 
6882 _Must_inspect_result_
6883 _IRQL_requires_max_(PASSIVE_LEVEL)
6884 WDFAPI
6885 NTSTATUS
6886 VFWDFEXPORT(WdfStringCreate)(
6887     _In_
6888     PWDF_DRIVER_GLOBALS DriverGlobals,
6889     _In_opt_
6890     PCUNICODE_STRING UnicodeString,
6891     _In_opt_
6892     PWDF_OBJECT_ATTRIBUTES StringAttributes,
6893     _Out_
6894     WDFSTRING* String
6895     )
6896 {
6897     PAGED_CODE_LOCKED();
6898     return ((PFN_WDFSTRINGCREATE) WdfVersion.Functions.pfnWdfStringCreate)(DriverGlobals, UnicodeString, StringAttributes, String);
6899 }
6900 
6901 _IRQL_requires_max_(PASSIVE_LEVEL)
6902 WDFAPI
6903 VOID
6904 VFWDFEXPORT(WdfStringGetUnicodeString)(
6905     _In_
6906     PWDF_DRIVER_GLOBALS DriverGlobals,
6907     _In_
6908     WDFSTRING String,
6909     _Out_
6910     PUNICODE_STRING UnicodeString
6911     )
6912 {
6913     PAGED_CODE_LOCKED();
6914     ((PFN_WDFSTRINGGETUNICODESTRING) WdfVersion.Functions.pfnWdfStringGetUnicodeString)(DriverGlobals, String, UnicodeString);
6915 }
6916 
6917 _IRQL_requires_max_(DISPATCH_LEVEL)
6918 WDFAPI
6919 VOID
6920 VFWDFEXPORT(WdfObjectAcquireLock)(
6921     _In_
6922     PWDF_DRIVER_GLOBALS DriverGlobals,
6923     _In_
6924     _Requires_lock_not_held_(_Curr_)
6925     _Acquires_lock_(_Curr_)
6926     WDFOBJECT Object
6927     )
6928 {
6929     PAGED_CODE_LOCKED();
6930     ((PFN_WDFOBJECTACQUIRELOCK) WdfVersion.Functions.pfnWdfObjectAcquireLock)(DriverGlobals, Object);
6931 }
6932 
6933 _IRQL_requires_max_(DISPATCH_LEVEL)
6934 WDFAPI
6935 VOID
6936 VFWDFEXPORT(WdfObjectReleaseLock)(
6937     _In_
6938     PWDF_DRIVER_GLOBALS DriverGlobals,
6939     _In_
6940     _Requires_lock_held_(_Curr_)
6941     _Releases_lock_(_Curr_)
6942     WDFOBJECT Object
6943     )
6944 {
6945     PAGED_CODE_LOCKED();
6946     ((PFN_WDFOBJECTRELEASELOCK) WdfVersion.Functions.pfnWdfObjectReleaseLock)(DriverGlobals, Object);
6947 }
6948 
6949 _Must_inspect_result_
6950 _IRQL_requires_max_(DISPATCH_LEVEL)
6951 WDFAPI
6952 NTSTATUS
6953 VFWDFEXPORT(WdfWaitLockCreate)(
6954     _In_
6955     PWDF_DRIVER_GLOBALS DriverGlobals,
6956     _In_opt_
6957     PWDF_OBJECT_ATTRIBUTES LockAttributes,
6958     _Out_
6959     WDFWAITLOCK* Lock
6960     )
6961 {
6962     PAGED_CODE_LOCKED();
6963     return ((PFN_WDFWAITLOCKCREATE) WdfVersion.Functions.pfnWdfWaitLockCreate)(DriverGlobals, LockAttributes, Lock);
6964 }
6965 
6966 _When_(Timeout == NULL, _IRQL_requires_max_(PASSIVE_LEVEL))
6967 _When_(Timeout != NULL && *Timeout == 0, _IRQL_requires_max_(DISPATCH_LEVEL))
6968 _When_(Timeout != NULL && *Timeout != 0, _IRQL_requires_max_(PASSIVE_LEVEL))
6969 _Always_(_When_(Timeout == NULL, _Acquires_lock_(Lock)))
6970 _When_(Timeout != NULL && return == STATUS_SUCCESS, _Acquires_lock_(Lock))
6971 _When_(Timeout != NULL, _Must_inspect_result_)
6972 WDFAPI
6973 NTSTATUS
6974 VFWDFEXPORT(WdfWaitLockAcquire)(
6975     _In_
6976     PWDF_DRIVER_GLOBALS DriverGlobals,
6977     _In_
6978     _Requires_lock_not_held_(_Curr_)
6979     WDFWAITLOCK Lock,
6980     _In_opt_
6981     PLONGLONG Timeout
6982     )
6983 {
6984     PAGED_CODE_LOCKED();
6985     return ((PFN_WDFWAITLOCKACQUIRE) WdfVersion.Functions.pfnWdfWaitLockAcquire)(DriverGlobals, Lock, Timeout);
6986 }
6987 
6988 _IRQL_requires_max_(DISPATCH_LEVEL)
6989 WDFAPI
6990 VOID
6991 VFWDFEXPORT(WdfWaitLockRelease)(
6992     _In_
6993     PWDF_DRIVER_GLOBALS DriverGlobals,
6994     _In_
6995     _Requires_lock_held_(_Curr_)
6996     _Releases_lock_(_Curr_)
6997     WDFWAITLOCK Lock
6998     )
6999 {
7000     PAGED_CODE_LOCKED();
7001     ((PFN_WDFWAITLOCKRELEASE) WdfVersion.Functions.pfnWdfWaitLockRelease)(DriverGlobals, Lock);
7002 }
7003 
7004 _Must_inspect_result_
7005 _IRQL_requires_max_(DISPATCH_LEVEL)
7006 WDFAPI
7007 NTSTATUS
7008 VFWDFEXPORT(WdfSpinLockCreate)(
7009     _In_
7010     PWDF_DRIVER_GLOBALS DriverGlobals,
7011     _In_opt_
7012     PWDF_OBJECT_ATTRIBUTES SpinLockAttributes,
7013     _Out_
7014     WDFSPINLOCK* SpinLock
7015     )
7016 {
7017     PAGED_CODE_LOCKED();
7018     return ((PFN_WDFSPINLOCKCREATE) WdfVersion.Functions.pfnWdfSpinLockCreate)(DriverGlobals, SpinLockAttributes, SpinLock);
7019 }
7020 
7021 _IRQL_requires_max_(DISPATCH_LEVEL)
7022 _IRQL_raises_(DISPATCH_LEVEL)
7023 WDFAPI
7024 VOID
7025 VFWDFEXPORT(WdfSpinLockAcquire)(
7026     _In_
7027     PWDF_DRIVER_GLOBALS DriverGlobals,
7028     _In_
7029     _Requires_lock_not_held_(_Curr_)
7030     _Acquires_lock_(_Curr_)
7031     _IRQL_saves_
7032     WDFSPINLOCK SpinLock
7033     )
7034 {
7035     PAGED_CODE_LOCKED();
7036     ((PFN_WDFSPINLOCKACQUIRE) WdfVersion.Functions.pfnWdfSpinLockAcquire)(DriverGlobals, SpinLock);
7037 }
7038 
7039 _IRQL_requires_max_(DISPATCH_LEVEL)
7040 _IRQL_requires_min_(DISPATCH_LEVEL)
7041 WDFAPI
7042 VOID
7043 VFWDFEXPORT(WdfSpinLockRelease)(
7044     _In_
7045     PWDF_DRIVER_GLOBALS DriverGlobals,
7046     _In_
7047     _Requires_lock_held_(_Curr_)
7048     _Releases_lock_(_Curr_)
7049     _IRQL_restores_
7050     WDFSPINLOCK SpinLock
7051     )
7052 {
7053     PAGED_CODE_LOCKED();
7054     ((PFN_WDFSPINLOCKRELEASE) WdfVersion.Functions.pfnWdfSpinLockRelease)(DriverGlobals, SpinLock);
7055 }
7056 
7057 _Must_inspect_result_
7058 _IRQL_requires_max_(DISPATCH_LEVEL)
7059 WDFAPI
7060 NTSTATUS
7061 VFWDFEXPORT(WdfTimerCreate)(
7062     _In_
7063     PWDF_DRIVER_GLOBALS DriverGlobals,
7064     _In_
7065     PWDF_TIMER_CONFIG Config,
7066     _In_
7067     PWDF_OBJECT_ATTRIBUTES Attributes,
7068     _Out_
7069     WDFTIMER* Timer
7070     )
7071 {
7072     PAGED_CODE_LOCKED();
7073     return ((PFN_WDFTIMERCREATE) WdfVersion.Functions.pfnWdfTimerCreate)(DriverGlobals, Config, Attributes, Timer);
7074 }
7075 
7076 _IRQL_requires_max_(DISPATCH_LEVEL)
7077 WDFAPI
7078 BOOLEAN
7079 VFWDFEXPORT(WdfTimerStart)(
7080     _In_
7081     PWDF_DRIVER_GLOBALS DriverGlobals,
7082     _In_
7083     WDFTIMER Timer,
7084     _In_
7085     LONGLONG DueTime
7086     )
7087 {
7088     PAGED_CODE_LOCKED();
7089     return ((PFN_WDFTIMERSTART) WdfVersion.Functions.pfnWdfTimerStart)(DriverGlobals, Timer, DueTime);
7090 }
7091 
7092 _When_(Wait == __true, _IRQL_requires_max_(PASSIVE_LEVEL))
7093 _When_(Wait == __false, _IRQL_requires_max_(DISPATCH_LEVEL))
7094 WDFAPI
7095 BOOLEAN
7096 VFWDFEXPORT(WdfTimerStop)(
7097     _In_
7098     PWDF_DRIVER_GLOBALS DriverGlobals,
7099     _In_
7100     WDFTIMER Timer,
7101     _In_
7102     BOOLEAN Wait
7103     )
7104 {
7105     PAGED_CODE_LOCKED();
7106     return ((PFN_WDFTIMERSTOP) WdfVersion.Functions.pfnWdfTimerStop)(DriverGlobals, Timer, Wait);
7107 }
7108 
7109 _IRQL_requires_max_(DISPATCH_LEVEL)
7110 WDFAPI
7111 WDFOBJECT
7112 VFWDFEXPORT(WdfTimerGetParentObject)(
7113     _In_
7114     PWDF_DRIVER_GLOBALS DriverGlobals,
7115     _In_
7116     WDFTIMER Timer
7117     )
7118 {
7119     PAGED_CODE_LOCKED();
7120     return ((PFN_WDFTIMERGETPARENTOBJECT) WdfVersion.Functions.pfnWdfTimerGetParentObject)(DriverGlobals, Timer);
7121 }
7122 
7123 _Must_inspect_result_
7124 _IRQL_requires_max_(PASSIVE_LEVEL)
7125 WDFAPI
7126 NTSTATUS
7127 VFWDFEXPORT(WdfUsbTargetDeviceCreate)(
7128     _In_
7129     PWDF_DRIVER_GLOBALS DriverGlobals,
7130     _In_
7131     WDFDEVICE Device,
7132     _In_opt_
7133     PWDF_OBJECT_ATTRIBUTES Attributes,
7134     _Out_
7135     WDFUSBDEVICE* UsbDevice
7136     )
7137 {
7138     PAGED_CODE_LOCKED();
7139     return ((PFN_WDFUSBTARGETDEVICECREATE) WdfVersion.Functions.pfnWdfUsbTargetDeviceCreate)(DriverGlobals, Device, Attributes, UsbDevice);
7140 }
7141 
7142 _Must_inspect_result_
7143 _IRQL_requires_max_(PASSIVE_LEVEL)
7144 WDFAPI
7145 NTSTATUS
7146 VFWDFEXPORT(WdfUsbTargetDeviceCreateWithParameters)(
7147     _In_
7148     PWDF_DRIVER_GLOBALS DriverGlobals,
7149     _In_
7150     WDFDEVICE Device,
7151     _In_
7152     PWDF_USB_DEVICE_CREATE_CONFIG Config,
7153     _In_opt_
7154     PWDF_OBJECT_ATTRIBUTES Attributes,
7155     _Out_
7156     WDFUSBDEVICE* UsbDevice
7157     )
7158 {
7159     PAGED_CODE_LOCKED();
7160     return ((PFN_WDFUSBTARGETDEVICECREATEWITHPARAMETERS) WdfVersion.Functions.pfnWdfUsbTargetDeviceCreateWithParameters)(DriverGlobals, Device, Config, Attributes, UsbDevice);
7161 }
7162 
7163 _Must_inspect_result_
7164 _IRQL_requires_max_(DISPATCH_LEVEL)
7165 WDFAPI
7166 NTSTATUS
7167 VFWDFEXPORT(WdfUsbTargetDeviceRetrieveInformation)(
7168     _In_
7169     PWDF_DRIVER_GLOBALS DriverGlobals,
7170     _In_
7171     WDFUSBDEVICE UsbDevice,
7172     _Out_
7173     PWDF_USB_DEVICE_INFORMATION Information
7174     )
7175 {
7176     PAGED_CODE_LOCKED();
7177     return ((PFN_WDFUSBTARGETDEVICERETRIEVEINFORMATION) WdfVersion.Functions.pfnWdfUsbTargetDeviceRetrieveInformation)(DriverGlobals, UsbDevice, Information);
7178 }
7179 
7180 _IRQL_requires_max_(PASSIVE_LEVEL)
7181 WDFAPI
7182 VOID
7183 VFWDFEXPORT(WdfUsbTargetDeviceGetDeviceDescriptor)(
7184     _In_
7185     PWDF_DRIVER_GLOBALS DriverGlobals,
7186     _In_
7187     WDFUSBDEVICE UsbDevice,
7188     _Out_
7189     PUSB_DEVICE_DESCRIPTOR UsbDeviceDescriptor
7190     )
7191 {
7192     PAGED_CODE_LOCKED();
7193     ((PFN_WDFUSBTARGETDEVICEGETDEVICEDESCRIPTOR) WdfVersion.Functions.pfnWdfUsbTargetDeviceGetDeviceDescriptor)(DriverGlobals, UsbDevice, UsbDeviceDescriptor);
7194 }
7195 
7196 _Must_inspect_result_
7197 _IRQL_requires_max_(PASSIVE_LEVEL)
7198 WDFAPI
7199 NTSTATUS
7200 VFWDFEXPORT(WdfUsbTargetDeviceRetrieveConfigDescriptor)(
7201     _In_
7202     PWDF_DRIVER_GLOBALS DriverGlobals,
7203     _In_
7204     WDFUSBDEVICE UsbDevice,
7205     _Out_writes_bytes_to_opt_(*ConfigDescriptorLength,*ConfigDescriptorLength)
7206     PVOID ConfigDescriptor,
7207     _Inout_
7208     PUSHORT ConfigDescriptorLength
7209     )
7210 {
7211     PAGED_CODE_LOCKED();
7212 #pragma prefast(suppress: __WARNING_HIGH_PRIORITY_OVERFLOW_POSTCONDITION, "This is a verifier DDI hook routine and all it does is call original routine.")
7213     return ((PFN_WDFUSBTARGETDEVICERETRIEVECONFIGDESCRIPTOR) WdfVersion.Functions.pfnWdfUsbTargetDeviceRetrieveConfigDescriptor)(DriverGlobals, UsbDevice, ConfigDescriptor, ConfigDescriptorLength);
7214 }
7215 
7216 _Must_inspect_result_
7217 _IRQL_requires_max_(PASSIVE_LEVEL)
7218 WDFAPI
7219 NTSTATUS
7220 VFWDFEXPORT(WdfUsbTargetDeviceQueryString)(
7221     _In_
7222     PWDF_DRIVER_GLOBALS DriverGlobals,
7223     _In_
7224     WDFUSBDEVICE UsbDevice,
7225     _In_opt_
7226     WDFREQUEST Request,
7227     _In_opt_
7228     PWDF_REQUEST_SEND_OPTIONS RequestOptions,
7229     _Out_writes_opt_(*NumCharacters)
7230     PUSHORT String,
7231     _Inout_
7232     PUSHORT NumCharacters,
7233     _In_
7234     UCHAR StringIndex,
7235     _In_opt_
7236     USHORT LangID
7237     )
7238 {
7239     PAGED_CODE_LOCKED();
7240     return ((PFN_WDFUSBTARGETDEVICEQUERYSTRING) WdfVersion.Functions.pfnWdfUsbTargetDeviceQueryString)(DriverGlobals, UsbDevice, Request, RequestOptions, String, NumCharacters, StringIndex, LangID);
7241 }
7242 
7243 _Must_inspect_result_
7244 _IRQL_requires_max_(PASSIVE_LEVEL)
7245 WDFAPI
7246 NTSTATUS
7247 VFWDFEXPORT(WdfUsbTargetDeviceAllocAndQueryString)(
7248     _In_
7249     PWDF_DRIVER_GLOBALS DriverGlobals,
7250     _In_
7251     WDFUSBDEVICE UsbDevice,
7252     _In_opt_
7253     PWDF_OBJECT_ATTRIBUTES StringMemoryAttributes,
7254     _Out_
7255     WDFMEMORY* StringMemory,
7256     _Out_opt_
7257     PUSHORT NumCharacters,
7258     _In_
7259     UCHAR StringIndex,
7260     _In_opt_
7261     USHORT LangID
7262     )
7263 {
7264     PAGED_CODE_LOCKED();
7265     return ((PFN_WDFUSBTARGETDEVICEALLOCANDQUERYSTRING) WdfVersion.Functions.pfnWdfUsbTargetDeviceAllocAndQueryString)(DriverGlobals, UsbDevice, StringMemoryAttributes, StringMemory, NumCharacters, StringIndex, LangID);
7266 }
7267 
7268 _Must_inspect_result_
7269 _IRQL_requires_max_(DISPATCH_LEVEL)
7270 WDFAPI
7271 NTSTATUS
7272 VFWDFEXPORT(WdfUsbTargetDeviceFormatRequestForString)(
7273     _In_
7274     PWDF_DRIVER_GLOBALS DriverGlobals,
7275     _In_
7276     WDFUSBDEVICE UsbDevice,
7277     _In_
7278     WDFREQUEST Request,
7279     _In_
7280     WDFMEMORY Memory,
7281     _In_opt_
7282     PWDFMEMORY_OFFSET Offset,
7283     _In_
7284     UCHAR StringIndex,
7285     _In_opt_
7286     USHORT LangID
7287     )
7288 {
7289     PAGED_CODE_LOCKED();
7290     return ((PFN_WDFUSBTARGETDEVICEFORMATREQUESTFORSTRING) WdfVersion.Functions.pfnWdfUsbTargetDeviceFormatRequestForString)(DriverGlobals, UsbDevice, Request, Memory, Offset, StringIndex, LangID);
7291 }
7292 
7293 _IRQL_requires_max_(DISPATCH_LEVEL)
7294 WDFAPI
7295 UCHAR
7296 VFWDFEXPORT(WdfUsbTargetDeviceGetNumInterfaces)(
7297     _In_
7298     PWDF_DRIVER_GLOBALS DriverGlobals,
7299     _In_
7300     WDFUSBDEVICE UsbDevice
7301     )
7302 {
7303     PAGED_CODE_LOCKED();
7304     return ((PFN_WDFUSBTARGETDEVICEGETNUMINTERFACES) WdfVersion.Functions.pfnWdfUsbTargetDeviceGetNumInterfaces)(DriverGlobals, UsbDevice);
7305 }
7306 
7307 _Must_inspect_result_
7308 _IRQL_requires_max_(PASSIVE_LEVEL)
7309 WDFAPI
7310 NTSTATUS
7311 VFWDFEXPORT(WdfUsbTargetDeviceSelectConfig)(
7312     _In_
7313     PWDF_DRIVER_GLOBALS DriverGlobals,
7314     _In_
7315     WDFUSBDEVICE UsbDevice,
7316     _In_opt_
7317     PWDF_OBJECT_ATTRIBUTES PipeAttributes,
7318     _Inout_
7319     PWDF_USB_DEVICE_SELECT_CONFIG_PARAMS Params
7320     )
7321 {
7322     PAGED_CODE_LOCKED();
7323     return ((PFN_WDFUSBTARGETDEVICESELECTCONFIG) WdfVersion.Functions.pfnWdfUsbTargetDeviceSelectConfig)(DriverGlobals, UsbDevice, PipeAttributes, Params);
7324 }
7325 
7326 _IRQL_requires_max_(DISPATCH_LEVEL)
7327 WDFAPI
7328 USBD_CONFIGURATION_HANDLE
7329 VFWDFEXPORT(WdfUsbTargetDeviceWdmGetConfigurationHandle)(
7330     _In_
7331     PWDF_DRIVER_GLOBALS DriverGlobals,
7332     _In_
7333     WDFUSBDEVICE UsbDevice
7334     )
7335 {
7336     PAGED_CODE_LOCKED();
7337     return ((PFN_WDFUSBTARGETDEVICEWDMGETCONFIGURATIONHANDLE) WdfVersion.Functions.pfnWdfUsbTargetDeviceWdmGetConfigurationHandle)(DriverGlobals, UsbDevice);
7338 }
7339 
7340 _Must_inspect_result_
7341 _IRQL_requires_max_(DISPATCH_LEVEL)
7342 WDFAPI
7343 NTSTATUS
7344 VFWDFEXPORT(WdfUsbTargetDeviceRetrieveCurrentFrameNumber)(
7345     _In_
7346     PWDF_DRIVER_GLOBALS DriverGlobals,
7347     _In_
7348     WDFUSBDEVICE UsbDevice,
7349     _Out_
7350     PULONG CurrentFrameNumber
7351     )
7352 {
7353     PAGED_CODE_LOCKED();
7354     return ((PFN_WDFUSBTARGETDEVICERETRIEVECURRENTFRAMENUMBER) WdfVersion.Functions.pfnWdfUsbTargetDeviceRetrieveCurrentFrameNumber)(DriverGlobals, UsbDevice, CurrentFrameNumber);
7355 }
7356 
7357 _Must_inspect_result_
7358 _IRQL_requires_max_(PASSIVE_LEVEL)
7359 WDFAPI
7360 NTSTATUS
7361 VFWDFEXPORT(WdfUsbTargetDeviceSendControlTransferSynchronously)(
7362     _In_
7363     PWDF_DRIVER_GLOBALS DriverGlobals,
7364     _In_
7365     WDFUSBDEVICE UsbDevice,
7366     _In_opt_
7367     WDFREQUEST Request,
7368     _In_opt_
7369     PWDF_REQUEST_SEND_OPTIONS RequestOptions,
7370     _In_
7371     PWDF_USB_CONTROL_SETUP_PACKET SetupPacket,
7372     _In_opt_
7373     PWDF_MEMORY_DESCRIPTOR MemoryDescriptor,
7374     _Out_opt_
7375     PULONG BytesTransferred
7376     )
7377 {
7378     PAGED_CODE_LOCKED();
7379     return ((PFN_WDFUSBTARGETDEVICESENDCONTROLTRANSFERSYNCHRONOUSLY) WdfVersion.Functions.pfnWdfUsbTargetDeviceSendControlTransferSynchronously)(DriverGlobals, UsbDevice, Request, RequestOptions, SetupPacket, MemoryDescriptor, BytesTransferred);
7380 }
7381 
7382 _Must_inspect_result_
7383 _IRQL_requires_max_(DISPATCH_LEVEL)
7384 WDFAPI
7385 NTSTATUS
7386 VFWDFEXPORT(WdfUsbTargetDeviceFormatRequestForControlTransfer)(
7387     _In_
7388     PWDF_DRIVER_GLOBALS DriverGlobals,
7389     _In_
7390     WDFUSBDEVICE UsbDevice,
7391     _In_
7392     WDFREQUEST Request,
7393     _In_
7394     PWDF_USB_CONTROL_SETUP_PACKET SetupPacket,
7395     _In_opt_
7396     WDFMEMORY TransferMemory,
7397     _In_opt_
7398     PWDFMEMORY_OFFSET TransferOffset
7399     )
7400 {
7401     PAGED_CODE_LOCKED();
7402     return ((PFN_WDFUSBTARGETDEVICEFORMATREQUESTFORCONTROLTRANSFER) WdfVersion.Functions.pfnWdfUsbTargetDeviceFormatRequestForControlTransfer)(DriverGlobals, UsbDevice, Request, SetupPacket, TransferMemory, TransferOffset);
7403 }
7404 
7405 _Must_inspect_result_
7406 _IRQL_requires_max_(PASSIVE_LEVEL)
7407 WDFAPI
7408 NTSTATUS
7409 VFWDFEXPORT(WdfUsbTargetDeviceIsConnectedSynchronous)(
7410     _In_
7411     PWDF_DRIVER_GLOBALS DriverGlobals,
7412     _In_
7413     WDFUSBDEVICE UsbDevice
7414     )
7415 {
7416     PAGED_CODE_LOCKED();
7417     return ((PFN_WDFUSBTARGETDEVICEISCONNECTEDSYNCHRONOUS) WdfVersion.Functions.pfnWdfUsbTargetDeviceIsConnectedSynchronous)(DriverGlobals, UsbDevice);
7418 }
7419 
7420 _Must_inspect_result_
7421 _IRQL_requires_max_(PASSIVE_LEVEL)
7422 WDFAPI
7423 NTSTATUS
7424 VFWDFEXPORT(WdfUsbTargetDeviceResetPortSynchronously)(
7425     _In_
7426     PWDF_DRIVER_GLOBALS DriverGlobals,
7427     _In_
7428     WDFUSBDEVICE UsbDevice
7429     )
7430 {
7431     PAGED_CODE_LOCKED();
7432     return ((PFN_WDFUSBTARGETDEVICERESETPORTSYNCHRONOUSLY) WdfVersion.Functions.pfnWdfUsbTargetDeviceResetPortSynchronously)(DriverGlobals, UsbDevice);
7433 }
7434 
7435 _Must_inspect_result_
7436 _IRQL_requires_max_(PASSIVE_LEVEL)
7437 WDFAPI
7438 NTSTATUS
7439 VFWDFEXPORT(WdfUsbTargetDeviceCyclePortSynchronously)(
7440     _In_
7441     PWDF_DRIVER_GLOBALS DriverGlobals,
7442     _In_
7443     WDFUSBDEVICE UsbDevice
7444     )
7445 {
7446     PAGED_CODE_LOCKED();
7447     return ((PFN_WDFUSBTARGETDEVICECYCLEPORTSYNCHRONOUSLY) WdfVersion.Functions.pfnWdfUsbTargetDeviceCyclePortSynchronously)(DriverGlobals, UsbDevice);
7448 }
7449 
7450 _Must_inspect_result_
7451 _IRQL_requires_max_(DISPATCH_LEVEL)
7452 WDFAPI
7453 NTSTATUS
7454 VFWDFEXPORT(WdfUsbTargetDeviceFormatRequestForCyclePort)(
7455     _In_
7456     PWDF_DRIVER_GLOBALS DriverGlobals,
7457     _In_
7458     WDFUSBDEVICE UsbDevice,
7459     _In_
7460     WDFREQUEST Request
7461     )
7462 {
7463     PAGED_CODE_LOCKED();
7464     return ((PFN_WDFUSBTARGETDEVICEFORMATREQUESTFORCYCLEPORT) WdfVersion.Functions.pfnWdfUsbTargetDeviceFormatRequestForCyclePort)(DriverGlobals, UsbDevice, Request);
7465 }
7466 
7467 _Must_inspect_result_
7468 _IRQL_requires_max_(PASSIVE_LEVEL)
7469 WDFAPI
7470 NTSTATUS
7471 VFWDFEXPORT(WdfUsbTargetDeviceSendUrbSynchronously)(
7472     _In_
7473     PWDF_DRIVER_GLOBALS DriverGlobals,
7474     _In_
7475     WDFUSBDEVICE UsbDevice,
7476     _In_opt_
7477     WDFREQUEST Request,
7478     _In_opt_
7479     PWDF_REQUEST_SEND_OPTIONS RequestOptions,
7480     _In_reads_(_Inexpressible_("union bug in SAL"))
7481     PURB Urb
7482     )
7483 {
7484     PAGED_CODE_LOCKED();
7485     return ((PFN_WDFUSBTARGETDEVICESENDURBSYNCHRONOUSLY) WdfVersion.Functions.pfnWdfUsbTargetDeviceSendUrbSynchronously)(DriverGlobals, UsbDevice, Request, RequestOptions, Urb);
7486 }
7487 
7488 _Must_inspect_result_
7489 _IRQL_requires_max_(DISPATCH_LEVEL)
7490 WDFAPI
7491 NTSTATUS
7492 VFWDFEXPORT(WdfUsbTargetDeviceFormatRequestForUrb)(
7493     _In_
7494     PWDF_DRIVER_GLOBALS DriverGlobals,
7495     _In_
7496     WDFUSBDEVICE UsbDevice,
7497     _In_
7498     WDFREQUEST Request,
7499     _In_
7500     WDFMEMORY UrbMemory,
7501     _In_opt_
7502     PWDFMEMORY_OFFSET UrbMemoryOffset
7503     )
7504 {
7505     PAGED_CODE_LOCKED();
7506     return ((PFN_WDFUSBTARGETDEVICEFORMATREQUESTFORURB) WdfVersion.Functions.pfnWdfUsbTargetDeviceFormatRequestForUrb)(DriverGlobals, UsbDevice, Request, UrbMemory, UrbMemoryOffset);
7507 }
7508 
7509 _Must_inspect_result_
7510 _IRQL_requires_max_(PASSIVE_LEVEL)
7511 WDFAPI
7512 NTSTATUS
7513 VFWDFEXPORT(WdfUsbTargetDeviceQueryUsbCapability)(
7514     _In_
7515     PWDF_DRIVER_GLOBALS DriverGlobals,
7516     _In_
7517     WDFUSBDEVICE UsbDevice,
7518     _In_
7519     CONST GUID* CapabilityType,
7520     _In_
7521     ULONG CapabilityBufferLength,
7522     _When_(CapabilityBufferLength == 0, _Out_opt_)
7523     _When_(CapabilityBufferLength != 0 && ResultLength == NULL, _Out_writes_bytes_(CapabilityBufferLength))
7524     _When_(CapabilityBufferLength != 0 && ResultLength != NULL, _Out_writes_bytes_to_opt_(CapabilityBufferLength, *ResultLength))
7525     PVOID CapabilityBuffer,
7526     _Out_opt_
7527     _When_(ResultLength != NULL,_Deref_out_range_(<=,CapabilityBufferLength))
7528     PULONG ResultLength
7529     )
7530 {
7531     PAGED_CODE_LOCKED();
7532     return ((PFN_WDFUSBTARGETDEVICEQUERYUSBCAPABILITY) WdfVersion.Functions.pfnWdfUsbTargetDeviceQueryUsbCapability)(DriverGlobals, UsbDevice, CapabilityType, CapabilityBufferLength, CapabilityBuffer, ResultLength);
7533 }
7534 
7535 _Must_inspect_result_
7536 _IRQL_requires_max_(DISPATCH_LEVEL)
7537 WDFAPI
7538 NTSTATUS
7539 VFWDFEXPORT(WdfUsbTargetDeviceCreateUrb)(
7540     _In_
7541     PWDF_DRIVER_GLOBALS DriverGlobals,
7542     _In_
7543     WDFUSBDEVICE UsbDevice,
7544     _In_opt_
7545     PWDF_OBJECT_ATTRIBUTES Attributes,
7546     _Out_
7547     WDFMEMORY* UrbMemory,
7548     _Outptr_opt_result_bytebuffer_(sizeof(URB))
7549     PURB* Urb
7550     )
7551 {
7552     PAGED_CODE_LOCKED();
7553     return ((PFN_WDFUSBTARGETDEVICECREATEURB) WdfVersion.Functions.pfnWdfUsbTargetDeviceCreateUrb)(DriverGlobals, UsbDevice, Attributes, UrbMemory, Urb);
7554 }
7555 
7556 _Must_inspect_result_
7557 _IRQL_requires_max_(DISPATCH_LEVEL)
7558 WDFAPI
7559 NTSTATUS
7560 VFWDFEXPORT(WdfUsbTargetDeviceCreateIsochUrb)(
7561     _In_
7562     PWDF_DRIVER_GLOBALS DriverGlobals,
7563     _In_
7564     WDFUSBDEVICE UsbDevice,
7565     _In_opt_
7566     PWDF_OBJECT_ATTRIBUTES Attributes,
7567     _In_
7568     ULONG NumberOfIsochPackets,
7569     _Out_
7570     WDFMEMORY* UrbMemory,
7571     _Outptr_opt_result_bytebuffer_(GET_ISO_URB_SIZE(NumberOfIsochPackets))
7572     PURB* Urb
7573     )
7574 {
7575     PAGED_CODE_LOCKED();
7576     return ((PFN_WDFUSBTARGETDEVICECREATEISOCHURB) WdfVersion.Functions.pfnWdfUsbTargetDeviceCreateIsochUrb)(DriverGlobals, UsbDevice, Attributes, NumberOfIsochPackets, UrbMemory, Urb);
7577 }
7578 
7579 _IRQL_requires_max_(DISPATCH_LEVEL)
7580 WDFAPI
7581 VOID
7582 VFWDFEXPORT(WdfUsbTargetPipeGetInformation)(
7583     _In_
7584     PWDF_DRIVER_GLOBALS DriverGlobals,
7585     _In_
7586     WDFUSBPIPE Pipe,
7587     _Out_
7588     PWDF_USB_PIPE_INFORMATION PipeInformation
7589     )
7590 {
7591     PAGED_CODE_LOCKED();
7592     ((PFN_WDFUSBTARGETPIPEGETINFORMATION) WdfVersion.Functions.pfnWdfUsbTargetPipeGetInformation)(DriverGlobals, Pipe, PipeInformation);
7593 }
7594 
7595 _IRQL_requires_max_(DISPATCH_LEVEL)
7596 WDFAPI
7597 BOOLEAN
7598 VFWDFEXPORT(WdfUsbTargetPipeIsInEndpoint)(
7599     _In_
7600     PWDF_DRIVER_GLOBALS DriverGlobals,
7601     _In_
7602     WDFUSBPIPE Pipe
7603     )
7604 {
7605     PAGED_CODE_LOCKED();
7606     return ((PFN_WDFUSBTARGETPIPEISINENDPOINT) WdfVersion.Functions.pfnWdfUsbTargetPipeIsInEndpoint)(DriverGlobals, Pipe);
7607 }
7608 
7609 _IRQL_requires_max_(DISPATCH_LEVEL)
7610 WDFAPI
7611 BOOLEAN
7612 VFWDFEXPORT(WdfUsbTargetPipeIsOutEndpoint)(
7613     _In_
7614     PWDF_DRIVER_GLOBALS DriverGlobals,
7615     _In_
7616     WDFUSBPIPE Pipe
7617     )
7618 {
7619     PAGED_CODE_LOCKED();
7620     return ((PFN_WDFUSBTARGETPIPEISOUTENDPOINT) WdfVersion.Functions.pfnWdfUsbTargetPipeIsOutEndpoint)(DriverGlobals, Pipe);
7621 }
7622 
7623 _IRQL_requires_max_(DISPATCH_LEVEL)
7624 WDFAPI
7625 WDF_USB_PIPE_TYPE
7626 VFWDFEXPORT(WdfUsbTargetPipeGetType)(
7627     _In_
7628     PWDF_DRIVER_GLOBALS DriverGlobals,
7629     _In_
7630     WDFUSBPIPE Pipe
7631     )
7632 {
7633     PAGED_CODE_LOCKED();
7634     return ((PFN_WDFUSBTARGETPIPEGETTYPE) WdfVersion.Functions.pfnWdfUsbTargetPipeGetType)(DriverGlobals, Pipe);
7635 }
7636 
7637 _IRQL_requires_max_(DISPATCH_LEVEL)
7638 WDFAPI
7639 VOID
7640 VFWDFEXPORT(WdfUsbTargetPipeSetNoMaximumPacketSizeCheck)(
7641     _In_
7642     PWDF_DRIVER_GLOBALS DriverGlobals,
7643     _In_
7644     WDFUSBPIPE Pipe
7645     )
7646 {
7647     PAGED_CODE_LOCKED();
7648     ((PFN_WDFUSBTARGETPIPESETNOMAXIMUMPACKETSIZECHECK) WdfVersion.Functions.pfnWdfUsbTargetPipeSetNoMaximumPacketSizeCheck)(DriverGlobals, Pipe);
7649 }
7650 
7651 _Must_inspect_result_
7652 _IRQL_requires_max_(PASSIVE_LEVEL)
7653 WDFAPI
7654 NTSTATUS
7655 VFWDFEXPORT(WdfUsbTargetPipeWriteSynchronously)(
7656     _In_
7657     PWDF_DRIVER_GLOBALS DriverGlobals,
7658     _In_
7659     WDFUSBPIPE Pipe,
7660     _In_opt_
7661     WDFREQUEST Request,
7662     _In_opt_
7663     PWDF_REQUEST_SEND_OPTIONS RequestOptions,
7664     _In_opt_
7665     PWDF_MEMORY_DESCRIPTOR MemoryDescriptor,
7666     _Out_opt_
7667     PULONG BytesWritten
7668     )
7669 {
7670     PAGED_CODE_LOCKED();
7671     return ((PFN_WDFUSBTARGETPIPEWRITESYNCHRONOUSLY) WdfVersion.Functions.pfnWdfUsbTargetPipeWriteSynchronously)(DriverGlobals, Pipe, Request, RequestOptions, MemoryDescriptor, BytesWritten);
7672 }
7673 
7674 _Must_inspect_result_
7675 _IRQL_requires_max_(DISPATCH_LEVEL)
7676 WDFAPI
7677 NTSTATUS
7678 VFWDFEXPORT(WdfUsbTargetPipeFormatRequestForWrite)(
7679     _In_
7680     PWDF_DRIVER_GLOBALS DriverGlobals,
7681     _In_
7682     WDFUSBPIPE Pipe,
7683     _In_
7684     WDFREQUEST Request,
7685     _In_opt_
7686     WDFMEMORY WriteMemory,
7687     _In_opt_
7688     PWDFMEMORY_OFFSET WriteOffset
7689     )
7690 {
7691     PAGED_CODE_LOCKED();
7692     return ((PFN_WDFUSBTARGETPIPEFORMATREQUESTFORWRITE) WdfVersion.Functions.pfnWdfUsbTargetPipeFormatRequestForWrite)(DriverGlobals, Pipe, Request, WriteMemory, WriteOffset);
7693 }
7694 
7695 _Must_inspect_result_
7696 _IRQL_requires_max_(PASSIVE_LEVEL)
7697 WDFAPI
7698 NTSTATUS
7699 VFWDFEXPORT(WdfUsbTargetPipeReadSynchronously)(
7700     _In_
7701     PWDF_DRIVER_GLOBALS DriverGlobals,
7702     _In_
7703     WDFUSBPIPE Pipe,
7704     _In_opt_
7705     WDFREQUEST Request,
7706     _In_opt_
7707     PWDF_REQUEST_SEND_OPTIONS RequestOptions,
7708     _In_opt_
7709     PWDF_MEMORY_DESCRIPTOR MemoryDescriptor,
7710     _Out_opt_
7711     PULONG BytesRead
7712     )
7713 {
7714     PAGED_CODE_LOCKED();
7715     return ((PFN_WDFUSBTARGETPIPEREADSYNCHRONOUSLY) WdfVersion.Functions.pfnWdfUsbTargetPipeReadSynchronously)(DriverGlobals, Pipe, Request, RequestOptions, MemoryDescriptor, BytesRead);
7716 }
7717 
7718 _Must_inspect_result_
7719 _IRQL_requires_max_(DISPATCH_LEVEL)
7720 WDFAPI
7721 NTSTATUS
7722 VFWDFEXPORT(WdfUsbTargetPipeFormatRequestForRead)(
7723     _In_
7724     PWDF_DRIVER_GLOBALS DriverGlobals,
7725     _In_
7726     WDFUSBPIPE Pipe,
7727     _In_
7728     WDFREQUEST Request,
7729     _In_opt_
7730     WDFMEMORY ReadMemory,
7731     _In_opt_
7732     PWDFMEMORY_OFFSET ReadOffset
7733     )
7734 {
7735     PAGED_CODE_LOCKED();
7736     return ((PFN_WDFUSBTARGETPIPEFORMATREQUESTFORREAD) WdfVersion.Functions.pfnWdfUsbTargetPipeFormatRequestForRead)(DriverGlobals, Pipe, Request, ReadMemory, ReadOffset);
7737 }
7738 
7739 _Must_inspect_result_
7740 _IRQL_requires_max_(DISPATCH_LEVEL)
7741 WDFAPI
7742 NTSTATUS
7743 VFWDFEXPORT(WdfUsbTargetPipeConfigContinuousReader)(
7744     _In_
7745     PWDF_DRIVER_GLOBALS DriverGlobals,
7746     _In_
7747     WDFUSBPIPE Pipe,
7748     _In_
7749     PWDF_USB_CONTINUOUS_READER_CONFIG Config
7750     )
7751 {
7752     PAGED_CODE_LOCKED();
7753     return ((PFN_WDFUSBTARGETPIPECONFIGCONTINUOUSREADER) WdfVersion.Functions.pfnWdfUsbTargetPipeConfigContinuousReader)(DriverGlobals, Pipe, Config);
7754 }
7755 
7756 _Must_inspect_result_
7757 _IRQL_requires_max_(PASSIVE_LEVEL)
7758 WDFAPI
7759 NTSTATUS
7760 VFWDFEXPORT(WdfUsbTargetPipeAbortSynchronously)(
7761     _In_
7762     PWDF_DRIVER_GLOBALS DriverGlobals,
7763     _In_
7764     WDFUSBPIPE Pipe,
7765     _In_opt_
7766     WDFREQUEST Request,
7767     _In_opt_
7768     PWDF_REQUEST_SEND_OPTIONS RequestOptions
7769     )
7770 {
7771     PAGED_CODE_LOCKED();
7772     return ((PFN_WDFUSBTARGETPIPEABORTSYNCHRONOUSLY) WdfVersion.Functions.pfnWdfUsbTargetPipeAbortSynchronously)(DriverGlobals, Pipe, Request, RequestOptions);
7773 }
7774 
7775 _Must_inspect_result_
7776 _IRQL_requires_max_(DISPATCH_LEVEL)
7777 WDFAPI
7778 NTSTATUS
7779 VFWDFEXPORT(WdfUsbTargetPipeFormatRequestForAbort)(
7780     _In_
7781     PWDF_DRIVER_GLOBALS DriverGlobals,
7782     _In_
7783     WDFUSBPIPE Pipe,
7784     _In_
7785     WDFREQUEST Request
7786     )
7787 {
7788     PAGED_CODE_LOCKED();
7789     return ((PFN_WDFUSBTARGETPIPEFORMATREQUESTFORABORT) WdfVersion.Functions.pfnWdfUsbTargetPipeFormatRequestForAbort)(DriverGlobals, Pipe, Request);
7790 }
7791 
7792 _Must_inspect_result_
7793 _IRQL_requires_max_(PASSIVE_LEVEL)
7794 WDFAPI
7795 NTSTATUS
7796 VFWDFEXPORT(WdfUsbTargetPipeResetSynchronously)(
7797     _In_
7798     PWDF_DRIVER_GLOBALS DriverGlobals,
7799     _In_
7800     WDFUSBPIPE Pipe,
7801     _In_opt_
7802     WDFREQUEST Request,
7803     _In_opt_
7804     PWDF_REQUEST_SEND_OPTIONS RequestOptions
7805     )
7806 {
7807     PAGED_CODE_LOCKED();
7808     return ((PFN_WDFUSBTARGETPIPERESETSYNCHRONOUSLY) WdfVersion.Functions.pfnWdfUsbTargetPipeResetSynchronously)(DriverGlobals, Pipe, Request, RequestOptions);
7809 }
7810 
7811 _Must_inspect_result_
7812 _IRQL_requires_max_(DISPATCH_LEVEL)
7813 WDFAPI
7814 NTSTATUS
7815 VFWDFEXPORT(WdfUsbTargetPipeFormatRequestForReset)(
7816     _In_
7817     PWDF_DRIVER_GLOBALS DriverGlobals,
7818     _In_
7819     WDFUSBPIPE Pipe,
7820     _In_
7821     WDFREQUEST Request
7822     )
7823 {
7824     PAGED_CODE_LOCKED();
7825     return ((PFN_WDFUSBTARGETPIPEFORMATREQUESTFORRESET) WdfVersion.Functions.pfnWdfUsbTargetPipeFormatRequestForReset)(DriverGlobals, Pipe, Request);
7826 }
7827 
7828 _Must_inspect_result_
7829 _IRQL_requires_max_(PASSIVE_LEVEL)
7830 WDFAPI
7831 NTSTATUS
7832 VFWDFEXPORT(WdfUsbTargetPipeSendUrbSynchronously)(
7833     _In_
7834     PWDF_DRIVER_GLOBALS DriverGlobals,
7835     _In_
7836     WDFUSBPIPE Pipe,
7837     _In_opt_
7838     WDFREQUEST Request,
7839     _In_opt_
7840     PWDF_REQUEST_SEND_OPTIONS RequestOptions,
7841     _In_reads_(_Inexpressible_("union bug in SAL"))
7842     PURB Urb
7843     )
7844 {
7845     PAGED_CODE_LOCKED();
7846     return ((PFN_WDFUSBTARGETPIPESENDURBSYNCHRONOUSLY) WdfVersion.Functions.pfnWdfUsbTargetPipeSendUrbSynchronously)(DriverGlobals, Pipe, Request, RequestOptions, Urb);
7847 }
7848 
7849 _Must_inspect_result_
7850 _IRQL_requires_max_(DISPATCH_LEVEL)
7851 WDFAPI
7852 NTSTATUS
7853 VFWDFEXPORT(WdfUsbTargetPipeFormatRequestForUrb)(
7854     _In_
7855     PWDF_DRIVER_GLOBALS DriverGlobals,
7856     _In_
7857     WDFUSBPIPE PIPE,
7858     _In_
7859     WDFREQUEST Request,
7860     _In_
7861     WDFMEMORY UrbMemory,
7862     _In_opt_
7863     PWDFMEMORY_OFFSET UrbMemoryOffset
7864     )
7865 {
7866     PAGED_CODE_LOCKED();
7867     return ((PFN_WDFUSBTARGETPIPEFORMATREQUESTFORURB) WdfVersion.Functions.pfnWdfUsbTargetPipeFormatRequestForUrb)(DriverGlobals, PIPE, Request, UrbMemory, UrbMemoryOffset);
7868 }
7869 
7870 _IRQL_requires_max_(DISPATCH_LEVEL)
7871 WDFAPI
7872 BYTE
7873 VFWDFEXPORT(WdfUsbInterfaceGetInterfaceNumber)(
7874     _In_
7875     PWDF_DRIVER_GLOBALS DriverGlobals,
7876     _In_
7877     WDFUSBINTERFACE UsbInterface
7878     )
7879 {
7880     PAGED_CODE_LOCKED();
7881     return ((PFN_WDFUSBINTERFACEGETINTERFACENUMBER) WdfVersion.Functions.pfnWdfUsbInterfaceGetInterfaceNumber)(DriverGlobals, UsbInterface);
7882 }
7883 
7884 _IRQL_requires_max_(DISPATCH_LEVEL)
7885 WDFAPI
7886 BYTE
7887 VFWDFEXPORT(WdfUsbInterfaceGetNumEndpoints)(
7888     _In_
7889     PWDF_DRIVER_GLOBALS DriverGlobals,
7890     _In_
7891     WDFUSBINTERFACE UsbInterface,
7892     _In_
7893     UCHAR SettingIndex
7894     )
7895 {
7896     PAGED_CODE_LOCKED();
7897     return ((PFN_WDFUSBINTERFACEGETNUMENDPOINTS) WdfVersion.Functions.pfnWdfUsbInterfaceGetNumEndpoints)(DriverGlobals, UsbInterface, SettingIndex);
7898 }
7899 
7900 _IRQL_requires_max_(DISPATCH_LEVEL)
7901 WDFAPI
7902 VOID
7903 VFWDFEXPORT(WdfUsbInterfaceGetDescriptor)(
7904     _In_
7905     PWDF_DRIVER_GLOBALS DriverGlobals,
7906     _In_
7907     WDFUSBINTERFACE UsbInterface,
7908     _In_
7909     UCHAR SettingIndex,
7910     _Out_
7911     PUSB_INTERFACE_DESCRIPTOR InterfaceDescriptor
7912     )
7913 {
7914     PAGED_CODE_LOCKED();
7915     ((PFN_WDFUSBINTERFACEGETDESCRIPTOR) WdfVersion.Functions.pfnWdfUsbInterfaceGetDescriptor)(DriverGlobals, UsbInterface, SettingIndex, InterfaceDescriptor);
7916 }
7917 
7918 _IRQL_requires_max_(DISPATCH_LEVEL)
7919 WDFAPI
7920 BYTE
7921 VFWDFEXPORT(WdfUsbInterfaceGetNumSettings)(
7922     _In_
7923     PWDF_DRIVER_GLOBALS DriverGlobals,
7924     _In_
7925     WDFUSBINTERFACE UsbInterface
7926     )
7927 {
7928     PAGED_CODE_LOCKED();
7929     return ((PFN_WDFUSBINTERFACEGETNUMSETTINGS) WdfVersion.Functions.pfnWdfUsbInterfaceGetNumSettings)(DriverGlobals, UsbInterface);
7930 }
7931 
7932 _Must_inspect_result_
7933 _IRQL_requires_max_(PASSIVE_LEVEL)
7934 WDFAPI
7935 NTSTATUS
7936 VFWDFEXPORT(WdfUsbInterfaceSelectSetting)(
7937     _In_
7938     PWDF_DRIVER_GLOBALS DriverGlobals,
7939     _In_
7940     WDFUSBINTERFACE UsbInterface,
7941     _In_opt_
7942     PWDF_OBJECT_ATTRIBUTES PipesAttributes,
7943     _In_
7944     PWDF_USB_INTERFACE_SELECT_SETTING_PARAMS Params
7945     )
7946 {
7947     PAGED_CODE_LOCKED();
7948     return ((PFN_WDFUSBINTERFACESELECTSETTING) WdfVersion.Functions.pfnWdfUsbInterfaceSelectSetting)(DriverGlobals, UsbInterface, PipesAttributes, Params);
7949 }
7950 
7951 _IRQL_requires_max_(DISPATCH_LEVEL)
7952 WDFAPI
7953 VOID
7954 VFWDFEXPORT(WdfUsbInterfaceGetEndpointInformation)(
7955     _In_
7956     PWDF_DRIVER_GLOBALS DriverGlobals,
7957     _In_
7958     WDFUSBINTERFACE UsbInterface,
7959     _In_
7960     UCHAR SettingIndex,
7961     _In_
7962     UCHAR EndpointIndex,
7963     _Out_
7964     PWDF_USB_PIPE_INFORMATION EndpointInfo
7965     )
7966 {
7967     PAGED_CODE_LOCKED();
7968     ((PFN_WDFUSBINTERFACEGETENDPOINTINFORMATION) WdfVersion.Functions.pfnWdfUsbInterfaceGetEndpointInformation)(DriverGlobals, UsbInterface, SettingIndex, EndpointIndex, EndpointInfo);
7969 }
7970 
7971 _IRQL_requires_max_(DISPATCH_LEVEL)
7972 WDFAPI
7973 WDFUSBINTERFACE
7974 VFWDFEXPORT(WdfUsbTargetDeviceGetInterface)(
7975     _In_
7976     PWDF_DRIVER_GLOBALS DriverGlobals,
7977     _In_
7978     WDFUSBDEVICE UsbDevice,
7979     _In_
7980     UCHAR InterfaceIndex
7981     )
7982 {
7983     PAGED_CODE_LOCKED();
7984     return ((PFN_WDFUSBTARGETDEVICEGETINTERFACE) WdfVersion.Functions.pfnWdfUsbTargetDeviceGetInterface)(DriverGlobals, UsbDevice, InterfaceIndex);
7985 }
7986 
7987 _IRQL_requires_max_(DISPATCH_LEVEL)
7988 WDFAPI
7989 BYTE
7990 VFWDFEXPORT(WdfUsbInterfaceGetConfiguredSettingIndex)(
7991     _In_
7992     PWDF_DRIVER_GLOBALS DriverGlobals,
7993     _In_
7994     WDFUSBINTERFACE Interface
7995     )
7996 {
7997     PAGED_CODE_LOCKED();
7998     return ((PFN_WDFUSBINTERFACEGETCONFIGUREDSETTINGINDEX) WdfVersion.Functions.pfnWdfUsbInterfaceGetConfiguredSettingIndex)(DriverGlobals, Interface);
7999 }
8000 
8001 _IRQL_requires_max_(DISPATCH_LEVEL)
8002 WDFAPI
8003 BYTE
8004 VFWDFEXPORT(WdfUsbInterfaceGetNumConfiguredPipes)(
8005     _In_
8006     PWDF_DRIVER_GLOBALS DriverGlobals,
8007     _In_
8008     WDFUSBINTERFACE UsbInterface
8009     )
8010 {
8011     PAGED_CODE_LOCKED();
8012     return ((PFN_WDFUSBINTERFACEGETNUMCONFIGUREDPIPES) WdfVersion.Functions.pfnWdfUsbInterfaceGetNumConfiguredPipes)(DriverGlobals, UsbInterface);
8013 }
8014 
8015 _IRQL_requires_max_(DISPATCH_LEVEL)
8016 WDFAPI
8017 WDFUSBPIPE
8018 VFWDFEXPORT(WdfUsbInterfaceGetConfiguredPipe)(
8019     _In_
8020     PWDF_DRIVER_GLOBALS DriverGlobals,
8021     _In_
8022     WDFUSBINTERFACE UsbInterface,
8023     _In_
8024     UCHAR PipeIndex,
8025     _Out_opt_
8026     PWDF_USB_PIPE_INFORMATION PipeInfo
8027     )
8028 {
8029     PAGED_CODE_LOCKED();
8030     return ((PFN_WDFUSBINTERFACEGETCONFIGUREDPIPE) WdfVersion.Functions.pfnWdfUsbInterfaceGetConfiguredPipe)(DriverGlobals, UsbInterface, PipeIndex, PipeInfo);
8031 }
8032 
8033 _IRQL_requires_max_(DISPATCH_LEVEL)
8034 WDFAPI
8035 USBD_PIPE_HANDLE
8036 VFWDFEXPORT(WdfUsbTargetPipeWdmGetPipeHandle)(
8037     _In_
8038     PWDF_DRIVER_GLOBALS DriverGlobals,
8039     _In_
8040     WDFUSBPIPE UsbPipe
8041     )
8042 {
8043     PAGED_CODE_LOCKED();
8044     return ((PFN_WDFUSBTARGETPIPEWDMGETPIPEHANDLE) WdfVersion.Functions.pfnWdfUsbTargetPipeWdmGetPipeHandle)(DriverGlobals, UsbPipe);
8045 }
8046 
8047 WDFAPI
8048 VOID
8049 VFWDFEXPORT(WdfVerifierDbgBreakPoint)(
8050     _In_
8051     PWDF_DRIVER_GLOBALS DriverGlobals
8052     )
8053 {
8054     PAGED_CODE_LOCKED();
8055     ((PFN_WDFVERIFIERDBGBREAKPOINT) WdfVersion.Functions.pfnWdfVerifierDbgBreakPoint)(DriverGlobals);
8056 }
8057 
8058 WDFAPI
8059 VOID
8060 VFWDFEXPORT(WdfVerifierKeBugCheck)(
8061     _In_
8062     PWDF_DRIVER_GLOBALS DriverGlobals,
8063     _In_
8064     ULONG BugCheckCode,
8065     _In_
8066     ULONG_PTR BugCheckParameter1,
8067     _In_
8068     ULONG_PTR BugCheckParameter2,
8069     _In_
8070     ULONG_PTR BugCheckParameter3,
8071     _In_
8072     ULONG_PTR BugCheckParameter4
8073     )
8074 {
8075     PAGED_CODE_LOCKED();
8076     ((PFN_WDFVERIFIERKEBUGCHECK) WdfVersion.Functions.pfnWdfVerifierKeBugCheck)(DriverGlobals, BugCheckCode, BugCheckParameter1, BugCheckParameter2, BugCheckParameter3, BugCheckParameter4);
8077 }
8078 
8079 WDFAPI
8080 PVOID
8081 VFWDFEXPORT(WdfGetTriageInfo)(
8082     _In_
8083     PWDF_DRIVER_GLOBALS DriverGlobals
8084     )
8085 {
8086     PAGED_CODE_LOCKED();
8087     return ((PFN_WDFGETTRIAGEINFO) WdfVersion.Functions.pfnWdfGetTriageInfo)(DriverGlobals);
8088 }
8089 
8090 _Must_inspect_result_
8091 _IRQL_requires_max_(DISPATCH_LEVEL)
8092 WDFAPI
8093 NTSTATUS
8094 VFWDFEXPORT(WdfWmiProviderCreate)(
8095     _In_
8096     PWDF_DRIVER_GLOBALS DriverGlobals,
8097     _In_
8098     WDFDEVICE Device,
8099     _In_
8100     PWDF_WMI_PROVIDER_CONFIG WmiProviderConfig,
8101     _In_opt_
8102     PWDF_OBJECT_ATTRIBUTES ProviderAttributes,
8103     _Out_
8104     WDFWMIPROVIDER* WmiProvider
8105     )
8106 {
8107     PAGED_CODE_LOCKED();
8108     return ((PFN_WDFWMIPROVIDERCREATE) WdfVersion.Functions.pfnWdfWmiProviderCreate)(DriverGlobals, Device, WmiProviderConfig, ProviderAttributes, WmiProvider);
8109 }
8110 
8111 _IRQL_requires_max_(DISPATCH_LEVEL)
8112 WDFAPI
8113 WDFDEVICE
8114 VFWDFEXPORT(WdfWmiProviderGetDevice)(
8115     _In_
8116     PWDF_DRIVER_GLOBALS DriverGlobals,
8117     _In_
8118     WDFWMIPROVIDER WmiProvider
8119     )
8120 {
8121     PAGED_CODE_LOCKED();
8122     return ((PFN_WDFWMIPROVIDERGETDEVICE) WdfVersion.Functions.pfnWdfWmiProviderGetDevice)(DriverGlobals, WmiProvider);
8123 }
8124 
8125 _IRQL_requires_max_(DISPATCH_LEVEL)
8126 WDFAPI
8127 BOOLEAN
8128 VFWDFEXPORT(WdfWmiProviderIsEnabled)(
8129     _In_
8130     PWDF_DRIVER_GLOBALS DriverGlobals,
8131     _In_
8132     WDFWMIPROVIDER WmiProvider,
8133     _In_
8134     WDF_WMI_PROVIDER_CONTROL ProviderControl
8135     )
8136 {
8137     PAGED_CODE_LOCKED();
8138     return ((PFN_WDFWMIPROVIDERISENABLED) WdfVersion.Functions.pfnWdfWmiProviderIsEnabled)(DriverGlobals, WmiProvider, ProviderControl);
8139 }
8140 
8141 _IRQL_requires_max_(DISPATCH_LEVEL)
8142 WDFAPI
8143 ULONGLONG
8144 VFWDFEXPORT(WdfWmiProviderGetTracingHandle)(
8145     _In_
8146     PWDF_DRIVER_GLOBALS DriverGlobals,
8147     _In_
8148     WDFWMIPROVIDER WmiProvider
8149     )
8150 {
8151     PAGED_CODE_LOCKED();
8152     return ((PFN_WDFWMIPROVIDERGETTRACINGHANDLE) WdfVersion.Functions.pfnWdfWmiProviderGetTracingHandle)(DriverGlobals, WmiProvider);
8153 }
8154 
8155 _Must_inspect_result_
8156 _IRQL_requires_max_(DISPATCH_LEVEL)
8157 WDFAPI
8158 NTSTATUS
8159 VFWDFEXPORT(WdfWmiInstanceCreate)(
8160     _In_
8161     PWDF_DRIVER_GLOBALS DriverGlobals,
8162     _In_
8163     WDFDEVICE Device,
8164     _In_
8165     PWDF_WMI_INSTANCE_CONFIG InstanceConfig,
8166     _In_opt_
8167     PWDF_OBJECT_ATTRIBUTES InstanceAttributes,
8168     _Out_opt_
8169     WDFWMIINSTANCE* Instance
8170     )
8171 {
8172     PAGED_CODE_LOCKED();
8173     return ((PFN_WDFWMIINSTANCECREATE) WdfVersion.Functions.pfnWdfWmiInstanceCreate)(DriverGlobals, Device, InstanceConfig, InstanceAttributes, Instance);
8174 }
8175 
8176 _Must_inspect_result_
8177 _IRQL_requires_max_(PASSIVE_LEVEL)
8178 WDFAPI
8179 NTSTATUS
8180 VFWDFEXPORT(WdfWmiInstanceRegister)(
8181     _In_
8182     PWDF_DRIVER_GLOBALS DriverGlobals,
8183     _In_
8184     WDFWMIINSTANCE WmiInstance
8185     )
8186 {
8187     PAGED_CODE_LOCKED();
8188     return ((PFN_WDFWMIINSTANCEREGISTER) WdfVersion.Functions.pfnWdfWmiInstanceRegister)(DriverGlobals, WmiInstance);
8189 }
8190 
8191 _IRQL_requires_max_(PASSIVE_LEVEL)
8192 WDFAPI
8193 VOID
8194 VFWDFEXPORT(WdfWmiInstanceDeregister)(
8195     _In_
8196     PWDF_DRIVER_GLOBALS DriverGlobals,
8197     _In_
8198     WDFWMIINSTANCE WmiInstance
8199     )
8200 {
8201     PAGED_CODE_LOCKED();
8202     ((PFN_WDFWMIINSTANCEDEREGISTER) WdfVersion.Functions.pfnWdfWmiInstanceDeregister)(DriverGlobals, WmiInstance);
8203 }
8204 
8205 _IRQL_requires_max_(DISPATCH_LEVEL)
8206 WDFAPI
8207 WDFDEVICE
8208 VFWDFEXPORT(WdfWmiInstanceGetDevice)(
8209     _In_
8210     PWDF_DRIVER_GLOBALS DriverGlobals,
8211     _In_
8212     WDFWMIINSTANCE WmiInstance
8213     )
8214 {
8215     PAGED_CODE_LOCKED();
8216     return ((PFN_WDFWMIINSTANCEGETDEVICE) WdfVersion.Functions.pfnWdfWmiInstanceGetDevice)(DriverGlobals, WmiInstance);
8217 }
8218 
8219 _IRQL_requires_max_(DISPATCH_LEVEL)
8220 WDFAPI
8221 WDFWMIPROVIDER
8222 VFWDFEXPORT(WdfWmiInstanceGetProvider)(
8223     _In_
8224     PWDF_DRIVER_GLOBALS DriverGlobals,
8225     _In_
8226     WDFWMIINSTANCE WmiInstance
8227     )
8228 {
8229     PAGED_CODE_LOCKED();
8230     return ((PFN_WDFWMIINSTANCEGETPROVIDER) WdfVersion.Functions.pfnWdfWmiInstanceGetProvider)(DriverGlobals, WmiInstance);
8231 }
8232 
8233 _Must_inspect_result_
8234 _IRQL_requires_max_(APC_LEVEL)
8235 WDFAPI
8236 NTSTATUS
8237 VFWDFEXPORT(WdfWmiInstanceFireEvent)(
8238     _In_
8239     PWDF_DRIVER_GLOBALS DriverGlobals,
8240     _In_
8241     WDFWMIINSTANCE WmiInstance,
8242     _In_opt_
8243     ULONG EventDataSize,
8244     _In_reads_bytes_opt_(EventDataSize)
8245     PVOID EventData
8246     )
8247 {
8248     PAGED_CODE_LOCKED();
8249     return ((PFN_WDFWMIINSTANCEFIREEVENT) WdfVersion.Functions.pfnWdfWmiInstanceFireEvent)(DriverGlobals, WmiInstance, EventDataSize, EventData);
8250 }
8251 
8252 _Must_inspect_result_
8253 _IRQL_requires_max_(DISPATCH_LEVEL)
8254 WDFAPI
8255 NTSTATUS
8256 VFWDFEXPORT(WdfWorkItemCreate)(
8257     _In_
8258     PWDF_DRIVER_GLOBALS DriverGlobals,
8259     _In_
8260     PWDF_WORKITEM_CONFIG Config,
8261     _In_
8262     PWDF_OBJECT_ATTRIBUTES Attributes,
8263     _Out_
8264     WDFWORKITEM* WorkItem
8265     )
8266 {
8267     PAGED_CODE_LOCKED();
8268     return ((PFN_WDFWORKITEMCREATE) WdfVersion.Functions.pfnWdfWorkItemCreate)(DriverGlobals, Config, Attributes, WorkItem);
8269 }
8270 
8271 _IRQL_requires_max_(DISPATCH_LEVEL)
8272 WDFAPI
8273 VOID
8274 VFWDFEXPORT(WdfWorkItemEnqueue)(
8275     _In_
8276     PWDF_DRIVER_GLOBALS DriverGlobals,
8277     _In_
8278     WDFWORKITEM WorkItem
8279     )
8280 {
8281     PAGED_CODE_LOCKED();
8282     ((PFN_WDFWORKITEMENQUEUE) WdfVersion.Functions.pfnWdfWorkItemEnqueue)(DriverGlobals, WorkItem);
8283 }
8284 
8285 _IRQL_requires_max_(DISPATCH_LEVEL)
8286 WDFAPI
8287 WDFOBJECT
8288 VFWDFEXPORT(WdfWorkItemGetParentObject)(
8289     _In_
8290     PWDF_DRIVER_GLOBALS DriverGlobals,
8291     _In_
8292     WDFWORKITEM WorkItem
8293     )
8294 {
8295     PAGED_CODE_LOCKED();
8296     return ((PFN_WDFWORKITEMGETPARENTOBJECT) WdfVersion.Functions.pfnWdfWorkItemGetParentObject)(DriverGlobals, WorkItem);
8297 }
8298 
8299 _IRQL_requires_max_(PASSIVE_LEVEL)
8300 WDFAPI
8301 VOID
8302 VFWDFEXPORT(WdfWorkItemFlush)(
8303     _In_
8304     PWDF_DRIVER_GLOBALS DriverGlobals,
8305     _In_
8306     WDFWORKITEM WorkItem
8307     )
8308 {
8309     PAGED_CODE_LOCKED();
8310     ((PFN_WDFWORKITEMFLUSH) WdfVersion.Functions.pfnWdfWorkItemFlush)(DriverGlobals, WorkItem);
8311 }
8312 
8313 
8314