ReactOS  0.4.15-dev-3331-g8ebe441
vfeventhooks.cpp File Reference
#include "vfpriv.hpp"
Include dependency graph for vfeventhooks.cpp:

Go to the source code of this file.

Functions

NTSTATUS VfEvtDeviceD0Entry (WDFDEVICE Device, WDF_POWER_DEVICE_STATE PreviousState)
 
NTSTATUS VfEvtDeviceD0EntryPostInterruptsEnabled (WDFDEVICE Device, WDF_POWER_DEVICE_STATE PreviousState)
 
NTSTATUS VfEvtDeviceD0Exit (WDFDEVICE Device, WDF_POWER_DEVICE_STATE TargetState)
 
NTSTATUS VfEvtDeviceD0ExitPreInterruptsDisabled (WDFDEVICE Device, WDF_POWER_DEVICE_STATE TargetState)
 
NTSTATUS VfEvtDevicePrepareHardware (WDFDEVICE Device, WDFCMRESLIST ResourcesRaw, WDFCMRESLIST ResourcesTranslated)
 
NTSTATUS VfEvtDeviceReleaseHardware (WDFDEVICE Device, WDFCMRESLIST ResourcesTranslated)
 
VOID VfEvtDeviceSelfManagedIoCleanup (WDFDEVICE Device)
 
VOID VfEvtDeviceSelfManagedIoFlush (WDFDEVICE Device)
 
NTSTATUS VfEvtDeviceSelfManagedIoInit (WDFDEVICE Device)
 
NTSTATUS VfEvtDeviceSelfManagedIoSuspend (WDFDEVICE Device)
 
NTSTATUS VfEvtDeviceSelfManagedIoRestart (WDFDEVICE Device)
 
NTSTATUS VfEvtDeviceQueryStop (WDFDEVICE Device)
 
NTSTATUS VfEvtDeviceQueryRemove (WDFDEVICE Device)
 
VOID VfEvtDeviceSurpriseRemoval (WDFDEVICE Device)
 
VOID VfEvtDeviceUsageNotification (WDFDEVICE Device, WDF_SPECIAL_FILE_TYPE NotificationType, BOOLEAN IsInNotificationPath)
 
NTSTATUS VfEvtDeviceUsageNotificationEx (WDFDEVICE Device, WDF_SPECIAL_FILE_TYPE NotificationType, BOOLEAN IsInNotificationPath)
 
VOID VfEvtDeviceRelationsQuery (WDFDEVICE Device, DEVICE_RELATION_TYPE RelationType)
 
VOID VfEvtIoDefault (WDFQUEUE Queue, WDFREQUEST Request)
 
VOID VfEvtIoStop (WDFQUEUE Queue, WDFREQUEST Request, ULONG ActionFlags)
 
VOID VfEvtIoResume (WDFQUEUE Queue, WDFREQUEST Request)
 
VOID VfEvtIoRead (WDFQUEUE Queue, WDFREQUEST Request, size_t Length)
 
VOID VfEvtIoWrite (WDFQUEUE Queue, WDFREQUEST Request, size_t Length)
 
VOID VfEvtIoDeviceControl (WDFQUEUE Queue, WDFREQUEST Request, size_t OutputBufferLength, size_t InputBufferLength, ULONG IoControlCode)
 
VOID VfEvtIoInternalDeviceControl (WDFQUEUE Queue, WDFREQUEST Request, size_t OutputBufferLength, size_t InputBufferLength, ULONG IoControlCode)
 
VOID VfEvtIoCanceledOnQueue (WDFQUEUE Queue, WDFREQUEST Request)
 

Variables

WDFVERSION WdfVersion
 

Function Documentation

◆ VfEvtDeviceD0Entry()

NTSTATUS VfEvtDeviceD0Entry ( WDFDEVICE  Device,
WDF_POWER_DEVICE_STATE  PreviousState 
)

Definition at line 57 of file vfeventhooks.cpp.

61 {
62  NTSTATUS returnVal = STATUS_SUCCESS;
65 
67 
69  ASSERT(context != NULL);
70 
71  pfn = context->PnpPowerEventCallbacksOriginal.EvtDeviceD0Entry;
72  if (pfn != NULL) {
73  GUID activityId = { 0 };
74  if (PerfEvtDeviceD0EntryStart(Device, &activityId)) {
75  returnVal = (pfn)(
76  Device,
78  );
79 
80  PerfEvtDeviceD0EntryStop(Device, &activityId);
81  } else {
83  BOOLEAN critRegion = FALSE;
84 
86  VerifyCriticalRegionEntry(&critRegion);
87 
88  returnVal = (pfn)(
89  Device,
91  );
92 
93  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
94  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
95  }
96  }
97 
98  return returnVal;
99 }
#define GET_CONTEXT
Definition: api.h:64
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
Definition: http.c:7251
LONG NTSTATUS
Definition: precomp.h:26
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
__inline BOOLEAN PerfEvtDeviceD0EntryStart(__in WDFDEVICE Handle, __inout GUID *pActivityId)
Definition: vfprivkm.hpp:184
#define ASSERT(a)
Definition: mode.c:44
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
EVT_WDF_DEVICE_D0_ENTRY * PFN_WDF_DEVICE_D0_ENTRY
Definition: wdfdevice.h:831
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45
__inline VOID PerfEvtDeviceD0EntryStop(__in WDFDEVICE Handle, __in GUID *pActivityId)
Definition: vfprivkm.hpp:205
#define STATUS_SUCCESS
Definition: shellext.h:65
_In_ WDF_POWER_DEVICE_STATE PreviousState
Definition: wdfdevice.h:829

