Click or drag to resize

GetRepCapItemCount

Gets the total number of repeated capability instances of the specified class.

template <typename RepCapClass>
HRESULT GetRepCapItemCount(long* plCount);
Parameters
RepCapClass

Template parameter identifying the repeated capability class.

plCount

[out] Returns the total number of repeated capability instances of the class identified by the RepCapClass template parameter.

Return Value

Returns S_OK if successful, otherwise a failure HRESULT.

Remarks

The signature of this function is specifically designed to match that of the standard Count method found on all repeated capabilities.

Example

The following example demonstrates use of the GetRepCapItemCount function.

C++
// CoAcme4321.cpp
HRESULT Acme4321::IAcme4321Channels_get_Count(long* val)
{
    HRESULT hr = S_OK;

    hr = GetRepCapItemCount<Acme4321Channel>(val);

    return hr;
}
See Also

Download a complete CHM version of this documentation here.