diff options
| author | Dave Wilson <[email protected]> | 2015-03-17 19:50:07 -0700 |
|---|---|---|
| committer | Dave Wilson <[email protected]> | 2015-03-17 19:50:07 -0700 |
| commit | 97cf5197cf5b882b2c689d8dc2b555f2edf8f418 (patch) | |
| tree | 46f3701832d70b420eb0fc0eb93261f9da45db3f /general/echo/umdfSocketEcho/Driver/device.h | |
| parent | ef1905bf1e8825bb31120dfb27e0daf3154d859a (diff) | |
Initial publish
Diffstat (limited to 'general/echo/umdfSocketEcho/Driver/device.h')
| -rw-r--r-- | general/echo/umdfSocketEcho/Driver/device.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/general/echo/umdfSocketEcho/Driver/device.h b/general/echo/umdfSocketEcho/Driver/device.h new file mode 100644 index 00000000..176f10e6 --- /dev/null +++ b/general/echo/umdfSocketEcho/Driver/device.h @@ -0,0 +1,70 @@ +/*++ + +Copyright (C) Microsoft Corporation, All Rights Reserved + +Module Name: + + Device.h + +Abstract: + + This module contains the type definitions for the UMDF Skeleton sample + driver's device callback class. + +Environment: + + Windows User-Mode Driver Framework (WUDF) + +--*/ + +#pragma once + +// +// Class for the iotrace driver. +// + +class ATL_NO_VTABLE CMyDevice : + public CComObjectRootEx<CComMultiThreadModel>, + public IFileCallbackCleanup, + public IFileCallbackClose, + public IObjectCleanup +{ +public: + +DECLARE_NOT_AGGREGATABLE(CMyDevice) + +BEGIN_COM_MAP(CMyDevice) + COM_INTERFACE_ENTRY(IFileCallbackCleanup) + COM_INTERFACE_ENTRY(IFileCallbackClose) + COM_INTERFACE_ENTRY(IObjectCleanup) +END_COM_MAP() + +public: + + //IFileCallbackCleanup + STDMETHOD_(void,OnCleanupFile)(_In_ IWDFFile* pWdfFileObject); + //IFileCallbackClose + STDMETHOD_(void,OnCloseFile)(_In_ IWDFFile* pWdfFileObject); + //IObjectCleanup + STDMETHOD_(void,OnCleanup)(_In_ IWDFObject* pWdfObject); + +public: + + STDMETHOD(Initialize)(_In_ IWDFDriver* pWdfDriver, _In_ IWDFDeviceInitialize* pWdfDeviceInit); + + HRESULT + Configure( + ); + + IWDFDevice * + GetFxDevice( + ) + { + return m_FxDevice; + } + +private: + CComPtr<IWDFDevice> m_FxDevice; + HRESULT ReadAndAssignPropertyStoreValue(); + +}; |