◆ VfEvtDeviceD0EntryPostInterruptsEnabled()

NTSTATUS VfEvtDeviceD0EntryPostInterruptsEnabled ( WDFDEVICE  Device,
WDF_POWER_DEVICE_STATE  PreviousState 
)

Definition at line 102 of file vfeventhooks.cpp.

106 {
107  NTSTATUS returnVal = STATUS_SUCCESS;
110 
112 
114  ASSERT(context != NULL);
115 
116  pfn = context->PnpPowerEventCallbacksOriginal.EvtDeviceD0EntryPostInterruptsEnabled;
117  if (pfn != NULL) {
119  BOOLEAN critRegion = FALSE;
120 
122  VerifyCriticalRegionEntry(&critRegion);
123 
124  returnVal = (pfn)(
125  Device,
127  );
128 
129  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
130  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
131  }
132 
133  return returnVal;
134 }
#define GET_CONTEXT
Definition: api.h:64
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
Definition: http.c:7251
LONG NTSTATUS
Definition: precomp.h:26
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
#define ASSERT(a)
Definition: mode.c:44
EVT_WDF_DEVICE_D0_ENTRY_POST_INTERRUPTS_ENABLED * PFN_WDF_DEVICE_D0_ENTRY_POST_INTERRUPTS_ENABLED
Definition: wdfdevice.h:846
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45
#define STATUS_SUCCESS
Definition: shellext.h:65
_In_ WDF_POWER_DEVICE_STATE PreviousState
Definition: wdfdevice.h:829

◆ VfEvtDeviceD0Exit()

NTSTATUS VfEvtDeviceD0Exit ( WDFDEVICE  Device,
WDF_POWER_DEVICE_STATE  TargetState 
)

Definition at line 137 of file vfeventhooks.cpp.

141 {
142  NTSTATUS returnVal = STATUS_SUCCESS;
145 
147 
149  ASSERT(context != NULL);
150 
151  pfn = context->PnpPowerEventCallbacksOriginal.EvtDeviceD0Exit;
152  if (pfn != NULL) {
153  GUID activityId = { 0 };
154  if (PerfEvtDeviceD0ExitStart(Device, &activityId)) {
155  returnVal = (pfn)(
156  Device,
158  );
159 
160  PerfEvtDeviceD0ExitStop(Device, &activityId);
161  } else {
163  BOOLEAN critRegion = FALSE;
164 
166  VerifyCriticalRegionEntry(&critRegion);
167 
168  returnVal = (pfn)(
169  Device,
171  );
172 
173  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
174  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
175  }
176  }
177 
178  return returnVal;
179 }
#define GET_CONTEXT
Definition: api.h:64
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
Definition: http.c:7251
LONG NTSTATUS
Definition: precomp.h:26
__inline VOID PerfEvtDeviceD0ExitStop(__in WDFDEVICE Handle, __in GUID *pActivityId)
Definition: vfprivkm.hpp:235
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
EVT_WDF_DEVICE_D0_EXIT * PFN_WDF_DEVICE_D0_EXIT
Definition: wdfdevice.h:861
#define ASSERT(a)
Definition: mode.c:44
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_In_ WDF_POWER_DEVICE_STATE TargetState
Definition: wdfdevice.h:859
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
__inline BOOLEAN PerfEvtDeviceD0ExitStart(__in WDFDEVICE Handle, __inout GUID *pActivityId)
Definition: vfprivkm.hpp:215
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ VfEvtDeviceD0ExitPreInterruptsDisabled()

NTSTATUS VfEvtDeviceD0ExitPreInterruptsDisabled ( WDFDEVICE  Device,
WDF_POWER_DEVICE_STATE  TargetState 
)

Definition at line 182 of file vfeventhooks.cpp.

