ReactOS 0.4.15-dev-8058-ga7cbb60
fxdeviceapikm.cpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 FxDeviceApiKm.cpp
8
9Abstract:
10
11 This module exposes the "C" interface to the FxDevice object.
12
13Author:
14
15
16
17Environment:
18
19 Kernel mode only
20
21Revision History:
22
23--*/
24
25#include "coreprivshared.hpp"
26#include "fxiotarget.hpp"
27
28extern "C" {
29// #include "FxDeviceApiKm.tmh"
30}
31
32//
33// extern "C" the entire file
34//
35extern "C" {
36
37//
38// Verifier Functions
39//
40// Do not specify argument names
42VOID,
47 );
48
49// Do not specify argument names
54 _In_ MdIrp,
57 );
58
60WDFDEVICE
62WDFEXPORT(WdfWdmDeviceGetWdfDeviceHandle)(
63 __in
65 __in
67 )
68{
70
72}
73
77WDFEXPORT(WdfDeviceWdmGetDeviceObject)(
78 __in
80 __in
81 WDFDEVICE Device
82 )
83{
85
87 Device,
89 (PVOID*) &pDevice);
90
92}
93
97WDFEXPORT(WdfDeviceWdmGetAttachedDevice)(
98 __in
100 __in
101 WDFDEVICE Device
102 )
103{
105
107 Device,
109 (PVOID*) &pDevice);
110
112}
113
114
118WDFEXPORT(WdfDeviceWdmGetPhysicalDevice)(
119 __in
121 __in
122 WDFDEVICE Device
123 )
124{
126
128 Device,
130 (PVOID*) &pDevice);
131
133}
134
136WDFFILEOBJECT
138WDFEXPORT(WdfDeviceGetFileObject)(
139 __in
141 __in
142 WDFDEVICE Device,
143 __in
145 )
146/*++
147
148Routine Description:
149
150 This functions returns the WDFFILEOBJECT corresponding to the WDM fileobject.
151
152Arguments:
153
154 Device - Handle to the device to which the WDM fileobject is related to.
155
156 FileObject - WDM FILE_OBJECT structure.
157
158Return Value:
159
160--*/
161
162{
167
169
170
171
172
173
174
175 pFxFO = NULL;
176
177 //
178 // Validate the Device object handle, and get its FxDevice*
179 //
181 Device,
183 (PVOID*)&pDevice);
184
185 //
186 // Call the static GetFileObjectFromWdm function. This will return an error if the
187 // WDM fileObject is NULL and the device is not exclusive or the device is
188 // configured to have a WDFFILEOBJECT for every open handle.
189 //
191 pDevice,
194 &pFxFO
195 );
196
200 "FxFileObject::_GetFileObjectFromWdm returned an error %!STATUS!",
201 status);
202 return NULL;
203 }
204
205 //
206 // pFxFO can be NULL if the device is configured with FileObjectClass WdfFileObjectNotRequired.
207 //
208 return pFxFO != NULL ? pFxFO->GetHandle() : NULL;
209}
210
215WDFEXPORT(WdfDeviceWdmDispatchPreprocessedIrp)(
216 __in
218 __in
219 WDFDEVICE Device,
220 __in
222 )
223{
226
228 Device,
230 (PVOID*) &device,
232
234
235 //
236 // Verifier checks.
237 // This API can only be called by the client driver, Cx must call
238 // WdfDeviceWdmDispatchIrp from its preprocess callback.
239 // Also, Cx must register for a Preprocessor routine using
240 // WdfCxDeviceInitAssignWdmIrpPreprocessCallback.
241 //
243 if (device->IsCxInIoPath()) {
245
246 if (IsListEmpty(&device->m_PreprocessInfoListHead) ||
247 device->IsCxDriverInIoPath(driver)) {
248
251 "This API can only be called by client driver from its "
252 "pre-process IRP callback, STATUS_INVALID_DEVICE_REQUEST");
254 }
255 }
256 }
257
258 //
259 // OK, ready to dispatch IRP.
260 //
261 return device->DispatchPreprocessedIrp(
262 Irp,
263 device->m_PreprocessInfoListHead.Flink->Flink);
264}
265
266VOID
268 _In_ PFX_DRIVER_GLOBALS FxDriverGlobals,
272 )
273{
274 UNREFERENCED_PARAMETER(FxDriverGlobals);
279
281
285 &device->m_PreprocessInfoListHead ? TRUE : FALSE;
286 //
287 // Driver should be a cx.
288 //
289 if (device->IsCxDriverInIoPath(driver) == FALSE) {
292 device->GetDriverGlobals(), TRACE_LEVEL_ERROR, TRACINGIO,
293 "This API can only be called by wdf extension driver "
294 "from its pre-process IRP callback, %!STATUS!",
295 status);
296 FxVerifierDbgBreakPoint(device->GetDriverGlobals());
297 }
298
299 //
300 // Validate DispatchContext.
301 //
302
303 for (next = device->m_PreprocessInfoListHead.Flink;
304 next != &device->m_PreprocessInfoListHead;
305 next = next->Flink) {
307 ctxValid = TRUE;
308 break;
309 }
310 }
311
312 if (FALSE == ctxValid) {
315 device->GetDriverGlobals(), TRACE_LEVEL_ERROR, TRACINGIO,
316 "DispatchContext 0x%p is invalid, %!STATUS!",
318 FxVerifierDbgBreakPoint(device->GetDriverGlobals());
319 }
320}
321
326WDFEXPORT(WdfDeviceWdmDispatchIrp)(
327 __in
329 __in
330 WDFDEVICE Device,
331 __in
332 MdIrp Irp,
333 __in
335 )
336
337/*++
338
339Routine Description:
340
341 Client driver calls this API from its dispatch callback when it decides to hand the IRP
342 back to framework.
343
344 Cx calls this API from (a) its pre-process callback or (b) its dispatch callback when
345 it decides to hand the IRP back to the framework.
346
347Arguments:
348 Device - WDF Device handle.
349
350 IRP - WDM request.
351
352 DispatchContext - WDF's context (input arg to callback).
353
354Returns:
355 IRP's status.
356
357--*/
358
359{
362
364 Device,
366 (PVOID*) &device);
367
368 FxPointerNotNull(device->GetDriverGlobals(), Irp);
370
372 //
373 // Called from a dispach irp callback.
374 //
376 (WDFCONTEXT)((ULONG_PTR)DispatchContext & ~FX_IN_DISPATCH_CALLBACK);
377
378 //
379 // DispatchContext is validated by DispatchStep1.
380 //
381 status = device->m_PkgIo->DispatchStep1(Irp, DispatchContext);
382 }
383 else {
384 //
385 // Called from a pre-process irp callback.
386 //
387
388 //
389 // Verifier checks.
390 //
391 VerifyWdfDeviceWdmDispatchIrp(device->GetDriverGlobals(),
393 device,
395
396 status = device->DispatchPreprocessedIrp(Irp, DispatchContext);
397 }
398
399 return status;
400}
401
406WDFEXPORT(WdfDeviceWdmDispatchIrpToIoQueue)(
407 __in
409 __in
410 WDFDEVICE Device,
411 __in
412 MdIrp Irp,
413 __in
414 WDFQUEUE Queue,
415 __in
417 )
418{
425
428
430 Device,
432 (PVOID*) &device);
433
434 fxDriverGlobals = device->GetDriverGlobals();
436
438 Queue,
440 (PVOID*)&queue);
441
443
444 //
445 // If the caller is a preprocess routine, the contract for this DDI is just like IoCallDriver.
446 // The caller sets up their stack location and then the DDI advances to the next stack
447 // location. This means that the caller either has to call IoSkipCurrentIrpStackLocation
448 // or IoCopyCurrentIrpStackLocationToNext before calling this DDI.
449 //
452 }
453
454 //
455 // Verifier checks.
456 //
458 device,
459 Irp,
460 queue,
461 Flags);
462 if(!NT_SUCCESS(status)) {
463 Irp->IoStatus.Status = status;
464 Irp->IoStatus.Information = 0;
466
467 return status;
468 }
469
470 //
471 // Adjust stack if IRP needs to be forwarded to parent device.
472 //
473 if (device->m_ParentDevice == queue->GetDevice()) {
476
477 //
478 // From now on use new device.
479 //
480 device = device->m_ParentDevice;
481
482 //
483 // Save a pointer to the device object for this request so that it can
484 // be used later in completion.
485 //
487 stack->DeviceObject = device->GetDeviceObject();
488 }
489
490 //
491 // Get in-context caller callback if required.
492 //
494 ioInCallerCtx = device->m_PkgIo->GetIoInCallerContextCallback(
495 queue->GetCxDeviceInfo());
496 }
497
498 //
499 // DispatchStep2 will convert the IRP into a WDFREQUEST, queue it and if
500 // possible dispatch the request to the driver.
501 //
502 return device->m_PkgIo->DispatchStep2(Irp, ioInCallerCtx, queue);
503}
504
509WDFEXPORT(WdfDeviceAddDependentUsageDeviceObject)(
510 __in
512 __in
513 WDFDEVICE Device,
514 __in
516 )
517{
520
522 Device,
524 (PVOID *) &pDevice,
526
528
530}
531
533VOID
535WDFEXPORT(WdfDeviceRemoveDependentUsageDeviceObject)(
536 __in
538 __in
539 WDFDEVICE Device,
540 __in
542 )
543{
546
548 Device,
550 (PVOID *) &pDevice,
552
554
556}
557
562WDFEXPORT(WdfDeviceAssignMofResourceName)(
563 __in
565 __in
566 WDFDEVICE Device,
567 __in
569 )
570{
574
576 Device,
578 (PVOID *) &pDevice,
580
582
584 if (!NT_SUCCESS(status)) {
585 return status;
586 }
587
589 if (!NT_SUCCESS(status)) {
590 return status;
591 }
592
595
598 "WDFDEVICE %p MofResourceName already assigned, %!STATUS!",
599 Device, status);
600
601 return status;
602 }
603
607
608 if (!NT_SUCCESS(status)) {
611 "WDFDEVICE %p couldn't creat duplicate buffer, %!STATUS!",
612 Device, status);
613 }
614
615 return status;
616}
617
619VOID
621WDFEXPORT(WdfDeviceSetSpecialFileSupport)(
622 __in
624 __in
625 WDFDEVICE Device,
626 __in
628 __in
630 )
631{
634
636 Device,
638 (PVOID *) &pDevice,
640
641 if (FileType < WdfSpecialFilePaging || FileType >= WdfSpecialFileMax) {
644 "WDFDEVICE 0x%p FileType %d specified is not in valid range",
647 return;
648 }
649
651 Device,
653 (PVOID*) &pDevice);
654
656}
657
662WDFEXPORT(WdfDeviceIndicateWakeStatus)(
663 __in
665 __in
666 WDFDEVICE Device,
667 __in
669 )
670{
674
676 Device,
678 (PVOID *) &pDevice,
680
681 if (Device == NULL ||
684 "NULL WDFDEVICE handle %p or invalid %!STATUS!",
687 }
688
692 }
693 else {
694 //
695 // There was no request to complete
696 //
698 "WDFDEVICE 0x%p No request to complete"
699 " STATUS_INVALID_DEVICE_REQUEST",
700 Device);
701
703 }
704 }
705 else {
706 //
707 // We cannot complete what we do not own
708 //
710 "WDFDEVICE 0x%p Not the waitwake owner"
711 " STATUS_INVALID_DEVICE_STATE",
712 Device);
713
715 }
716
717 return status;
718}
719
721VOID
723WDFEXPORT(WdfDeviceSetBusInformationForChildren)(
724 __in
726 __in
727 WDFDEVICE Device,
728 __in
730 )
731{
733
735 Device,
737 (PVOID*) &pDevice);
738
740
742}
743
748WDFEXPORT(WdfDeviceAddRemovalRelationsPhysicalDevice)(
749 __in
751 __in
752 WDFDEVICE Device,
753 __in
755 )
756/*++
757
758Routine Description:
759 Registers a PDO from another non descendant (not verifiable though) pnp
760 stack to be reported as also requiring removal when this PDO is removed.
761
762 The PDO could be another device enumerated by this driver.
763
764Arguments:
765 Device - this driver's PDO
766
767 PhysicalDevice - PDO for another stack
768
769Return Value:
770 NTSTATUS
771
772 --*/
773{
775
777 Device,
779 (PVOID*) &pDevice);
780
782
784}
785
787VOID
789WDFEXPORT(WdfDeviceRemoveRemovalRelationsPhysicalDevice)(
790 __in
792 __in
793 WDFDEVICE Device,
794 __in
796 )
797/*++
798
799Routine Description:
800 Deregisters a PDO from another non descendant (not verifiable though) pnp
801 stack to not be reported as also requiring removal when this PDO is removed.
802
803 The PDO could be another device enumerated by this driver.
804
805Arguments:
806 Device - this driver's PDO
807
808 PhysicalDevice - PDO for another stack
809
810Return Value:
811 None
812
813 --*/
814{
816
818 Device,
820 (PVOID*) &pDevice);
821
823
825}
826
828VOID
830WDFEXPORT(WdfDeviceClearRemovalRelationsDevices)(
831 __in
833 __in
834 WDFDEVICE Device
835 )
836/*++
837
838Routine Description:
839 Deregisters all PDOs to not be reported as also requiring removal when this
840 PDO is removed.
841
842Arguments:
843 Device - this driver's PDO
844
845Return Value:
846 None
847
848 --*/
849{
851
853 Device,
855 (PVOID*) &pDevice);
856
858}
859
864WDFEXPORT(WdfDeviceWdmAssignPowerFrameworkSettings)(
865 __in
867 __in
868 WDFDEVICE Device,
869 __in
871 )
872/*++
873
874Routine Description:
875 The DDI is invoked by KMDF client drivers for single-component devices to
876 specify their power framework settings to KMDF. KMDF uses these settings on
877 Win8+ when registering with the power framework.
878
879 On Win7 and older operating systems the power framework is not available, so
880 KMDF does nothing.
881
882Arguments:
883
884 Device - Handle to the framework device object for which power framework
885 settings are being specified.
886
887 PowerFrameworkSettings - Pointer to a WDF_POWER_FRAMEWORK_SETTINGS structure
888 that contains the client driver's power framework settings.
889
890Return Value:
891 An NTSTATUS value that denotes success or failure of the DDI
892
893--*/
894{
898
899 //
900 // Validate the Device object handle and get its FxDevice. Also get the
901 // driver globals pointer.
902 //
904 Device,
906 (PVOID *) &pDevice,
908
910
911 //
912 // Only power policy owners should call this DDI
913 //
918 "WDFDEVICE 0x%p is not the power policy owner, so the caller cannot"
919 " assign power framework settings %!STATUS!", Device, status);
921 return status;
922 }
923
924 //
925 // Validate the Settings parameter
926 //
931 "WDFDEVICE 0x%p Expected PowerFrameworkSettings size %d, actual %d,"
932 " %!STATUS!",
933 Device,
936 status);
938 return status;
939 }
940
941 //
942 // If settings for component 0 are specified, make sure it contains at least
943 // one F-state.
944 //
945 if (NULL != PowerFrameworkSettings->Component) {
946
947 if (0 == PowerFrameworkSettings->Component->IdleStateCount) {
951 "WDFDEVICE 0x%p Component settings are specified but "
952 "IdleStateCount is 0. %!STATUS!", Device, status);
954 return status;
955 }
956
957 if (NULL == PowerFrameworkSettings->Component->IdleStates) {
961 "WDFDEVICE 0x%p Component settings are specified but IdleStates"
962 " is NULL. %!STATUS!", Device, status);
964 return status;
965 }
966 }
967
968 //
969 // Assign the driver's settings
970 //
973
974 return status;
975}
976
977} // extern "C"
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
MdDeviceObject __inline GetPhysicalDevice(VOID)
Definition: fxdevice.hpp:228
WDFDEVICE __inline GetHandle(VOID)
Definition: fxdevice.hpp:237
MdDeviceObject __inline GetAttachedDevice(VOID)
Definition: fxdevice.hpp:210
MdDeviceObject __inline GetDeviceObject(VOID)
Definition: fxdevice.hpp:174
static FxDevice * GetFxDevice(__in MdDeviceObject DeviceObject)
Definition: fxdeviceum.cpp:60
FxPkgPnp * m_PkgPnp
Definition: fxdevice.hpp:670
UNICODE_STRING m_MofResourceName
Definition: fxdevice.hpp:585
__inline WDF_FILEOBJECT_CLASS GetFileObjectClass(VOID)
Definition: fxdevice.hpp:1123
static _Must_inspect_result_ NTSTATUS _GetFileObjectFromWdm(__in FxDevice *pDevice, __in WDF_FILEOBJECT_CLASS FileObjectClass, __in_opt MdFileObject pWdmFileObject, __deref_out_opt FxFileObject **ppFxFileObject)
__inline WDFFILEOBJECT GetHandle(VOID)
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
VOID RemoveUsageDevice(__in MdDeviceObject DependentDevice)
Definition: fxpkgpnp.cpp:4742
BOOLEAN IsPowerPolicyOwner(VOID)
Definition: fxpkgpnp.hpp:3612
_Must_inspect_result_ NTSTATUS AddUsageDevice(__in MdDeviceObject DependentDevice)
Definition: fxpkgpnp.cpp:4685
VOID SetSpecialFileSupport(__in WDF_SPECIAL_FILE_TYPE FileType, __in BOOLEAN Supported)
Definition: fxpkgpnp.cpp:1307
_Must_inspect_result_ NTSTATUS AddRemovalDevice(__in MdDeviceObject DependentDevice)
Definition: fxpkgpnp.cpp:4753
BOOLEAN PowerIndicateWaitWakeStatus(__in NTSTATUS WaitWakeStatus)
SharedPowerData m_SharedPower
Definition: fxpkgpnp.hpp:4161
VOID RemoveRemovalDevice(__in MdDeviceObject DependentDevice)
Definition: fxpkgpnp.cpp:4816
NTSTATUS AssignPowerFrameworkSettings(__in PWDF_POWER_FRAMEWORK_SETTINGS PowerFrameworkSettings)
Definition: fxpkgpnp.cpp:6243
VOID ClearRemovalDevicesList(VOID)
Definition: fxpkgpnp.cpp:4832
VOID SetChildBusInformation(__in PPNP_BUS_INFORMATION BusInformation)
Definition: fxpkgpnp.hpp:3468
Definition: _queue.h:67
Definition: _stack.h:55
_In_ PIRP Irp
Definition: csq.h:116
#define __in
Definition: dbghelp.h:35
#define TRACINGIO
Definition: dbgtrace.h:66
#define TRACINGDEVICE
Definition: dbgtrace.h:58
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define __drv_maxIRQL(irql)
Definition: driverspecs.h:291
#define IsListEmpty(ListHead)
Definition: env_spec_w32.h:954
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
_Must_inspect_result_ NTSTATUS FX_VF_FUNCTION() VerifyWdfDeviceWdmDispatchIrpToIoQueue(_In_ PFX_DRIVER_GLOBALS FxDriverGlobals, _In_ FxDevice *device, _In_ MdIrp Irp, _In_ FxIoQueue *queue, _In_ ULONG Flags)
PIO_STACK_LOCATION stack
__in WDFDEVICE __in PPNP_BUS_INFORMATION BusInformation
_Must_inspect_result_ __in WDFDEVICE __in MdIrp __in WDFQUEUE __in ULONG Flags
_Must_inspect_result_ __in WDFDEVICE __in PDEVICE_OBJECT PhysicalDevice
_Must_inspect_result_ __in WDFDEVICE __in MdIrp Irp
FxDevice * device
FxDevice * pDevice
_Must_inspect_result_ __in WDFDEVICE __in MdIrp __in WDFQUEUE Queue
__in PDEVICE_OBJECT DeviceObject
__in WDFDEVICE __in WDF_SPECIAL_FILE_TYPE FileType
FxObjectHandleGetPtr(GetFxDriverGlobals(DriverGlobals), Device, FX_TYPE_DEVICE_BASE,(PVOID *) &pDevice)
PFX_DRIVER_GLOBALS fxDriverGlobals
FX_TRACK_DRIVER(fxDriverGlobals)
_Must_inspect_result_ __in WDFDEVICE __in PDEVICE_OBJECT DependentDevice
_Must_inspect_result_ __in WDFDEVICE __in MdIrp __in WDFCONTEXT DispatchContext
__in WDFDEVICE Device
_Must_inspect_result_ __in WDFDEVICE __in NTSTATUS WaitWakeStatus
FxFileObject * pFxFO
NTSTATUS status
__in WDFDEVICE __in MdFileObject FileObject
FxObjectHandleGetPtrAndGlobals(GetFxDriverGlobals(DriverGlobals), Device, FX_TYPE_DEVICE,(PVOID *) &device, &fxDriverGlobals)
VOID FX_VF_FUNCTION() VerifyWdfDeviceWdmDispatchIrp(_In_ PFX_DRIVER_GLOBALS FxDriverGlobals, _In_ PWDF_DRIVER_GLOBALS DriverGlobals, _In_ FxDevice *device, _In_ WDFCONTEXT DispatchContext)
_Must_inspect_result_ __in WDFDEVICE __in PCUNICODE_STRING MofResourceName
FxIoInCallerContext * ioInCallerCtx
_Must_inspect_result_ __in WDFDEVICE __in PWDF_POWER_FRAMEWORK_SETTINGS PowerFrameworkSettings
__in WDFDEVICE __in WDF_SPECIAL_FILE_TYPE __in BOOLEAN Supported
pFxDriverGlobals
FxVerifierDbgBreakPoint(pFxDriverGlobals)
DriverGlobals
@ OkForDownLevel
Definition: fxglobals.h:80
__inline PFX_DRIVER_GLOBALS GetFxDriverGlobals(__in PWDF_DRIVER_GLOBALS DriverGlobals)
Definition: fxglobals.h:597
#define FX_DECLARE_VF_FUNCTION_P3(rt, fnName, at1, at2, at3)
Definition: fxmacros.hpp:132
#define FX_DECLARE_VF_FUNCTION_P4(rt, fnName, at1, at2, at3, at4)
Definition: fxmacros.hpp:151
#define FX_VF_FUNCTION(fnName)
Definition: fxmacros.hpp:47
#define WDFEXPORT(a)
Definition: fxmacros.hpp:157
#define FxPointerNotNull(FxDriverGlobals, Ptr)
Definition: fxmacros.hpp:253
BOOLEAN ctxValid
Definition: fxpkgio.cpp:129
#define FX_IN_DISPATCH_CALLBACK
Definition: fxpkgio.hpp:39
@ FX_TYPE_DEVICE
Definition: fxtypes.h:47
@ FX_TYPE_QUEUE
Definition: fxtypes.h:48
@ FX_TYPE_DEVICE_BASE
Definition: fxtypes.h:83
_Must_inspect_result_ NTSTATUS __inline FxValidateUnicodeString(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PCUNICODE_STRING String)
__inline NTSTATUS FxVerifierCheckIrqlLevel(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in KIRQL Irql)
Definition: fxverifier.h:158
if(dx< 0)
Definition: linetemp.h:194
#define _Must_inspect_result_
Definition: ms_sal.h:558
#define _In_
Definition: ms_sal.h:308
struct @1671::@1672 driver
PFILE_OBJECT MdFileObject
Definition: mxgeneralkm.h:32
IWudfIrp * MdIrp
Definition: mxum.h:103
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define IoCopyCurrentIrpStackLocationToNext(Irp)
Definition: ntifs_ex.h:413
#define IoCompleteRequest
Definition: irp.c:1240
#define STATUS_PENDING
Definition: ntstatus.h:82
static unsigned __int64 next
Definition: rand_nt.c:6
#define STATUS_SUCCESS
Definition: shellext.h:65
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
_Must_inspect_result_ NTSTATUS FxDuplicateUnicodeString(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in const UNICODE_STRING *Source, __out PUNICODE_STRING Destination)
Definition: stringutil.cpp:180
BOOLEAN m_WaitWakeOwner
Definition: fxpkgpnp.hpp:186
FxDriver * Driver
Definition: fxglobals.h:374
_Must_inspect_result_ BOOLEAN IsVerificationEnabled(__in ULONG Major, __in ULONG Minor, __in FxVerifierDownlevelOption DownLevel)
Definition: fxglobals.h:286
Definition: typedefs.h:120
Definition: devices.h:37
Definition: ps.c:97
struct _LIST_ENTRY * PLIST_ENTRY
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
#define STATUS_INVALID_DEVICE_REQUEST
Definition: udferr_usr.h:138
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define STATUS_INVALID_DEVICE_STATE
Definition: udferr_usr.h:178
#define STATUS_INFO_LENGTH_MISMATCH
Definition: udferr_usr.h:133
#define STATUS_CANCELLED
Definition: udferr_usr.h:170
#define STDCALL
Definition: wdf.h:45
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_In_ UCHAR _In_ UCHAR _In_ ULONG _In_ WDFCONTEXT _Inout_ PIRP _In_ WDFCONTEXT DispatchContext
Definition: wdfdevice.h:1708
enum _WDF_SPECIAL_FILE_TYPE WDF_SPECIAL_FILE_TYPE
@ WDF_DISPATCH_IRP_TO_IO_QUEUE_PREPROCESSED_IRP
Definition: wdfdevice.h:437
@ WDF_DISPATCH_IRP_TO_IO_QUEUE_INVOKE_INCALLERCTX_CALLBACK
Definition: wdfdevice.h:436
_Must_inspect_result_ _In_ WDFDEVICE _In_ PDEVICE_OBJECT PhysicalDevice
Definition: wdfdevice.h:2323
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:550
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING MofResourceName
Definition: wdfdevice.h:2464
@ WdfSpecialFileMax
Definition: wdfdevice.h:446
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
Definition: wdfdevice.h:2225
_In_ WDFDEVICE _In_ WDF_SPECIAL_FILE_TYPE FileType
Definition: wdfdevice.h:2741
_Must_inspect_result_ _In_ WDFDEVICE _In_ NTSTATUS WaitWakeStatus
Definition: wdfdevice.h:3945
_Must_inspect_result_ _In_ WDFDEVICE _In_ PDEVICE_OBJECT DependentDevice
Definition: wdfdevice.h:2263
_In_ WDFDEVICE _In_ PPNP_BUS_INFORMATION BusInformation
Definition: wdfdevice.h:3915
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_POWER_FRAMEWORK_SETTINGS PowerFrameworkSettings
Definition: wdfdevice.h:4335
PVOID WDFCONTEXT
Definition: wdftypes.h:94
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
FORCEINLINE VOID IoSetNextIrpStackLocation(_Inout_ PIRP Irp)
Definition: iofuncs.h:2680
#define IO_NO_INCREMENT
Definition: iotypes.h:598
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1417
unsigned char UCHAR
Definition: xmlstorage.h:181