IUnknown::AddRef

Increases the interface's reference count by 1.

ULONG AddRef();

Parameters

None.

Return Values

Returns the new reference count. This value is for diagnostic and testing purposes only.

Remarks

When the interface is created, its reference count is set to 1. Every time an application obtains an interface to the object or calls the IUnknown::AddRef method, the interface's reference count is increased by 1. Use the IUnknown::Release method to decrease the interface's reference count by 1.

Requirements

Header: Declared in Unknwn.h.