186 {
187  NTSTATUS returnVal = STATUS_SUCCESS;
190 
192 
194  ASSERT(context != NULL);
195 
196  pfn = context->PnpPowerEventCallbacksOriginal.EvtDeviceD0ExitPreInterruptsDisabled;
197  if (pfn != NULL) {
199  BOOLEAN critRegion = FALSE;
200 
202  VerifyCriticalRegionEntry(&critRegion);
203 
204  returnVal = (pfn)(
205  Device,
207  );
208 
209  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
210  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
211  }
212 
213  return returnVal;
214 }
#define GET_CONTEXT
Definition: api.h:64
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
Definition: http.c:7251
LONG NTSTATUS
Definition: precomp.h:26
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
EVT_WDF_DEVICE_D0_EXIT_PRE_INTERRUPTS_DISABLED * PFN_WDF_DEVICE_D0_EXIT_PRE_INTERRUPTS_DISABLED
Definition: wdfdevice.h:876
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
#define ASSERT(a)
Definition: mode.c:44
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_In_ WDF_POWER_DEVICE_STATE TargetState
Definition: wdfdevice.h:859
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ VfEvtDevicePrepareHardware()

NTSTATUS VfEvtDevicePrepareHardware ( WDFDEVICE  Device,
WDFCMRESLIST  ResourcesRaw,
WDFCMRESLIST  ResourcesTranslated 
)

Definition at line 217 of file vfeventhooks.cpp.

222 {
223  NTSTATUS returnVal = STATUS_SUCCESS;
226 
228 
230  ASSERT(context != NULL);
231 
232  pfn = context->PnpPowerEventCallbacksOriginal.EvtDevicePrepareHardware;
233  if (pfn != NULL) {
234  GUID activityId = { 0 };
235  if (PerfEvtDevicePrepareHardwareStart(Device, &activityId)) {
236  returnVal = (pfn)(
237  Device,
238  ResourcesRaw,
240  );
241 
243  } else {
245  BOOLEAN critRegion = FALSE;
246 
248  VerifyCriticalRegionEntry(&critRegion);
249 
250  returnVal = (pfn)(
251  Device,
252  ResourcesRaw,
254  );
255 
256  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
257  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
258  }
259  }
260 
261  return returnVal;
262 }
#define GET_CONTEXT
Definition: api.h:64
__inline BOOLEAN PerfEvtDevicePrepareHardwareStart(__in WDFDEVICE Handle, __inout GUID *pActivityId)
Definition: vfprivkm.hpp:245
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
Definition: http.c:7251
LONG NTSTATUS
Definition: precomp.h:26
KIRQL irql
Definition: wave.h:1
__inline VOID PerfEvtDevicePrepareHardwareStop(__in WDFDEVICE Handle, __in GUID *pActivityId)
Definition: vfprivkm.hpp:266
EVT_WDF_DEVICE_PREPARE_HARDWARE * PFN_WDF_DEVICE_PREPARE_HARDWARE
Definition: wdfdevice.h:893
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
_In_ WDFCMRESLIST ResourcesRaw
Definition: wdfdevice.h:888
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
#define ASSERT(a)
Definition: mode.c:44
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_In_ WDFCMRESLIST _In_ WDFCMRESLIST ResourcesTranslated
Definition: wdfdevice.h:888
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ VfEvtDeviceQueryRemove()

NTSTATUS VfEvtDeviceQueryRemove ( WDFDEVICE  Device)

Definition at line 506 of file vfeventhooks.cpp.

509 {
510  NTSTATUS returnVal = STATUS_SUCCESS;
513 
515 
517  ASSERT(context != NULL);
518 
519  pfn = context->PnpPowerEventCallbacksOriginal.EvtDeviceQueryRemove;
520  if (pfn != NULL) {
522  BOOLEAN critRegion = FALSE;
523 
525  VerifyCriticalRegionEntry(&critRegion);
526 
527  returnVal = (pfn)(
528  Device
529  );
530 
531  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
532  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
533  }
534 
535  return returnVal;
536 }
#define GET_CONTEXT
Definition: api.h:64
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
Definition: http.c:7251
LONG NTSTATUS
Definition: precomp.h:26
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
#define ASSERT(a)
Definition: mode.c:44
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
EVT_WDF_DEVICE_QUERY_REMOVE * PFN_WDF_DEVICE_QUERY_REMOVE
Definition: wdfdevice.h:999
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ VfEvtDeviceQueryStop()

NTSTATUS VfEvtDeviceQueryStop ( WDFDEVICE  Device)

Definition at line 473 of file vfeventhooks.cpp.

476 {
477  NTSTATUS returnVal = STATUS_SUCCESS;
480 
482 
484  ASSERT(context != NULL);
485 
486  pfn = context->PnpPowerEventCallbacksOriginal.EvtDeviceQueryStop;
487  if (pfn != NULL) {
489  BOOLEAN critRegion = FALSE;
490 
492  VerifyCriticalRegionEntry(&critRegion);
493 
494  returnVal = (pfn)(
495  Device
496  );
497 
498  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
499  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
500  }
501 
502  return returnVal;
503 }
#define GET_CONTEXT
Definition: api.h:64
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
Definition: http.c:7251
LONG NTSTATUS
Definition: precomp.h:26
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
#define ASSERT(a)
Definition: mode.c:44
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
EVT_WDF_DEVICE_QUERY_STOP * PFN_WDF_DEVICE_QUERY_STOP
Definition: wdfdevice.h:986
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ VfEvtDeviceRelationsQuery()

VOID VfEvtDeviceRelationsQuery ( WDFDEVICE  Device,
DEVICE_RELATION_TYPE  RelationType 
)

Definition at line 644 of file vfeventhooks.cpp.

648 {
651 
653 
655  ASSERT(context != NULL);
656 
657  pfn = context->PnpPowerEventCallbacksOriginal.EvtDeviceRelationsQuery;
658  if (pfn != NULL) {
660  BOOLEAN critRegion = FALSE;
661 
663  VerifyCriticalRegionEntry(&critRegion);
664 
665  (pfn)(
666  Device,
668  );
669 
670  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
671  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
672  }
673 
674  return;
675 }
#define GET_CONTEXT
Definition: api.h:64
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
Definition: http.c:7251
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
_In_ DEVICE_RELATION_TYPE RelationType
Definition: wdfdevice.h:1059
#define ASSERT(a)
Definition: mode.c:44
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
EVT_WDF_DEVICE_RELATIONS_QUERY * PFN_WDF_DEVICE_RELATIONS_QUERY
Definition: wdfdevice.h:1061
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45

◆ VfEvtDeviceReleaseHardware()

NTSTATUS VfEvtDeviceReleaseHardware ( WDFDEVICE  Device,
WDFCMRESLIST  ResourcesTranslated 
)

Definition at line 265 of file vfeventhooks.cpp.

269 {
270  NTSTATUS returnVal = STATUS_SUCCESS;
273 
275 
277  ASSERT(context != NULL);
278 
279  pfn = context->PnpPowerEventCallbacksOriginal.EvtDeviceReleaseHardware;
280  if (pfn != NULL) {
281  GUID activityId = { 0 };
282  if (PerfEvtDeviceReleaseHardwareStart(Device, &activityId)) {
283  returnVal = (pfn)(
284  Device,
286  );
287 
289  } else {
291  BOOLEAN critRegion = FALSE;
292 
294  VerifyCriticalRegionEntry(&critRegion);
295 
296  returnVal = (pfn)(
297  Device,
299  );
300 
301  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
302  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
303  }
304  }
305 
306  return returnVal;
307 }
#define GET_CONTEXT
Definition: api.h:64
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
Definition: http.c:7251
LONG NTSTATUS
Definition: precomp.h:26
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
__inline BOOLEAN PerfEvtDeviceReleaseHardwareStart(__in WDFDEVICE Handle, __inout GUID *pActivityId)
Definition: vfprivkm.hpp:276
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
#define ASSERT(a)
Definition: mode.c:44
__inline VOID PerfEvtDeviceReleaseHardwareStop(__in WDFDEVICE Handle, __in GUID *pActivityId)
Definition: vfprivkm.hpp:296
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_In_ WDFCMRESLIST _In_ WDFCMRESLIST ResourcesTranslated
Definition: wdfdevice.h:888
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45
#define STATUS_SUCCESS
Definition: shellext.h:65
EVT_WDF_DEVICE_RELEASE_HARDWARE * PFN_WDF_DEVICE_RELEASE_HARDWARE
Definition: wdfdevice.h:908

◆ VfEvtDeviceSelfManagedIoCleanup()

VOID VfEvtDeviceSelfManagedIoCleanup ( WDFDEVICE  Device)

Definition at line 310 of file vfeventhooks.cpp.

313 {
316 
318 
320  ASSERT(context != NULL);
321 
322  pfn = context->PnpPowerEventCallbacksOriginal.EvtDeviceSelfManagedIoCleanup;
323  if (pfn != NULL) {
325  BOOLEAN critRegion = FALSE;
326 
328  VerifyCriticalRegionEntry(&critRegion);
329 
330  (pfn)(
331  Device
332  );
333 
334  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
335  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
336  }
337 
338  return;
339 }
#define GET_CONTEXT
Definition: api.h:64
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
Definition: http.c:7251
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
EVT_WDF_DEVICE_SELF_MANAGED_IO_CLEANUP * PFN_WDF_DEVICE_SELF_MANAGED_IO_CLEANUP
Definition: wdfdevice.h:921
#define ASSERT(a)
Definition: mode.c:44
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45

◆ VfEvtDeviceSelfManagedIoFlush()

VOID VfEvtDeviceSelfManagedIoFlush ( WDFDEVICE  Device)

Definition at line 342 of file vfeventhooks.cpp.

