6template <
class T,
class Base>
12 STDMETHOD_(
long, AddRef)(THIS) OVERRIDE
14 return Base::AddRef();
16 STDMETHOD_(
long, Release)(THIS) OVERRIDE
18 return Base::Release();
20 STDMETHOD_(
void, OnFinalRelease)(THIS) OVERRIDE
22 return Base::OnFinalRelease();
25 STDMETHOD_(IWindow *, ToIWindow)(THIS) OVERRIDE
27 return (IWindow *)
this;
30 STDMETHOD_(HRESULT, QueryInterface)(REFGUID id, IObjRef **ppRet) OVERRIDE
32 if (
id == T::GetIID())
40 return Base::QueryInterface(
id, ppRet);