blob: 85c866ecb1794b1dbea3e89784f9014b5ffd91c2 (
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
/*++
Copyright (C) Microsoft Corporation, All Rights Reserved.
Module Name:
dllsup.cpp
Abstract:
This module contains the implementation of the UMDF Socktecho Sample
Driver's entry point and its exported functions for providing COM support.
This module can be copied without modification to a new UMDF driver. It
depends on some of the code in comsup.cpp & comsup.h to handle DLL
registration and creating the first class factory.
This module is dependent on the following defines:
MYDRIVER_TRACING_ID - A wide string passed to WPP when initializing
tracing.
MYDRIVER_CLASS_ID - A GUID encoded in struct format used to
initialize the driver's ClassID.
These are defined in internal.h for the sample. If you choose
to use a different primary include file, you should ensure they are
defined there as well.
Environment:
WDF User-Mode Driver Framework (WDF:UMDF)
--*/
#include "internal.h"
#include "dllsup.tmh"
const GUID CLSID_MyDriverCoClass = MYDRIVER_CLASS_ID;
class CNetNfpProviderModule : public CAtlDllModuleT< CNetNfpProviderModule >
{
};
OBJECT_ENTRY_AUTO(CLSID_MyDriverCoClass, CMyDriver)
CNetNfpProviderModule _AtlModule;
BOOL
WINAPI
DllMain(
HINSTANCE ModuleHandle,
DWORD Reason,
PVOID Reserved
)
/*++
Routine Description:
This is the entry point and exit point for the I/O trace driver. This
does very little as the I/O trace driver has minimal global data.
This method initializes tracing.
Arguments:
ModuleHandle - the DLL handle for this module.
Reason - the reason this entry point was called.
Reserved - unused
Return Value:
TRUE
--*/
{
UNREFERENCED_PARAMETER( ModuleHandle );
if (DLL_PROCESS_ATTACH == Reason)
{
//
// Initialize tracing.
//
WPP_INIT_TRACING(MYDRIVER_TRACING_ID);
TracingTlsInitialize();
}
else if (DLL_PROCESS_DETACH == Reason)
{
//
// Cleanup tracing.
//
TracingTlsFree();
WPP_CLEANUP();
}
return _AtlModule.DllMain(Reason, Reserved);
;
}
_Check_return_
STDAPI DllGetClassObject(_In_ REFCLSID rclsid, _In_ REFIID riid, _Outptr_ LPVOID* ppv)
{
return _AtlModule.DllGetClassObject(rclsid, riid, ppv);
}
|