Partager via


3.1.1.5.8 IUnknown Interface

The IUnknown interface enables clients to retrieve pointers to other interfaces on a given object through the QueryInterface method, and to manage the existence of the object through the IUnknown::AddRef and IUnknown::Release methods. All other COM interfaces are inherited, directly or indirectly, from IUnknown. Therefore, the three methods in IUnknown reserve opnums 0 through 2, inclusive, for every interface.

The IUnknown interface has the local IDL attribute (section 2.2.27).

The UUID for this interface is {00000000-0000-0000-C000-000000000046}.

Methods in RPC Opnum Order

Method

Description

Opnum0NotUsedOnWire

QueryInterface

Reserved for local use.

Opnum: 0

Opnum1NotUsedOnWire

AddRef

Reserved for local use.

Opnum: 1

Opnum2NotUsedOnWire

Release

Reserved for local use.

Opnum: 2

In the preceding table, the term "Reserved for local use" means that the client MUST NOT send the opnum, and the server behavior is undefined<50> since it does not affect interoperability.

All methods MUST NOT throw exceptions.