ReactOS 0.4.15-dev-5667-ged97270
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
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}
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define GET_CONTEXT
Definition: api.h:64
KIRQL irql
Definition: wave.h:1
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define ASSERT(a)
Definition: mode.c:44
#define STATUS_SUCCESS
Definition: shellext.h:65
Definition: http.c:7252
__inline VOID VerifyCriticalRegionEntry(__out BOOLEAN *CritRegion)
Definition: vfprivkm.hpp:65
__inline VOID PerfEvtDeviceD0EntryStop(__in WDFDEVICE Handle, __in GUID *pActivityId)
Definition: vfprivkm.hpp:205
__inline VOID VerifyCriticalRegionExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in BOOLEAN OldCritRegion, __in PVOID Pfn)
Definition: vfprivkm.hpp:76
__inline VOID VerifyIrqlEntry(__out KIRQL *Irql)
Definition: vfprivkm.hpp:36
__inline VOID VerifyIrqlExit(__in PWDF_DRIVER_GLOBALS DriverGlobals, __in KIRQL PrevIrql)
Definition: vfprivkm.hpp:45
__inline BOOLEAN PerfEvtDeviceD0EntryStart(__in WDFDEVICE Handle, __inout GUID *pActivityId)
Definition: vfprivkm.hpp:184
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_In_ WDF_POWER_DEVICE_STATE PreviousState
Definition: wdfdevice.h:829
EVT_WDF_DEVICE_D0_ENTRY * PFN_WDF_DEVICE_D0_ENTRY
Definition: wdfdevice.h:831
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1431

◆ 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}
EVT_WDF_DEVICE_D0_ENTRY_POST_INTERRUPTS_ENABLED * PFN_WDF_DEVICE_D0_ENTRY_POST_INTERRUPTS_ENABLED
Definition: wdfdevice.h:846

◆ 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}
__inline BOOLEAN PerfEvtDeviceD0ExitStart(__in WDFDEVICE Handle, __inout GUID *pActivityId)
Definition: vfprivkm.hpp:215
__inline VOID PerfEvtDeviceD0ExitStop(__in WDFDEVICE Handle, __in GUID *pActivityId)
Definition: vfprivkm.hpp:235
_In_ WDF_POWER_DEVICE_STATE TargetState
Definition: wdfdevice.h:859
EVT_WDF_DEVICE_D0_EXIT * PFN_WDF_DEVICE_D0_EXIT
Definition: wdfdevice.h:861

◆ 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}
EVT_WDF_DEVICE_D0_EXIT_PRE_INTERRUPTS_DISABLED * PFN_WDF_DEVICE_D0_EXIT_PRE_INTERRUPTS_DISABLED
Definition: wdfdevice.h:876

◆ 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,
240 );
241
243 } else {
245 BOOLEAN critRegion = FALSE;
246
248 VerifyCriticalRegionEntry(&critRegion);
249
250 returnVal = (pfn)(
251 Device,
254 );
255
256 VerifyIrqlExit(context->CommonHeader.DriverGlobals, irql);
257 VerifyCriticalRegionExit(context->CommonHeader.DriverGlobals, critRegion, (PVOID)pfn);
258 }
259 }
260
261 return returnVal;
262}
__inline BOOLEAN PerfEvtDevicePrepareHardwareStart(__in WDFDEVICE Handle, __inout GUID *pActivityId)
Definition: vfprivkm.hpp:245
__inline VOID PerfEvtDevicePrepareHardwareStop(__in WDFDEVICE Handle, __in GUID *pActivityId)
Definition: vfprivkm.hpp:266
_In_ WDFCMRESLIST _In_ WDFCMRESLIST ResourcesTranslated
Definition: wdfdevice.h:891
EVT_WDF_DEVICE_PREPARE_HARDWARE * PFN_WDF_DEVICE_PREPARE_HARDWARE
Definition: wdfdevice.h:893
_In_ WDFCMRESLIST ResourcesRaw
Definition: wdfdevice.h:888

◆ 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}
EVT_WDF_DEVICE_QUERY_REMOVE * PFN_WDF_DEVICE_QUERY_REMOVE
Definition: wdfdevice.h:999

◆ 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}
EVT_WDF_DEVICE_QUERY_STOP * PFN_WDF_DEVICE_QUERY_STOP
Definition: wdfdevice.h:986

◆ 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}
_In_ DEVICE_RELATION_TYPE RelationType
Definition: wdfdevice.h:1059
EVT_WDF_DEVICE_RELATIONS_QUERY * PFN_WDF_DEVICE_RELATIONS_QUERY
Definition: wdfdevice.h:1061

