33#include "FxMessageDispatchUm.tmh"
38{0xcba20727, 0x0910, 0x4a8a, { 0xaa, 0xda, 0xc3, 0x1d, 0x5c, 0xf5, 0xbf, 0x20 }};
54 *ppWudfDispatcher =
NULL;
57 if (
NULL == pWudfDispatcher) {
60 "Memory allocation failure. Cannot create Dispatcher object.\n");
64 *ppWudfDispatcher = pWudfDispatcher;
132 else if ( iid == IID_IFxMessageDispatch ) {
133 *
ppv =
static_cast<IFxMessageDispatch *
> (
this);
135 else if ( iid == IID_IFxMessageDispatch2 ) {
136 *
ppv =
static_cast<IFxMessageDispatch2 *
> (
this);
158 IWudfPnpIrp * pIPnpIrp =
NULL;
179 _In_ IWudfIoIrp * pCreateIrp
271 _Out_ UMINT::WDF_DEVICE_IO_BUFFER_RETRIEVAL *RetrievalMode,
272 _Out_ UMINT::WDF_DEVICE_IO_TYPE *RWPreference,
273 _Out_ UMINT::WDF_DEVICE_IO_TYPE *IoctlPreference
306 pDeviceInterfaceGuid,
358 _In_ IFxMessageDispatch* pIFxMessageDispatch
364 reinterpret_cast<void**
>(&pWudfDispatcher)
368 return pWudfDispatcher;
380 IFxMessageDispatch * pIFxMessageDispatch =
NULL;
382 (
PVOID*)&pIFxMessageDispatch);
384 pIFxMessageDispatch->Release();
385 return pIFxMessageDispatch;
#define InterlockedIncrement
#define InterlockedDecrement
static BOOL TransportQueryId(_In_ IWudfDevice *DeviceObject, _In_ DWORD Id, _In_ PVOID DataBuffer, _In_ SIZE_T cbDataBufferSize)
static WUDF_INTERFACE_CONTEXT RemoteInterfaceArrival(_In_ IWudfDevice *DeviceObject, _In_ LPCGUID DeviceInterfaceGuid, _In_ PCWSTR SymbolicLink)
__inline ULONG GetDirectTransferThreshold(VOID)
static void PoFxDevicePowerRequired(_In_ MdDeviceObject DeviceObject)
static void RemoteInterfaceRemoval(_In_ IWudfDevice *DeviceObject, _In_ WUDF_INTERFACE_CONTEXT RemoteInterfaceID)
static void PoFxDevicePowerNotRequired(_In_ MdDeviceObject DeviceObject)
static VOID GetPreferredTransferMode(_In_ MdDeviceObject DeviceObject, _Out_ UMINT::WDF_DEVICE_IO_BUFFER_RETRIEVAL *RetrievalMode, _Out_ WDF_DEVICE_IO_TYPE *RWPreference, _Out_ WDF_DEVICE_IO_TYPE *IoctlPreference)
NTSTATUS ProcessWmiPowerQueryOrSetData(_In_ RdWmiPowerAction Action, _Out_ BOOLEAN *QueryResult)
static IFxMessageDispatch * _GetDispatcherItf(_In_ FxMessageDispatch *pWudfDispatcher)
static NTSTATUS _CreateAndInitialize(_In_ PFX_DRIVER_GLOBALS DriverGlobals, _In_ FxDevice *Device, _Out_ FxMessageDispatch **ppWudfDispatcher)
virtual BOOL __stdcall TransportQueryID(_In_ DWORD Id, _In_ PVOID DataBuffer, _In_ SIZE_T cbDataBufferSize)
virtual void __stdcall FlushBuffers(_In_ IWudfIoIrp *pIrp, _In_opt_ IUnknown *pFxContext)
virtual VOID __stdcall GetPreferredTransferMode(_Out_ UMINT::WDF_DEVICE_IO_BUFFER_RETRIEVAL *RetrievalMode, _Out_ UMINT::WDF_DEVICE_IO_TYPE *RWPreference, _Out_ UMINT::WDF_DEVICE_IO_TYPE *IoctlPreference)
virtual void __stdcall QueryInformationFile(_In_ IWudfIoIrp *pIrp, _In_opt_ IUnknown *pFxContext)
virtual void __stdcall ReadFile(_In_ IWudfIoIrp *pIrp, _In_opt_ IUnknown *pFxContext)
HRESULT __stdcall QueryInterface(_In_ REFIID riid, _Out_ LPVOID *ppvObject)
virtual WUDF_INTERFACE_CONTEXT __stdcall RemoteInterfaceArrival(_In_ LPCGUID pDeviceInterfaceGuid, _In_ PCWSTR pSymbolicLink)
virtual void __stdcall PoFxDevicePowerNotRequired(VOID)
virtual void __stdcall CloseFile(_In_ IWudfIoIrp *pIrp, _In_ IUnknown *pFxContext)
virtual void __stdcall SetInformationFile(_In_ IWudfIoIrp *pIrp, _In_opt_ IUnknown *pFxContext)
virtual NTSTATUS __stdcall ProcessWmiPowerQueryOrSetData(_In_ RdWmiPowerAction Action, _Out_ BOOLEAN *QueryResult)
virtual void __stdcall CleanupFile(_In_ IWudfIoIrp *pIrp, _In_ IUnknown *pFxContext)
virtual void __stdcall DeviceControl(_In_ IWudfIoIrp *pIrp, _In_opt_ IUnknown *pFxContext)
virtual void __stdcall WriteFile(_In_ IWudfIoIrp *pIrp, _In_opt_ IUnknown *pFxContext)
virtual void __stdcall CreateFile(_In_ IWudfIoIrp *pCreateIrp)
ULONG __stdcall Release()
virtual void __stdcall RemoteInterfaceRemoval(_In_ WUDF_INTERFACE_CONTEXT RemoteInterfaceID)
static FxMessageDispatch * _GetObjFromItf(_In_ IFxMessageDispatch *pIFxMessageDispatch)
virtual void __stdcall DispatchPnP(_In_ IWudfIrp *pIrp)
virtual ULONG __stdcall GetDirectTransferThreshold(VOID)
virtual void __stdcall PoFxDevicePowerRequired(VOID)
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
return pDevice GetDeviceObject()
return pDriver GetDriverObject()
const GUID IID_FxMessageDispatch
const GUID IID_FxMessageDispatch
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
UINT64 WUDF_INTERFACE_CONTEXT
#define IRP_MJ_DEVICE_CONTROL
#define IRP_MJ_SET_INFORMATION
#define IRP_MJ_QUERY_INFORMATION
#define TRACE_LEVEL_ERROR
_Must_inspect_result_ _In_ WDFDEVICE Device
enum _WDF_DEVICE_IO_TYPE WDF_DEVICE_IO_TYPE
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
#define IRP_MJ_FLUSH_BUFFERS