345 {
348 
350 
352  ASSERT(context != NULL);
353 
354  pfn = context->PnpPowerEventCallbacksOriginal.EvtDeviceSelfManagedIoFlush;
355  if (pfn != NULL) {
357  BOOLEAN critRegion = FALSE;
358 
360  VerifyCriticalRegionEntry(&critRegion);
361 
362  (pfn)(
363  Device
364  );
365 
366  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
367  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
368  }
369 
370  return;
371 }
#define GET_CONTEXT
Definition: api.h:64
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
Definition: http.c:7251
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
#define ASSERT(a)
Definition: mode.c:44
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
EVT_WDF_DEVICE_SELF_MANAGED_IO_FLUSH * PFN_WDF_DEVICE_SELF_MANAGED_IO_FLUSH
Definition: wdfdevice.h:934
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45

◆ VfEvtDeviceSelfManagedIoInit()

NTSTATUS VfEvtDeviceSelfManagedIoInit ( WDFDEVICE  Device)

Definition at line 374 of file vfeventhooks.cpp.

377 {
378  NTSTATUS returnVal = STATUS_SUCCESS;
381 
383 
385  ASSERT(context != NULL);
386 
387  pfn = context->PnpPowerEventCallbacksOriginal.EvtDeviceSelfManagedIoInit;
388  if (pfn != NULL) {
390  BOOLEAN critRegion = FALSE;
391 
393  VerifyCriticalRegionEntry(&critRegion);
394 
395  returnVal = (pfn)(
396  Device
397  );
398 
399  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
400  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
401  }
402 
403  return returnVal;
404 }
#define GET_CONTEXT
Definition: api.h:64
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
Definition: http.c:7251
LONG NTSTATUS
Definition: precomp.h:26
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
EVT_WDF_DEVICE_SELF_MANAGED_IO_INIT * PFN_WDF_DEVICE_SELF_MANAGED_IO_INIT
Definition: wdfdevice.h:947
#define ASSERT(a)
Definition: mode.c:44
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ VfEvtDeviceSelfManagedIoRestart()

NTSTATUS VfEvtDeviceSelfManagedIoRestart ( WDFDEVICE  Device)

Definition at line 440 of file vfeventhooks.cpp.

443 {
444  NTSTATUS returnVal = STATUS_SUCCESS;
447 
449 
451  ASSERT(context != NULL);
452 
453  pfn = context->PnpPowerEventCallbacksOriginal.EvtDeviceSelfManagedIoRestart;
454  if (pfn != NULL) {
456  BOOLEAN critRegion = FALSE;
457 
459  VerifyCriticalRegionEntry(&critRegion);
460 
461  returnVal = (pfn)(
462  Device
463  );
464 
465  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
466  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
467  }
468 
469  return returnVal;
470 }
#define GET_CONTEXT
Definition: api.h:64
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
Definition: http.c:7251
LONG NTSTATUS
Definition: precomp.h:26
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
#define ASSERT(a)
Definition: mode.c:44
EVT_WDF_DEVICE_SELF_MANAGED_IO_RESTART * PFN_WDF_DEVICE_SELF_MANAGED_IO_RESTART
Definition: wdfdevice.h:973
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ VfEvtDeviceSelfManagedIoSuspend()

NTSTATUS VfEvtDeviceSelfManagedIoSuspend ( WDFDEVICE  Device)

Definition at line 407 of file vfeventhooks.cpp.

410 {
411  NTSTATUS returnVal = STATUS_SUCCESS;
414 
416 
418  ASSERT(context != NULL);
419 
420  pfn = context->PnpPowerEventCallbacksOriginal.EvtDeviceSelfManagedIoSuspend;
421  if (pfn != NULL) {
423  BOOLEAN critRegion = FALSE;
424 
426  VerifyCriticalRegionEntry(&critRegion);
427 
428  returnVal = (pfn)(
429  Device
430  );
431 
432  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
433  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
434  }
435 
436  return returnVal;
437 }
#define GET_CONTEXT
Definition: api.h:64
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
Definition: http.c:7251
LONG NTSTATUS
Definition: precomp.h:26
KIRQL irql
Definition: wave.h:1
EVT_WDF_DEVICE_SELF_MANAGED_IO_SUSPEND * PFN_WDF_DEVICE_SELF_MANAGED_IO_SUSPEND
Definition: wdfdevice.h:960
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
#define ASSERT(a)
Definition: mode.c:44
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ VfEvtDeviceSurpriseRemoval()

VOID VfEvtDeviceSurpriseRemoval ( WDFDEVICE  Device)

Definition at line 539 of file vfeventhooks.cpp.

542 {
545 
547 
549  ASSERT(context != NULL);
550 
551  pfn = context->PnpPowerEventCallbacksOriginal.EvtDeviceSurpriseRemoval;
552  if (pfn != NULL) {
554  BOOLEAN critRegion = FALSE;
555 
557  VerifyCriticalRegionEntry(&critRegion);
558 
559  (pfn)(
560  Device
561  );
562 
563  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
564  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
565  }
566 
567  return;
568 }
#define GET_CONTEXT
Definition: api.h:64
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
Definition: http.c:7251
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
#define ASSERT(a)
Definition: mode.c:44
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45
EVT_WDF_DEVICE_SURPRISE_REMOVAL * PFN_WDF_DEVICE_SURPRISE_REMOVAL
Definition: wdfdevice.h:1012

