ReactOS  0.4.15-dev-2972-gda2a567
FxRequestCancelCallback Class Reference

#include <fxrequestcallbacks.hpp>

Inheritance diagram for FxRequestCancelCallback:
Collaboration diagram for FxRequestCancelCallback:

Public Member Functions

 FxRequestCancelCallback (VOID)
 
void InvokeCancel (__in FxCallbackLock *Lock, __in WDFREQUEST Request)
 
- Public Member Functions inherited from FxCallback
 FxCallback (__in_opt PFX_DRIVER_GLOBALS FxDriverGlobals=NULL)
 
PVOID operator new (__in size_t Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in POOL_TYPE PoolType=NonPagedPool)
 
VOID operator delete (__in PVOID pointer)
 

Public Attributes

PFN_WDF_REQUEST_CANCEL m_Cancel
 

Additional Inherited Members

- Protected Member Functions inherited from FxCallback
void __inline CallbackStart (VOID)
 
void __inline CallbackEnd (VOID)
 

Detailed Description

Definition at line 33 of file fxrequestcallbacks.hpp.

Constructor & Destructor Documentation

◆ FxRequestCancelCallback()

FxRequestCancelCallback::FxRequestCancelCallback ( VOID  )
inline

Definition at line 38 of file fxrequestcallbacks.hpp.

41  {
42  m_Cancel = NULL;
43  }
PFN_WDF_REQUEST_CANCEL m_Cancel
#define NULL
Definition: types.h:112

Member Function Documentation

◆ InvokeCancel()

void FxRequestCancelCallback::InvokeCancel ( __in FxCallbackLock Lock,
__in WDFREQUEST  Request 
)
inline

Definition at line 46 of file fxrequestcallbacks.hpp.

50  {
51  if (m_Cancel != NULL) {
52  PFN_WDF_REQUEST_CANCEL pMethod;
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  }
PFN_WDF_REQUEST_CANCEL m_Cancel
EVT_WDF_REQUEST_CANCEL * PFN_WDF_REQUEST_CANCEL
Definition: wdfrequest.h:130
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
#define NULL
Definition: types.h:112
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:124

Member Data Documentation

◆ m_Cancel

PFN_WDF_REQUEST_CANCEL FxRequestCancelCallback::m_Cancel

The documentation for this class was generated from the following file: