blob: 6affa20fb8c903fb3c5303499c8a7a1f165f506f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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);
};
|