Microsoft DirectX 8.1 (C++)

IAMTimelineComp::GetCountOfType

The GetCountOfType method retrieves the number of objects of a given type contained in this composition and all its virtual tracks, recursively.

Syntax

HRESULT GetCountOfType(
    long *pVal,
    long *pValWithComps,
    TIMELINE_MAJOR_TYPE MajorType
);

Parameters

pVal

Pointer to a variable that receives the number of objects of the specified type contained in this composition and all its virtual tracks, recursively.

pValWithComps

Pointer to a variable that receives the count returned in pVal plus the number of compositions searched, including this one.

MajorType

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

Return Value

Returns S_OK if successful, or E_POINTER otherwise.

Remarks

Typically, an application will not call this method. It is called by the render engine.

If you count compositions, the value returned in pVal is zero and the value returned in pValWithComps is the number of compositions. The value of *pValWithComps includes the composition on which you call the method. For example, if you call this method on an empty composition, *pValWithComps equals 1.

Groups cannot reside inside compositions, so you cannot use this method to count groups. (The returned count will always be zero.) To count groups, call the IAMTimeline::GetGroupCount method.

See Also