IUnknown class com

The foundational COM interface that provides methods for querying other interfaces and managing the lifecycle of a COM object.

All COM interfaces directly or indirectly inherit from IUnknown. As such, the three methods defined by IUnknown (queryInterface, addRef, and release) are always the first entries in the VTable for any COM interface.

To learn more, see learn.microsoft.com/windows/win32/api/unknwn/nn-unknwn-iunknown.

Implemented types
Implementers

Constructors

IUnknown(VTablePointer ptr)
Creates a new instance of IUnknown from a VTablePointer.
IUnknown.from(IUnknown interface)
Creates a new instance of IUnknown from an existing interface.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
ptr VTablePointer
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addRef() int
Increments the reference count of this COM object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
queryInterface<T extends IUnknown>() → T
Queries this COM object for a specific interface defined by the type parameter T.
release() int
Decrements the reference count of this COM object.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited