AddRef
Microsoft DirectX 9.0 SDK Update (October 2004)

IUnknown::AddRef Method


Increases the interface's reference count by 1.

Syntax

ULONG AddRef(VOID);

Return Value

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.



© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.