reactos/sdk/lib/drivers/wdf/shared/inc/private/common/fxdevicecallbacks.hpp
Victor Perevertkin 8a978a179f
[WDF] Add Windows Driver Framework files
Takern from Microsoft GitHub repo:
d9c6040fe9

Licensed under MIT
2020-11-03 00:06:26 +03:00

63 lines
914 B
C++

/*++
Copyright (c) Microsoft Corporation
Module Name:
FxDeviceCallbacks.h
Abstract:
This module implements the FxDevice object callbacks
Author:
Environment:
Both kernel and user mode
Revision History:
--*/
#ifndef _FXDEVICECALLBACKS_H_
#define _FXDEVICECALLBACKS_H_
//
// These delegates are in a seperate file
//
//
// DrvDeviceInitialize callback delegate
//
class FxIoInCallerContext : public FxCallback {
public:
PFN_WDF_IO_IN_CALLER_CONTEXT m_Method;
FxIoInCallerContext(
__in PFX_DRIVER_GLOBALS FxDriverGlobals
) : FxCallback(FxDriverGlobals), m_Method(NULL)
{
}
VOID
Invoke(
__in WDFDEVICE Device,
__in WDFREQUEST Request
)
{
if (m_Method != NULL) {
CallbackStart();
m_Method(Device, Request);
CallbackEnd();
}
}
};
#endif // _FXDEVICECALLBACKS_H_