https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8a978a179f3edfef58ade…
commit 8a978a179f3edfef58ade4287b5bcd6de734dc55
Author: Victor Perevertkin <victor.perevertkin(a)reactos.org>
AuthorDate: Thu Sep 24 23:51:15 2020 +0300
Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org>
CommitDate: Tue Nov 3 00:06:26 2020 +0300
[WDF] Add Windows Driver Framework files
Takern from Microsoft GitHub repo:
https://github.com/microsoft/Windows-Driver-Frameworks/commit/d9c6040fe9fa7…
Licensed under MIT
---
sdk/lib/drivers/wdf/kmdf/inc/private/fx.hpp | 208 +
sdk/lib/drivers/wdf/kmdf/inc/private/fxbugcheck.h | 91 +
.../wdf/kmdf/inc/private/fxcommonbuffer.hpp | 161 +
.../wdf/kmdf/inc/private/fxdmatransaction.hpp | 1559 ++++
.../kmdf/inc/private/fxdmatransactioncallbacks.hpp | 168 +
sdk/lib/drivers/wdf/kmdf/inc/private/fxdpc.hpp | 201 +
sdk/lib/drivers/wdf/kmdf/inc/private/fxdynamics.h | 6943 ++++++++++++++++
.../wdf/kmdf/inc/private/fxdynamicswrapper.h | 18 +
.../drivers/wdf/kmdf/inc/private/fxlibrarycommon.h | 87 +
.../drivers/wdf/kmdf/inc/private/fxprobeandlock.h | 38 +
sdk/lib/drivers/wdf/kmdf/inc/private/ifxmemory.hpp | 161 +
.../drivers/wdf/kmdf/inc/private/vffxdynamics.h | 6484 +++++++++++++++
sdk/lib/drivers/wdf/kmdf/inc/private/wdf10.h | 2173 +++++
sdk/lib/drivers/wdf/kmdf/inc/private/wdf11.h | 2203 +++++
sdk/lib/drivers/wdf/kmdf/inc/private/wdf111.h | 2896 +++++++
sdk/lib/drivers/wdf/kmdf/inc/private/wdf113.h | 3064 +++++++
sdk/lib/drivers/wdf/kmdf/inc/private/wdf115.h | 3079 +++++++
sdk/lib/drivers/wdf/kmdf/inc/private/wdf15.h | 2209 +++++
sdk/lib/drivers/wdf/kmdf/inc/private/wdf17.h | 2228 ++++++
sdk/lib/drivers/wdf/kmdf/inc/private/wdf19.h | 2410 ++++++
sdk/lib/drivers/wdf/kmdf/src/core/corepriv.hpp | 32 +
.../wdf/kmdf/src/core/fxbugcheckcallback.cpp | 1219 +++
sdk/lib/drivers/wdf/kmdf/src/core/fxchildlist.cpp | 3268 ++++++++
.../drivers/wdf/kmdf/src/core/fxchildlistapi.cpp | 804 ++
sdk/lib/drivers/wdf/kmdf/src/core/fxcorepch.hpp | 29 +
.../drivers/wdf/kmdf/src/core/fxdevicefdoapi.cpp | 464 ++
.../drivers/wdf/kmdf/src/core/fxdevicepdoapi.cpp | 491 ++
sdk/lib/drivers/wdf/kmdf/src/core/fxdpc.cpp | 412 +
sdk/lib/drivers/wdf/kmdf/src/core/fxdpcapi.cpp | 289 +
.../drivers/wdf/kmdf/src/core/fxsystemthread.cpp | 677 ++
sdk/lib/drivers/wdf/kmdf/src/core/tracing.cpp | 530 ++
.../wdf/kmdf/src/dma/base/fxcommonbuffer.cpp | 173 +
.../wdf/kmdf/src/dma/base/fxcommonbufferapi.cpp | 303 +
.../drivers/wdf/kmdf/src/dma/base/fxdmaenabler.cpp | 1125 +++
.../wdf/kmdf/src/dma/base/fxdmaenablerapi.cpp | 516 ++
sdk/lib/drivers/wdf/kmdf/src/dma/base/fxdmapch.hpp | 7 +
.../wdf/kmdf/src/dma/base/fxdmatransaction.cpp | 2533 ++++++
.../wdf/kmdf/src/dma/base/fxdmatransactionapi.cpp | 1251 +++
.../wdf/kmdf/src/dynamic/version/version.cpp | 760 ++
.../fxobject/fxobjectinfokm.cpp | 99 +
.../fxtosharedinterface/fxobject/fxobjectpch.hpp | 29 +
.../fxtosharedinterface/fxobject/objectpriv.hpp | 33 +
.../wdf/kmdf/src/irphandlers/wmi/fxwmiapi.cpp | 439 +
.../wdf/kmdf/src/irphandlers/wmi/fxwmiinstance.cpp | 684 ++
.../kmdf/src/irphandlers/wmi/fxwmiirphandler.cpp | 1960 +++++
.../wdf/kmdf/src/irphandlers/wmi/fxwmipch.hpp | 32 +
.../wdf/kmdf/src/irphandlers/wmi/fxwmiprovider.cpp | 563 ++
.../wdf/kmdf/src/librarycommon/fxlibrarycommon.cpp | 717 ++
.../wdf/kmdf/src/support/fxqueryinterface.cpp | 182 +
.../wdf/kmdf/src/support/fxqueryinterfaceapi.cpp | 222 +
.../wdf/kmdf/src/support/fxrelateddevice.cpp | 44 +
.../wdf/kmdf/src/support/fxrelateddevicelist.cpp | 150 +
.../drivers/wdf/kmdf/src/support/fxsupportpch.hpp | 32 +
.../drivers/wdf/kmdf/src/support/probeandlock.c | 79 +
sdk/lib/drivers/wdf/shared/core/coreprivshared.hpp | 388 +
sdk/lib/drivers/wdf/shared/core/fxcxdeviceinit.cpp | 78 +
.../drivers/wdf/shared/core/fxcxdeviceinitapi.cpp | 501 ++
sdk/lib/drivers/wdf/shared/core/fxdevice.cpp | 2177 +++++
sdk/lib/drivers/wdf/shared/core/fxdeviceapi.cpp | 2702 +++++++
sdk/lib/drivers/wdf/shared/core/fxdevicebase.cpp | 417 +
.../drivers/wdf/shared/core/fxdevicecontrolapi.cpp | 66 +
sdk/lib/drivers/wdf/shared/core/fxdeviceinit.cpp | 323 +
.../drivers/wdf/shared/core/fxdeviceinitapi.cpp | 2711 +++++++
sdk/lib/drivers/wdf/shared/core/fxdisposelist.cpp | 305 +
sdk/lib/drivers/wdf/shared/core/fxdriver.cpp | 656 ++
sdk/lib/drivers/wdf/shared/core/fxdriverapi.cpp | 522 ++
sdk/lib/drivers/wdf/shared/core/fxfileobject.cpp | 565 ++
.../drivers/wdf/shared/core/fxfileobjectapi.cpp | 181 +
sdk/lib/drivers/wdf/shared/core/fxirpqueue.cpp | 964 +++
sdk/lib/drivers/wdf/shared/core/fxlock.cpp | 59 +
.../drivers/wdf/shared/core/fxlookasidelist.cpp | 217 +
.../drivers/wdf/shared/core/fxlookasidelistapi.cpp | 300 +
sdk/lib/drivers/wdf/shared/core/fxmemorybuffer.cpp | 181 +
.../drivers/wdf/shared/core/fxmemorybufferapi.cpp | 364 +
.../shared/core/fxmemorybufferfromlookaside.cpp | 298 +
.../wdf/shared/core/fxmemorybufferfrompool.cpp | 160 +
.../wdf/shared/core/fxmemorybufferpreallocated.cpp | 156 +
.../shared/core/fxmemorybufferpreallocatedapi.cpp | 177 +
sdk/lib/drivers/wdf/shared/core/fxmemoryobject.cpp | 319 +
.../wdf/shared/core/fxpagedlookasidelist.cpp | 310 +
sdk/lib/drivers/wdf/shared/core/fxrequest.cpp | 3217 ++++++++
sdk/lib/drivers/wdf/shared/core/fxrequestapi.cpp | 3766 +++++++++
sdk/lib/drivers/wdf/shared/core/fxrequestbase.cpp | 832 ++
.../drivers/wdf/shared/core/fxrequestcontext.cpp | 195 +
.../drivers/wdf/shared/core/fxrequestmemory.cpp | 324 +
.../wdf/shared/core/fxrequestoutputbuffer.cpp | 327 +
.../wdf/shared/core/fxrequestsystembuffer.cpp | 317 +
sdk/lib/drivers/wdf/shared/core/fxsyncrequest.cpp | 191 +
.../drivers/wdf/shared/core/fxsystemworkitem.cpp | 379 +
sdk/lib/drivers/wdf/shared/core/fxtimer.cpp | 779 ++
sdk/lib/drivers/wdf/shared/core/fxtimerapi.cpp | 335 +
sdk/lib/drivers/wdf/shared/core/fxworkitem.cpp | 561 ++
sdk/lib/drivers/wdf/shared/core/fxworkitemapi.cpp | 264 +
.../drivers/wdf/shared/core/km/fxdeviceapikm.cpp | 959 +++
.../drivers/wdf/shared/core/km/fxdevicebasekm.cpp | 101 +
.../drivers/wdf/shared/core/km/fxdeviceinitkm.cpp | 85 +
sdk/lib/drivers/wdf/shared/core/km/fxdevicekm.cpp | 1037 +++
.../drivers/wdf/shared/core/km/fxdriverapikm.cpp | 263 +
sdk/lib/drivers/wdf/shared/core/km/fxdriverkm.cpp | 170 +
.../wdf/shared/core/km/fxfileobjectapikm.cpp | 81 +
.../drivers/wdf/shared/core/km/fxfileobjectkm.cpp | 97 +
.../wdf/shared/core/km/fxnpagedlookasidelistkm.cpp | 268 +
sdk/lib/drivers/wdf/shared/core/km/fxrequestkm.cpp | 906 +++
.../wdf/shared/core/km/fxrequestsystembufferkm.cpp | 93 +
.../drivers/wdf/shared/core/um/fxdeviceapium.cpp | 1462 ++++
.../drivers/wdf/shared/core/um/fxdevicebaseum.cpp | 81 +
.../wdf/shared/core/um/fxdeviceinitapium.cpp | 53 +
.../drivers/wdf/shared/core/um/fxdeviceinitum.cpp | 87 +
sdk/lib/drivers/wdf/shared/core/um/fxdeviceum.cpp | 1972 +++++
.../drivers/wdf/shared/core/um/fxdriverapium.cpp | 244 +
sdk/lib/drivers/wdf/shared/core/um/fxdriverum.cpp | 352 +
.../wdf/shared/core/um/fxfileobjectapium.cpp | 180 +
.../drivers/wdf/shared/core/um/fxfileobjectum.cpp | 119 +
sdk/lib/drivers/wdf/shared/core/um/fxirpum.cpp | 1814 +++++
.../wdf/shared/core/um/fxmessagedispatchum.cpp | 386 +
.../wdf/shared/core/um/fxnpagedlookasidelistum.cpp | 149 +
.../drivers/wdf/shared/core/um/fxrequestapium.cpp | 449 ++
.../wdf/shared/core/um/fxrequestsystembufferum.cpp | 72 +
sdk/lib/drivers/wdf/shared/core/um/fxrequestum.cpp | 264 +
sdk/lib/drivers/wdf/shared/core/verifierapi.cpp | 269 +
.../wdf/shared/enhancedverif/km/vfprivkm.hpp | 357 +
.../wdf/shared/enhancedverif/km/vfwdfdynamics.cpp | 8313 +++++++++++++++++++
.../wdf/shared/enhancedverif/um/vfprivum.hpp | 325 +
.../wdf/shared/enhancedverif/um/vfwdfdynamics.cpp | 5002 ++++++++++++
.../drivers/wdf/shared/enhancedverif/verifier.cpp | 650 ++
.../wdf/shared/enhancedverif/vfeventhooks.cpp | 1020 +++
.../wdf/shared/enhancedverif/vfeventhooks.hpp | 50 +
.../drivers/wdf/shared/enhancedverif/vfpriv.hpp | 138 +
.../wdf/shared/inc/primitives/common/dbgmacros.h | 63 +
.../drivers/wdf/shared/inc/primitives/common/mx.h | 42 +
.../shared/inc/primitives/common/mxdeviceobject.h | 152 +
.../shared/inc/primitives/common/mxdriverobject.h | 107 +
.../wdf/shared/inc/primitives/common/mxevent.h | 143 +
.../shared/inc/primitives/common/mxfileobject.h | 97 +
.../wdf/shared/inc/primitives/common/mxgeneral.h | 606 ++
.../wdf/shared/inc/primitives/common/mxlock.h | 109 +
.../wdf/shared/inc/primitives/common/mxmacros.h | 29 +
.../wdf/shared/inc/primitives/common/mxmemory.h | 49 +
.../wdf/shared/inc/primitives/common/mxpagedlock.h | 103 +
.../wdf/shared/inc/primitives/common/mxtimer.h | 95 +
.../wdf/shared/inc/primitives/common/mxworkitem.h | 118 +
.../shared/inc/primitives/km/mxdeviceobjectkm.h | 189 +
.../shared/inc/primitives/km/mxdriverobjectkm.h | 72 +
.../wdf/shared/inc/primitives/km/mxeventkm.h | 148 +
.../wdf/shared/inc/primitives/km/mxfileobjectkm.h | 82 +
.../wdf/shared/inc/primitives/km/mxgeneralkm.h | 778 ++
.../drivers/wdf/shared/inc/primitives/km/mxkm.h | 49 +
.../wdf/shared/inc/primitives/km/mxlockkm.h | 115 +
.../wdf/shared/inc/primitives/km/mxmemorykm.h | 47 +
.../wdf/shared/inc/primitives/km/mxpagedlockkm.h | 137 +
.../wdf/shared/inc/primitives/km/mxtimerkm.h | 291 +
.../wdf/shared/inc/primitives/km/mxworkitemkm.h | 109 +
.../wdf/shared/inc/primitives/um/errtostatus.h | 2036 +++++
.../shared/inc/primitives/um/mxdeviceobjectum.h | 18 +
.../shared/inc/primitives/um/mxdriverobjectum.h | 24 +
.../wdf/shared/inc/primitives/um/mxeventum.h | 289 +
.../wdf/shared/inc/primitives/um/mxfileobjectum.h | 89 +
.../wdf/shared/inc/primitives/um/mxgeneralum.h | 1078 +++
.../wdf/shared/inc/primitives/um/mxlockum.h | 185 +
.../wdf/shared/inc/primitives/um/mxmemoryum.h | 58 +
.../wdf/shared/inc/primitives/um/mxpagedlockum.h | 129 +
.../wdf/shared/inc/primitives/um/mxtimerum.h | 479 ++
.../drivers/wdf/shared/inc/primitives/um/mxum.h | 248 +
.../wdf/shared/inc/primitives/um/mxworkitemum.h | 294 +
.../wdf/shared/inc/private/common/dbgtrace.h | 99 +
.../shared/inc/private/common/fxautoregistry.hpp | 46 +
.../wdf/shared/inc/private/common/fxautostring.hpp | 53 +
.../wdf/shared/inc/private/common/fxcallback.hpp | 136 +
.../shared/inc/private/common/fxcallbacklock.hpp | 648 ++
.../inc/private/common/fxcallbackmutexlock.hpp | 173 +
.../inc/private/common/fxcallbackspinlock.hpp | 171 +
.../wdf/shared/inc/private/common/fxchildlist.hpp | 816 ++
.../wdf/shared/inc/private/common/fxcollection.hpp | 227 +
.../shared/inc/private/common/fxcxdeviceinfo.hpp | 31 +
.../shared/inc/private/common/fxcxdeviceinit.hpp | 95 +
.../inc/private/common/fxdefaultirphandler.hpp | 22 +
.../wdf/shared/inc/private/common/fxdevice.hpp | 2297 ++++++
.../inc/private/common/fxdevicecallbacks.hpp | 63 +
.../wdf/shared/inc/private/common/fxdeviceinit.hpp | 330 +
.../inc/private/common/fxdeviceinitshared.hpp | 65 +
.../inc/private/common/fxdeviceinterface.hpp | 98 +
.../private/common/fxdevicepwrreqstatemachine.hpp | 153 +
.../wdf/shared/inc/private/common/fxdevicetext.hpp | 85 +
.../inc/private/common/fxdevicetomxinterface.hpp | 59 +
.../shared/inc/private/common/fxdisposelist.hpp | 142 +
.../wdf/shared/inc/private/common/fxdriver.hpp | 422 +
.../inc/private/common/fxdrivercallbacks.hpp | 107 +
.../wdf/shared/inc/private/common/fxeventqueue.hpp | 381 +
.../wdf/shared/inc/private/common/fxfileobject.hpp | 255 +
.../inc/private/common/fxfileobjectcallbacks.hpp | 200 +
.../wdf/shared/inc/private/common/fxforward.hpp | 139 +
.../wdf/shared/inc/private/common/fxglobals.h | 1101 +++
.../wdf/shared/inc/private/common/fxhandle.h | 482 ++
.../drivers/wdf/shared/inc/private/common/fxifr.h | 123 +
.../wdf/shared/inc/private/common/fxifrkm.h | 83 +
.../wdf/shared/inc/private/common/fxinterrupt.hpp | 869 ++
.../wdf/shared/inc/private/common/fxioqueue.hpp | 1714 ++++
.../inc/private/common/fxioqueuecallbacks.hpp | 416 +
.../wdf/shared/inc/private/common/fxiotarget.hpp | 966 +++
.../shared/inc/private/common/fxiotargetremote.hpp | 440 +
.../shared/inc/private/common/fxiotargetself.hpp | 107 +
.../wdf/shared/inc/private/common/fxirp.hpp | 844 ++
.../private/common/fxirpdynamicdispatchinfo.hpp | 94 +
.../inc/private/common/fxirppreprocessinfo.hpp | 49 +
.../wdf/shared/inc/private/common/fxirpqueue.hpp | 297 +
.../drivers/wdf/shared/inc/private/common/fxldr.h | 249 +
.../wdf/shared/inc/private/common/fxlock.hpp | 150 +
.../shared/inc/private/common/fxlookasidelist.hpp | 126 +
.../wdf/shared/inc/private/common/fxmacros.hpp | 319 +
.../drivers/wdf/shared/inc/private/common/fxmdl.h | 91 +
.../shared/inc/private/common/fxmemorybuffer.hpp | 93 +
.../private/common/fxmemorybufferfromlookaside.hpp | 136 +
.../inc/private/common/fxmemorybufferfrompool.hpp | 88 +
.../private/common/fxmemorybufferpreallocated.hpp | 72 +
.../shared/inc/private/common/fxmemoryobject.hpp | 199 +
.../wdf/shared/inc/private/common/fxmin.hpp | 385 +
.../shared/inc/private/common/fxnonpagedobject.hpp | 229 +
.../inc/private/common/fxnpagedlookasidelist.hpp | 110 +
.../wdf/shared/inc/private/common/fxobject.hpp | 1506 ++++
.../wdf/shared/inc/private/common/fxpackage.hpp | 56 +
.../inc/private/common/fxpagedlookasidelist.hpp | 127 +
.../shared/inc/private/common/fxpagedobject.hpp | 90 +
.../wdf/shared/inc/private/common/fxpkgfdo.hpp | 486 ++
.../wdf/shared/inc/private/common/fxpkggeneral.hpp | 230 +
.../wdf/shared/inc/private/common/fxpkgio.hpp | 446 ++
.../shared/inc/private/common/fxpkgioshared.hpp | 36 +
.../wdf/shared/inc/private/common/fxpkgpdo.hpp | 592 ++
.../wdf/shared/inc/private/common/fxpkgpnp.hpp | 4588 +++++++++++
.../shared/inc/private/common/fxpnpcallbacks.hpp | 1127 +++
.../inc/private/common/fxpnpstatemachine.hpp | 225 +
.../drivers/wdf/shared/inc/private/common/fxpool.h | 286 +
.../shared/inc/private/common/fxpoolinlines.hpp | 258 +
.../inc/private/common/fxpoweridlestatemachine.hpp | 550 ++
.../private/common/fxpowerpolicystatemachine.hpp | 811 ++
.../inc/private/common/fxpowerstatemachine.hpp | 285 +
.../shared/inc/private/common/fxpoxinterface.hpp | 197 +
.../shared/inc/private/common/fxqueryinterface.hpp | 137 +
.../wdf/shared/inc/private/common/fxregkey.hpp | 286 +
.../shared/inc/private/common/fxrelateddevice.hpp | 81 +
.../inc/private/common/fxrelateddevicelist.hpp | 112 +
.../wdf/shared/inc/private/common/fxrequest.hpp | 1530 ++++
.../shared/inc/private/common/fxrequestbase.hpp | 959 +++
.../shared/inc/private/common/fxrequestbuffer.hpp | 157 +
.../inc/private/common/fxrequestcallbacks.hpp | 99 +
.../shared/inc/private/common/fxrequestcontext.hpp | 156 +
.../inc/private/common/fxrequestcontexttypes.h | 27 +
.../shared/inc/private/common/fxrequestmemory.hpp | 124 +
.../private/common/fxrequestvalidatefunctions.hpp | 163 +
.../wdf/shared/inc/private/common/fxresource.hpp | 749 ++
.../private/common/fxselfmanagediostatemachine.hpp | 245 +
.../wdf/shared/inc/private/common/fxspinlock.hpp | 121 +
.../wdf/shared/inc/private/common/fxstring.hpp | 152 +
.../wdf/shared/inc/private/common/fxstump.hpp | 107 +
.../shared/inc/private/common/fxsyncrequest.hpp | 121 +
.../shared/inc/private/common/fxsystemthread.hpp | 289 +
.../shared/inc/private/common/fxsystemworkitem.hpp | 254 +
.../wdf/shared/inc/private/common/fxtagtracker.hpp | 317 +
.../wdf/shared/inc/private/common/fxtelemetry.hpp | 197 +
.../inc/private/common/fxtelemetrycommon.hpp | 55 +
.../wdf/shared/inc/private/common/fxtimer.hpp | 221 +
.../shared/inc/private/common/fxtoobjectitf.hpp | 60 +
.../wdf/shared/inc/private/common/fxtrace.h | 119 +
.../inc/private/common/fxtransactionedlist.hpp | 305 +
.../wdf/shared/inc/private/common/fxtypedefs.hpp | 41 +
.../wdf/shared/inc/private/common/fxtypes.h | 124 +
.../wdf/shared/inc/private/common/fxusbdevice.hpp | 664 ++
.../shared/inc/private/common/fxusbidleinfo.hpp | 45 +
.../shared/inc/private/common/fxusbinterface.hpp | 270 +
.../wdf/shared/inc/private/common/fxusbpipe.hpp | 747 ++
.../inc/private/common/fxusbrequestcontext.hpp | 89 +
.../wdf/shared/inc/private/common/fxuserobject.hpp | 106 +
.../inc/private/common/fxvalidatefunctions.hpp | 162 +
.../wdf/shared/inc/private/common/fxverifier.h | 263 +
.../shared/inc/private/common/fxverifierlock.hpp | 562 ++
.../wdf/shared/inc/private/common/fxwaitlock.hpp | 351 +
.../private/common/fxwakeinterruptstatemachine.hpp | 196 +
.../wdf/shared/inc/private/common/fxwatchdog.hpp | 116 +
.../wdf/shared/inc/private/common/fxwmicompat.h | 79 +
.../shared/inc/private/common/fxwmiinstance.hpp | 659 ++
.../shared/inc/private/common/fxwmiirphandler.hpp | 329 +
.../shared/inc/private/common/fxwmiprovider.hpp | 295 +
.../wdf/shared/inc/private/common/fxworkitem.hpp | 231 +
.../shared/inc/private/common/ifxhascallbacks.hpp | 88 +
.../wdf/shared/inc/private/common/ifxmemory.hpp | 161 +
.../wdf/shared/inc/private/common/stringutil.hpp | 41 +
.../wdf/shared/inc/private/km/fxdevicekm.hpp | 171 +
.../wdf/shared/inc/private/km/fxdmaenabler.hpp | 479 ++
.../inc/private/km/fxdmaenablercallbacks.hpp | 254 +
.../wdf/shared/inc/private/km/fxglobalskm.h | 744 ++
.../wdf/shared/inc/private/km/fxinterruptkm.hpp | 116 +
.../wdf/shared/inc/private/km/fxioqueuekm.hpp | 59 +
.../wdf/shared/inc/private/km/fxiotargetkm.hpp | 270 +
.../shared/inc/private/km/fxiotargetremotekm.hpp | 81 +
.../drivers/wdf/shared/inc/private/km/fxirpkm.hpp | 1347 ++++
.../wdf/shared/inc/private/km/fxperftracekm.hpp | 117 +
.../wdf/shared/inc/private/km/fxrequestbasekm.hpp | 68 +
.../shared/inc/private/km/fxrequestbufferkm.hpp | 111 +
.../wdf/shared/inc/private/km/fxtelemetrykm.hpp | 196 +
.../wdf/shared/inc/private/km/fxtypedefskm.hpp | 56 +
.../wdf/shared/inc/private/km/fxverifierkm.h | 72 +
.../wdf/shared/inc/private/um/device_common.h | 46 +
.../wdf/shared/inc/private/um/fxdeviceum.hpp | 460 ++
.../wdf/shared/inc/private/um/fxfileobjectum.hpp | 33 +
.../wdf/shared/inc/private/um/fxforwardum.hpp | 30 +
.../wdf/shared/inc/private/um/fxglobalsum.h | 184 +
.../inc/private/um/fxinterruptthreadpoolum.hpp | 195 +
.../wdf/shared/inc/private/um/fxinterruptum.hpp | 44 +
.../wdf/shared/inc/private/um/fxioqueueum.hpp | 231 +
.../shared/inc/private/um/fxiotargetremoteum.hpp | 141 +
.../wdf/shared/inc/private/um/fxiotargetum.hpp | 162 +
.../drivers/wdf/shared/inc/private/um/fxirpum.hpp | 16 +
.../drivers/wdf/shared/inc/private/um/fxldrum.h | 256 +
.../shared/inc/private/um/fxmessagedispatchum.hpp | 253 +
.../wdf/shared/inc/private/um/fxrequestbaseum.hpp | 29 +
.../shared/inc/private/um/fxrequestbufferum.hpp | 69 +
.../wdf/shared/inc/private/um/fxtelemetryum.hpp | 130 +
.../wdf/shared/inc/private/um/fxtypedefsum.hpp | 29 +
.../wdf/shared/inc/private/um/fxverifierum.h | 62 +
.../wdf/shared/inc/private/um/ufxverifier.h | 26 +
sdk/lib/drivers/wdf/shared/inc/private/um/umusb.h | 260 +
.../shared/inc/private/um/wdffileobject_private.h | 80 +
.../irphandlers/default/fxdefaultirphandler.cpp | 97 +
.../shared/irphandlers/general/fxpkggeneral.cpp | 2057 +++++
.../wdf/shared/irphandlers/io/fxioqueue.cpp | 6527 +++++++++++++++
.../wdf/shared/irphandlers/io/fxioqueueapi.cpp | 1420 ++++
.../drivers/wdf/shared/irphandlers/io/fxpkgio.cpp | 1797 +++++
.../wdf/shared/irphandlers/io/ioprivshared.hpp | 309 +
.../wdf/shared/irphandlers/io/km/fxioqueuekm.cpp | 573 ++
.../wdf/shared/irphandlers/irphandlerspriv.hpp | 38 +
.../wdf/shared/irphandlers/package/fxpackage.cpp | 41 +
.../irphandlers/pnp/devicepwrreqstatemachine.cpp | 430 +
.../wdf/shared/irphandlers/pnp/eventqueue.cpp | 438 +
.../wdf/shared/irphandlers/pnp/fdopower.cpp | 586 ++
.../wdf/shared/irphandlers/pnp/fxinterruptapi.cpp | 1385 ++++
.../wdf/shared/irphandlers/pnp/fxpkgfdo.cpp | 1569 ++++
.../wdf/shared/irphandlers/pnp/fxpkgpdo.cpp | 1926 +++++
.../wdf/shared/irphandlers/pnp/fxpkgpnp.cpp | 6487 +++++++++++++++
.../wdf/shared/irphandlers/pnp/interruptobject.cpp | 2013 +++++
.../wdf/shared/irphandlers/pnp/km/eventqueuekm.cpp | 119 +
.../wdf/shared/irphandlers/pnp/km/fxpkgfdokm.cpp | 596 ++
.../wdf/shared/irphandlers/pnp/km/fxpkgpdokm.cpp | 387 +
.../wdf/shared/irphandlers/pnp/km/fxpkgpnpkm.cpp | 624 ++
.../irphandlers/pnp/km/interruptobjectkm.cpp | 569 ++
.../wdf/shared/irphandlers/pnp/km/pnpprivkm.hpp | 87 +
.../irphandlers/pnp/km/pnpstatemachinekm.cpp | 238 +
.../pnp/km/powerpolicystatemachinekm.cpp | 245 +
.../irphandlers/pnp/km/powerstatemachinekm.cpp | 151 +
.../shared/irphandlers/pnp/km/poxinterfacekm.cpp | 460 ++
.../wdf/shared/irphandlers/pnp/km/supportkm.cpp | 321 +
.../pnp/notpowerpolicyownerstatemachine.cpp | 593 ++
.../wdf/shared/irphandlers/pnp/pdopower.cpp | 496 ++
.../drivers/wdf/shared/irphandlers/pnp/pnppriv.hpp | 482 ++
.../wdf/shared/irphandlers/pnp/pnpstatemachine.cpp | 4793 +++++++++++
.../irphandlers/pnp/poweridlestatemachine.cpp | 2023 +++++
.../irphandlers/pnp/powerpolicystatemachine.cpp | 8403 ++++++++++++++++++++
.../shared/irphandlers/pnp/powerstatemachine.cpp | 5398 +++++++++++++
.../wdf/shared/irphandlers/pnp/poxinterface.cpp | 579 ++
.../irphandlers/pnp/selfmanagediostatemachine.cpp | 469 ++
.../wdf/shared/irphandlers/pnp/um/eventqueueum.cpp | 77 +
.../shared/irphandlers/pnp/um/fxchildlistum.cpp | 601 ++
.../irphandlers/pnp/um/fxinterruptthreadpoolum.cpp | 400 +
.../wdf/shared/irphandlers/pnp/um/fxpkgfdoum.cpp | 322 +
.../wdf/shared/irphandlers/pnp/um/fxpkgpdoum.cpp | 144 +
.../wdf/shared/irphandlers/pnp/um/fxpkgpnpum.cpp | 339 +
.../irphandlers/pnp/um/fxqueryinterfaceum.cpp | 128 +
.../irphandlers/pnp/um/fxrelateddevicelistum.cpp | 86 +
.../irphandlers/pnp/um/fxrelateddeviceum.cpp | 49 +
.../shared/irphandlers/pnp/um/fxsystemthreadum.cpp | 199 +
.../irphandlers/pnp/um/fxwmiirphandlerum.cpp | 91 +
.../shared/irphandlers/pnp/um/fxwmiproviderum.cpp | 162 +
.../irphandlers/pnp/um/interruptobjectum.cpp | 804 ++
.../wdf/shared/irphandlers/pnp/um/pnpprivum.hpp | 14 +
.../irphandlers/pnp/um/pnpstatemachineum.cpp | 178 +
.../pnp/um/powerpolicystatemachineum.cpp | 213 +
.../irphandlers/pnp/um/powerstatemachineum.cpp | 103 +
.../shared/irphandlers/pnp/um/poxinterfaceum.cpp | 125 +
.../wdf/shared/irphandlers/pnp/um/supportum.cpp | 149 +
.../irphandlers/pnp/wakeinterruptstatemachine.cpp | 524 ++
sdk/lib/drivers/wdf/shared/object/dbgtrace.cpp | 130 +
sdk/lib/drivers/wdf/shared/object/fxobject.cpp | 1137 +++
sdk/lib/drivers/wdf/shared/object/fxobjectapi.cpp | 383 +
sdk/lib/drivers/wdf/shared/object/fxobjectpch.hpp | 30 +
.../wdf/shared/object/fxobjectstatemachine.cpp | 1217 +++
sdk/lib/drivers/wdf/shared/object/fxtagtracker.cpp | 382 +
sdk/lib/drivers/wdf/shared/object/fxuserobject.cpp | 106 +
.../drivers/wdf/shared/object/fxuserobjectapi.cpp | 145 +
.../wdf/shared/object/fxvalidatefunctions.cpp | 220 +
.../wdf/shared/object/fxverifierbugcheck.cpp | 107 +
.../drivers/wdf/shared/object/fxverifierlock.cpp | 1050 +++
sdk/lib/drivers/wdf/shared/object/globals.cpp | 1740 ++++
sdk/lib/drivers/wdf/shared/object/handleapi.cpp | 702 ++
.../drivers/wdf/shared/object/km/fxobjectkm.cpp | 120 +
sdk/lib/drivers/wdf/shared/object/km/globalskm.cpp | 254 +
sdk/lib/drivers/wdf/shared/object/km/wdfpoolkm.cpp | 272 +
sdk/lib/drivers/wdf/shared/object/objectpriv.hpp | 37 +
.../wdf/shared/object/um/fxobjectinfoum.cpp | 70 +
.../drivers/wdf/shared/object/um/fxobjectum.cpp | 194 +
sdk/lib/drivers/wdf/shared/object/um/globalsum.cpp | 67 +
sdk/lib/drivers/wdf/shared/object/wdfpool.cpp | 710 ++
.../wdf/shared/primitives/km/mxgeneralkm.cpp | 58 +
.../wdf/shared/primitives/um/errtostatus.cpp | 74 +
.../wdf/shared/primitives/um/mxdeviceobjectum.cpp | 206 +
.../wdf/shared/primitives/um/mxdriverobjectum.cpp | 75 +
.../wdf/shared/primitives/um/mxfileobjectum.cpp | 41 +
.../wdf/shared/primitives/um/mxgeneralum.cpp | 123 +
.../wdf/shared/primitives/um/mxworkitemum.cpp | 66 +
.../drivers/wdf/shared/support/fxcollection.cpp | 285 +
.../drivers/wdf/shared/support/fxcollectionapi.cpp | 384 +
.../wdf/shared/support/fxdeviceinterface.cpp | 155 +
.../wdf/shared/support/fxdeviceinterfaceapi.cpp | 400 +
.../drivers/wdf/shared/support/fxdevicetext.cpp | 52 +
.../drivers/wdf/shared/support/fxregistryapi.cpp | 1530 ++++
sdk/lib/drivers/wdf/shared/support/fxregkey.cpp | 66 +
.../drivers/wdf/shared/support/fxrequestbuffer.cpp | 340 +
.../drivers/wdf/shared/support/fxresourceapi.cpp | 1314 +++
.../wdf/shared/support/fxresourcecollection.cpp | 739 ++
sdk/lib/drivers/wdf/shared/support/fxspinlock.cpp | 142 +
.../drivers/wdf/shared/support/fxspinlockapi.cpp | 181 +
sdk/lib/drivers/wdf/shared/support/fxstring.cpp | 67 +
sdk/lib/drivers/wdf/shared/support/fxstringapi.cpp | 152 +
.../drivers/wdf/shared/support/fxsupportpch.hpp | 25 +
sdk/lib/drivers/wdf/shared/support/fxtelemetry.cpp | 149 +
.../wdf/shared/support/fxtransactionedlist.cpp | 552 ++
sdk/lib/drivers/wdf/shared/support/fxwaitlock.cpp | 74 +
.../drivers/wdf/shared/support/fxwaitlockapi.cpp | 184 +
.../wdf/shared/support/km/fxdeviceinterfacekm.cpp | 236 +
.../drivers/wdf/shared/support/km/fxregkeykm.cpp | 296 +
.../wdf/shared/support/km/fxrequestbufferkm.cpp | 277 +
.../shared/support/km/fxresourcecollectionkm.cpp | 39 +
.../wdf/shared/support/km/fxsupportpchkm.hpp | 41 +
.../wdf/shared/support/km/fxtelemetrykm.cpp | 732 ++
sdk/lib/drivers/wdf/shared/support/stringutil.cpp | 308 +
.../wdf/shared/support/um/fxdeviceinterfaceum.cpp | 289 +
.../drivers/wdf/shared/support/um/fxregkeyum.cpp | 302 +
.../wdf/shared/support/um/fxrequestbufferum.cpp | 103 +
.../shared/support/um/fxresourcecollectionum.cpp | 788 ++
.../wdf/shared/support/um/fxsupportpchum.hpp | 44 +
.../wdf/shared/support/um/fxtelemetryum.cpp | 426 +
.../drivers/wdf/shared/support/um/tracingum.cpp | 838 ++
.../drivers/wdf/shared/targets/fxtargetsshared.hpp | 187 +
.../wdf/shared/targets/general/fxiotarget.cpp | 2716 +++++++
.../wdf/shared/targets/general/fxiotargetapi.cpp | 2012 +++++
.../shared/targets/general/fxiotargetremote.cpp | 825 ++
.../wdf/shared/targets/general/fxiotargetself.cpp | 176 +
.../shared/targets/general/km/fxiotargetapikm.cpp | 433 +
.../wdf/shared/targets/general/km/fxiotargetkm.cpp | 524 ++
.../targets/general/km/fxiotargetremotekm.cpp | 366 +
.../targets/general/um/fxiotargetremoteum.cpp | 658 ++
.../wdf/shared/targets/general/um/fxiotargetum.cpp | 315 +
.../drivers/wdf/shared/targets/usb/fxusbdevice.cpp | 2475 ++++++
.../wdf/shared/targets/usb/fxusbdeviceapi.cpp | 1428 ++++
.../wdf/shared/targets/usb/fxusbinterface.cpp | 1168 +++
.../wdf/shared/targets/usb/fxusbinterfaceapi.cpp | 497 ++
.../drivers/wdf/shared/targets/usb/fxusbpch.hpp | 16 +
.../drivers/wdf/shared/targets/usb/fxusbpipe.cpp | 1892 +++++
.../wdf/shared/targets/usb/fxusbpipeapi.cpp | 862 ++
.../wdf/shared/targets/usb/km/fxusbdeviceapikm.cpp | 445 ++
.../wdf/shared/targets/usb/km/fxusbdevicekm.cpp | 1107 +++
.../wdf/shared/targets/usb/km/fxusbpipekm.cpp | 379 +
.../wdf/shared/targets/usb/um/fxusbdeviceum.cpp | 923 +++
.../wdf/shared/targets/usb/um/fxusbinterfaceum.cpp | 234 +
.../wdf/shared/targets/usb/um/fxusbpipeum.cpp | 345 +
.../wdf/shared/targets/usb/um/usbstubum.cpp | 147 +
sdk/lib/drivers/wdf/shared/targets/usb/usbutil.cpp | 614 ++
sdk/lib/drivers/wdf/shared/targets/usb/usbutil.hpp | 178 +
.../drivers/wdf/umdf/fxlib/inc/private/umdfstub.h | 62 +
sdk/lib/drivers/wdf/umdf/fxlib/inc/private/wdf20.h | 2977 +++++++
.../drivers/wdf/umdf/fxlib/inc/private/wdf215.h | 2989 +++++++
.../umdf/fxlib/librarycommon/fxlibrarycommon.cpp | 508 ++
.../wdf/umdf/fxlib/librarycommon/fxlibrarycommon.h | 71 +
.../drivers/wdf/umdf/fxlib/version/framework.cpp | 133 +
.../drivers/wdf/umdf/fxlib/version/fxdynamics.h | 4188 ++++++++++
.../wdf/umdf/fxlib/version/fxframeworkstubum.h | 48 +
sdk/lib/drivers/wdf/umdf/fxlib/version/version.cpp | 312 +
.../drivers/wdf/umdf/fxlib/version/vffxdynamics.h | 3911 +++++++++
475 files changed, 285099 insertions(+)
diff --git a/sdk/lib/drivers/wdf/kmdf/inc/private/fx.hpp
b/sdk/lib/drivers/wdf/kmdf/inc/private/fx.hpp
new file mode 100644
index 00000000000..d3eae97629e
--- /dev/null
+++ b/sdk/lib/drivers/wdf/kmdf/inc/private/fx.hpp
@@ -0,0 +1,208 @@
+/*++
+
+Copyright (c) Microsoft Corporation. All rights reserved.
+
+Module Name:
+
+ Fx.hpp
+
+Abstract:
+
+ This is the main driver framework include file.
+
+Author:
+ WDF team
+
+Environment:
+
+ kernel mode only
+
+Revision History:
+
+--*/
+
+#ifndef _FX_H
+#define _FX_H
+
+extern "C" {
+#include "mx.h"
+}
+
+#include "FxMacros.hpp"
+
+extern "C" {
+#include "wdf.h"
+#include "wdmsec.h"
+#include "wdmguid.h"
+
+#include "wdfdevicepri.h"
+#include "wdfiotargetpri.h"
+#include "wdfcx.h"
+#include "wdfldr.h"
+
+#include <FxDynamicsWrapper.h>
+
+#include "wdf10.h"
+#include "wdf11.h"
+#include "wdf15.h"
+#include "wdf17.h"
+#include "wdf19.h"
+#include "wdf111.h"
+#include "wdf113.h"
+#include "wdf115.h"
+}
+
+#define KMDF_ONLY_CODE_PATH_ASSERT()
+
+// Integer overflow functions
+#include "ntintsafe.h"
+
+#include "FxForward.hpp"
+
+//KMDF defines for shared type names
+#include "FxTypeDefsKm.hpp"
+
+#include "fxwmicompat.h"
+#include "fxtrace.h"
+#include "fxtypes.h"
+#include "fxrequestcontexttypes.h"
+#include "fxpool.h"
+#include "FxGlobalsKM.h"
+#include "FxPoolInlines.hpp"
+#include "fxverifier.h"
+#include "fxverifierkm.h"
+#include "FxMdl.h"
+#include "FxProbeAndLock.h"
+
+#include "FxPerfTraceKm.hpp"
+#include "DriverFrameworks-KernelMode-KmEvents.h"
+
+#include <NtStrSafe.h>
+
+#include "FxStump.hpp"
+
+#include "FxRequestBuffer.hpp"
+
+#include "FxTagTracker.hpp"
+
+// internal locks
+#include "FxVerifierLock.hpp"
+#include "FxLock.hpp"
+
+// base objects
+#include "fxobject.hpp"
+#include "FxPagedObject.hpp"
+#include "FxNonPagedObject.hpp"
+
+#include "fxhandle.h"
+
+// external locks
+#include "FxWaitLock.hpp"
+#include "FxSpinLock.hpp"
+
+// utitilty classes and functions
+#include "FxTransactionedList.hpp"
+#include "FxRelatedDeviceList.hpp"
+#include "FxDisposeList.hpp"
+#include "FxCollection.hpp"
+#include "StringUtil.hpp"
+
+// abstract classes
+#include "IFxHasCallbacks.hpp"
+
+// callback delegation and locking
+#include "FxSystemThread.hpp"
+#include "FxSystemWorkItem.hpp"
+#include "FxCallbackLock.hpp"
+#include "FxCallbackSpinLock.hpp"
+#include "FxCallbackMutexLock.hpp"
+#include "FxCallback.hpp"
+#include "FxSystemThread.hpp"
+
+#include "IFxMemory.hpp"
+#include "FxLookasideList.hpp"
+#include "FxNPagedLookasideList.hpp"
+#include "FxPagedLookasideList.hpp"
+#include "FxMemoryObject.hpp"
+#include "FxMemoryBuffer.hpp"
+#include "FxMemoryBufferFromPool.hpp"
+#include "FxMemoryBufferPreallocated.hpp"
+#include "FxMemoryBufferFromLookaside.hpp"
+#include "FxRequestMemory.hpp"
+#include "FxRegKey.hpp"
+#include "FxAutoRegistry.hpp"
+#include "FxAutoString.hpp"
+#include "FxString.hpp"
+
+#include "FxValidateFunctions.hpp"
+#include "FxRequestValidateFunctions.hpp"
+
+#include "FxResource.hpp"
+#include "FxRelatedDevice.hpp"
+#include "FxDeviceInterface.hpp"
+#include "FxQueryInterface.hpp"
+#include "FxDeviceText.hpp"
+
+#include "FxIrp.hpp"
+#include "FxDriver.hpp"
+
+// generic package interface
+#include "FxPackage.hpp"
+#include "FxPkgGeneral.hpp"
+#include "FxDefaultIrpHandler.hpp"
+#include "FxPkgPnp.hpp"
+#include "FxWatchDog.hpp"
+
+// Device support
+#include "FxChildList.hpp"
+#include "FxCxDeviceInfo.hpp"
+#include "FxDevice.hpp"
+
+#include "FxPkgIo.hpp"
+
+#include "FxDeviceToMxInterface.hpp"
+
+#include "FxIrpQueue.hpp"
+#include "FxRequestContext.hpp"
+#include "FxRequestCallbacks.hpp"
+#include "FxRequestBase.hpp"
+#include "FxRequest.hpp"
+#include "FxSyncRequest.hpp"
+
+// specialized irp handlers (ie packages)
+#include "FxPkgFdo.hpp"
+#include "FxPkgPdo.hpp"
+#include "FxWmiIrpHandler.hpp"
+#include "FxWmiProvider.hpp"
+#include "FxWmiInstance.hpp"
+
+// queus for read, write, (internal) IOCTL
+#include "FxIoQueue.hpp"
+#include "FxFileObject.hpp"
+#include "FxIrpPreprocessInfo.hpp"
+#include "FxIrpDynamicDispatchInfo.hpp"
+
+#include "FxDpc.hpp"
+#include "FxWorkItem.hpp"
+#include "FxTimer.hpp"
+#include "FxInterruptKm.hpp"
+
+// IO targets (device lower edge interface)
+#include "FxIoTarget.hpp"
+#include "FxIoTargetRemote.hpp"
+#include "FxIoTargetSelf.hpp"
+
+#include "FxUsbDevice.hpp"
+#include "FxUsbInterface.hpp"
+#include "FxUsbPipe.hpp"
+
+// DMA support
+#include "FxDmaEnabler.hpp"
+#include "FxDmaTransaction.hpp"
+#include "FxCommonBuffer.hpp"
+
+// Triage info.
+#include "wdftriage.h"
+
+#include "FxTelemetry.hpp"
+#endif // _FX_H
diff --git a/sdk/lib/drivers/wdf/kmdf/inc/private/fxbugcheck.h
b/sdk/lib/drivers/wdf/kmdf/inc/private/fxbugcheck.h
new file mode 100644
index 00000000000..d7894530347
--- /dev/null
+++ b/sdk/lib/drivers/wdf/kmdf/inc/private/fxbugcheck.h
@@ -0,0 +1,91 @@
+/*++
+
+Copyright (c) Microsoft Corporation
+
+Module Name:
+
+ FxBugcheck.h
+
+Abstract:
+ This module contains private macros/defines for crashdumps.
+
+--*/
+
+#ifndef __FXBUGCHECK_H__
+#define __FXBUGCHECK_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//
+// Macro for doing pointer arithmetic.
+//
+#define Add2Ptr(P,I) ((PVOID)((PUCHAR)(P) + (I)))
+
+//
+// This macro takes a length & rounds it up to a multiple of the alignment
+// Alignment is given as a power of 2
+//
+#define EXP_ALIGN_UP_PTR_ON_BOUNDARY(_length, _alignment) \
+ (PVOID) ((((ULONG_PTR) (_length)) + ((_alignment)-1)) & \
+ ~(ULONG_PTR)((_alignment) - 1))
+
+//
+// Checks if 1st argument is aligned on given power of 2 boundary specified
+// by 2nd argument
+//
+#define EXP_IS_PTR_ALIGNED_ON_BOUNDARY(_pointer, _alignment) \
+ ((((ULONG_PTR) (_pointer)) & ((_alignment) - 1)) == 0)
+
+
+//
+// This macro takes a size and rounds it down to a multiple of the alignemnt.
+// Alignment doesn't need to be a power of 2.
+//
+#define EXP_ALIGN_DOWN_ON_BOUNDARY(_size, _alignment) \
+ ((_size) - ((_size) % _alignment))
+
+//
+// Define the max data size the bugcheck callback can write. Per callback the
+// total size is around 16K on 32bit OS (32K on 64bit OS).
+//
+#ifdef _WIN64
+#define FX_MAX_DUMP_SIZE (32*1024)
+#else
+#define FX_MAX_DUMP_SIZE (16*1024)
+#endif
+
+//
+// Maximum number of CPUs supported by the driver tracker.
+//
+#define FX_DRIVER_TRACKER_MAX_CPUS 256 // Max Win7 processors.
+
+//
+// The initial/increment size of the array to hold driver info.
+//
+#define FX_DUMP_DRIVER_INFO_INCREMENT 10 // # entries.
+
+//
+// The max size of the array to hold the driver info. This is the max data
+// we can write into the minidump.
+//
+#define FX_MAX_DUMP_DRIVER_INFO_COUNT \
+ (FX_MAX_DUMP_SIZE/sizeof(FX_DUMP_DRIVER_INFO_ENTRY))
+
+//
+// During run-time we store info about the loaded drivers in an array
+// of FX_DUMP_DRIVER_INFO_ENTRY struct entries, on a crash we write the
+// entire array in the minidump for postmortem analysis.
+//
+typedef struct _FX_DUMP_DRIVER_INFO_ENTRY {
+ PFX_DRIVER_GLOBALS FxDriverGlobals;
+ WDF_VERSION Version;
+ CHAR DriverName[WDF_DRIVER_GLOBALS_NAME_LEN];
+} FX_DUMP_DRIVER_INFO_ENTRY, *PFX_DUMP_DRIVER_INFO_ENTRY;
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // __FXBUGCHECK_H__
diff --git a/sdk/lib/drivers/wdf/kmdf/inc/private/fxcommonbuffer.hpp
b/sdk/lib/drivers/wdf/kmdf/inc/private/fxcommonbuffer.hpp
new file mode 100644
index 00000000000..329c07fa02a
--- /dev/null
+++ b/sdk/lib/drivers/wdf/kmdf/inc/private/fxcommonbuffer.hpp
@@ -0,0 +1,161 @@
+/*++
+
+Copyright (c) Microsoft Corporation
+
+Module Name:
+
+ FxCommonBuffer.hpp
+
+Abstract:
+
+ WDF CommonBuffer Object support
+
+Environment:
+
+ Kernel mode only.
+
+Notes:
+
+
+Revision History:
+
+--*/
+
+#ifndef _FXCOMMONBUFFER_H_
+#define _FXCOMMONBUFFER_H_
+
+//
+// Calculate an "aligned" address (Logical or Virtual) per
+// a specific alignment value.
+//
+FORCEINLINE
+PVOID
+FX_ALIGN_VIRTUAL_ADDRESS(
+ __in PVOID VA,
+ __in size_t AlignTo
+ )
+{
+ return (PVOID)(((ULONG_PTR)VA + AlignTo) & ~AlignTo);
+}
+
+FORCEINLINE
+ULONGLONG
+FX_ALIGN_LOGICAL_ADDRESS(
+ __in PHYSICAL_ADDRESS LA,
+ __in size_t AlignTo
+ )
+{
+ return (LA.QuadPart + AlignTo) & ~((ULONGLONG)AlignTo);
+}
+
+//
+// Declare the FxCommonBuffer class
+//
+class FxCommonBuffer : public FxNonPagedObject {
+
+public:
+
+ FxCommonBuffer(
+ __in PFX_DRIVER_GLOBALS FxDriverGlobals,
+ __in FxDmaEnabler * pDmaEnabler
+ );
+
+ virtual
+ BOOLEAN
+ Dispose(
+ VOID
+ );
+
+ _Must_inspect_result_
+ NTSTATUS
+ AllocateCommonBuffer(
+ __in size_t Length
+ );
+
+ VOID
+ FreeCommonBuffer(
+ VOID
+ );
+
+ __forceinline
+ PHYSICAL_ADDRESS
+ GetAlignedLogicalAddress(
+ VOID
+ )
+ {
+ return m_BufferAlignedLA;
+ }
+
+ __forceinline
+ PVOID
+ GetAlignedVirtualAddress(
+ VOID
+ )
+ {
+ return m_BufferAlignedVA;
+ }
+
+ __forceinline
+ size_t
+ GetLength(
+ VOID
+ )
+ {
+ return m_Length;
+ }
+
+ __forceinline
+ VOID
+ SetAlignment(
+ __in ULONG Alignment
+ )
+ {
+ m_Alignment = Alignment;
+ }
+
+protected:
+
+ //
+ // Unaligned virtual address
+ //
+ PVOID m_BufferRawVA;
+
+ //
+ // Aligned virtual address
+ //
+ PVOID m_BufferAlignedVA;
+
+ //
+ // Aligned logical address
+ //
+ PHYSICAL_ADDRESS m_BufferAlignedLA;
+
+ //
+ // Unaligned logical address
+ //
+ PHYSICAL_ADDRESS m_BufferRawLA;
+
+ //
+ // Pointer to the DMA enabler
+ //
+ FxDmaEnabler * m_DmaEnabler;
+
+ //
+ // Length specified by the caller
+ //
+ size_t m_Length;
+
+ //
+ // Actual length used to allocate buffer after adding the alignement
+ // value.
+ //
+ size_t m_RawLength;
+
+ //
+ // Alignment of the allocated buffer.
+ //
+ size_t m_Alignment;
+
+};
+
+#endif // _FXCOMMONBUFFER_H_
diff --git a/sdk/lib/drivers/wdf/kmdf/inc/private/fxdmatransaction.hpp
b/sdk/lib/drivers/wdf/kmdf/inc/private/fxdmatransaction.hpp
new file mode 100644
index 00000000000..0e3535b669c
--- /dev/null
+++ b/sdk/lib/drivers/wdf/kmdf/inc/private/fxdmatransaction.hpp
@@ -0,0 +1,1559 @@
+//
+// Copyright (C) Microsoft. All rights reserved.
+//
+#ifndef _FXDMATRANSACTION_HPP_
+#define _FXDMATRANSACTION_HPP_
+
+extern "C" {
+#include "FxDmaTransaction.hpp.tmh"
+}
+
+#include "FxDmaTransactionCallbacks.hpp"
+
+//
+// This type is used to allocate scatter-gather list of 1 element on the stack.
+//
+typedef __declspec(align(MEMORY_ALLOCATION_ALIGNMENT))UCHAR UCHAR_MEMORY_ALIGNED;
+
+// begin_wpp enum
+
+//
+// FxDmaTransactionStateCreated when the object is created.
+// FxDmaTransactionStateInitialized when object is initialized using with
+// Mdl/VA/Length.
+// FxDmaTransactionStateReserved when driver calls AllocateResources until
+// the adapter control routine returns
+// FxDmaTransactionStateTransfer is called when the driver call Execute
+// to start the DMA transfer.
+// FxDmaTransactionStateTransferCompleted is when transfer is completed or
+// aborted
+// FxDmaTransactionStateTransferFailed is set if the framework is not able
+// to start the transfer due to error.
+// FxDmaTransactionStateReleased is set when the object is reinitailized for reuse
+// FxDmaTransactionStateDeleted is set in the Dipose due to WdfObjectDelete
+//
+enum FxDmaTransactionState {
+ FxDmaTransactionStateInvalid = 0,
+ FxDmaTransactionStateCreated,
+ FxDmaTransactionStateReserved,
+ FxDmaTransactionStateInitialized,
+ FxDmaTransactionStateTransfer,
+ FxDmaTransactionStateTransferCompleted,
+ FxDmaTransactionStateTransferFailed,
+ FxDmaTransactionStateReleased,
+ FxDmaTransactionStateDeleted,
+};
+
+//
+// FxDmaCompletionTypeFull is used when the driver calls WdfDmaTransactionDmaComplete
+// to indicate that last framgement has been transmitted fully and to initiate
+// the transfer of next fragment.
+// FxDmaCompletionTypePartial is used when the driver completes the transfer and
+// specifies a amount of bytes it has transfered, and to initiate the next transfer
+// from the untransmitted portion of the buffer.
+// FxDmaCompletionTypeAbort i used when the driver calls DmaCompleteFinal to indicate
+// that's the final transfer and not initiate anymore transfers for the
remaining
+// data.
+//
+enum FxDmaCompletionType {
+ FxDmaCompletionTypeFull = 1,
+ FxDmaCompletionTypePartial,
+ FxDmaCompletionTypeAbort,
+};
+
+// end_wpp
+
+//
+// This tag is used to track whether the request pointer in the transaction
+// has a reference taken on it. Since the pointer is guaranteed to be
+// 4-byte aligned this can be set and cleared without destroying the pointer.
+//
+#define FX_STRONG_REF_TAG 0x1
+
+//
+// Simple set of macros to encode and decode tagged pointers.
+//
+#define FX_ENCODE_POINTER(T,p,tag) ((T*) ((ULONG_PTR) p | (ULONG_PTR) tag))
+#define FX_DECODE_POINTER(T,p,tag) ((T*) ((ULONG_PTR) p & ~(ULONG_PTR) tag))
+#define FX_IS_POINTER_ENCODED(p,tag) ((((ULONG_PTR) p & (ULONG_PTR) tag) == tag) ?
TRUE : FALSE)
+
+//
+// An uninitialized value for Dma completion status
+//
+
+#define UNDEFINED_DMA_COMPLETION_STATUS ((DMA_COMPLETION_STATUS) -1)
+
+class FxDmaTransactionBase : public FxNonPagedObject {
+
+ friend class FxDmaEnabler;
+
+public:
+
+ FxDmaTransactionBase(
+ __in PFX_DRIVER_GLOBALS FxDriverGlobals,
+ __in USHORT ObjectSize,
+ __in USHORT ExtraSize,
+ __in FxDmaEnabler *DmaEnabler
+ );
+
+ static
+ VOID
+ _ComputeNextTransferAddress(
+ __in PMDL CurrentMdl,
+ __in size_t CurrentOffset,
+ __in ULONG Transferred,
+ __deref_out PMDL *NextMdl,
+ __out size_t *NextOffset
+ );
+
+ _Must_inspect_result_
+ static
+ NTSTATUS
+ _CalculateRequiredMapRegisters(
+ __in PMDL Mdl,
+ __in size_t CurrentOffset,
+ __in ULONG Length,
+ __in ULONG AvailableMapRegisters,
+ __out_opt PULONG PossibleTransferLength,
+ __out PULONG MapRegistersRequired
+ );
+
+ virtual
+ BOOLEAN
+ Dispose(
+ VOID
+ );
+
+ _Must_inspect_result_
+ NTSTATUS
+ Initialize(
+ __in PFN_WDF_PROGRAM_DMA ProgramDmaFunction,
+ __in WDF_DMA_DIRECTION DmaDirection,
+ __in PMDL Mdl,
+ __in size_t Offset,
+ __in ULONG Length
+ );
+
+ _Must_inspect_result_
+ virtual
+ NTSTATUS
+ InitializeResources(
+ VOID
+ )=0;
+
+ _Must_inspect_result_
+ NTSTATUS
+ Execute(
+ __in PVOID Context
+ );
+
+ _Must_inspect_result_
+ virtual
+ NTSTATUS
+ StartTransfer(
+ VOID
+ )=0;
+
+ _Must_inspect_result_
+ virtual
+ NTSTATUS
+ StageTransfer(
+ VOID
+ )=0;
+
+ BOOLEAN
+ DmaCompleted(
+ __in size_t TransferredLength,
+ __out NTSTATUS * ReturnStatus,
+ __in FxDmaCompletionType CompletionType
+ );
+
+ _Must_inspect_result_
+ virtual
+ NTSTATUS
+ TransferCompleted(
+ VOID
+ )=0;
+
+ VOID
+ ReleaseForReuse(
+ __in BOOLEAN ForceRelease
+ );
+
+ virtual
+ VOID
+ ReleaseResources(
+ __in BOOLEAN ForceRelease
+ )=0;
+
+ VOID
+ GetTransferInfo(
+ __out_opt ULONG *MapRegisterCount,
+ __out_opt ULONG *ScatterGatherElementCount
+ );
+
+ __forceinline
+ size_t
+ GetBytesTransferred(
+ VOID
+ )
+ {
+ return m_Transferred;
+ }
+
+ __forceinline
+ FxDmaEnabler *
+ GetDmaEnabler(
+ VOID
+ )
+ {
+ return m_DmaEnabler;
+ }
+
+ __forceinline
+ FxRequest *
+ GetRequest(
+ VOID
+ )
+ {
+ //
+ // Strip out the strong reference tag if it's set
+ //
+ return FX_DECODE_POINTER(FxRequest,
+ m_EncodedRequest,
+ FX_STRONG_REF_TAG);
+ }
+
+ __forceinline
+ BOOLEAN
+ IsRequestReferenced(
+ VOID
+ )
+ {
+ return FX_IS_POINTER_ENCODED(m_EncodedRequest, FX_STRONG_REF_TAG);
+ }
+
+ __forceinline
+ VOID
+ SetRequest(
+ __in FxRequest* Request
+ )
+ {
+ ASSERT(m_EncodedRequest == NULL);
+
+ //
+ // Make sure the pointer doesn't have the strong ref flag set already
+ //
+ ASSERT(FX_IS_POINTER_ENCODED(Request, FX_STRONG_REF_TAG) == FALSE);
+
+ m_EncodedRequest = Request;
+ }
+
+ __forceinline
+ VOID
+ ReferenceRequest(
+ VOID
+ )
+ {
+ ASSERT(m_EncodedRequest != NULL);
+ ASSERT(IsRequestReferenced() == false);
+
+ //
+ // Take a reference on the irp to catch completion of request
+ // when there is a pending DMA transaction.
+ // While there is no need to take a reference on request itself,
+ // I'm keeping it to avoid regression as we are so close to
+ // shipping this.
+ //
+ m_EncodedRequest->AddIrpReference();
+
+ //
+ // Increment reference to this Request.
+ // See complementary section in WdfDmaTransactionDelete
+ // and WdfDmaTransactionRelease.
+ //
+ m_EncodedRequest->ADDREF( this );
+
+ m_EncodedRequest = FX_ENCODE_POINTER(FxRequest,
+ m_EncodedRequest,
+ FX_STRONG_REF_TAG);
+ }
+
+ __forceinline
+ VOID
+ ReleaseButRetainRequest(
+ VOID
+ )
+ {
+ ASSERT(m_EncodedRequest != NULL);
+ ASSERT(IsRequestReferenced());
+
+ //
+ // Clear the referenced bit on the encoded request.
+ //
+ m_EncodedRequest = FX_DECODE_POINTER(FxRequest,
+ m_EncodedRequest,
+ FX_STRONG_REF_TAG);
+
+ //
+ // Release this reference to the Irp and FxRequest.
+ //
+ m_EncodedRequest->ReleaseIrpReference();
+
+ m_EncodedRequest->RELEASE( this );
+ }
+
+ __forceinline
+ VOID
+ ClearRequest(
+ VOID
+ )
+ {
+ if (IsRequestReferenced()) {
+ ReleaseButRetainRequest();
+ }
+ m_EncodedRequest = NULL;
+ }
+
+ __forceinline
+ size_t
+ GetMaximumFragmentLength(
+ VOID
+ )
+ {
+ return m_MaxFragmentLength;
+ }
+
+ __forceinline
+ VOID
+ SetMaximumFragmentLength(
+ size_t MaximumFragmentLength
+ )
+ {
+ if (MaximumFragmentLength < m_AdapterInfo->MaximumFragmentLength) {
+ m_MaxFragmentLength = MaximumFragmentLength;
+ }
+ }
+
+ __forceinline
+ size_t
+ GetCurrentFragmentLength(
+ VOID
+ )
+ {
+ return m_CurrentFragmentLength;
+ }
+
+ __forceinline
+ WDFDMATRANSACTION
+ GetHandle(
+ VOID
+ )
+ {
+ return (WDFDMATRANSACTION) GetObjectHandle();
+ }
+
+ PVOID
+ GetTransferContext(
+ VOID
+ )
+ {
+ return m_TransferContext;
+ }
+
+ VOID
+ SetImmediateExecution(
+ __in BOOLEAN Value
+ );
+
+ BOOLEAN
+ CancelResourceAllocation(
+ VOID
+ );
+
+ FxDmaTransactionState
+ GetTransactionState(
+ VOID
+ )
+ {
+ return m_State;
+ }
+
+protected:
+
+ FxDmaTransactionState m_State;
+
+ WDF_DMA_DIRECTION m_DmaDirection;
+
+ FxDmaEnabler* m_DmaEnabler;
+
+ //
+ // Depending on the direction of the transfer, this one
+ // points to either m_ReadAdapterInfo or m_WriteAdapterInfo
+ // structure of the DMA enabler.
+ //
+ FxDmaDescription* m_AdapterInfo;
+
+ //
+ // Request associated with this transfer. Encoding uses the
+ // FX_[EN|DE]CODE_POINTER macros with the FX_STRONG_REF_TAG
+ // to indicate whether the reference has been taken or not
+ //
+ FxRequest* m_EncodedRequest;
+
+ //
+ // Callback and context for ProgramDma function
+ //
+ // The callback is overloaded to also hold the callback for
+ // Packet & System transfer's Reserve callback (to save space.)
+ // This is possible because the driver may not call execute
+ // and reserve in parallel on the same transaction. Disambiguate
+ // using the state of the transaction.
+ //
+ FxDmaTransactionProgramOrReserveDma m_DmaAcquiredFunction;
+ PVOID m_DmaAcquiredContext;
+
+ //
+ // The DMA transfer context (when using V3 DMA)
+ //
+ PVOID m_TransferContext;
+
+ //
+ // This is the first MDL of the transaction.
+ //
+ PMDL m_StartMdl;
+
+ //
+ // This is the MDL where the current transfer is being executed.
+ // If the data spans multiple MDL then this would be different
+ // from the startMDL when we stage large transfers and also
+ // if the driver performs partial transfers.
+ //
+ PMDL m_CurrentFragmentMdl;
+
+ //
+ // Starting offset in the first m_StartMdl. This might be same as
+ // m_StartMdl->StartVA.
+ //
+ size_t m_StartOffset;
+
+ //
+ // Points to address where the next transfer will begin.
+ //
+ size_t m_CurrentFragmentOffset;
+
+ //
+ // This is maximum length of transfer that can be made. This is
+ // computed based on the available map registers and driver
+ // configuration.
+ //
+ size_t m_MaxFragmentLength;
+
+ //
+ // Length of the whole transaction.
+ //
+ size_t m_TransactionLength;
+
+ //
+ // Number of bytes pending to be transfered.
+ //
+ size_t m_Remaining;
+
+ //
+ // Total number of bytes transfered.
+ //
+ size_t m_Transferred;
+
+ //
+ // Number of bytes transfered in the last transaction.
+ //
+ size_t m_CurrentFragmentLength;
+
+ //
+ // DMA flags for passing to GetScatterGatherListEx &
+ // AllocateAdapterChannelEx
+ //
+
+ ULONG m_Flags;
+
+ static
+ PVOID
+ GetStartVaFromOffset(
+ __in PMDL Mdl,
+ __in size_t Offset
+ )
+ {
+ return ((PUCHAR) MmGetMdlVirtualAddress(Mdl)) + Offset;
+ }
+
+ virtual
+ VOID
+ Reuse(
+ VOID
+ )
+ {
+ return;
+ }
+
+};
+
+class FxDmaScatterGatherTransaction : public FxDmaTransactionBase {
+
+public:
+
+ FxDmaScatterGatherTransaction(
+ __in PFX_DRIVER_GLOBALS FxDriverGlobals,
+ __in USHORT ExtraSize,
+ __in FxDmaEnabler *DmaEnabler
+ );
+
+ virtual
+ BOOLEAN
+ Dispose(
+ VOID
+ );
+
+ _Must_inspect_result_
+ virtual
+ NTSTATUS
+ InitializeResources(
+ VOID
+ );
+
+ _Must_inspect_result_
+ virtual
+ NTSTATUS
+ StartTransfer(
+ VOID
+ );
+
+ _Must_inspect_result_
+ virtual
+ NTSTATUS
+ TransferCompleted(
+ VOID
+ );
+
+ _Must_inspect_result_
+ virtual
+ NTSTATUS
+ StageTransfer(
+ VOID
+ );
+
+ virtual
+ VOID
+ ReleaseResources(
+ __in BOOLEAN ForceRelease
+ );
+
+ _Must_inspect_result_
+ static
+ NTSTATUS
+ _Create(
+ __in PFX_DRIVER_GLOBALS FxDriverGlobals,
+ __in PWDF_OBJECT_ATTRIBUTES Attributes,
+ __in FxDmaEnabler* DmaEnabler,
+ __out WDFDMATRANSACTION* Transaction
+ );
+
+protected:
+
+ //
+ // Scatter-Gather list provided by the system.
+ //
+ PSCATTER_GATHER_LIST m_SGList;
+
+ //
+ // Preallocated memory from lookaside buffer for the
+ // scatter-gather list when running on XP and later OSes.
+ //
+ PVOID m_LookasideBuffer;
+
+
+private:
+
+ static
+ VOID
+ _AdapterListControl(
+ __in DEVICE_OBJECT * DeviceObject,
+ __in IRP * Irp,
+ __in SCATTER_GATHER_LIST * SgList,
+ __in VOID * Context
+ );
+
+ _Must_inspect_result_
+ NTSTATUS
+ GetScatterGatherList (
+ __in PMDL Mdl,
+ __in size_t CurrentOffset,
+ __in ULONG Length,
+ __in PDRIVER_LIST_CONTROL ExecutionRoutine,
+ __in PVOID Context
+ )
+ {
+ NTSTATUS status;
+ KIRQL irql;
+
+ KeRaiseIrql(DISPATCH_LEVEL, &irql);
+
+ if (m_DmaEnabler->UsesDmaV3())
+ {
+ PDMA_OPERATIONS dmaOperations =
+ m_AdapterInfo->AdapterObject->DmaOperations;
+
+ status = dmaOperations->GetScatterGatherListEx(
+ m_AdapterInfo->AdapterObject,
+ m_DmaEnabler->m_FDO,
+ GetTransferContext(),
+ Mdl,
+ CurrentOffset,
+ Length,
+ m_Flags,
+ ExecutionRoutine,
+ Context,
+ (BOOLEAN) m_DmaDirection,
+ NULL,
+ NULL,
+ NULL
+ );
+ }
+ else
+ {
+ status = m_AdapterInfo->AdapterObject->DmaOperations->
+ GetScatterGatherList(m_AdapterInfo->AdapterObject,
+ m_DmaEnabler->m_FDO,
+ Mdl,
+ GetStartVaFromOffset(Mdl, CurrentOffset),
+ Length,
+ ExecutionRoutine,
+ Context,
+ (BOOLEAN) m_DmaDirection);
+ }
+
+ KeLowerIrql(irql);
+
+ return status;
+ }
+
+ VOID
+ PutScatterGatherList(
+ __in PSCATTER_GATHER_LIST ScatterGather
+ )
+ {
+ KIRQL irql;
+
+ KeRaiseIrql(DISPATCH_LEVEL, &irql);
+
+ m_AdapterInfo->AdapterObject->DmaOperations->
+ PutScatterGatherList(m_AdapterInfo->AdapterObject,
+ ScatterGather,
+ (BOOLEAN) m_DmaDirection);
+ KeLowerIrql(irql);
+
+ return;
+ }
+
+ _Must_inspect_result_
+ NTSTATUS
+ BuildScatterGatherList(
+ __in PMDL Mdl,
+ __in size_t CurrentOffset,
+ __in ULONG Length,
+ __in PDRIVER_LIST_CONTROL ExecutionRoutine,
+ __in PVOID Context,
+ __in PVOID ScatterGatherBuffer,
+ __in ULONG ScatterGatherBufferLength
+ )
+ {
+ NTSTATUS status;
+ KIRQL irql;
+
+ KeRaiseIrql(DISPATCH_LEVEL, &irql);
+
+ if (m_DmaEnabler->UsesDmaV3()) {
+
+ PDMA_OPERATIONS dmaOperations =
+ m_AdapterInfo->AdapterObject->DmaOperations;
+ ULONG flags = 0;
+
+ if (GetDriverGlobals()->IsVersionGreaterThanOrEqualTo(1,15)) {
+ //
+ // Though the correct behavior is to pass the m_Flags to the
+ // BuildScatterGatherListEx function, the code was not doing it
+ // for versions <= 1.13. To reduce any chance of regression,
+ // the m_Flags is honored for drivers that are 1.15
+ // or newer.
+ //
+ flags = m_Flags;
+ }
+
+ status = dmaOperations->BuildScatterGatherListEx(
+ m_AdapterInfo->AdapterObject,
+ m_DmaEnabler->m_FDO,
+ GetTransferContext(),
+ Mdl,
+ CurrentOffset,
+ Length,
+ flags,
+ ExecutionRoutine,
+ Context,
+ (BOOLEAN) m_DmaDirection,
+ ScatterGatherBuffer,
+ ScatterGatherBufferLength,
+ NULL,
+ NULL,
+ NULL
+ );
+ }
+ else {
+
+ status = m_AdapterInfo->AdapterObject->DmaOperations->
+ BuildScatterGatherList(m_AdapterInfo->AdapterObject,
+ m_DmaEnabler->m_FDO,
+ Mdl,
+ GetStartVaFromOffset(Mdl, CurrentOffset),
+ Length,
+ ExecutionRoutine,
+ Context,
+ (BOOLEAN) m_DmaDirection,
+ ScatterGatherBuffer,
+ ScatterGatherBufferLength);
+ }
+
+
+ KeLowerIrql(irql);
+
+ return status;
+ }
+};
+
+class FxDmaPacketTransaction : public FxDmaTransactionBase {
+
+protected:
+ FxDmaPacketTransaction(
+ __in PFX_DRIVER_GLOBALS FxDriverGlobals,
+ __in USHORT ObjectSize,
+ __in USHORT ExtraSize,
+ __in FxDmaEnabler *DmaEnabler
+ );
+
+public:
+
+ _Must_inspect_result_
+ virtual
+ NTSTATUS
+ InitializeResources(
+ VOID
+ );
+
+ _Must_inspect_result_
+ NTSTATUS
+ ReserveAdapter(
+ __in ULONG NumberOfMapRegisters,
+ __in WDF_DMA_DIRECTION Direction,
+ __in PFN_WDF_RESERVE_DMA Callback,
+ __in_opt PVOID Context
+ );
+
+ VOID
+ ReleaseAdapter(
+ VOID
+ );
+
+ _Must_inspect_result_
+ virtual
+ NTSTATUS
+ StartTransfer(
+ VOID
+ );
+
+ _Must_inspect_result_
+ virtual
+ NTSTATUS
+ TransferCompleted(
+ VOID
+ );
+
+ _Must_inspect_result_
+ virtual
+ NTSTATUS
+ StageTransfer(
+ VOID
+ );
+
+ virtual
+ VOID
+ ReleaseResources(
+ __in BOOLEAN ForceRelease
+ );
+
+ _Must_inspect_result_
+ static
+ NTSTATUS
+ _Create(
+ __in PFX_DRIVER_GLOBALS FxDriverGlobals,
+ __in PWDF_OBJECT_ATTRIBUTES Attributes,
+ __in FxDmaEnabler* DmaEnabler,
+ __out WDFDMATRANSACTION* Transaction
+ );
+
+ VOID
+ SetDeviceAddressOffset(
+ __in ULONG Offset
+ )
+ {
+ m_DeviceAddressOffset = Offset;
+ }
+
+protected:
+
+ //
+ // Number of map registers to be used in this transfer.
+ // This value is the least of the number of map registers
+ // needed to satisfy the current transfer request, and the
+ // number of available map registers returned by IoGetDmaAdapter.
+ //
+ ULONG m_MapRegistersNeeded;
+
+ //
+ // Opaque-value represents the map registers that the system has
+ // assigned for this transfer operation. We pass this value in
+ // FlushAdapterBuffers, FreeMapRegisters, and MapTransfer.
+ //
+ PVOID m_MapRegisterBase;
+
+ //
+ // TRUE when the map register base above is valid. The HAL can give
+ // us a NULL map register base when double buffering isn't required,
+ // so we can't just do a NULL test on m_MapRegisterBase to know if
+ // the DMA channel is allocated.
+ //
+ BOOLEAN m_MapRegisterBaseSet;
+
+ //
+ // For system-DMA this provides the offset from the original
+ // DeviceAddress used to compute the device register to or from which
+ // DMA should occur.
+ //
+ ULONG m_DeviceAddressOffset;
+
+ //
+ // 0 if the transaction has not reserved the enabler. Otherwise
+ // this is the number of map registers requested for the reservation.
+ // This value persists across a reuse and reinitialization of the
+ // transaction, and is only cleared when the enabler is released.
+ //
+ ULONG m_MapRegistersReserved;
+
+ //
+ // These fields are used to defer completion or staging while another
+ // thread/CPU is already staging. They are protected by the
+ // transfer state lock.
+ //
+ // These values are cleared when checked, not in InitializeResources.
+ // It's possible for a transaction being staged to complete on another
+ // CPU, get reused and reinitialized. Clearing these values in
+ // InitializeResources would destroy the state the prior call to
+ // StageTransfer depends on.
+ //
+ struct {
+
+ //
+ // Non-null when a staging operation is in progress on some CPU.
+ // When set any attempt to call the DMA completion routine or
+ // stage the transfer again (due to a call to TransferComplete)
+ // will be deferred to this thread.
+ //
+ PKTHREAD CurrentStagingThread;
+
+ //
+ // Indicates that a nested or concurrent attempt to stage
+ // the transaction was deferred. The CurrentStagingThread
+ // will restage the transaction.
+ //
+ BOOLEAN RerunStaging;
+
+ //
+ // Indicates that a nested or concurrent attempt to call the
+ // DMA completion routine occurred. The CurrentStagingThread
+ // will call the DMA completion routine when it unwinds providing
+ // the saved CompletionStatus
+ //
+ BOOLEAN RerunCompletion;
+ DMA_COMPLETION_STATUS CompletionStatus;
+
+ } m_TransferState;
+
+ //
+ // Indicates that the DMA transfer has been cancelled.
+ // Set during StopTransfer and cleared during InitializeResources
+ // Checked during StageTransfer. Stop and Initialize should never
+ // race (it's not valid for the driver to stop an uninitialized
+ // transaction). Stop and Stage can race but in that case Stop
+ // will mark the transaction context such that MapTransfer fails
+ // (and that's protected by a HAL lock).
+ //
+ // So this field does not need to be volatile or interlocked, but
+ // it needs to be sized to allow atomic writes.
+ //
+ ULONG m_IsCancelled;
+
+
+ virtual
+ VOID
+ Reuse(
+ VOID
+ )
+ {
+ return;
+ }
+
+protected:
+
+ inline
+ SetMapRegisterBase(
+ __in PVOID Value
+ )
+ {
+ NT_ASSERTMSG("Map register base is already set",
+ m_MapRegisterBaseSet == FALSE);
+
+ m_MapRegisterBase = Value;
+ m_MapRegisterBaseSet = TRUE;
+ }
+
+ inline
+ ClearMapRegisterBase(
+ VOID
+ )
+ {
+ NT_ASSERTMSG("Map register base was not set",
+ m_MapRegisterBaseSet == TRUE);
+ m_MapRegisterBaseSet = FALSE;
+ }
+
+ inline
+ IsMapRegisterBaseSet(
+ VOID
+ )
+ {
+ return m_MapRegisterBaseSet;
+ }
+
+ inline
+ PVOID
+ GetMapRegisterBase(
+ VOID
+ )
+ {
+ NT_ASSERTMSG("Map register base is not set",
+ m_MapRegisterBaseSet == TRUE);
+ return m_MapRegisterBase;
+ }
+
+ virtual
+ IO_ALLOCATION_ACTION
+ GetAdapterControlReturnValue(
+ VOID
+ )
+ {
+ return DeallocateObjectKeepRegisters;
+ }
+
+ virtual
+ BOOLEAN
+ PreMapTransfer(
+ VOID
+ )
+ {
+ return TRUE;
+ }
+
+ _Acquires_lock_(this)
+ VOID
+ __drv_raisesIRQL(DISPATCH_LEVEL)
+#pragma prefast(suppress:__WARNING_FAILING_TO_ACQUIRE_MEDIUM_CONFIDENCE,
"transferring lock name to 'this->TransferStateLock'")
+#pragma prefast(suppress:__WARNING_FAILING_TO_RELEASE_MEDIUM_CONFIDENCE,
"transferring lock name to 'this->TransferStateLock'")
+ LockTransferState(
+ __out __drv_deref(__drv_savesIRQL) KIRQL *OldIrql
+ )
+ {
+ Lock(OldIrql);
+ }
+
+ _Requires_lock_held_(this)
+ _Releases_lock_(this)
+ VOID
+#pragma prefast(suppress:__WARNING_FAILING_TO_RELEASE_MEDIUM_CONFIDENCE,
"transferring lock name from 'this->TransferStateLock'")
+ UnlockTransferState(
+ __in __drv_restoresIRQL KIRQL OldIrql
+ )
+ {
+#pragma prefast(suppress:__WARNING_CALLER_FAILING_TO_HOLD, "transferring lock name
from 'this->TransferStateLock'")
+ Unlock(OldIrql);
+ }
+
+ virtual
+ PDMA_COMPLETION_ROUTINE
+ GetTransferCompletionRoutine(
+ VOID
+ )
+ {
+ return NULL;
+ }
+
+ static
+ IO_ALLOCATION_ACTION
+ _AdapterControl(
+ __in PDEVICE_OBJECT DeviceObject,
+ __in PIRP Irp,
+ __in PVOID MapRegisterBase,
+ __in PVOID Context
+ );
+
+ _Must_inspect_result_
+ NTSTATUS
+ AcquireDevice(
+ VOID
+ )
+ {
+ if (m_DmaEnabler->UsesDmaV3() == FALSE)
+ {
+ return m_DmaEnabler->GetDevice()->AcquireDmaPacketTransaction();
+ }
+ else
+ {
+ return STATUS_SUCCESS;
+ }
+ }
+
+ FORCEINLINE
+ VOID
+ ReleaseDevice(
+ VOID
+ )
+ {
+ if (m_DmaEnabler->UsesDmaV3() == FALSE)
+ {
+ m_DmaEnabler->GetDevice()->ReleaseDmaPacketTransaction();
+ }
+ }
+
+ _Must_inspect_result_
+ NTSTATUS
+ AllocateAdapterChannel(
+ __in BOOLEAN MapRegistersReserved
+ )
+ {
+ NTSTATUS status;
+ KIRQL irql;
+
+ KeRaiseIrql(DISPATCH_LEVEL, &irql);
+
+ if (GetDriverGlobals()->FxVerifierOn) {
+
+ if (MapRegistersReserved == FALSE) {
+ DoTraceLevelMessage(
+ GetDriverGlobals(), TRACE_LEVEL_VERBOSE, TRACINGDMA,
+ "Allocating %d map registers for "
+ "WDFDMATRANSACTION %p",
+ m_MapRegistersNeeded,
+ GetHandle()
+ );
+ }
+ else {
+ DoTraceLevelMessage(
+ GetDriverGlobals(), TRACE_LEVEL_VERBOSE, TRACINGDMA,
+ "Using %d reserved map registers for "
+ "WDFDMATRANSACTION %p",
+ m_MapRegistersNeeded,
+ GetHandle()
+ );
+ }
+ }
+
+ if (m_DmaEnabler->UsesDmaV3()) {
+ PDMA_OPERATIONS dmaOperations =
+ m_AdapterInfo->AdapterObject->DmaOperations;
+
+ if (MapRegistersReserved == FALSE)
+ {
+ status = dmaOperations->AllocateAdapterChannelEx(
+ m_AdapterInfo->AdapterObject,
+ m_DmaEnabler->m_FDO,
+ GetTransferContext(),
+ m_MapRegistersNeeded,
+ m_Flags,
+#pragma prefast(suppress: __WARNING_CLASS_MISMATCH_NONE, "This warning requires a
wrapper class for the DRIVER_CONTROL type.")
+ _AdapterControl,
+ this,
+ NULL
+ );
+ }
+ else {
+#pragma prefast(suppress:__WARNING_PASSING_FUNCTION_UNEXPECTED_NULL,
"_AdapterControl does not actually use the IRP parameter.");
+ _AdapterControl(m_DmaEnabler->m_FDO,
+ NULL,
+ GetMapRegisterBase(),
+ this);
+ status = STATUS_SUCCESS;
+ }
+ }
+ else {
+
+ ASSERTMSG("Prereserved map registers are not compatible with DMA
V2",
+ MapRegistersReserved == FALSE);
+
+ status = m_AdapterInfo->AdapterObject->DmaOperations->
+ AllocateAdapterChannel(m_AdapterInfo->AdapterObject,
+ m_DmaEnabler->m_FDO,
+ m_MapRegistersNeeded,
+#pragma prefast(suppress: __WARNING_CLASS_MISMATCH_NONE, "This warning requires a
wrapper class for the DRIVER_CONTROL type.")
+ _AdapterControl,
+ this);
+ }
+
+ KeLowerIrql(irql);
+
+ if (!NT_SUCCESS(status))
+ {
+ DoTraceLevelMessage(
+ GetDriverGlobals(), TRACE_LEVEL_ERROR, TRACINGDMA,
+ "Allocating DMA resources (%d map registers) for WDFDMATRANSACTION
%p "
+ "returned %!STATUS!",
+ m_MapRegistersNeeded,
+ GetHandle(),
+ status
+ );
+ }
+
+ return status;
+ }
+
+ FORCEINLINE
+ NTSTATUS
+ MapTransfer(
+ __out_bcount_opt(ScatterGatherListCb)
+ PSCATTER_GATHER_LIST ScatterGatherList,
+ __in ULONG ScatterGatherListCb,
+ __in_opt PDMA_COMPLETION_ROUTINE CompletionRoutine,
+ __in_opt PVOID CompletionContext,
+ __out ULONG *TransferLength
+ )
+ {
+ //
+ // Cache globals & object handle since call to MapTransferEx could
+ // result in a DmaComplete callback before returning.
+ //
+ PFX_DRIVER_GLOBALS pFxDriverGlobals = GetDriverGlobals();
+ WDFDMATRANSACTION handle = GetHandle();
+#if DBG
+ ULONG_PTR mapRegistersRequired;
+
+ mapRegistersRequired = ADDRESS_AND_SIZE_TO_SPAN_PAGES(
+ GetStartVaFromOffset(m_CurrentFragmentMdl,
+ m_CurrentFragmentOffset),
+ m_CurrentFragmentLength
+ );
+ NT_ASSERTMSG("Mapping requires too many map registers",
+ mapRegistersRequired <= m_MapRegistersNeeded);
+#endif
+
+ NTSTATUS status;
+
+ //
+ // Assume we're going to transfer the entire current fragment.
+ // MapTransfer may say otherwise.
+ //
+
+ *TransferLength = (ULONG) m_CurrentFragmentLength;
+
+ //
+ // Map the transfer.
+ //
+
+ if (pFxDriverGlobals->FxVerifierOn) {
+ DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGDMA,
+ "Mapping transfer for WDFDMATRANSACTION %p. "
+ "MDL %p, Offset %I64x, Length %x, MapRegisterBase
%p",
+ handle,
+ m_CurrentFragmentMdl,
+ m_CurrentFragmentOffset,
+ *TransferLength,
+ GetMapRegisterBase());
+ }
+
+ if (m_DmaEnabler->UsesDmaV3()) {
+
+ PDMA_OPERATIONS dmaOperations =
+ m_AdapterInfo->AdapterObject->DmaOperations;
+
+ status = dmaOperations->MapTransferEx(
+ m_AdapterInfo->AdapterObject,
+ m_CurrentFragmentMdl,
+ GetMapRegisterBase(),
+ m_CurrentFragmentOffset,
+ m_DeviceAddressOffset,
+ TransferLength,
+ (BOOLEAN) m_DmaDirection,
+ ScatterGatherList,
+ ScatterGatherListCb,
+ CompletionRoutine,
+ CompletionContext
+ );
+
+ NT_ASSERTMSG(
+ "With these parameters, MapTransferEx should never fail",
+ NT_SUCCESS(status) || status == STATUS_CANCELLED
+ );
+ }
+ else {
+ NT_ASSERTMSG("cannot use DMA completion routine with DMAv2",
+ CompletionRoutine == NULL);
+
+ NT_ASSERTMSG(
+ "scatter gather list length must be large enough for at least one
element",
+ (ScatterGatherListCb >= (sizeof(SCATTER_GATHER_LIST) +
+ sizeof(SCATTER_GATHER_ELEMENT)))
+ );
+
+ //
+ // This matches the assertion above. There's no way to explain to
+ // prefast that this code path requires the caller to provide a buffer
+ // of sufficient size to store the SGL. The only case which doesn't
+ // provide any buffer is system-mode DMA and that uses DMA v3 and so
+ // won't go through this path.
+ //
+
+ __assume((ScatterGatherListCb >= (sizeof(SCATTER_GATHER_LIST) +
+ sizeof(SCATTER_GATHER_ELEMENT))));
+
+ ScatterGatherList->NumberOfElements = 1;
+ ScatterGatherList->Reserved = 0;
+ ScatterGatherList->Elements[0].Address =
+ m_AdapterInfo->AdapterObject->DmaOperations->
+ MapTransfer(m_AdapterInfo->AdapterObject,
+ m_CurrentFragmentMdl,
+ GetMapRegisterBase(),
+ GetStartVaFromOffset(m_CurrentFragmentMdl,
+ m_CurrentFragmentOffset),
+ TransferLength,
+ (BOOLEAN) m_DmaDirection);
+ ScatterGatherList->Elements[0].Length = *TransferLength;
+
+ status = STATUS_SUCCESS;
+ }
+
+ if (pFxDriverGlobals->FxVerifierOn) {
+ DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGDMA,
+ "MapTransfer mapped next %d bytes of "
+ "WDFDMATRANSACTION %p - status %!STATUS!",
+ *TransferLength,
+ handle,
+ status);
+ }
+
+ return status;
+ }
+
+ FORCEINLINE
+ NTSTATUS
+ FlushAdapterBuffers(
+ VOID
+ )
+ {
+ PDMA_OPERATIONS dmaOperations =
+ m_AdapterInfo->AdapterObject->DmaOperations;
+
+ NTSTATUS status;
+
+#if DBG
+ ULONG_PTR mapRegistersRequired;
+
+ mapRegistersRequired = ADDRESS_AND_SIZE_TO_SPAN_PAGES(
+ GetStartVaFromOffset(m_CurrentFragmentMdl,
+ m_CurrentFragmentOffset),
+ m_CurrentFragmentLength
+ );
+ NT_ASSERTMSG("Mapping requires too many map registers",
+ mapRegistersRequired <= m_MapRegistersNeeded);
+#endif
+
+ if (GetDriverGlobals()->FxVerifierOn) {
+ DoTraceLevelMessage(GetDriverGlobals(), TRACE_LEVEL_VERBOSE, TRACINGDMA,
+ "Flushing DMA buffers for WDFDMATRANSACTION %p.
"
+ "MDL %p, Offset %I64x, Length %I64x",
+ GetHandle(),
+ m_CurrentFragmentMdl,
+ m_CurrentFragmentOffset,
+ m_CurrentFragmentLength);
+ }
+
+ if (m_DmaEnabler->UsesDmaV3()) {
+ status = dmaOperations->FlushAdapterBuffersEx(
+ m_AdapterInfo->AdapterObject,
+ m_CurrentFragmentMdl,
+ GetMapRegisterBase(),
+ m_CurrentFragmentOffset,
+ (ULONG) m_CurrentFragmentLength,
+ (BOOLEAN) m_DmaDirection
+ );
+ }
+ else if (dmaOperations->FlushAdapterBuffers(
+ m_AdapterInfo->AdapterObject,
+ m_CurrentFragmentMdl,
+ GetMapRegisterBase(),
+ GetStartVaFromOffset(m_CurrentFragmentMdl,
+ m_CurrentFragmentOffset),
+ (ULONG) m_CurrentFragmentLength,
+ (BOOLEAN) m_DmaDirection) == FALSE) {
+ status = STATUS_UNSUCCESSFUL;
+ }
+ else {
+ status = STATUS_SUCCESS;
+ }
+
+ if (!NT_SUCCESS(status)) {
+ DoTraceLevelMessage(GetDriverGlobals(), TRACE_LEVEL_ERROR, TRACINGDMA,
+ "Flushing DMA buffers for WDFDMATRANSACTION %p
("
+ "MDL %p, Offset %I64x, Length %I64x)"
+ "completed with %!STATUS!",
+ GetHandle(),
+ m_CurrentFragmentMdl,
+ m_CurrentFragmentOffset,
+ m_CurrentFragmentLength,
+ status);
+ }
+
+ return status;
+ }
+
+ virtual
+ VOID
+ FreeMapRegistersAndAdapter(
+ VOID
+ )
+ {
+ KIRQL irql;
+
+ PVOID mapRegisterBase = GetMapRegisterBase();
+
+ //
+ // It's illegal to free a NULL map register base, even if the HAL gave it
+ // to us.
+ //
+ if (mapRegisterBase == NULL) {
+ if (GetDriverGlobals()->FxVerifierOn) {
+ DoTraceLevelMessage(GetDriverGlobals(), TRACE_LEVEL_VERBOSE, TRACINGDMA,
+ "Skipping free of %d map registers for
WDFDMATRANSACTION %p "
+ "because base was NULL",
+ m_MapRegistersNeeded,
+ GetHandle());
+ }
+
+ return;
+ }
+
+ //
+ // Free the map registers
+ //
+ KeRaiseIrql(DISPATCH_LEVEL, &irql);
+
+ if (GetDriverGlobals()->FxVerifierOn) {
+ DoTraceLevelMessage(GetDriverGlobals(), TRACE_LEVEL_VERBOSE, TRACINGDMA,
+ "Freeing %d map registers for WDFDMATRANSACTION %p
"
+ "(base %p)",
+ m_MapRegistersNeeded,
+ GetHandle(),
+ mapRegisterBase);
+ }
+
+ //
+ // If we pre-reserved map registers then Reserved contains
+ // the number to free. Otherwise Needed is the number allocated
+ // for the last transaction, which is the number to free.
+ //
+ m_AdapterInfo->AdapterObject->DmaOperations->
+ FreeMapRegisters(m_AdapterInfo->AdapterObject,
+ mapRegisterBase,
+ (m_MapRegistersReserved > 0 ?
+ m_MapRegistersReserved :
+ m_MapRegistersNeeded));
+ KeLowerIrql(irql);
+
+ return;
+ }
+
+ virtual
+ VOID
+ CallEvtDmaCompleted(
+ __in DMA_COMPLETION_STATUS /* Status */
+ )
+ {
+ //
+ // Packet mode DMA doesn't support cancellation or
+ // completion routines. So this should never run.
+ //
+ ASSERTMSG("EvtDmaCompleted is not a valid callback for "
+ "a packet-mode transaction",
+ FALSE);
+ return;
+ }
+
+};
+
+class FxDmaSystemTransaction: public FxDmaPacketTransaction {
+
+ friend FxDmaPacketTransaction;
+
+public:
+
+ FxDmaSystemTransaction(
+ __in PFX_DRIVER_GLOBALS FxDriverGlobals,
+ __in USHORT ExtraSize,
+ __in FxDmaEnabler *DmaEnabler
+ );
+
+ _Must_inspect_result_
+ static
+ NTSTATUS
+ _Create(
+ __in PFX_DRIVER_GLOBALS FxDriverGlobals,
+ __in PWDF_OBJECT_ATTRIBUTES Attributes,
+ __in FxDmaEnabler* DmaEnabler,
+ __out WDFDMATRANSACTION* Transaction
+ );
+
+ VOID
+ SetConfigureChannelCallback(
+ __in_opt PFN_WDF_DMA_TRANSACTION_CONFIGURE_DMA_CHANNEL Callback,
+ __in_opt PVOID Context
+ )
+ {
+ m_ConfigureChannelFunction.Method = Callback;
+ m_ConfigureChannelContext = Context;
+ }
+
+ VOID
+ SetTransferCompleteCallback(
+ __in_opt PFN_WDF_DMA_TRANSACTION_DMA_TRANSFER_COMPLETE Callback,
+ __in_opt PVOID Context
+ )
+ {
+ m_TransferCompleteFunction.Method = Callback;
+ m_TransferCompleteContext = Context;
+ }
+
+ VOID
+ StopTransfer(
+ VOID
+ );
+
+protected:
+
+ //
+ // Callback and context for configure channel callback
+ //
+ FxDmaTransactionConfigureChannel m_ConfigureChannelFunction;
+ PVOID m_ConfigureChannelContext;
+
+ //
+ // Callback and context for DMA completion callback
+ //
+ FxDmaTransactionTransferComplete m_TransferCompleteFunction;
+ PVOID m_TransferCompleteContext;
+
+ IO_ALLOCATION_ACTION
+ GetAdapterControlReturnValue(
+ VOID
+ )
+ {
+ return KeepObject;
+ }
+
+ VOID
+ FreeMapRegistersAndAdapter(
+ VOID
+ )
+ {
+ PFX_DRIVER_GLOBALS pFxDriverGlobals = GetDriverGlobals();
+ KIRQL irql;
+
+ KeRaiseIrql(DISPATCH_LEVEL, &irql);
+
+ if (pFxDriverGlobals->FxVerifierOn) {
+ DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGDMA,
+ "Freeing adapter channel for WDFDMATRANSACTION
%p",
+ GetHandle());
+ }
+
+ m_AdapterInfo->AdapterObject->DmaOperations->
+ FreeAdapterChannel(m_AdapterInfo->AdapterObject);
+ KeLowerIrql(irql);
+
+ return;
+ }
+
+ BOOLEAN
+ CancelMappedTransfer(
+ VOID
+ )
+ {
+ NTSTATUS status;
+
+ ASSERT(m_DmaEnabler->UsesDmaV3());
+
+ //
+ // Cancel the transfer. if it's not yet mapped this will mark the
+ // TC so that mapping will fail. If it's running this will invoke the
+ // DMA completion routine.
+ //
+ status =
+ m_AdapterInfo->AdapterObject->DmaOperations->CancelMappedTransfer(
+ m_AdapterInfo->AdapterObject,
+ GetTransferContext()
+ );
+
+ DoTraceLevelMessage(GetDriverGlobals(), TRACE_LEVEL_VERBOSE, TRACINGDMA,
+ "Stopping WDFDMATRANSACTION %p returned status
%!STATUS!",
+ GetHandle(),
+ status);
+
+ return NT_SUCCESS(status);
+ }
+
+ VOID
+ Reuse(
+ VOID
+ )
+ {
+ __super::Reuse();
+ m_ConfigureChannelFunction.Method = NULL;
+ m_ConfigureChannelContext = NULL;
+
+ m_TransferCompleteFunction.Method = NULL;
+ m_TransferCompleteContext = NULL;
+ }
+
+ VOID
+ CallEvtDmaCompleted(
+ __in DMA_COMPLETION_STATUS Status
+ );
+
+ virtual
+ BOOLEAN
+ PreMapTransfer(
+ VOID
+ );
+
+ virtual
+ PDMA_COMPLETION_ROUTINE
+ GetTransferCompletionRoutine(
+ VOID
+ );
+
+ static DMA_COMPLETION_ROUTINE _SystemDmaCompletion;
+};
+
+#endif // _FXDMATRANSACTION_HPP_
diff --git a/sdk/lib/drivers/wdf/kmdf/inc/private/fxdmatransactioncallbacks.hpp
b/sdk/lib/drivers/wdf/kmdf/inc/private/fxdmatransactioncallbacks.hpp
new file mode 100644
index 00000000000..189528c3d3d
--- /dev/null
+++ b/sdk/lib/drivers/wdf/kmdf/inc/private/fxdmatransactioncallbacks.hpp
@@ -0,0 +1,168 @@
+/*++
+
+Copyright (c) Microsoft Corporation
+
+Module Name:
+
+ FxDmaTransactionCallbacks.h
+
+Abstract:
+
+ This module implements the FxDmaTransaction object callbacks
+
+Environment:
+
+ kernel mode only
+
+Revision History:
+
+--*/
+
+#ifndef _FXDMATRANSACTIONCALLBACKS_H
+#define _FXDMATRANSACTIONCALLBACKS_H
+
+//
+// FxDmaTransactionProgramDma or FxDmaTransactionReserveDma callback delegate
+// These are mutually exclusive callbacks and are packed together in
+// the callback structure (C++ won't allow two classes with constructors
+// to be together in a union, so the containing class can't do the
+// packing)
+//
+class FxDmaTransactionProgramOrReserveDma : public FxCallback {
+
+public:
+ union {
+ PFN_WDF_PROGRAM_DMA ProgramDma;
+ PFN_WDF_RESERVE_DMA ReserveDma;
+ } Method;
+
+ FxDmaTransactionProgramOrReserveDma(
+ VOID
+ ) :
+ FxCallback()
+ {
+ Method.ProgramDma = NULL;
+ }
+
+ BOOLEAN
+ InvokeProgramDma(
+ __in WDFDMATRANSACTION Transaction,
+ __in WDFDEVICE Device,
+ __in PVOID Context,
+ __in WDF_DMA_DIRECTION Direction,
+ __in PSCATTER_GATHER_LIST SgList
+ )
+ {
+ if (Method.ProgramDma) {
+ BOOLEAN cc;
+
+ CallbackStart();
+ cc = Method.ProgramDma( Transaction,
+ Device,
+ Context,
+ Direction,
+ SgList );
+ CallbackEnd();
+
+ return cc;
+ }
+ else {
+ return FALSE;
+ }
+ }
+
+ VOID
+ InvokeReserveDma(
+ __in WDFDMATRANSACTION Transaction,
+ __in PVOID Context
+ )
+ {
+ if (Method.ReserveDma) {
+ CallbackStart();
+ Method.ReserveDma( Transaction, Context );
+ CallbackEnd();
+ }
+ }
+
+ VOID
+ Clear(
+ VOID
+ )
+ {
+ Method.ProgramDma = NULL;
+ }
+};
+
+//
+// FxDmaTransactionConfigureChannel callback delegate
+//
+
+class FxDmaTransactionConfigureChannel : public FxCallback {
+
+public:
+ PFN_WDF_DMA_TRANSACTION_CONFIGURE_DMA_CHANNEL Method;
+
+ FxDmaTransactionConfigureChannel(
+ VOID
+ ) :
+ FxCallback()
+ {
+ Method = NULL;
+ }
+
+ _Must_inspect_result_
+ BOOLEAN
+ Invoke(
+ __in WDFDMATRANSACTION DmaTransaction,
+ __in WDFDEVICE Device,
+ __in PVOID Context,
+ __in_opt PMDL Mdl,
+ __in size_t Offset,
+ __in size_t Length
+ )
+ {
+ BOOLEAN b = TRUE;
+ if (Method) {
+ CallbackStart();
+ b = Method( DmaTransaction, Device, Context, Mdl, Offset, Length );
+ CallbackEnd();
+ }
+ return b;
+ }
+};
+
+//
+// FxDmaTransactionTransferComplete callback delegate
+//
+
+class FxDmaTransactionTransferComplete : public FxCallback {
+
+public:
+ PFN_WDF_DMA_TRANSACTION_DMA_TRANSFER_COMPLETE Method;
+
+ FxDmaTransactionTransferComplete(
+ VOID
+ ) :
+ FxCallback()
+ {
+ Method = NULL;
+ }
+
+ VOID
+ Invoke(
+ __in WDFDMATRANSACTION Transaction,
+ __in WDFDEVICE Device,
+ __in WDFCONTEXT Context,
+ __in WDF_DMA_DIRECTION Direction,
+ __in DMA_COMPLETION_STATUS Status
+ )
+ {
+ if (Method) {
+ CallbackStart();
+ Method( Transaction, Device, Context, Direction, Status );
+ CallbackEnd();
+ }
+ }
+};
+
+#endif // _FXDMATRANSACTIONCALLBACKS_H
diff --git a/sdk/lib/drivers/wdf/kmdf/inc/private/fxdpc.hpp
b/sdk/lib/drivers/wdf/kmdf/inc/private/fxdpc.hpp
new file mode 100644
index 00000000000..97933d35447
--- /dev/null
+++ b/sdk/lib/drivers/wdf/kmdf/inc/private/fxdpc.hpp
@@ -0,0 +1,201 @@
+/*++
+
+Copyright (c) Microsoft Corporation
+
+Module Name:
+
+ FxDpc.hpp
+
+Abstract:
+
+ This module implements a frameworks managed DPC that
+ can synchrononize with driver frameworks object locks.
+
+Author:
+
+
+
+Environment:
+
+ kernel mode only
+
+Revision History:
+
+
+--*/
+
+#ifndef _FXDPC_H_
+#define _FXDPC_H_
+
+//
+// Driver Frameworks DPC Design:
+//
+// The driver frameworks provides an optional DPC wrapper object that allows
+// the creation of a reference counted DPC object that can synchronize
+// automatically with certain frameworks objects.
+//
+// This provides automatic synchronization between the DPC's execution, and the
+// frameworks objects' event callbacks into the device driver.
+//
+// The WDFDPC object is designed to be re-useable, in which it can be re-linked
+// into the DPC queue after firing.
+//
+// In many cases, the KDPC struct is embedded inside another structure that
+// represents a device command block. These device command blocks are typically
+// submitted to another device driver. So the calling driver, which is utilizing
+// the driver frameworks would not likely have an opportunity to make
+// changes to this. In order to support this, the caller can optionally supply
+// a DPC object pointer to Initialize, and the WDFDPC object will use this
+// embedded user supplied DPC object, and pass its address as the RawDpc
+// parameter to the callback function.
+//
+// If the user does not supply a DPC pointer by passing NULL, then the
+// internal DPC object is used, and RawDPC is NULL.
+//
+// Calling GetDpcPtr returns the DPC to be used, and could be
+// the caller supplied DPC, or the embedded one depending on
+// whether the caller supplied a user DPC pointer to Initialize.
+//
+// The GetDpcPtr allows linking of the WDFDPC object into various DPC
+// lists by the driver.
+//
+
+class FxDpc : public FxNonPagedObject {
+
+private:
+
+ KDPC m_Dpc;
+
+ //
+ // This is the Framework object who is associated with the DPC
+ // if supplied
+ //
+ FxObject* m_Object;
+
+ //
+ // This is the callback lock for the object this DPC will
+ // synchronize with
+ //
+ FxCallbackLock* m_CallbackLock;
+
+ //
+ // This is the object whose reference count actually controls
+ // the lifetime of the m_CallbackLock
+ //
+ FxObject* m_CallbackLockObject;
+
+ //
+ // This is the user supplied callback function
+ //
+ PFN_WDF_DPC m_Callback;
+
+ // Ensures only one of either Delete or Cleanup runs down the object
+ BOOLEAN m_RunningDown;
+
+public:
+ static
+ _Must_inspect_result_
+ NTSTATUS
+ _Create(
+ __in PFX_DRIVER_GLOBALS FxDriverGlobals,
+ __in PWDF_DPC_CONFIG Config,
+ __in PWDF_OBJECT_ATTRIBUTES Attributes,
+ __in FxObject* ParentObject,
+ __out WDFDPC* Dpc
+ );
+
+ FxDpc(
+ __in PFX_DRIVER_GLOBALS FxDriverGlobals
+ );
+
+ virtual
+ ~FxDpc(
+ VOID
+ );
+
+ KDPC*
+ GetDpcPtr(
+ VOID
+ )
+ {
+ return &m_Dpc;
+ }
+
+ WDFOBJECT
+ GetObject(
+ VOID
+ )
+ {
+ if (m_Object != NULL) {
+ return m_Object->GetObjectHandle();
+ }
+ else {
+ return NULL;
+ }
+ }
+
+/*++
+
+Routine Description:
+
+ Initialize the DPC using either the caller supplied DPC
+ struct, or if NULL, our own internal one.
+
+Arguments:
+
+Returns:
+
+ NTSTATUS
+
+--*/
+ _Must_inspect_result_
+ NTSTATUS
+ Initialize(
+ __in PWDF_OBJECT_ATTRIBUTES Attributes,
+ __in PWDF_DPC_CONFIG Config,
+ __in FxObject* ParentObject,
+ __out WDFDPC* Dpc
+ );
+
+ virtual
+ BOOLEAN
+ Dispose(
+ VOID
+ );
+
+ BOOLEAN
+ Cancel(
+ __in BOOLEAN Wait
+ );
+
+ VOID
+ DpcHandler(
+ __in PKDPC Dpc,
+ __in PVOID SystemArgument1,
+ __in PVOID SystemArgument2
+ );
+
+private:
+
+ //
+ // Called from Dispose, or cleanup list to perform final flushing of any
+ // outstanding DPC's and dereferencing of objects.
+ //
+ VOID
+ FlushAndRundown(
+ );
+
+ static
+ KDEFERRED_ROUTINE
+ FxDpcThunk;
+
+ static
+ VOID
+ WorkItemThunk(
+ PDEVICE_OBJECT DeviceObject,
+ PVOID Context
+ );
+};
+
+#endif // _FXDPC_H_
+
diff --git a/sdk/lib/drivers/wdf/kmdf/inc/private/fxdynamics.h
b/sdk/lib/drivers/wdf/kmdf/inc/private/fxdynamics.h
new file mode 100644
index 00000000000..35a3564dab3
--- /dev/null
+++ b/sdk/lib/drivers/wdf/kmdf/inc/private/fxdynamics.h
@@ -0,0 +1,6943 @@
+/*++
+
+Module Name: FxDynamics.h
+
+Abstract:
+ Generated header for WDF APIs
+
+Environment:
+ kernel mode only
+
+ Warning: manual changes to this file will be lost.
+--*/
+
+#ifndef _FXDYNAMICS_H_
+#define _FXDYNAMICS_H_
+
+
+typedef struct _WDFFUNCTIONS {
+
+ PFN_WDFCHILDLISTCREATE pfnWdfChildListCreate;
+ PFN_WDFCHILDLISTGETDEVICE pfnWdfChildListGetDevice;
+ PFN_WDFCHILDLISTRETRIEVEPDO
pfnWdfChildListRetrievePdo;
+ PFN_WDFCHILDLISTRETRIEVEADDRESSDESCRIPTION
pfnWdfChildListRetrieveAddressDescription;
+ PFN_WDFCHILDLISTBEGINSCAN pfnWdfChildListBeginScan;
+ PFN_WDFCHILDLISTENDSCAN pfnWdfChildListEndScan;
+ PFN_WDFCHILDLISTBEGINITERATION
pfnWdfChildListBeginIteration;
+ PFN_WDFCHILDLISTRETRIEVENEXTDEVICE
pfnWdfChildListRetrieveNextDevice;
+ PFN_WDFCHILDLISTENDITERATION
pfnWdfChildListEndIteration;
+ PFN_WDFCHILDLISTADDORUPDATECHILDDESCRIPTIONASPRESENT
pfnWdfChildListAddOrUpdateChildDescriptionAsPresent;
+ PFN_WDFCHILDLISTUPDATECHILDDESCRIPTIONASMISSING
pfnWdfChildListUpdateChildDescriptionAsMissing;
+ PFN_WDFCHILDLISTUPDATEALLCHILDDESCRIPTIONSASPRESENT
pfnWdfChildListUpdateAllChildDescriptionsAsPresent;
+ PFN_WDFCHILDLISTREQUESTCHILDEJECT
pfnWdfChildListRequestChildEject;
+ PFN_WDFCOLLECTIONCREATE pfnWdfCollectionCreate;
+ PFN_WDFCOLLECTIONGETCOUNT pfnWdfCollectionGetCount;
+ PFN_WDFCOLLECTIONADD pfnWdfCollectionAdd;
+ PFN_WDFCOLLECTIONREMOVE pfnWdfCollectionRemove;
+ PFN_WDFCOLLECTIONREMOVEITEM
pfnWdfCollectionRemoveItem;
+ PFN_WDFCOLLECTIONGETITEM pfnWdfCollectionGetItem;
+ PFN_WDFCOLLECTIONGETFIRSTITEM
pfnWdfCollectionGetFirstItem;
+ PFN_WDFCOLLECTIONGETLASTITEM
pfnWdfCollectionGetLastItem;
+ PFN_WDFCOMMONBUFFERCREATE pfnWdfCommonBufferCreate;
+ PFN_WDFCOMMONBUFFERGETALIGNEDVIRTUALADDRESS
pfnWdfCommonBufferGetAlignedVirtualAddress;
+ PFN_WDFCOMMONBUFFERGETALIGNEDLOGICALADDRESS
pfnWdfCommonBufferGetAlignedLogicalAddress;
+ PFN_WDFCOMMONBUFFERGETLENGTH
pfnWdfCommonBufferGetLength;
+ PFN_WDFCONTROLDEVICEINITALLOCATE
pfnWdfControlDeviceInitAllocate;
+ PFN_WDFCONTROLDEVICEINITSETSHUTDOWNNOTIFICATION
pfnWdfControlDeviceInitSetShutdownNotification;
+ PFN_WDFCONTROLFINISHINITIALIZING
pfnWdfControlFinishInitializing;
+ PFN_WDFDEVICEGETDEVICESTATE
pfnWdfDeviceGetDeviceState;
+ PFN_WDFDEVICESETDEVICESTATE
pfnWdfDeviceSetDeviceState;
+ PFN_WDFWDMDEVICEGETWDFDEVICEHANDLE
pfnWdfWdmDeviceGetWdfDeviceHandle;
+ PFN_WDFDEVICEWDMGETDEVICEOBJECT
pfnWdfDeviceWdmGetDeviceObject;
+ PFN_WDFDEVICEWDMGETATTACHEDDEVICE
pfnWdfDeviceWdmGetAttachedDevice;
+ PFN_WDFDEVICEWDMGETPHYSICALDEVICE
pfnWdfDeviceWdmGetPhysicalDevice;
+ PFN_WDFDEVICEWDMDISPATCHPREPROCESSEDIRP
pfnWdfDeviceWdmDispatchPreprocessedIrp;
+ PFN_WDFDEVICEADDDEPENDENTUSAGEDEVICEOBJECT
pfnWdfDeviceAddDependentUsageDeviceObject;
+ PFN_WDFDEVICEADDREMOVALRELATIONSPHYSICALDEVICE
pfnWdfDeviceAddRemovalRelationsPhysicalDevice;
+ PFN_WDFDEVICEREMOVEREMOVALRELATIONSPHYSICALDEVICE
pfnWdfDeviceRemoveRemovalRelationsPhysicalDevice;
+ PFN_WDFDEVICECLEARREMOVALRELATIONSDEVICES
pfnWdfDeviceClearRemovalRelationsDevices;
+ PFN_WDFDEVICEGETDRIVER pfnWdfDeviceGetDriver;
+ PFN_WDFDEVICERETRIEVEDEVICENAME
pfnWdfDeviceRetrieveDeviceName;
+ PFN_WDFDEVICEASSIGNMOFRESOURCENAME
pfnWdfDeviceAssignMofResourceName;
+ PFN_WDFDEVICEGETIOTARGET pfnWdfDeviceGetIoTarget;
+ PFN_WDFDEVICEGETDEVICEPNPSTATE
pfnWdfDeviceGetDevicePnpState;
+ PFN_WDFDEVICEGETDEVICEPOWERSTATE
pfnWdfDeviceGetDevicePowerState;
+ PFN_WDFDEVICEGETDEVICEPOWERPOLICYSTATE
pfnWdfDeviceGetDevicePowerPolicyState;
+ PFN_WDFDEVICEASSIGNS0IDLESETTINGS
pfnWdfDeviceAssignS0IdleSettings;
+ PFN_WDFDEVICEASSIGNSXWAKESETTINGS
pfnWdfDeviceAssignSxWakeSettings;
+ PFN_WDFDEVICEOPENREGISTRYKEY
pfnWdfDeviceOpenRegistryKey;
+ PFN_WDFDEVICESETSPECIALFILESUPPORT
pfnWdfDeviceSetSpecialFileSupport;
+ PFN_WDFDEVICESETCHARACTERISTICS
pfnWdfDeviceSetCharacteristics;
+ PFN_WDFDEVICEGETCHARACTERISTICS
pfnWdfDeviceGetCharacteristics;
+ PFN_WDFDEVICEGETALIGNMENTREQUIREMENT
pfnWdfDeviceGetAlignmentRequirement;
+ PFN_WDFDEVICESETALIGNMENTREQUIREMENT
pfnWdfDeviceSetAlignmentRequirement;
+ PFN_WDFDEVICEINITFREE pfnWdfDeviceInitFree;
+ PFN_WDFDEVICEINITSETPNPPOWEREVENTCALLBACKS
pfnWdfDeviceInitSetPnpPowerEventCallbacks;
+ PFN_WDFDEVICEINITSETPOWERPOLICYEVENTCALLBACKS
pfnWdfDeviceInitSetPowerPolicyEventCallbacks;
+ PFN_WDFDEVICEINITSETPOWERPOLICYOWNERSHIP
pfnWdfDeviceInitSetPowerPolicyOwnership;
+ PFN_WDFDEVICEINITREGISTERPNPSTATECHANGECALLBACK
pfnWdfDeviceInitRegisterPnpStateChangeCallback;
+ PFN_WDFDEVICEINITREGISTERPOWERSTATECHANGECALLBACK
pfnWdfDeviceInitRegisterPowerStateChangeCallback;
+ PFN_WDFDEVICEINITREGISTERPOWERPOLICYSTATECHANGECALLBACK
pfnWdfDeviceInitRegisterPowerPolicyStateChangeCallback;
+ PFN_WDFDEVICEINITSETIOTYPE pfnWdfDeviceInitSetIoType;
+ PFN_WDFDEVICEINITSETEXCLUSIVE
pfnWdfDeviceInitSetExclusive;
+ PFN_WDFDEVICEINITSETPOWERNOTPAGEABLE
pfnWdfDeviceInitSetPowerNotPageable;
+ PFN_WDFDEVICEINITSETPOWERPAGEABLE
pfnWdfDeviceInitSetPowerPageable;
+ PFN_WDFDEVICEINITSETPOWERINRUSH
pfnWdfDeviceInitSetPowerInrush;
+ PFN_WDFDEVICEINITSETDEVICETYPE
pfnWdfDeviceInitSetDeviceType;
+ PFN_WDFDEVICEINITASSIGNNAME
pfnWdfDeviceInitAssignName;
+ PFN_WDFDEVICEINITASSIGNSDDLSTRING
pfnWdfDeviceInitAssignSDDLString;
+ PFN_WDFDEVICEINITSETDEVICECLASS
pfnWdfDeviceInitSetDeviceClass;
+ PFN_WDFDEVICEINITSETCHARACTERISTICS
pfnWdfDeviceInitSetCharacteristics;
+ PFN_WDFDEVICEINITSETFILEOBJECTCONFIG
pfnWdfDeviceInitSetFileObjectConfig;
+ PFN_WDFDEVICEINITSETREQUESTATTRIBUTES
pfnWdfDeviceInitSetRequestAttributes;
+ PFN_WDFDEVICEINITASSIGNWDMIRPPREPROCESSCALLBACK
pfnWdfDeviceInitAssignWdmIrpPreprocessCallback;
+ PFN_WDFDEVICEINITSETIOINCALLERCONTEXTCALLBACK
pfnWdfDeviceInitSetIoInCallerContextCallback;
+ PFN_WDFDEVICECREATE pfnWdfDeviceCreate;
+ PFN_WDFDEVICESETSTATICSTOPREMOVE
pfnWdfDeviceSetStaticStopRemove;
+ PFN_WDFDEVICECREATEDEVICEINTERFACE
pfnWdfDeviceCreateDeviceInterface;
+ PFN_WDFDEVICESETDEVICEINTERFACESTATE
pfnWdfDeviceSetDeviceInterfaceState;
+ PFN_WDFDEVICERETRIEVEDEVICEINTERFACESTRING
pfnWdfDeviceRetrieveDeviceInterfaceString;
+ PFN_WDFDEVICECREATESYMBOLICLINK
pfnWdfDeviceCreateSymbolicLink;
+ PFN_WDFDEVICEQUERYPROPERTY pfnWdfDeviceQueryProperty;
+ PFN_WDFDEVICEALLOCANDQUERYPROPERTY
pfnWdfDeviceAllocAndQueryProperty;
+ PFN_WDFDEVICESETPNPCAPABILITIES
pfnWdfDeviceSetPnpCapabilities;
+ PFN_WDFDEVICESETPOWERCAPABILITIES
pfnWdfDeviceSetPowerCapabilities;
+ PFN_WDFDEVICESETBUSINFORMATIONFORCHILDREN
pfnWdfDeviceSetBusInformationForChildren;
+ PFN_WDFDEVICEINDICATEWAKESTATUS
pfnWdfDeviceIndicateWakeStatus;
+ PFN_WDFDEVICESETFAILED pfnWdfDeviceSetFailed;
+ PFN_WDFDEVICESTOPIDLENOTRACK
pfnWdfDeviceStopIdleNoTrack;
+ PFN_WDFDEVICERESUMEIDLENOTRACK
pfnWdfDeviceResumeIdleNoTrack;
+ PFN_WDFDEVICEGETFILEOBJECT pfnWdfDeviceGetFileObject;
+ PFN_WDFDEVICEENQUEUEREQUEST
pfnWdfDeviceEnqueueRequest;
+ PFN_WDFDEVICEGETDEFAULTQUEUE
pfnWdfDeviceGetDefaultQueue;
+ PFN_WDFDEVICECONFIGUREREQUESTDISPATCHING
pfnWdfDeviceConfigureRequestDispatching;
+ PFN_WDFDMAENABLERCREATE pfnWdfDmaEnablerCreate;
+ PFN_WDFDMAENABLERGETMAXIMUMLENGTH
pfnWdfDmaEnablerGetMaximumLength;
+ PFN_WDFDMAENABLERGETMAXIMUMSCATTERGATHERELEMENTS
pfnWdfDmaEnablerGetMaximumScatterGatherElements;
+ PFN_WDFDMAENABLERSETMAXIMUMSCATTERGATHERELEMENTS
pfnWdfDmaEnablerSetMaximumScatterGatherElements;
+ PFN_WDFDMATRANSACTIONCREATE
pfnWdfDmaTransactionCreate;
+ PFN_WDFDMATRANSACTIONINITIALIZE
pfnWdfDmaTransactionInitialize;
+ PFN_WDFDMATRANSACTIONINITIALIZEUSINGREQUEST
pfnWdfDmaTransactionInitializeUsingRequest;
+ PFN_WDFDMATRANSACTIONEXECUTE
pfnWdfDmaTransactionExecute;
+ PFN_WDFDMATRANSACTIONRELEASE
pfnWdfDmaTransactionRelease;
+ PFN_WDFDMATRANSACTIONDMACOMPLETED
pfnWdfDmaTransactionDmaCompleted;
+ PFN_WDFDMATRANSACTIONDMACOMPLETEDWITHLENGTH
pfnWdfDmaTransactionDmaCompletedWithLength;
+ PFN_WDFDMATRANSACTIONDMACOMPLETEDFINAL
pfnWdfDmaTransactionDmaCompletedFinal;
+ PFN_WDFDMATRANSACTIONGETBYTESTRANSFERRED
pfnWdfDmaTransactionGetBytesTransferred;
+ PFN_WDFDMATRANSACTIONSETMAXIMUMLENGTH
pfnWdfDmaTransactionSetMaximumLength;
+ PFN_WDFDMATRANSACTIONGETREQUEST
pfnWdfDmaTransactionGetRequest;
+ PFN_WDFDMATRANSACTIONGETCURRENTDMATRANSFERLENGTH
pfnWdfDmaTransactionGetCurrentDmaTransferLength;
+ PFN_WDFDMATRANSACTIONGETDEVICE
pfnWdfDmaTransactionGetDevice;
+ PFN_WDFDPCCREATE pfnWdfDpcCreate;
+ PFN_WDFDPCENQUEUE pfnWdfDpcEnqueue;
+ PFN_WDFDPCCANCEL pfnWdfDpcCancel;
+ PFN_WDFDPCGETPARENTOBJECT pfnWdfDpcGetParentObject;
+ PFN_WDFDPCWDMGETDPC pfnWdfDpcWdmGetDpc;
+ PFN_WDFDRIVERCREATE pfnWdfDriverCreate;
+ PFN_WDFDRIVERGETREGISTRYPATH
pfnWdfDriverGetRegistryPath;
+ PFN_WDFDRIVERWDMGETDRIVEROBJECT
pfnWdfDriverWdmGetDriverObject;
+ PFN_WDFDRIVEROPENPARAMETERSREGISTRYKEY
pfnWdfDriverOpenParametersRegistryKey;
+ PFN_WDFWDMDRIVERGETWDFDRIVERHANDLE
pfnWdfWdmDriverGetWdfDriverHandle;
+ PFN_WDFDRIVERREGISTERTRACEINFO
pfnWdfDriverRegisterTraceInfo;
+ PFN_WDFDRIVERRETRIEVEVERSIONSTRING
pfnWdfDriverRetrieveVersionString;
+ PFN_WDFDRIVERISVERSIONAVAILABLE
pfnWdfDriverIsVersionAvailable;
+ PFN_WDFFDOINITWDMGETPHYSICALDEVICE
pfnWdfFdoInitWdmGetPhysicalDevice;
+ PFN_WDFFDOINITOPENREGISTRYKEY
pfnWdfFdoInitOpenRegistryKey;
+ PFN_WDFFDOINITQUERYPROPERTY
pfnWdfFdoInitQueryProperty;
+ PFN_WDFFDOINITALLOCANDQUERYPROPERTY
pfnWdfFdoInitAllocAndQueryProperty;
+ PFN_WDFFDOINITSETEVENTCALLBACKS
pfnWdfFdoInitSetEventCallbacks;
+ PFN_WDFFDOINITSETFILTER pfnWdfFdoInitSetFilter;
+ PFN_WDFFDOINITSETDEFAULTCHILDLISTCONFIG
pfnWdfFdoInitSetDefaultChildListConfig;
+ PFN_WDFFDOQUERYFORINTERFACE
pfnWdfFdoQueryForInterface;
+ PFN_WDFFDOGETDEFAULTCHILDLIST
pfnWdfFdoGetDefaultChildList;
+ PFN_WDFFDOADDSTATICCHILD pfnWdfFdoAddStaticChild;
+ PFN_WDFFDOLOCKSTATICCHILDLISTFORITERATION
pfnWdfFdoLockStaticChildListForIteration;
+ PFN_WDFFDORETRIEVENEXTSTATICCHILD
pfnWdfFdoRetrieveNextStaticChild;
+ PFN_WDFFDOUNLOCKSTATICCHILDLISTFROMITERATION
pfnWdfFdoUnlockStaticChildListFromIteration;
+ PFN_WDFFILEOBJECTGETFILENAME
pfnWdfFileObjectGetFileName;
+ PFN_WDFFILEOBJECTGETFLAGS pfnWdfFileObjectGetFlags;
+ PFN_WDFFILEOBJECTGETDEVICE pfnWdfFileObjectGetDevice;
+ PFN_WDFFILEOBJECTWDMGETFILEOBJECT
pfnWdfFileObjectWdmGetFileObject;
+ PFN_WDFINTERRUPTCREATE pfnWdfInterruptCreate;
+ PFN_WDFINTERRUPTQUEUEDPCFORISR
pfnWdfInterruptQueueDpcForIsr;
+ PFN_WDFINTERRUPTSYNCHRONIZE
pfnWdfInterruptSynchronize;
+ PFN_WDFINTERRUPTACQUIRELOCK
pfnWdfInterruptAcquireLock;
+ PFN_WDFINTERRUPTRELEASELOCK
pfnWdfInterruptReleaseLock;
+ PFN_WDFINTERRUPTENABLE pfnWdfInterruptEnable;
+ PFN_WDFINTERRUPTDISABLE pfnWdfInterruptDisable;
+ PFN_WDFINTERRUPTWDMGETINTERRUPT
pfnWdfInterruptWdmGetInterrupt;
+ PFN_WDFINTERRUPTGETINFO pfnWdfInterruptGetInfo;
+ PFN_WDFINTERRUPTSETPOLICY pfnWdfInterruptSetPolicy;
+ PFN_WDFINTERRUPTGETDEVICE pfnWdfInterruptGetDevice;
+ PFN_WDFIOQUEUECREATE pfnWdfIoQueueCreate;
+ PFN_WDFIOQUEUEGETSTATE pfnWdfIoQueueGetState;
+ PFN_WDFIOQUEUESTART pfnWdfIoQueueStart;
+ PFN_WDFIOQUEUESTOP pfnWdfIoQueueStop;
+ PFN_WDFIOQUEUESTOPSYNCHRONOUSLY
pfnWdfIoQueueStopSynchronously;
+ PFN_WDFIOQUEUEGETDEVICE pfnWdfIoQueueGetDevice;
+ PFN_WDFIOQUEUERETRIEVENEXTREQUEST
pfnWdfIoQueueRetrieveNextRequest;
+ PFN_WDFIOQUEUERETRIEVEREQUESTBYFILEOBJECT
pfnWdfIoQueueRetrieveRequestByFileObject;
+ PFN_WDFIOQUEUEFINDREQUEST pfnWdfIoQueueFindRequest;
+ PFN_WDFIOQUEUERETRIEVEFOUNDREQUEST
pfnWdfIoQueueRetrieveFoundRequest;
+ PFN_WDFIOQUEUEDRAINSYNCHRONOUSLY
pfnWdfIoQueueDrainSynchronously;
+ PFN_WDFIOQUEUEDRAIN pfnWdfIoQueueDrain;
+ PFN_WDFIOQUEUEPURGESYNCHRONOUSLY
pfnWdfIoQueuePurgeSynchronously;
+ PFN_WDFIOQUEUEPURGE pfnWdfIoQueuePurge;
+ PFN_WDFIOQUEUEREADYNOTIFY pfnWdfIoQueueReadyNotify;
+ PFN_WDFIOTARGETCREATE pfnWdfIoTargetCreate;
+ PFN_WDFIOTARGETOPEN pfnWdfIoTargetOpen;
+ PFN_WDFIOTARGETCLOSEFORQUERYREMOVE
pfnWdfIoTargetCloseForQueryRemove;
+ PFN_WDFIOTARGETCLOSE pfnWdfIoTargetClose;
+ PFN_WDFIOTARGETSTART pfnWdfIoTargetStart;
+ PFN_WDFIOTARGETSTOP pfnWdfIoTargetStop;
+ PFN_WDFIOTARGETGETSTATE pfnWdfIoTargetGetState;
+ PFN_WDFIOTARGETGETDEVICE pfnWdfIoTargetGetDevice;
+ PFN_WDFIOTARGETQUERYTARGETPROPERTY
pfnWdfIoTargetQueryTargetProperty;
+ PFN_WDFIOTARGETALLOCANDQUERYTARGETPROPERTY
pfnWdfIoTargetAllocAndQueryTargetProperty;
+ PFN_WDFIOTARGETQUERYFORINTERFACE
pfnWdfIoTargetQueryForInterface;
+ PFN_WDFIOTARGETWDMGETTARGETDEVICEOBJECT
pfnWdfIoTargetWdmGetTargetDeviceObject;
+ PFN_WDFIOTARGETWDMGETTARGETPHYSICALDEVICE
pfnWdfIoTargetWdmGetTargetPhysicalDevice;
+ PFN_WDFIOTARGETWDMGETTARGETFILEOBJECT
pfnWdfIoTargetWdmGetTargetFileObject;
+ PFN_WDFIOTARGETWDMGETTARGETFILEHANDLE
pfnWdfIoTargetWdmGetTargetFileHandle;
+ PFN_WDFIOTARGETSENDREADSYNCHRONOUSLY
pfnWdfIoTargetSendReadSynchronously;
+ PFN_WDFIOTARGETFORMATREQUESTFORREAD
pfnWdfIoTargetFormatRequestForRead;
+ PFN_WDFIOTARGETSENDWRITESYNCHRONOUSLY
pfnWdfIoTargetSendWriteSynchronously;
+ PFN_WDFIOTARGETFORMATREQUESTFORWRITE
pfnWdfIoTargetFormatRequestForWrite;
+ PFN_WDFIOTARGETSENDIOCTLSYNCHRONOUSLY
pfnWdfIoTargetSendIoctlSynchronously;
+ PFN_WDFIOTARGETFORMATREQUESTFORIOCTL
pfnWdfIoTargetFormatRequestForIoctl;
+ PFN_WDFIOTARGETSENDINTERNALIOCTLSYNCHRONOUSLY
pfnWdfIoTargetSendInternalIoctlSynchronously;
+ PFN_WDFIOTARGETFORMATREQUESTFORINTERNALIOCTL
pfnWdfIoTargetFormatRequestForInternalIoctl;
+ PFN_WDFIOTARGETSENDINTERNALIOCTLOTHERSSYNCHRONOUSLY
pfnWdfIoTargetSendInternalIoctlOthersSynchronously;
+ PFN_WDFIOTARGETFORMATREQUESTFORINTERNALIOCTLOTHERS
pfnWdfIoTargetFormatRequestForInternalIoctlOthers;
+ PFN_WDFMEMORYCREATE pfnWdfMemoryCreate;
+ PFN_WDFMEMORYCREATEPREALLOCATED
pfnWdfMemoryCreatePreallocated;
+ PFN_WDFMEMORYGETBUFFER pfnWdfMemoryGetBuffer;
+ PFN_WDFMEMORYASSIGNBUFFER pfnWdfMemoryAssignBuffer;
+ PFN_WDFMEMORYCOPYTOBUFFER pfnWdfMemoryCopyToBuffer;
+ PFN_WDFMEMORYCOPYFROMBUFFER
pfnWdfMemoryCopyFromBuffer;
+ PFN_WDFLOOKASIDELISTCREATE pfnWdfLookasideListCreate;
+ PFN_WDFMEMORYCREATEFROMLOOKASIDE
pfnWdfMemoryCreateFromLookaside;
+ PFN_WDFDEVICEMINIPORTCREATE
pfnWdfDeviceMiniportCreate;
+ PFN_WDFDRIVERMINIPORTUNLOAD
pfnWdfDriverMiniportUnload;
+ PFN_WDFOBJECTGETTYPEDCONTEXTWORKER
pfnWdfObjectGetTypedContextWorker;
+ PFN_WDFOBJECTALLOCATECONTEXT
pfnWdfObjectAllocateContext;
+ PFN_WDFOBJECTCONTEXTGETOBJECT
pfnWdfObjectContextGetObject;
+ PFN_WDFOBJECTREFERENCEACTUAL
pfnWdfObjectReferenceActual;
+ PFN_WDFOBJECTDEREFERENCEACTUAL
pfnWdfObjectDereferenceActual;
+ PFN_WDFOBJECTCREATE pfnWdfObjectCreate;
+ PFN_WDFOBJECTDELETE pfnWdfObjectDelete;
+ PFN_WDFOBJECTQUERY pfnWdfObjectQuery;
+ PFN_WDFPDOINITALLOCATE pfnWdfPdoInitAllocate;
+ PFN_WDFPDOINITSETEVENTCALLBACKS
pfnWdfPdoInitSetEventCallbacks;
+ PFN_WDFPDOINITASSIGNDEVICEID
pfnWdfPdoInitAssignDeviceID;
+ PFN_WDFPDOINITASSIGNINSTANCEID
pfnWdfPdoInitAssignInstanceID;
+ PFN_WDFPDOINITADDHARDWAREID
pfnWdfPdoInitAddHardwareID;
+ PFN_WDFPDOINITADDCOMPATIBLEID
pfnWdfPdoInitAddCompatibleID;
+ PFN_WDFPDOINITADDDEVICETEXT
pfnWdfPdoInitAddDeviceText;
+ PFN_WDFPDOINITSETDEFAULTLOCALE
pfnWdfPdoInitSetDefaultLocale;
+ PFN_WDFPDOINITASSIGNRAWDEVICE
pfnWdfPdoInitAssignRawDevice;
+ PFN_WDFPDOMARKMISSING pfnWdfPdoMarkMissing;
+ PFN_WDFPDOREQUESTEJECT pfnWdfPdoRequestEject;
+ PFN_WDFPDOGETPARENT pfnWdfPdoGetParent;
+ PFN_WDFPDORETRIEVEIDENTIFICATIONDESCRIPTION
pfnWdfPdoRetrieveIdentificationDescription;
+ PFN_WDFPDORETRIEVEADDRESSDESCRIPTION
pfnWdfPdoRetrieveAddressDescription;
+ PFN_WDFPDOUPDATEADDRESSDESCRIPTION
pfnWdfPdoUpdateAddressDescription;
+ PFN_WDFPDOADDEJECTIONRELATIONSPHYSICALDEVICE
pfnWdfPdoAddEjectionRelationsPhysicalDevice;
+ PFN_WDFPDOREMOVEEJECTIONRELATIONSPHYSICALDEVICE
pfnWdfPdoRemoveEjectionRelationsPhysicalDevice;
+ PFN_WDFPDOCLEAREJECTIONRELATIONSDEVICES
pfnWdfPdoClearEjectionRelationsDevices;
+ PFN_WDFDEVICEADDQUERYINTERFACE
pfnWdfDeviceAddQueryInterface;
+ PFN_WDFREGISTRYOPENKEY pfnWdfRegistryOpenKey;
+ PFN_WDFREGISTRYCREATEKEY pfnWdfRegistryCreateKey;
+ PFN_WDFREGISTRYCLOSE pfnWdfRegistryClose;
+ PFN_WDFREGISTRYWDMGETHANDLE
pfnWdfRegistryWdmGetHandle;
+ PFN_WDFREGISTRYREMOVEKEY pfnWdfRegistryRemoveKey;
+ PFN_WDFREGISTRYREMOVEVALUE pfnWdfRegistryRemoveValue;
+ PFN_WDFREGISTRYQUERYVALUE pfnWdfRegistryQueryValue;
+ PFN_WDFREGISTRYQUERYMEMORY pfnWdfRegistryQueryMemory;
+ PFN_WDFREGISTRYQUERYMULTISTRING
pfnWdfRegistryQueryMultiString;
+ PFN_WDFREGISTRYQUERYUNICODESTRING
pfnWdfRegistryQueryUnicodeString;
+ PFN_WDFREGISTRYQUERYSTRING pfnWdfRegistryQueryString;
+ PFN_WDFREGISTRYQUERYULONG pfnWdfRegistryQueryULong;
+ PFN_WDFREGISTRYASSIGNVALUE pfnWdfRegistryAssignValue;
+ PFN_WDFREGISTRYASSIGNMEMORY
pfnWdfRegistryAssignMemory;
+ PFN_WDFREGISTRYASSIGNMULTISTRING
pfnWdfRegistryAssignMultiString;
+ PFN_WDFREGISTRYASSIGNUNICODESTRING
pfnWdfRegistryAssignUnicodeString;
+ PFN_WDFREGISTRYASSIGNSTRING
pfnWdfRegistryAssignString;
+ PFN_WDFREGISTRYASSIGNULONG pfnWdfRegistryAssignULong;
+ PFN_WDFREQUESTCREATE pfnWdfRequestCreate;
+ PFN_WDFREQUESTCREATEFROMIRP
pfnWdfRequestCreateFromIrp;
+ PFN_WDFREQUESTREUSE pfnWdfRequestReuse;
+ PFN_WDFREQUESTCHANGETARGET pfnWdfRequestChangeTarget;
+ PFN_WDFREQUESTFORMATREQUESTUSINGCURRENTTYPE
pfnWdfRequestFormatRequestUsingCurrentType;
+ PFN_WDFREQUESTWDMFORMATUSINGSTACKLOCATION
pfnWdfRequestWdmFormatUsingStackLocation;
+ PFN_WDFREQUESTSEND pfnWdfRequestSend;
+ PFN_WDFREQUESTGETSTATUS pfnWdfRequestGetStatus;
+ PFN_WDFREQUESTMARKCANCELABLE
pfnWdfRequestMarkCancelable;
+ PFN_WDFREQUESTUNMARKCANCELABLE
pfnWdfRequestUnmarkCancelable;
+ PFN_WDFREQUESTISCANCELED pfnWdfRequestIsCanceled;
+ PFN_WDFREQUESTCANCELSENTREQUEST
pfnWdfRequestCancelSentRequest;
+ PFN_WDFREQUESTISFROM32BITPROCESS
pfnWdfRequestIsFrom32BitProcess;
+ PFN_WDFREQUESTSETCOMPLETIONROUTINE
pfnWdfRequestSetCompletionRoutine;
+ PFN_WDFREQUESTGETCOMPLETIONPARAMS
pfnWdfRequestGetCompletionParams;
+ PFN_WDFREQUESTALLOCATETIMER
pfnWdfRequestAllocateTimer;
+ PFN_WDFREQUESTCOMPLETE pfnWdfRequestComplete;
+ PFN_WDFREQUESTCOMPLETEWITHPRIORITYBOOST
pfnWdfRequestCompleteWithPriorityBoost;
+ PFN_WDFREQUESTCOMPLETEWITHINFORMATION
pfnWdfRequestCompleteWithInformation;
+ PFN_WDFREQUESTGETPARAMETERS
pfnWdfRequestGetParameters;
+ PFN_WDFREQUESTRETRIEVEINPUTMEMORY
pfnWdfRequestRetrieveInputMemory;
+ PFN_WDFREQUESTRETRIEVEOUTPUTMEMORY
pfnWdfRequestRetrieveOutputMemory;
+ PFN_WDFREQUESTRETRIEVEINPUTBUFFER
pfnWdfRequestRetrieveInputBuffer;
+ PFN_WDFREQUESTRETRIEVEOUTPUTBUFFER
pfnWdfRequestRetrieveOutputBuffer;
+ PFN_WDFREQUESTRETRIEVEINPUTWDMMDL
pfnWdfRequestRetrieveInputWdmMdl;
+ PFN_WDFREQUESTRETRIEVEOUTPUTWDMMDL
pfnWdfRequestRetrieveOutputWdmMdl;
+ PFN_WDFREQUESTRETRIEVEUNSAFEUSERINPUTBUFFER
pfnWdfRequestRetrieveUnsafeUserInputBuffer;
+ PFN_WDFREQUESTRETRIEVEUNSAFEUSEROUTPUTBUFFER
pfnWdfRequestRetrieveUnsafeUserOutputBuffer;
+ PFN_WDFREQUESTSETINFORMATION
pfnWdfRequestSetInformation;
+ PFN_WDFREQUESTGETINFORMATION
pfnWdfRequestGetInformation;
+ PFN_WDFREQUESTGETFILEOBJECT
pfnWdfRequestGetFileObject;
+ PFN_WDFREQUESTPROBEANDLOCKUSERBUFFERFORREAD
pfnWdfRequestProbeAndLockUserBufferForRead;
+ PFN_WDFREQUESTPROBEANDLOCKUSERBUFFERFORWRITE
pfnWdfRequestProbeAndLockUserBufferForWrite;
+ PFN_WDFREQUESTGETREQUESTORMODE
pfnWdfRequestGetRequestorMode;
+ PFN_WDFREQUESTFORWARDTOIOQUEUE
pfnWdfRequestForwardToIoQueue;
+ PFN_WDFREQUESTGETIOQUEUE pfnWdfRequestGetIoQueue;
+ PFN_WDFREQUESTREQUEUE pfnWdfRequestRequeue;
+ PFN_WDFREQUESTSTOPACKNOWLEDGE
pfnWdfRequestStopAcknowledge;
+ PFN_WDFREQUESTWDMGETIRP pfnWdfRequestWdmGetIrp;
+ PFN_WDFIORESOURCEREQUIREMENTSLISTSETSLOTNUMBER
pfnWdfIoResourceRequirementsListSetSlotNumber;
+ PFN_WDFIORESOURCEREQUIREMENTSLISTSETINTERFACETYPE
pfnWdfIoResourceRequirementsListSetInterfaceType;
+ PFN_WDFIORESOURCEREQUIREMENTSLISTAPPENDIORESLIST
pfnWdfIoResourceRequirementsListAppendIoResList;
+ PFN_WDFIORESOURCEREQUIREMENTSLISTINSERTIORESLIST
pfnWdfIoResourceRequirementsListInsertIoResList;
+ PFN_WDFIORESOURCEREQUIREMENTSLISTGETCOUNT
pfnWdfIoResourceRequirementsListGetCount;
+ PFN_WDFIORESOURCEREQUIREMENTSLISTGETIORESLIST
pfnWdfIoResourceRequirementsListGetIoResList;
+ PFN_WDFIORESOURCEREQUIREMENTSLISTREMOVE
pfnWdfIoResourceRequirementsListRemove;
+ PFN_WDFIORESOURCEREQUIREMENTSLISTREMOVEBYIORESLIST
pfnWdfIoResourceRequirementsListRemoveByIoResList;
+ PFN_WDFIORESOURCELISTCREATE
pfnWdfIoResourceListCreate;
+ PFN_WDFIORESOURCELISTAPPENDDESCRIPTOR
pfnWdfIoResourceListAppendDescriptor;
+ PFN_WDFIORESOURCELISTINSERTDESCRIPTOR
pfnWdfIoResourceListInsertDescriptor;
+ PFN_WDFIORESOURCELISTUPDATEDESCRIPTOR
pfnWdfIoResourceListUpdateDescriptor;
+ PFN_WDFIORESOURCELISTGETCOUNT
pfnWdfIoResourceListGetCount;
+ PFN_WDFIORESOURCELISTGETDESCRIPTOR
pfnWdfIoResourceListGetDescriptor;
+ PFN_WDFIORESOURCELISTREMOVE
pfnWdfIoResourceListRemove;
+ PFN_WDFIORESOURCELISTREMOVEBYDESCRIPTOR
pfnWdfIoResourceListRemoveByDescriptor;
+ PFN_WDFCMRESOURCELISTAPPENDDESCRIPTOR
pfnWdfCmResourceListAppendDescriptor;
+ PFN_WDFCMRESOURCELISTINSERTDESCRIPTOR
pfnWdfCmResourceListInsertDescriptor;
+ PFN_WDFCMRESOURCELISTGETCOUNT
pfnWdfCmResourceListGetCount;
+ PFN_WDFCMRESOURCELISTGETDESCRIPTOR
pfnWdfCmResourceListGetDescriptor;
+ PFN_WDFCMRESOURCELISTREMOVE
pfnWdfCmResourceListRemove;
+ PFN_WDFCMRESOURCELISTREMOVEBYDESCRIPTOR
pfnWdfCmResourceListRemoveByDescriptor;
+ PFN_WDFSTRINGCREATE pfnWdfStringCreate;
+ PFN_WDFSTRINGGETUNICODESTRING
pfnWdfStringGetUnicodeString;
+ PFN_WDFOBJECTACQUIRELOCK pfnWdfObjectAcquireLock;
+ PFN_WDFOBJECTRELEASELOCK pfnWdfObjectReleaseLock;
+ PFN_WDFWAITLOCKCREATE pfnWdfWaitLockCreate;
+ PFN_WDFWAITLOCKACQUIRE pfnWdfWaitLockAcquire;
+ PFN_WDFWAITLOCKRELEASE pfnWdfWaitLockRelease;
+ PFN_WDFSPINLOCKCREATE pfnWdfSpinLockCreate;
+ PFN_WDFSPINLOCKACQUIRE pfnWdfSpinLockAcquire;
+ PFN_WDFSPINLOCKRELEASE pfnWdfSpinLockRelease;
+ PFN_WDFTIMERCREATE pfnWdfTimerCreate;
+ PFN_WDFTIMERSTART pfnWdfTimerStart;
+ PFN_WDFTIMERSTOP pfnWdfTimerStop;
+ PFN_WDFTIMERGETPARENTOBJECT
pfnWdfTimerGetParentObject;
+ PFN_WDFUSBTARGETDEVICECREATE
pfnWdfUsbTargetDeviceCreate;
+ PFN_WDFUSBTARGETDEVICERETRIEVEINFORMATION
pfnWdfUsbTargetDeviceRetrieveInformation;
+ PFN_WDFUSBTARGETDEVICEGETDEVICEDESCRIPTOR
pfnWdfUsbTargetDeviceGetDeviceDescriptor;
+ PFN_WDFUSBTARGETDEVICERETRIEVECONFIGDESCRIPTOR
pfnWdfUsbTargetDeviceRetrieveConfigDescriptor;
+ PFN_WDFUSBTARGETDEVICEQUERYSTRING
pfnWdfUsbTargetDeviceQueryString;
+ PFN_WDFUSBTARGETDEVICEALLOCANDQUERYSTRING
pfnWdfUsbTargetDeviceAllocAndQueryString;
+ PFN_WDFUSBTARGETDEVICEFORMATREQUESTFORSTRING
pfnWdfUsbTargetDeviceFormatRequestForString;
+ PFN_WDFUSBTARGETDEVICEGETNUMINTERFACES
pfnWdfUsbTargetDeviceGetNumInterfaces;
+ PFN_WDFUSBTARGETDEVICESELECTCONFIG
pfnWdfUsbTargetDeviceSelectConfig;
+ PFN_WDFUSBTARGETDEVICEWDMGETCONFIGURATIONHANDLE
pfnWdfUsbTargetDeviceWdmGetConfigurationHandle;
+ PFN_WDFUSBTARGETDEVICERETRIEVECURRENTFRAMENUMBER
pfnWdfUsbTargetDeviceRetrieveCurrentFrameNumber;
+ PFN_WDFUSBTARGETDEVICESENDCONTROLTRANSFERSYNCHRONOUSLY
pfnWdfUsbTargetDeviceSendControlTransferSynchronously;
+ PFN_WDFUSBTARGETDEVICEFORMATREQUESTFORCONTROLTRANSFER
pfnWdfUsbTargetDeviceFormatRequestForControlTransfer;
+ PFN_WDFUSBTARGETDEVICEISCONNECTEDSYNCHRONOUS
pfnWdfUsbTargetDeviceIsConnectedSynchronous;
+ PFN_WDFUSBTARGETDEVICERESETPORTSYNCHRONOUSLY
pfnWdfUsbTargetDeviceResetPortSynchronously;
+ PFN_WDFUSBTARGETDEVICECYCLEPORTSYNCHRONOUSLY
pfnWdfUsbTargetDeviceCyclePortSynchronously;
+ PFN_WDFUSBTARGETDEVICEFORMATREQUESTFORCYCLEPORT
pfnWdfUsbTargetDeviceFormatRequestForCyclePort;
+ PFN_WDFUSBTARGETDEVICESENDURBSYNCHRONOUSLY
pfnWdfUsbTargetDeviceSendUrbSynchronously;
+ PFN_WDFUSBTARGETDEVICEFORMATREQUESTFORURB
pfnWdfUsbTargetDeviceFormatRequestForUrb;
+ PFN_WDFUSBTARGETPIPEGETINFORMATION
pfnWdfUsbTargetPipeGetInformation;
+ PFN_WDFUSBTARGETPIPEISINENDPOINT
pfnWdfUsbTargetPipeIsInEndpoint;
+ PFN_WDFUSBTARGETPIPEISOUTENDPOINT
pfnWdfUsbTargetPipeIsOutEndpoint;
+ PFN_WDFUSBTARGETPIPEGETTYPE
pfnWdfUsbTargetPipeGetType;
+ PFN_WDFUSBTARGETPIPESETNOMAXIMUMPACKETSIZECHECK
pfnWdfUsbTargetPipeSetNoMaximumPacketSizeCheck;
+ PFN_WDFUSBTARGETPIPEWRITESYNCHRONOUSLY
pfnWdfUsbTargetPipeWriteSynchronously;
+ PFN_WDFUSBTARGETPIPEFORMATREQUESTFORWRITE
pfnWdfUsbTargetPipeFormatRequestForWrite;
+ PFN_WDFUSBTARGETPIPEREADSYNCHRONOUSLY
pfnWdfUsbTargetPipeReadSynchronously;
+ PFN_WDFUSBTARGETPIPEFORMATREQUESTFORREAD
pfnWdfUsbTargetPipeFormatRequestForRead;
+ PFN_WDFUSBTARGETPIPECONFIGCONTINUOUSREADER
pfnWdfUsbTargetPipeConfigContinuousReader;
+ PFN_WDFUSBTARGETPIPEABORTSYNCHRONOUSLY
pfnWdfUsbTargetPipeAbortSynchronously;
+ PFN_WDFUSBTARGETPIPEFORMATREQUESTFORABORT
pfnWdfUsbTargetPipeFormatRequestForAbort;
+ PFN_WDFUSBTARGETPIPERESETSYNCHRONOUSLY
pfnWdfUsbTargetPipeResetSynchronously;
+ PFN_WDFUSBTARGETPIPEFORMATREQUESTFORRESET
pfnWdfUsbTargetPipeFormatRequestForReset;
+ PFN_WDFUSBTARGETPIPESENDURBSYNCHRONOUSLY
pfnWdfUsbTargetPipeSendUrbSynchronously;
+ PFN_WDFUSBTARGETPIPEFORMATREQUESTFORURB
pfnWdfUsbTargetPipeFormatRequestForUrb;
+ PFN_WDFUSBINTERFACEGETINTERFACENUMBER
pfnWdfUsbInterfaceGetInterfaceNumber;
+ PFN_WDFUSBINTERFACEGETNUMENDPOINTS
pfnWdfUsbInterfaceGetNumEndpoints;
+ PFN_WDFUSBINTERFACEGETDESCRIPTOR
pfnWdfUsbInterfaceGetDescriptor;
+ PFN_WDFUSBINTERFACESELECTSETTING
pfnWdfUsbInterfaceSelectSetting;
+ PFN_WDFUSBINTERFACEGETENDPOINTINFORMATION
pfnWdfUsbInterfaceGetEndpointInformation;
+ PFN_WDFUSBTARGETDEVICEGETINTERFACE
pfnWdfUsbTargetDeviceGetInterface;
+ PFN_WDFUSBINTERFACEGETCONFIGUREDSETTINGINDEX
pfnWdfUsbInterfaceGetConfiguredSettingIndex;
+ PFN_WDFUSBINTERFACEGETNUMCONFIGUREDPIPES
pfnWdfUsbInterfaceGetNumConfiguredPipes;
+ PFN_WDFUSBINTERFACEGETCONFIGUREDPIPE
pfnWdfUsbInterfaceGetConfiguredPipe;
+ PFN_WDFUSBTARGETPIPEWDMGETPIPEHANDLE
pfnWdfUsbTargetPipeWdmGetPipeHandle;
+ PFN_WDFVERIFIERDBGBREAKPOINT
pfnWdfVerifierDbgBreakPoint;
+ PFN_WDFVERIFIERKEBUGCHECK pfnWdfVerifierKeBugCheck;
+ PFN_WDFWMIPROVIDERCREATE pfnWdfWmiProviderCreate;
+ PFN_WDFWMIPROVIDERGETDEVICE
pfnWdfWmiProviderGetDevice;
+ PFN_WDFWMIPROVIDERISENABLED
pfnWdfWmiProviderIsEnabled;
+ PFN_WDFWMIPROVIDERGETTRACINGHANDLE
pfnWdfWmiProviderGetTracingHandle;
+ PFN_WDFWMIINSTANCECREATE pfnWdfWmiInstanceCreate;
+ PFN_WDFWMIINSTANCEREGISTER pfnWdfWmiInstanceRegister;
+ PFN_WDFWMIINSTANCEDEREGISTER
pfnWdfWmiInstanceDeregister;
+ PFN_WDFWMIINSTANCEGETDEVICE
pfnWdfWmiInstanceGetDevice;
+ PFN_WDFWMIINSTANCEGETPROVIDER
pfnWdfWmiInstanceGetProvider;
+ PFN_WDFWMIINSTANCEFIREEVENT
pfnWdfWmiInstanceFireEvent;
+ PFN_WDFWORKITEMCREATE pfnWdfWorkItemCreate;
+ PFN_WDFWORKITEMENQUEUE pfnWdfWorkItemEnqueue;
+ PFN_WDFWORKITEMGETPARENTOBJECT
pfnWdfWorkItemGetParentObject;
+ PFN_WDFWORKITEMFLUSH pfnWdfWorkItemFlush;
+ PFN_WDFCOMMONBUFFERCREATEWITHCONFIG
pfnWdfCommonBufferCreateWithConfig;
+ PFN_WDFDMAENABLERGETFRAGMENTLENGTH
pfnWdfDmaEnablerGetFragmentLength;
+ PFN_WDFDMAENABLERWDMGETDMAADAPTER
pfnWdfDmaEnablerWdmGetDmaAdapter;
+ PFN_WDFUSBINTERFACEGETNUMSETTINGS
pfnWdfUsbInterfaceGetNumSettings;
+ PFN_WDFDEVICEREMOVEDEPENDENTUSAGEDEVICEOBJECT
pfnWdfDeviceRemoveDependentUsageDeviceObject;
+ PFN_WDFDEVICEGETSYSTEMPOWERACTION
pfnWdfDeviceGetSystemPowerAction;
+ PFN_WDFINTERRUPTSETEXTENDEDPOLICY
pfnWdfInterruptSetExtendedPolicy;
+ PFN_WDFIOQUEUEASSIGNFORWARDPROGRESSPOLICY
pfnWdfIoQueueAssignForwardProgressPolicy;
+ PFN_WDFPDOINITASSIGNCONTAINERID
pfnWdfPdoInitAssignContainerID;
+ PFN_WDFPDOINITALLOWFORWARDINGREQUESTTOPARENT
pfnWdfPdoInitAllowForwardingRequestToParent;
+ PFN_WDFREQUESTMARKCANCELABLEEX
pfnWdfRequestMarkCancelableEx;
+ PFN_WDFREQUESTISRESERVED pfnWdfRequestIsReserved;
+ PFN_WDFREQUESTFORWARDTOPARENTDEVICEIOQUEUE
pfnWdfRequestForwardToParentDeviceIoQueue;
+ PFN_WDFCXDEVICEINITALLOCATE
pfnWdfCxDeviceInitAllocate;
+ PFN_WDFCXDEVICEINITASSIGNWDMIRPPREPROCESSCALLBACK
pfnWdfCxDeviceInitAssignWdmIrpPreprocessCallback;
+ PFN_WDFCXDEVICEINITSETIOINCALLERCONTEXTCALLBACK
pfnWdfCxDeviceInitSetIoInCallerContextCallback;
+ PFN_WDFCXDEVICEINITSETREQUESTATTRIBUTES
pfnWdfCxDeviceInitSetRequestAttributes;
+ PFN_WDFCXDEVICEINITSETFILEOBJECTCONFIG
pfnWdfCxDeviceInitSetFileObjectConfig;
+ PFN_WDFDEVICEWDMDISPATCHIRP
pfnWdfDeviceWdmDispatchIrp;
+ PFN_WDFDEVICEWDMDISPATCHIRPTOIOQUEUE
pfnWdfDeviceWdmDispatchIrpToIoQueue;
+ PFN_WDFDEVICEINITSETREMOVELOCKOPTIONS
pfnWdfDeviceInitSetRemoveLockOptions;
+ PFN_WDFDEVICECONFIGUREWDMIRPDISPATCHCALLBACK
pfnWdfDeviceConfigureWdmIrpDispatchCallback;
+ PFN_WDFDMAENABLERCONFIGURESYSTEMPROFILE
pfnWdfDmaEnablerConfigureSystemProfile;
+ PFN_WDFDMATRANSACTIONINITIALIZEUSINGOFFSET
pfnWdfDmaTransactionInitializeUsingOffset;
+ PFN_WDFDMATRANSACTIONGETTRANSFERINFO
pfnWdfDmaTransactionGetTransferInfo;
+ PFN_WDFDMATRANSACTIONSETCHANNELCONFIGURATIONCALLBACK
pfnWdfDmaTransactionSetChannelConfigurationCallback;
+ PFN_WDFDMATRANSACTIONSETTRANSFERCOMPLETECALLBACK
pfnWdfDmaTransactionSetTransferCompleteCallback;
+ PFN_WDFDMATRANSACTIONSETIMMEDIATEEXECUTION
pfnWdfDmaTransactionSetImmediateExecution;
+ PFN_WDFDMATRANSACTIONALLOCATERESOURCES
pfnWdfDmaTransactionAllocateResources;
+ PFN_WDFDMATRANSACTIONSETDEVICEADDRESSOFFSET
pfnWdfDmaTransactionSetDeviceAddressOffset;
+ PFN_WDFDMATRANSACTIONFREERESOURCES
pfnWdfDmaTransactionFreeResources;
+ PFN_WDFDMATRANSACTIONCANCEL
pfnWdfDmaTransactionCancel;
+ PFN_WDFDMATRANSACTIONWDMGETTRANSFERCONTEXT
pfnWdfDmaTransactionWdmGetTransferContext;
+ PFN_WDFINTERRUPTQUEUEWORKITEMFORISR
pfnWdfInterruptQueueWorkItemForIsr;
+ PFN_WDFINTERRUPTTRYTOACQUIRELOCK
pfnWdfInterruptTryToAcquireLock;
+ PFN_WDFIOQUEUESTOPANDPURGE pfnWdfIoQueueStopAndPurge;
+ PFN_WDFIOQUEUESTOPANDPURGESYNCHRONOUSLY
pfnWdfIoQueueStopAndPurgeSynchronously;
+ PFN_WDFIOTARGETPURGE pfnWdfIoTargetPurge;
+ PFN_WDFUSBTARGETDEVICECREATEWITHPARAMETERS
pfnWdfUsbTargetDeviceCreateWithParameters;
+ PFN_WDFUSBTARGETDEVICEQUERYUSBCAPABILITY
pfnWdfUsbTargetDeviceQueryUsbCapability;
+ PFN_WDFUSBTARGETDEVICECREATEURB
pfnWdfUsbTargetDeviceCreateUrb;
+ PFN_WDFUSBTARGETDEVICECREATEISOCHURB
pfnWdfUsbTargetDeviceCreateIsochUrb;
+ PFN_WDFDEVICEWDMASSIGNPOWERFRAMEWORKSETTINGS
pfnWdfDeviceWdmAssignPowerFrameworkSettings;
+ PFN_WDFDMATRANSACTIONSTOPSYSTEMTRANSFER
pfnWdfDmaTransactionStopSystemTransfer;
+ PFN_WDFCXVERIFIERKEBUGCHECK
pfnWdfCxVerifierKeBugCheck;
+ PFN_WDFINTERRUPTREPORTACTIVE
pfnWdfInterruptReportActive;
+ PFN_WDFINTERRUPTREPORTINACTIVE
pfnWdfInterruptReportInactive;
+ PFN_WDFDEVICEINITSETRELEASEHARDWAREORDERONFAILURE
pfnWdfDeviceInitSetReleaseHardwareOrderOnFailure;
+ PFN_WDFGETTRIAGEINFO pfnWdfGetTriageInfo;
+ PFN_WDFDEVICEINITSETIOTYPEEX
pfnWdfDeviceInitSetIoTypeEx;
+ PFN_WDFDEVICEQUERYPROPERTYEX
pfnWdfDeviceQueryPropertyEx;
+ PFN_WDFDEVICEALLOCANDQUERYPROPERTYEX
pfnWdfDeviceAllocAndQueryPropertyEx;
+ PFN_WDFDEVICEASSIGNPROPERTY
pfnWdfDeviceAssignProperty;
+ PFN_WDFFDOINITQUERYPROPERTYEX
pfnWdfFdoInitQueryPropertyEx;
+ PFN_WDFFDOINITALLOCANDQUERYPROPERTYEX
pfnWdfFdoInitAllocAndQueryPropertyEx;
+ PFN_WDFDEVICESTOPIDLEACTUAL
pfnWdfDeviceStopIdleActual;
+ PFN_WDFDEVICERESUMEIDLEACTUAL
pfnWdfDeviceResumeIdleActual;
+ PFN_WDFDEVICEGETSELFIOTARGET
pfnWdfDeviceGetSelfIoTarget;
+ PFN_WDFDEVICEINITALLOWSELFIOTARGET
pfnWdfDeviceInitAllowSelfIoTarget;
+ PFN_WDFIOTARGETSELFASSIGNDEFAULTIOQUEUE
pfnWdfIoTargetSelfAssignDefaultIoQueue;
+ PFN_WDFDEVICEOPENDEVICEMAPKEY
pfnWdfDeviceOpenDevicemapKey;
+
+} WDFFUNCTIONS, *PWDFFUNCTIONS;
+
+
+typedef struct _WDFVERSION {
+
+ ULONG Size;
+ ULONG FuncCount;
+ WDFFUNCTIONS Functions;
+
+} WDFVERSION, *PWDFVERSION;
+
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfChildListCreate)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PWDF_CHILD_LIST_CONFIG Config,
+ _In_opt_
+ PWDF_OBJECT_ATTRIBUTES ChildListAttributes,
+ _Out_
+ WDFCHILDLIST* ChildList
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+WDFDEVICE
+WDFEXPORT(WdfChildListGetDevice)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFCHILDLIST ChildList
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+WDFDEVICE
+WDFEXPORT(WdfChildListRetrievePdo)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFCHILDLIST ChildList,
+ _Inout_
+ PWDF_CHILD_RETRIEVE_INFO RetrieveInfo
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfChildListRetrieveAddressDescription)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFCHILDLIST ChildList,
+ _In_
+ PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription,
+ _Inout_
+ PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfChildListBeginScan)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFCHILDLIST ChildList
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfChildListEndScan)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFCHILDLIST ChildList
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfChildListBeginIteration)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFCHILDLIST ChildList,
+ _In_
+ PWDF_CHILD_LIST_ITERATOR Iterator
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfChildListRetrieveNextDevice)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFCHILDLIST ChildList,
+ _In_
+ PWDF_CHILD_LIST_ITERATOR Iterator,
+ _Out_
+ WDFDEVICE* Device,
+ _Inout_opt_
+ PWDF_CHILD_RETRIEVE_INFO Info
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfChildListEndIteration)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFCHILDLIST ChildList,
+ _In_
+ PWDF_CHILD_LIST_ITERATOR Iterator
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfChildListAddOrUpdateChildDescriptionAsPresent)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFCHILDLIST ChildList,
+ _In_
+ PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription,
+ _In_opt_
+ PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfChildListUpdateChildDescriptionAsMissing)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFCHILDLIST ChildList,
+ _In_
+ PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfChildListUpdateAllChildDescriptionsAsPresent)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFCHILDLIST ChildList
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+BOOLEAN
+WDFEXPORT(WdfChildListRequestChildEject)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFCHILDLIST ChildList,
+ _In_
+ PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfCollectionCreate)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_opt_
+ PWDF_OBJECT_ATTRIBUTES CollectionAttributes,
+ _Out_
+ WDFCOLLECTION* Collection
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+ULONG
+WDFEXPORT(WdfCollectionGetCount)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFCOLLECTION Collection
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfCollectionAdd)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFCOLLECTION Collection,
+ _In_
+ WDFOBJECT Object
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfCollectionRemove)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFCOLLECTION Collection,
+ _In_
+ WDFOBJECT Item
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfCollectionRemoveItem)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFCOLLECTION Collection,
+ _In_
+ ULONG Index
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+WDFOBJECT
+WDFEXPORT(WdfCollectionGetItem)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFCOLLECTION Collection,
+ _In_
+ ULONG Index
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+WDFOBJECT
+WDFEXPORT(WdfCollectionGetFirstItem)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFCOLLECTION Collection
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+WDFOBJECT
+WDFEXPORT(WdfCollectionGetLastItem)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFCOLLECTION Collection
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfCommonBufferCreate)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDMAENABLER DmaEnabler,
+ _In_
+ _When_(Length == 0, __drv_reportError(Length cannot be zero))
+ size_t Length,
+ _In_opt_
+ PWDF_OBJECT_ATTRIBUTES Attributes,
+ _Out_
+ WDFCOMMONBUFFER* CommonBuffer
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfCommonBufferCreateWithConfig)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDMAENABLER DmaEnabler,
+ _In_
+ _When_(Length == 0, __drv_reportError(Length cannot be zero))
+ size_t Length,
+ _In_
+ PWDF_COMMON_BUFFER_CONFIG Config,
+ _In_opt_
+ PWDF_OBJECT_ATTRIBUTES Attributes,
+ _Out_
+ WDFCOMMONBUFFER* CommonBuffer
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+PVOID
+WDFEXPORT(WdfCommonBufferGetAlignedVirtualAddress)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFCOMMONBUFFER CommonBuffer
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+PHYSICAL_ADDRESS
+WDFEXPORT(WdfCommonBufferGetAlignedLogicalAddress)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFCOMMONBUFFER CommonBuffer
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+size_t
+WDFEXPORT(WdfCommonBufferGetLength)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFCOMMONBUFFER CommonBuffer
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+PWDFDEVICE_INIT
+WDFEXPORT(WdfControlDeviceInitAllocate)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDRIVER Driver,
+ _In_
+ CONST UNICODE_STRING* SDDLString
+ );
+
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfControlDeviceInitSetShutdownNotification)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit,
+ _In_
+ PFN_WDF_DEVICE_SHUTDOWN_NOTIFICATION Notification,
+ _In_
+ UCHAR Flags
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfControlFinishInitializing)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+PWDFCXDEVICE_INIT
+WDFEXPORT(WdfCxDeviceInitAllocate)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfCxDeviceInitAssignWdmIrpPreprocessCallback)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFCXDEVICE_INIT CxDeviceInit,
+ _In_
+ PFN_WDFCXDEVICE_WDM_IRP_PREPROCESS EvtCxDeviceWdmIrpPreprocess,
+ _In_
+ UCHAR MajorFunction,
+ _When_(NumMinorFunctions > 0, _In_reads_bytes_(NumMinorFunctions))
+ _When_(NumMinorFunctions == 0, _In_opt_)
+ PUCHAR MinorFunctions,
+ _In_
+ ULONG NumMinorFunctions
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfCxDeviceInitSetIoInCallerContextCallback)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFCXDEVICE_INIT CxDeviceInit,
+ _In_
+ PFN_WDF_IO_IN_CALLER_CONTEXT EvtIoInCallerContext
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfCxDeviceInitSetRequestAttributes)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFCXDEVICE_INIT CxDeviceInit,
+ _In_
+ PWDF_OBJECT_ATTRIBUTES RequestAttributes
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfCxDeviceInitSetFileObjectConfig)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFCXDEVICE_INIT CxDeviceInit,
+ _In_
+ PWDFCX_FILEOBJECT_CONFIG CxFileObjectConfig,
+ _In_opt_
+ PWDF_OBJECT_ATTRIBUTES FileObjectAttributes
+ );
+
+WDFAPI
+VOID
+WDFEXPORT(WdfCxVerifierKeBugCheck)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_opt_
+ WDFOBJECT Object,
+ _In_
+ ULONG BugCheckCode,
+ _In_
+ ULONG_PTR BugCheckParameter1,
+ _In_
+ ULONG_PTR BugCheckParameter2,
+ _In_
+ ULONG_PTR BugCheckParameter3,
+ _In_
+ ULONG_PTR BugCheckParameter4
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceGetDeviceState)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _Out_
+ PWDF_DEVICE_STATE DeviceState
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceSetDeviceState)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PWDF_DEVICE_STATE DeviceState
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+WDFDEVICE
+WDFEXPORT(WdfWdmDeviceGetWdfDeviceHandle)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PDEVICE_OBJECT DeviceObject
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+PDEVICE_OBJECT
+WDFEXPORT(WdfDeviceWdmGetDeviceObject)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+PDEVICE_OBJECT
+WDFEXPORT(WdfDeviceWdmGetAttachedDevice)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+PDEVICE_OBJECT
+WDFEXPORT(WdfDeviceWdmGetPhysicalDevice)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceWdmDispatchPreprocessedIrp)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PIRP Irp
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceWdmDispatchIrp)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PIRP Irp,
+ _In_
+ WDFCONTEXT DispatchContext
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceWdmDispatchIrpToIoQueue)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PIRP Irp,
+ _In_
+ WDFQUEUE Queue,
+ _In_
+ ULONG Flags
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceAddDependentUsageDeviceObject)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PDEVICE_OBJECT DependentDevice
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceRemoveDependentUsageDeviceObject)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PDEVICE_OBJECT DependentDevice
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceAddRemovalRelationsPhysicalDevice)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PDEVICE_OBJECT PhysicalDevice
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceRemoveRemovalRelationsPhysicalDevice)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PDEVICE_OBJECT PhysicalDevice
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceClearRemovalRelationsDevices)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+WDFDRIVER
+WDFEXPORT(WdfDeviceGetDriver)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceRetrieveDeviceName)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ WDFSTRING String
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceAssignMofResourceName)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PCUNICODE_STRING MofResourceName
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+WDFIOTARGET
+WDFEXPORT(WdfDeviceGetIoTarget)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+WDF_DEVICE_PNP_STATE
+WDFEXPORT(WdfDeviceGetDevicePnpState)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+WDF_DEVICE_POWER_STATE
+WDFEXPORT(WdfDeviceGetDevicePowerState)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+WDF_DEVICE_POWER_POLICY_STATE
+WDFEXPORT(WdfDeviceGetDevicePowerPolicyState)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceAssignS0IdleSettings)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS Settings
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceAssignSxWakeSettings)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PWDF_DEVICE_POWER_POLICY_WAKE_SETTINGS Settings
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceOpenRegistryKey)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ ULONG DeviceInstanceKeyType,
+ _In_
+ ACCESS_MASK DesiredAccess,
+ _In_opt_
+ PWDF_OBJECT_ATTRIBUTES KeyAttributes,
+ _Out_
+ WDFKEY* Key
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceOpenDevicemapKey)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PCUNICODE_STRING KeyName,
+ _In_
+ ACCESS_MASK DesiredAccess,
+ _In_opt_
+ PWDF_OBJECT_ATTRIBUTES KeyAttributes,
+ _Out_
+ WDFKEY* Key
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceSetSpecialFileSupport)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ WDF_SPECIAL_FILE_TYPE FileType,
+ _In_
+ BOOLEAN FileTypeIsSupported
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceSetCharacteristics)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ ULONG DeviceCharacteristics
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+ULONG
+WDFEXPORT(WdfDeviceGetCharacteristics)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+ULONG
+WDFEXPORT(WdfDeviceGetAlignmentRequirement)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceSetAlignmentRequirement)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ ULONG AlignmentRequirement
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceInitFree)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceInitSetPnpPowerEventCallbacks)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit,
+ _In_
+ PWDF_PNPPOWER_EVENT_CALLBACKS PnpPowerEventCallbacks
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceInitSetPowerPolicyEventCallbacks)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit,
+ _In_
+ PWDF_POWER_POLICY_EVENT_CALLBACKS PowerPolicyEventCallbacks
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceInitSetPowerPolicyOwnership)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit,
+ _In_
+ BOOLEAN IsPowerPolicyOwner
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceInitRegisterPnpStateChangeCallback)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit,
+ _In_
+ WDF_DEVICE_PNP_STATE PnpState,
+ _In_
+ PFN_WDF_DEVICE_PNP_STATE_CHANGE_NOTIFICATION EvtDevicePnpStateChange,
+ _In_
+ ULONG CallbackTypes
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceInitRegisterPowerStateChangeCallback)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit,
+ _In_
+ WDF_DEVICE_POWER_STATE PowerState,
+ _In_
+ PFN_WDF_DEVICE_POWER_STATE_CHANGE_NOTIFICATION EvtDevicePowerStateChange,
+ _In_
+ ULONG CallbackTypes
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceInitRegisterPowerPolicyStateChangeCallback)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit,
+ _In_
+ WDF_DEVICE_POWER_POLICY_STATE PowerPolicyState,
+ _In_
+ PFN_WDF_DEVICE_POWER_POLICY_STATE_CHANGE_NOTIFICATION
EvtDevicePowerPolicyStateChange,
+ _In_
+ ULONG CallbackTypes
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceInitSetExclusive)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit,
+ _In_
+ BOOLEAN IsExclusive
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceInitSetIoType)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit,
+ _In_
+ WDF_DEVICE_IO_TYPE IoType
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceInitSetPowerNotPageable)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceInitSetPowerPageable)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceInitSetPowerInrush)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceInitSetDeviceType)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit,
+ _In_
+ DEVICE_TYPE DeviceType
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceInitAssignName)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit,
+ _In_opt_
+ PCUNICODE_STRING DeviceName
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceInitAssignSDDLString)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit,
+ _In_opt_
+ PCUNICODE_STRING SDDLString
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceInitSetDeviceClass)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit,
+ _In_
+ CONST GUID* DeviceClassGuid
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceInitSetCharacteristics)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit,
+ _In_
+ ULONG DeviceCharacteristics,
+ _In_
+ BOOLEAN OrInValues
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceInitSetFileObjectConfig)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit,
+ _In_
+ PWDF_FILEOBJECT_CONFIG FileObjectConfig,
+ _In_opt_
+ PWDF_OBJECT_ATTRIBUTES FileObjectAttributes
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceInitSetRequestAttributes)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit,
+ _In_
+ PWDF_OBJECT_ATTRIBUTES RequestAttributes
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceInitAssignWdmIrpPreprocessCallback)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit,
+ _In_
+ PFN_WDFDEVICE_WDM_IRP_PREPROCESS EvtDeviceWdmIrpPreprocess,
+ _In_
+ UCHAR MajorFunction,
+ _When_(NumMinorFunctions > 0, _In_reads_bytes_(NumMinorFunctions))
+ _When_(NumMinorFunctions == 0, _In_opt_)
+ PUCHAR MinorFunctions,
+ _In_
+ ULONG NumMinorFunctions
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceInitSetIoInCallerContextCallback)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit,
+ _In_
+ PFN_WDF_IO_IN_CALLER_CONTEXT EvtIoInCallerContext
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceInitSetRemoveLockOptions)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit,
+ _In_
+ PWDF_REMOVE_LOCK_OPTIONS Options
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceCreate)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _Inout_
+ PWDFDEVICE_INIT* DeviceInit,
+ _In_opt_
+ PWDF_OBJECT_ATTRIBUTES DeviceAttributes,
+ _Out_
+ WDFDEVICE* Device
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceSetStaticStopRemove)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ BOOLEAN Stoppable
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceCreateDeviceInterface)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ CONST GUID* InterfaceClassGUID,
+ _In_opt_
+ PCUNICODE_STRING ReferenceString
+ );
+
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceSetDeviceInterfaceState)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ CONST GUID* InterfaceClassGUID,
+ _In_opt_
+ PCUNICODE_STRING ReferenceString,
+ _In_
+ BOOLEAN IsInterfaceEnabled
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceRetrieveDeviceInterfaceString)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ CONST GUID* InterfaceClassGUID,
+ _In_opt_
+ PCUNICODE_STRING ReferenceString,
+ _In_
+ WDFSTRING String
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceCreateSymbolicLink)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PCUNICODE_STRING SymbolicLinkName
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceQueryProperty)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ DEVICE_REGISTRY_PROPERTY DeviceProperty,
+ _In_
+ ULONG BufferLength,
+ _Out_writes_bytes_all_(BufferLength)
+ PVOID PropertyBuffer,
+ _Out_
+ PULONG ResultLength
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceAllocAndQueryProperty)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ DEVICE_REGISTRY_PROPERTY DeviceProperty,
+ _In_
+ _Strict_type_match_
+ POOL_TYPE PoolType,
+ _In_opt_
+ PWDF_OBJECT_ATTRIBUTES PropertyMemoryAttributes,
+ _Out_
+ WDFMEMORY* PropertyMemory
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceSetPnpCapabilities)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PWDF_DEVICE_PNP_CAPABILITIES PnpCapabilities
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceSetPowerCapabilities)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PWDF_DEVICE_POWER_CAPABILITIES PowerCapabilities
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceSetBusInformationForChildren)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PPNP_BUS_INFORMATION BusInformation
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceIndicateWakeStatus)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ NTSTATUS WaitWakeStatus
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceSetFailed)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ WDF_DEVICE_FAILED_ACTION FailedAction
+ );
+
+_Must_inspect_result_
+_When_(WaitForD0 == 0, _IRQL_requires_max_(DISPATCH_LEVEL))
+_When_(WaitForD0 != 0, _IRQL_requires_max_(PASSIVE_LEVEL))
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceStopIdleNoTrack)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ BOOLEAN WaitForD0
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceResumeIdleNoTrack)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device
+ );
+
+_Must_inspect_result_
+_When_(WaitForD0 == 0, _IRQL_requires_max_(DISPATCH_LEVEL))
+_When_(WaitForD0 != 0, _IRQL_requires_max_(PASSIVE_LEVEL))
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceStopIdleActual)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ BOOLEAN WaitForD0,
+ _In_opt_
+ PVOID Tag,
+ _In_
+ LONG Line,
+ _In_z_
+ PCHAR File
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceResumeIdleActual)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_opt_
+ PVOID Tag,
+ _In_
+ LONG Line,
+ _In_z_
+ PCHAR File
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+WDFFILEOBJECT
+WDFEXPORT(WdfDeviceGetFileObject)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PFILE_OBJECT FileObject
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceEnqueueRequest)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ WDFREQUEST Request
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+WDFQUEUE
+WDFEXPORT(WdfDeviceGetDefaultQueue)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceConfigureRequestDispatching)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ WDFQUEUE Queue,
+ _In_
+ _Strict_type_match_
+ WDF_REQUEST_TYPE RequestType
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceConfigureWdmIrpDispatchCallback)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_opt_
+ WDFDRIVER Driver,
+ _In_
+ UCHAR MajorFunction,
+ _In_
+ PFN_WDFDEVICE_WDM_IRP_DISPATCH EvtDeviceWdmIrpDisptach,
+ _In_opt_
+ WDFCONTEXT DriverContext
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+POWER_ACTION
+WDFEXPORT(WdfDeviceGetSystemPowerAction)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceWdmAssignPowerFrameworkSettings)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PWDF_POWER_FRAMEWORK_SETTINGS PowerFrameworkSettings
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceInitSetReleaseHardwareOrderOnFailure)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit,
+ _In_
+ WDF_RELEASE_HARDWARE_ORDER_ON_FAILURE ReleaseHardwareOrderOnFailure
+ );
+
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceInitSetIoTypeEx)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit,
+ _In_
+ PWDF_IO_TYPE_CONFIG IoTypeConfig
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(APC_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceQueryPropertyEx)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PWDF_DEVICE_PROPERTY_DATA DeviceProperty,
+ _In_
+ ULONG BufferLength,
+ _Out_
+ PVOID PropertyBuffer,
+ _Out_
+ PULONG RequiredSize,
+ _Out_
+ PDEVPROPTYPE Type
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(APC_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceAllocAndQueryPropertyEx)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PWDF_DEVICE_PROPERTY_DATA DeviceProperty,
+ _In_
+ _Strict_type_match_
+ POOL_TYPE PoolType,
+ _In_opt_
+ PWDF_OBJECT_ATTRIBUTES PropertyMemoryAttributes,
+ _Out_
+ WDFMEMORY* PropertyMemory,
+ _Out_
+ PDEVPROPTYPE Type
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(APC_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDeviceAssignProperty)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PWDF_DEVICE_PROPERTY_DATA DeviceProperty,
+ _In_
+ DEVPROPTYPE Type,
+ _In_
+ ULONG Size,
+ _In_opt_
+ PVOID Data
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+WDFIOTARGET
+WDFEXPORT(WdfDeviceGetSelfIoTarget)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+VOID
+WDFEXPORT(WdfDeviceInitAllowSelfIoTarget)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ PWDFDEVICE_INIT DeviceInit
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDmaEnablerCreate)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDEVICE Device,
+ _In_
+ PWDF_DMA_ENABLER_CONFIG Config,
+ _In_opt_
+ PWDF_OBJECT_ATTRIBUTES Attributes,
+ _Out_
+ WDFDMAENABLER* DmaEnablerHandle
+ );
+
+_Must_inspect_result_
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+NTSTATUS
+WDFEXPORT(WdfDmaEnablerConfigureSystemProfile)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDMAENABLER DmaEnabler,
+ _In_
+ PWDF_DMA_SYSTEM_PROFILE_CONFIG ProfileConfig,
+ _In_
+ WDF_DMA_DIRECTION ConfigDirection
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+size_t
+WDFEXPORT(WdfDmaEnablerGetMaximumLength)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDMAENABLER DmaEnabler
+ );
+
+_IRQL_requires_max_(DISPATCH_LEVEL)
+WDFAPI
+size_t
+WDFEXPORT(WdfDmaEnablerGetMaximumScatterGatherElements)(
+ _In_
+ PWDF_DRIVER_GLOBALS DriverGlobals,
+ _In_
+ WDFDMAENABLER DmaEnabler
+ );
+
+_IRQL_requires_max_(PASSIVE_LEVEL)
+WDFAPI
+VOID
... 283438 lines suppressed ...