Microsoft DirectX 9.0

IAMTimeline::CreateEmptyNode

The CreateEmptyNode method creates a new timeline object.

Use this method to create timeline objects, rather than the CoCreateInstance function, because this method performs important initialization routines. Every object created by this method supports at least the IAMTimelineObj interface, along with other interfaces specific to that type of object.

Syntax

HRESULT CreateEmptyNode(
    IAMTimelineObj **ppObj,
    TIMELINE_MAJOR_TYPE Type
);

Parameters

ppObj

[out] Address of a pointer that receives the new object's IAMTimelineObj interface.

Type

Member of the TIMELINE_MAJOR_TYPE enumerated type, specifying the type of object to create.

Return Value

Returns one of the following HRESULT values.

Return code Description
S_OK Success.
E_INVALIDARG Object type is not valid.
E_OUTOFMEMORY Insufficient memory.
E_POINTER NULL pointer argument.

Remarks

Do not add the new object to another timeline instance. Every object in a timeline must be created by that timeline.

If the method succeeds, the IAMTimelineObj interface that it returns has an outstanding reference count. Be sure to release the interface when you are finished using it.

Requirements

Header: Include Qedit.h. This header file is not compatible with Microsoft® Direct3D® headers later than version 7.

Library: Use strmiids.lib.

See Also