◆ 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}
__inline VOID PerfEvtDeviceReleaseHardwareStop(__in WDFDEVICE Handle, __in GUID *pActivityId)
Definition: vfprivkm.hpp:296
__inline BOOLEAN PerfEvtDeviceReleaseHardwareStart(__in WDFDEVICE Handle, __inout GUID *pActivityId)
Definition: vfprivkm.hpp:276
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}
EVT_WDF_DEVICE_SELF_MANAGED_IO_CLEANUP * PFN_WDF_DEVICE_SELF_MANAGED_IO_CLEANUP
Definition: wdfdevice.h:921

◆ 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}
EVT_WDF_DEVICE_SELF_MANAGED_IO_FLUSH * PFN_WDF_DEVICE_SELF_MANAGED_IO_FLUSH
Definition: wdfdevice.h:934

◆ 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}
EVT_WDF_DEVICE_SELF_MANAGED_IO_INIT * PFN_WDF_DEVICE_SELF_MANAGED_IO_INIT
Definition: wdfdevice.h:947

◆ 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}
EVT_WDF_DEVICE_SELF_MANAGED_IO_RESTART * PFN_WDF_DEVICE_SELF_MANAGED_IO_RESTART
Definition: wdfdevice.h:973

◆ 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}
EVT_WDF_DEVICE_SELF_MANAGED_IO_SUSPEND * PFN_WDF_DEVICE_SELF_MANAGED_IO_SUSPEND
Definition: wdfdevice.h:960

◆ 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}
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}
_In_ WDF_SPECIAL_FILE_TYPE _In_ BOOLEAN IsInNotificationPath
Definition: wdfdevice.h:1027
_In_ WDF_SPECIAL_FILE_TYPE NotificationType
Definition: wdfdevice.h:1024
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}
EVT_WDF_DEVICE_USAGE_NOTIFICATION_EX * PFN_WDF_DEVICE_USAGE_NOTIFICATION_EX
Definition: wdfdevice.h:1046

◆ 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}
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
Definition: wdfdevice.h:2225
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
EVT_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE * PFN_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE
Definition: wdfio.h:364

◆ 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}
FORCEINLINE BOOLEAN PerfIoStart(__in WDFREQUEST Handle)
Definition: vfprivkm.hpp:119
EVT_WDF_IO_QUEUE_IO_DEFAULT * PFN_WDF_IO_QUEUE_IO_DEFAULT
Definition: wdfio.h:239

◆ 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}
_In_ WDFREQUEST _In_ size_t _In_ size_t _In_ ULONG IoControlCode
Definition: wdfio.h:325
EVT_WDF_IO_QUEUE_IO_DEVICE_CONTROL * PFN_WDF_IO_QUEUE_IO_DEVICE_CONTROL
Definition: wdfio.h:327
_In_ WDFREQUEST _In_ size_t OutputBufferLength
Definition: wdfio.h:320
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
Definition: wdfio.h:322

◆ 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}
EVT_WDF_IO_QUEUE_IO_INTERNAL_DEVICE_CONTROL * PFN_WDF_IO_QUEUE_IO_INTERNAL_DEVICE_CONTROL
Definition: wdfio.h:348

◆ 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}
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
EVT_WDF_IO_QUEUE_IO_READ * PFN_WDF_IO_QUEUE_IO_READ
Definition: wdfio.h:289

◆ 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}
EVT_WDF_IO_QUEUE_IO_RESUME * PFN_WDF_IO_QUEUE_IO_RESUME
Definition: wdfio.h:272

◆ 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}
__inline BOOLEAN PerfEvtIoStopStart(__in WDFQUEUE Queue, __inout GUID *pActivityId)
Definition: vfprivkm.hpp:307
__inline VOID PerfEvtIoStopStop(__in WDFQUEUE Queue, __in GUID *pActivityId)
Definition: vfprivkm.hpp:337
EVT_WDF_IO_QUEUE_IO_STOP * PFN_WDF_IO_QUEUE_IO_STOP
Definition: wdfio.h:257
_In_ WDFREQUEST _In_ ULONG ActionFlags
Definition: wdfio.h:255

◆ 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}
EVT_WDF_IO_QUEUE_IO_WRITE * PFN_WDF_IO_QUEUE_IO_WRITE
Definition: wdfio.h:306

Variable Documentation

◆ WdfVersion

WDFVERSION WdfVersion
extern