Windows2000/private/shell/shell32/commobj.c

36 lines
712 B
C
Raw Normal View History

2001-01-01 00:00:00 +01:00
#include "shellprv.h"
#pragma hdrstop
#include "defext.h"
// Common : thunks
STDMETHODIMP Common_QueryInterface(void * punk, REFIID riid, LPVOID * ppvObj)
{
CCommonUnknown *this = IToCommonUnknown(punk);
return(this->unk.lpVtbl->QueryInterface(&(this->unk), riid, ppvObj));
}
STDMETHODIMP_(ULONG) Common_AddRef(void * punk)
{
CCommonUnknown *this = IToCommonUnknown(punk);
return(this->unk.lpVtbl->AddRef(&(this->unk)));
}
STDMETHODIMP_(ULONG) Common_Release(void * punk)
{
CCommonUnknown *this = IToCommonUnknown(punk);
// This is a fatal assertion; it will cause a stack fault.
ASSERT(punk!=(LPVOID)&this->unk);
return(this->unk.lpVtbl->Release(&(this->unk)));
}