◆ VfEvtDeviceUsageNotification()

VOID VfEvtDeviceUsageNotification ( WDFDEVICE  Device,
WDF_SPECIAL_FILE_TYPE  NotificationType,
BOOLEAN  IsInNotificationPath 
)

Definition at line 571 of file vfeventhooks.cpp.

576 {
579 
581 
583  ASSERT(context != NULL);
584 
585  pfn = context->PnpPowerEventCallbacksOriginal.EvtDeviceUsageNotification;
586  if (pfn != NULL) {
588  BOOLEAN critRegion = FALSE;
589 
591  VerifyCriticalRegionEntry(&critRegion);
592 
593  (pfn)(
594  Device,
597  );
598 
599  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
600  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
601  }
602 
603  return;
604 }
#define GET_CONTEXT
Definition: api.h:64
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
_In_ WDF_SPECIAL_FILE_TYPE _In_ BOOLEAN IsInNotificationPath
Definition: wdfdevice.h:1024
Definition: http.c:7251
KIRQL irql
Definition: wave.h:1
_In_ WDF_SPECIAL_FILE_TYPE NotificationType
Definition: wdfdevice.h:1024
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
#define ASSERT(a)
Definition: mode.c:44
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45
EVT_WDF_DEVICE_USAGE_NOTIFICATION * PFN_WDF_DEVICE_USAGE_NOTIFICATION
Definition: wdfdevice.h:1029

◆ VfEvtDeviceUsageNotificationEx()

NTSTATUS VfEvtDeviceUsageNotificationEx ( WDFDEVICE  Device,
WDF_SPECIAL_FILE_TYPE  NotificationType,
BOOLEAN  IsInNotificationPath 
)

Definition at line 607 of file vfeventhooks.cpp.

612 {
613  NTSTATUS returnVal = STATUS_SUCCESS;
616 
618 
620  ASSERT(context != NULL);
621 
622  pfn = context->PnpPowerEventCallbacksOriginal.EvtDeviceUsageNotificationEx;
623  if (pfn != NULL) {
625  BOOLEAN critRegion = FALSE;
626 
628  VerifyCriticalRegionEntry(&critRegion);
629 
630  returnVal = (pfn)(
631  Device,
634  );
635 
636  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
637  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
638  }
639 
640  return returnVal;
641 }
#define GET_CONTEXT
Definition: api.h:64
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
_In_ WDF_SPECIAL_FILE_TYPE _In_ BOOLEAN IsInNotificationPath
Definition: wdfdevice.h:1024
Definition: http.c:7251
LONG NTSTATUS
Definition: precomp.h:26
KIRQL irql
Definition: wave.h:1
_In_ WDF_SPECIAL_FILE_TYPE NotificationType
Definition: wdfdevice.h:1024
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
EVT_WDF_DEVICE_USAGE_NOTIFICATION_EX * PFN_WDF_DEVICE_USAGE_NOTIFICATION_EX
Definition: wdfdevice.h:1046
#define ASSERT(a)
Definition: mode.c:44
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ VfEvtIoCanceledOnQueue()

VOID VfEvtIoCanceledOnQueue ( WDFQUEUE  Queue,
WDFREQUEST  Request 
)

Definition at line 988 of file vfeventhooks.cpp.

992 {
995 
997 
999  ASSERT(context != NULL);
1000 
1001  pfn = context->IoQueueConfigOriginal.EvtIoCanceledOnQueue;
1002  if (pfn != NULL) {
1004  BOOLEAN critRegion = FALSE;
1005 
1007  VerifyCriticalRegionEntry(&critRegion);
1008 
1009  (pfn)(
1010  Queue,
1011  Request
1012  );
1013 
1014  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
1015  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
1016  }
1017 
1018  return;
1019 }
#define GET_CONTEXT
Definition: api.h:64
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
Definition: http.c:7251
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
Definition: wdfdevice.h:2221
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
KIRQL irql
Definition: wave.h:1
EVT_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE * PFN_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE
Definition: wdfio.h:364
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
#define ASSERT(a)
Definition: mode.c:44
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45

◆ VfEvtIoDefault()

VOID VfEvtIoDefault ( WDFQUEUE  Queue,
WDFREQUEST  Request 
)

Definition at line 678 of file vfeventhooks.cpp.

682 {
685 
687 
689  ASSERT(context != NULL);
690 
691  pfn = context->IoQueueConfigOriginal.EvtIoDefault;
692  if (pfn != NULL) {
693  if (PerfIoStart(Request)) {
694  (pfn)(
695  Queue,
696  Request
697  );
698  } else {
700  BOOLEAN critRegion = FALSE;
701 
703  VerifyCriticalRegionEntry(&critRegion);
704 
705  (pfn)(
706  Queue,
707  Request
708  );
709 
710  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
711  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
712  }
713  }
714 
715  return;
716 }
#define GET_CONTEXT
Definition: api.h:64
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
Definition: http.c:7251
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
Definition: wdfdevice.h:2221
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
#define ASSERT(a)
Definition: mode.c:44
FORCEINLINE BOOLEAN PerfIoStart(__in WDFREQUEST Handle)
Definition: vfprivkm.hpp:119
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
EVT_WDF_IO_QUEUE_IO_DEFAULT * PFN_WDF_IO_QUEUE_IO_DEFAULT
Definition: wdfio.h:239
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45

