What is IUKNOWN interface is c#

Posted by Jitendrasoft09 under C# on 6/26/2013 | Points: 10 | Views : 560 | Status : [Member] [MVP] | Replies : 1
Hi All,
I want to understand what is IUKNOWN interface is c# and how program to be written ,let me know if anybody knows.

Jitendra Kumar
If my post helps you, plz mark as an answer.


Posted by: Satyapriyanayak on: 6/26/2013 [Member] [MVP] Silver | Points: 25

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.


If this post helps you mark it as answer

Jitendrasoft09, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response