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/driver.h | |
| parent | ef1905bf1e8825bb31120dfb27e0daf3154d859a (diff) | |
Initial publish
Diffstat (limited to 'general/echo/umdfSocketEcho/Driver/driver.h')
| -rw-r--r-- | general/echo/umdfSocketEcho/Driver/driver.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/general/echo/umdfSocketEcho/Driver/driver.h b/general/echo/umdfSocketEcho/Driver/driver.h new file mode 100644 index 00000000..6affa20f --- /dev/null +++ b/general/echo/umdfSocketEcho/Driver/driver.h @@ -0,0 +1,53 @@ +/*++ + +Copyright (C) Microsoft Corporation, All Rights Reserved + +Module Name: + + Driver.h + +Abstract: + + This module contains the type definitions for the UMDF Socketecho sample's + driver callback class. + +Environment: + + Windows User-Mode Driver Framework (WUDF) + +--*/ + +#pragma once + +// +// This class handles driver events for the socktecho sample. In particular +// it supports the OnDeviceAdd event, which occurs when the driver is called +// to setup per-device handlers for a new device stack. +// + +extern const GUID CLSID_MyDriverCoClass; + +class ATL_NO_VTABLE CMyDriver : + public CComObjectRootEx<CComMultiThreadModel>, + public CComCoClass<CMyDriver, &CLSID_MyDriverCoClass>, + public IDriverEntry +{ +public: + +DECLARE_NOT_AGGREGATABLE(CMyDriver) + +DECLARE_CLASSFACTORY(); + +DECLARE_NO_REGISTRY(); + +BEGIN_COM_MAP(CMyDriver) + COM_INTERFACE_ENTRY(IDriverEntry) +END_COM_MAP() + +public: + // IDriverEntry + STDMETHOD(OnInitialize)(_In_ IWDFDriver* pWdfDriver); + STDMETHOD(OnDeviceAdd)(_In_ IWDFDriver* pWdfDriver, _In_ IWDFDeviceInitialize* pWdfDeviceInit); + STDMETHOD_(void,OnDeinitialize)(_In_ IWDFDriver* pWdfDriver); +}; + |