◆ VfEvtIoDeviceControl()

VOID VfEvtIoDeviceControl ( WDFQUEUE  Queue,
WDFREQUEST  Request,
size_t  OutputBufferLength,
size_t  InputBufferLength,
ULONG  IoControlCode 
)

Definition at line 888 of file vfeventhooks.cpp.

895 {
898 
900 
902  ASSERT(context != NULL);
903 
904  pfn = context->IoQueueConfigOriginal.EvtIoDeviceControl;
905  if (pfn != NULL) {
906  if (PerfIoStart(Request)) {
907  (pfn)(
908  Queue,
909  Request,
913  );
914  } else {
916  BOOLEAN critRegion = FALSE;
917 
919  VerifyCriticalRegionEntry(&critRegion);
920 
921  (pfn)(
922  Queue,
923  Request,
927  );
928 
929  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
930  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
931  }
932  }
933 
934  return;
935 }
#define GET_CONTEXT
Definition: api.h:64
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
EVT_WDF_IO_QUEUE_IO_DEVICE_CONTROL * PFN_WDF_IO_QUEUE_IO_DEVICE_CONTROL
Definition: wdfio.h:327
Definition: http.c:7251
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
Definition: wdfdevice.h:2221
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
KIRQL irql
Definition: wave.h:1
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
Definition: wdfio.h:318
_In_ WDFREQUEST _In_ size_t OutputBufferLength
Definition: wdfio.h:318
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
#define ASSERT(a)
Definition: mode.c:44
FORCEINLINE BOOLEAN PerfIoStart(__in WDFREQUEST Handle)
Definition: vfprivkm.hpp:119
_In_ WDFREQUEST _In_ size_t _In_ size_t _In_ ULONG IoControlCode
Definition: wdfio.h:318
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45

◆ VfEvtIoInternalDeviceControl()

VOID VfEvtIoInternalDeviceControl ( WDFQUEUE  Queue,
WDFREQUEST  Request,
size_t  OutputBufferLength,
size_t  InputBufferLength,
ULONG  IoControlCode 
)

Definition at line 938 of file vfeventhooks.cpp.

945 {
948 
950 
952  ASSERT(context != NULL);
953 
954  pfn = context->IoQueueConfigOriginal.EvtIoInternalDeviceControl;
955  if (pfn != NULL) {
956  if (PerfIoStart(Request)) {
957  (pfn)(
958  Queue,
959  Request,
963  );
964  } else {
966  BOOLEAN critRegion = FALSE;
967 
969  VerifyCriticalRegionEntry(&critRegion);
970 
971  (pfn)(
972  Queue,
973  Request,
977  );
978 
979  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
980  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
981  }
982  }
983 
984  return;
985 }
#define GET_CONTEXT
Definition: api.h:64
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
Definition: http.c:7251
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
Definition: wdfdevice.h:2221
EVT_WDF_IO_QUEUE_IO_INTERNAL_DEVICE_CONTROL * PFN_WDF_IO_QUEUE_IO_INTERNAL_DEVICE_CONTROL
Definition: wdfio.h:348
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
KIRQL irql
Definition: wave.h:1
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
Definition: wdfio.h:318
_In_ WDFREQUEST _In_ size_t OutputBufferLength
Definition: wdfio.h:318
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
#define ASSERT(a)
Definition: mode.c:44
FORCEINLINE BOOLEAN PerfIoStart(__in WDFREQUEST Handle)
Definition: vfprivkm.hpp:119
_In_ WDFREQUEST _In_ size_t _In_ size_t _In_ ULONG IoControlCode
Definition: wdfio.h:318
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45

◆ VfEvtIoRead()

VOID VfEvtIoRead ( WDFQUEUE  Queue,
WDFREQUEST  Request,
size_t  Length 
)

Definition at line 800 of file vfeventhooks.cpp.

805 {
808 
810 
812  ASSERT(context != NULL);
813 
814  pfn = context->IoQueueConfigOriginal.EvtIoRead;
815  if (pfn != NULL) {
816  if (PerfIoStart(Request)) {
817  (pfn)(
818  Queue,
819  Request,
820  Length
821  );
822  } else {
824  BOOLEAN critRegion = FALSE;
825 
827  VerifyCriticalRegionEntry(&critRegion);
828 
829  (pfn)(
830  Queue,
831  Request,
832  Length
833  );
834 
835  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
836  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
837  }
838  }
839 
840  return;
841 }
#define GET_CONTEXT
Definition: api.h:64
EVT_WDF_IO_QUEUE_IO_READ * PFN_WDF_IO_QUEUE_IO_READ
Definition: wdfio.h:289
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
Definition: http.c:7251
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
Definition: wdfdevice.h:2221
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
#define ASSERT(a)
Definition: mode.c:44
FORCEINLINE BOOLEAN PerfIoStart(__in WDFREQUEST Handle)
Definition: vfprivkm.hpp:119
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45

