MCPcopy Create free account
hub / github.com/LegacyUpdate/LegacyUpdate / ComClass

Class ComClass

include/com/ComClass.h:8–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6
7template<typename TImpl, typename TInterface>
8class ComClass : public TInterface {
9protected:
10 TImpl *m_pParent;
11
12public:
13 ComClass(TImpl *pParent) : m_pParent(pParent) {}
14
15 // IUnknown delegation
16 STDMETHODIMP QueryInterface(REFIID riid, void **ppvObject) {
17 return m_pParent->QueryInterface(riid, ppvObject);
18 }
19
20 STDMETHODIMP_(ULONG) AddRef(void) {
21 return m_pParent->AddRef();
22 }
23
24 STDMETHODIMP_(ULONG) Release(void) {
25 return m_pParent->Release();
26 }
27};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected