ReactOS 0.4.15-dev-8390-g075894b
fxrequestcallbacks.hpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 FxIoQueueCallbacks.h
8
9Abstract:
10
11 This module implements the I/O package queue object callbacks
12
13Author:
14
15
16
17
18Environment:
19
20 Both kernel and user mode
21
22Revision History:
23
24--*/
25
26#ifndef _FXREQUESTCALLBACKS_H_
27#define _FXREQUESTCALLBACKS_H_
28
29
30//
31// Delegate which contains EvtRequestCancel
32//
34
35public:
37
39 VOID
40 )
41 {
42 m_Cancel = NULL;
43 }
44
45 void
48 __in WDFREQUEST Request
49 )
50 {
51 if (m_Cancel != NULL) {
53 KIRQL irql;
54
55 //
56 // Satisfy W4 warning, even though it is technically not necessary to
57 // assign an initial value.
58 //
60
61 if (Lock != NULL) {
62 Lock->Lock(&irql);
63 }
64
65 //
66 // Clear the value before invoking the routine since the assignment
67 // is invalidated when the routine is run.
68 //
69 pMethod = m_Cancel;
70 m_Cancel = NULL;
71
72 pMethod(Request);
73
74 if (Lock != NULL) {
75 Lock->Unlock(irql);
76 }
77 }
78 }
79};
80
81//
82// Delegate which contains EvtRequestCompletion
83//
85
86public:
88
90 VOID
91 )
92 {
94 }
95};
96
97
98#endif // _FXREQUESTCALLBACKS_H_
99
void InvokeCancel(__in FxCallbackLock *Lock, __in WDFREQUEST Request)
PFN_WDF_REQUEST_CANCEL m_Cancel
PFN_WDF_REQUEST_COMPLETION_ROUTINE m_Completion
#define __in
Definition: dbghelp.h:35
#define NULL
Definition: types.h:112
KIRQL irql
Definition: wave.h:1
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
UCHAR KIRQL
Definition: env_spec_w32.h:591
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
EVT_WDF_REQUEST_COMPLETION_ROUTINE * PFN_WDF_REQUEST_COMPLETION_ROUTINE
Definition: wdfrequest.h:313
EVT_WDF_REQUEST_CANCEL * PFN_WDF_REQUEST_CANCEL
Definition: wdfrequest.h:130
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:127