1 /*++
2 
3 Copyright (c) Microsoft Corporation
4 
5 Module Name:
6 
7     FxDeviceCallbacks.h
8 
9 Abstract:
10 
11     This module implements the FxDevice object callbacks
12 
13 Author:
14 
15 
16 
17 
18 Environment:
19 
20     Both kernel and user mode
21 
22 Revision History:
23 
24 --*/
25 
26 #ifndef _FXDEVICECALLBACKS_H_
27 #define _FXDEVICECALLBACKS_H_
28 
29 //
30 // These delegates are in a seperate file
31 //
32 
33 //
34 // DrvDeviceInitialize callback delegate
35 //
36 class FxIoInCallerContext : public FxCallback {
37 
38 public:
39     PFN_WDF_IO_IN_CALLER_CONTEXT m_Method;
40 
41     FxIoInCallerContext(
42         __in PFX_DRIVER_GLOBALS FxDriverGlobals
43         ) : FxCallback(FxDriverGlobals), m_Method(NULL)
44     {
45     }
46 
47     VOID
48     Invoke(
49         __in WDFDEVICE Device,
50         __in WDFREQUEST Request
51         )
52     {
53         if (m_Method != NULL) {
54             CallbackStart();
55             m_Method(Device, Request);
56             CallbackEnd();
57         }
58     }
59 };
60 
61 
62 
63 #endif // _FXDEVICECALLBACKS_H_
64