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.

Methods

The IUnknown interface has these methods.

Method Description
IUnknown::AddRef Increments the reference count for an interface on an object. This method should be called for every new copy of a pointer to an interface on an object.
IUnknown::QueryInterface Retrieves pointers to the supported interfaces on an object.
IUnknown::QueryInterface Retrieves pointers to the supported interfaces on an object.
IUnknown::Release Decrements the reference count for an interface on an object.

Requirements

   
Windows version Windows 2000 Professional [desktop apps | UWP apps] Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header unknwn.h

See Also

Using and Implementing IUnknown