![]() | GetRepCapItemCount |
Gets the total number of repeated capability instances of the specified class.
template <typename RepCapClass> HRESULT GetRepCapItemCount(long* plCount);
Template parameter identifying the repeated capability class.
[out] Returns the total number of repeated capability instances of the class identified by the RepCapClass template parameter.
Returns S_OK if successful, otherwise a failure HRESULT.
The signature of this function is specifically designed to match that of the standard Count method found on all repeated capabilities.
The following example demonstrates use of the GetRepCapItemCount function.
// CoAcme4321.cpp HRESULT Acme4321::IAcme4321Channels_get_Count(long* val) { HRESULT hr = S_OK; hr = GetRepCapItemCount<Acme4321Channel>(val); return hr; }