-
A COM interface is a never changed deal between the client code and the server code. Think of it as the same brand of ATM machine, running the same code - for every bank.
If you learn how to use the one machine, you can deposit/remove/query from any bank that you have an account with. IUnknown makes those interfaces work.
IUknown supports three methods:
AddRef - this increments the counter for number of connections (objects) that all clients on the network or node have to the object. Called to increment reference counter.
Remove - decrements the reference counter. When zero, the SCM
removes the dll or ActiveX exe from memory.
QueryDef - lookup the names and methods of other interfaces.
IUknown has to exist for any COM object to work. In theory, but not practice, you can have a COM object with only the IUknown interface and it will work.
-
Thr right place
The function of IUnknown and other explanation of COM is better explained in many books.
If you don't have any preference, try Dan Appleman's book 'ActiveX and COM, and guide to the perplexed'. The version 5 of this book is available online at www.informit.com
Spend a little time in understanding COM. Its worth.