Share via


IUnknown::AddRef

  • Note   This topic describes IUnknown in the context of the AVIFile and AVIStream interfaces. For general information about IUnknown, see the Component Object Model (COM) documentation in the Windows SDK.

The AddRef method increments the reference count of the appropriate handler: IAVIEditStream, IAVIFile, IAVIStream, IAVIStreaming, or IGetFrame. When the reference count is nonzero, the handler must retain resources for the file or stream.

ULONG AddRef(
  LPUNKNWON ps  
);

Parameters

ps

Pointer to an IAVIEditStream, IAVIFile, IAVIStream, IAVIStreaming, or IGetFrame interface.

Return Values

Returns the resulting reference count.

Remarks

For handlers written in C++, AddRef has the following syntax:

HRESULT AddRef(VOID); 
 

Requirements

**  Windows NT/2000/XP:** Requires Windows NT 3.1 or later.
**  Windows 95/98/Me:** Requires Windows 95 or later.
**  Header:** Declared in unknwn.h.

See Also

Custom File and Stream Handlers, Custom File and Stream Handler Interfaces, IAVIEditStream, IAVIFile, IAVIStream, IAVIStreaming, IGetFrame