AdBrite

Your Ad Here

Thursday, April 21, 2011

IUnknown Interface


Enables clients to get pointers to other interfaces on a given object through the QueryInterface method, and manage the existence of the object through the AddRef and Release methods. All other COM interfaces are inherited, directly or indirectly, from IUnknown. Therefore, the three methods in IUnknown are the first entries in the VTable for every interface.
When To Implement

You must implement IUnknown as part of every interface. If you are using C++ multiple inheritance to implement multiple interfaces, the various interfaces can share one implementation of IUnknown. If you are using nested classes to implement multiple interfaces, you must implement IUnknown once for each interface you implement.
When To Use

Use IUnknown methods to switch between interfaces on an object, add references, and release objects.

No comments:

Post a Comment

BidVertiser

pocket cents

PocketCents Local Online Advertising