-
Notifications
You must be signed in to change notification settings - Fork 0
/
comsup.c
58 lines (44 loc) · 841 Bytes
/
comsup.c
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
#define INITGUID
#include <windef.h>
#include "comsup.h"
LONG LockCount;
LONG ObjectCount;
VOID
DllInitServer(VOID)
{
ObjectCount = 0;
LockCount = 0;
}
STDAPI
DllRegisterServer(VOID)
{
/* Always return S_OK, since there is currently nothing that can go wrong */
return S_OK;
}
STDAPI
DllUnregisterServer(VOID)
{
/* Always return S_OK, since there is currently nothing that can go wrong */
return S_OK;
}
STDAPI
DllCanUnloadNow(VOID)
{
if ((ObjectCount != 0) || (LockCount != 0))
{
return S_FALSE;
}
else
{
return S_OK;
}
}
STDAPI
DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
HRESULT hr;
/* There are no classes to export, so always return CLASS_E_CLASSNOTAVAILABLE*/
*ppv = NULL;
hr = CLASS_E_CLASSNOTAVAILABLE;
return hr;
}