Simple COM/DCOM interface question (IUnknown)
Posted on 2004-10-17
What I understand that in COM programming all interfaces MUST inherit from IUnknown. For example,
class IPatient : public IUnknown
Is this assumption true on ALL cases? That is, do ALL COM compliant interfaces inherit from IUnknown? The reason that I ask is because I am writing a basic COM management library and it doesn't make sense that I need to know the interface in order to call the Release method. For example is it always going to be safe to type cast an interface pointer to IUnknown to call the Release method? For example,
void* pInterface = GetInterfacePtr(CLSID,IID);
Thanks for the help!!