Template parameter specifying the repeated capability class.
GetRepCapCount
Gets the total number of repeated capability instances of the specified class.
Syntax
Section titled “Syntax”template <typename RepCapClass>int GetRepCapCount() const;Parameters
Section titled “Parameters”RepCapClass
Return value
Section titled “Return value”Returns the total number of repeated capability instances of the class identified by the RepCapClass template parameter.
Remarks
Section titled “Remarks”The count returned by this function includes the sum of the static repeated capabilities and dynamic repeated capabilities.
Example
Section titled “Example”The following example demonstrates use of the GetRepCapCount function.
HRESULT Acme4321::PresetAll(){ HRESULT hr = S_OK;
int nRepCapCount = GetRepCapCount<Acme4321Channel>(); for (int i = 0; i < nRepCapCount; i++) { Acme4321Channel* pChannel = GetRepCap<Acme4321Channel>(i);
// Call C++ functions on the Acme4321Channel class... pChannel->PresetHelper(); // Not a COM interface method }
return hr;}