◆ VfEvtIoResume()

VOID VfEvtIoResume ( WDFQUEUE  Queue,
WDFREQUEST  Request 
)

Definition at line 766 of file vfeventhooks.cpp.

770 {
773 
775 
777  ASSERT(context != NULL);
778 
779  pfn = context->IoQueueConfigOriginal.EvtIoResume;
780  if (pfn != NULL) {
782  BOOLEAN critRegion = FALSE;
783 
785  VerifyCriticalRegionEntry(&critRegion);
786 
787  (pfn)(
788  Queue,
789  Request
790  );
791 
792  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
793  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
794  }
795 
796  return;
797 }
#define GET_CONTEXT
Definition: api.h:64
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
Definition: http.c:7251
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
Definition: wdfdevice.h:2221
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
KIRQL irql
Definition: wave.h:1
EVT_WDF_IO_QUEUE_IO_RESUME * PFN_WDF_IO_QUEUE_IO_RESUME
Definition: wdfio.h:272
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
#define ASSERT(a)
Definition: mode.c:44
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45

◆ VfEvtIoStop()

VOID VfEvtIoStop ( WDFQUEUE  Queue,
WDFREQUEST  Request,
ULONG  ActionFlags 
)

Definition at line 719 of file vfeventhooks.cpp.

724 {
727 
729 
731  ASSERT(context != NULL);
732 
733  pfn = context->IoQueueConfigOriginal.EvtIoStop;
734  if (pfn != NULL) {
735  GUID activityId = { 0 };
736  if (PerfEvtIoStopStart(Queue, &activityId)) {
737  (pfn)(
738  Queue,
739  Request,
741  );
742 
743  PerfEvtIoStopStop(Queue, &activityId);
744  } else {
746  BOOLEAN critRegion = FALSE;
747 
749  VerifyCriticalRegionEntry(&critRegion);
750 
751  (pfn)(
752  Queue,
753  Request,
755  );
756 
757  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
758  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
759  }
760  }
761 
762  return;
763 }
#define GET_CONTEXT
Definition: api.h:64
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
Definition: http.c:7251
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
Definition: wdfdevice.h:2221
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
KIRQL irql
Definition: wave.h:1
EVT_WDF_IO_QUEUE_IO_STOP * PFN_WDF_IO_QUEUE_IO_STOP
Definition: wdfio.h:257
UCHAR KIRQL
Definition: env_spec_w32.h:591
_In_ WDFREQUEST _In_ ULONG ActionFlags
Definition: wdfio.h:252
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
__inline VOID PerfEvtIoStopStop(__in WDFQUEUE Queue, __in GUID *pActivityId)
Definition: vfprivkm.hpp:337
#define ASSERT(a)
Definition: mode.c:44
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45
__inline BOOLEAN PerfEvtIoStopStart(__in WDFQUEUE Queue, __inout GUID *pActivityId)
Definition: vfprivkm.hpp:307

◆ VfEvtIoWrite()

VOID VfEvtIoWrite ( WDFQUEUE  Queue,
WDFREQUEST  Request,
size_t  Length 
)

Definition at line 844 of file vfeventhooks.cpp.

849 {
852 
854 
856  ASSERT(context != NULL);
857 
858  pfn = context->IoQueueConfigOriginal.EvtIoWrite;
859  if (pfn != NULL) {
860  if (PerfIoStart(Request)) {
861  (pfn)(
862  Queue,
863  Request,
864  Length
865  );
866  } else {
868  BOOLEAN critRegion = FALSE;
869 
871  VerifyCriticalRegionEntry(&critRegion);
872 
873  (pfn)(
874  Queue,
875  Request,
876  Length
877  );
878 
879  VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
880  VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
881  }
882  }
883 
884  return;
885 }
#define GET_CONTEXT
Definition: api.h:64
EVT_WDF_IO_QUEUE_IO_WRITE * PFN_WDF_IO_QUEUE_IO_WRITE
Definition: wdfio.h:306
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
Definition: http.c:7251
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
Definition: wdfdevice.h:2221
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429
unsigned char BOOLEAN
#define ASSERT(a)
Definition: mode.c:44
FORCEINLINE BOOLEAN PerfIoStart(__in WDFREQUEST Handle)
Definition: vfprivkm.hpp:119
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
#define NULL
Definition: types.h:112
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45

Variable Documentation

◆ WdfVersion

WDFVERSION WdfVersion