-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.h
25 lines (22 loc) · 1.03 KB
/
common.h
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
#ifndef COMMON_H_
#define COMMON_H_
#define DUMMY_IUNKNOWN_REFERENCE \
protected: \
size_t _ref; \
public: \
virtual ULONG STDMETHODCALLTYPE AddRef(void) \
{ \
return ++_ref; \
} \
virtual ULONG STDMETHODCALLTYPE Release(void) \
{ \
return --_ref; \
}
#define DUMMY_IUNKNOWN \
HRESULT STDMETHODCALLTYPE \
QueryInterface(REFIID iid, LPVOID *ppv) \
{ \
return E_NOINTERFACE; \
} \
DUMMY_IUNKNOWN_REFERENCE
#endif // COMMON_H_