Template parameter identifying the repeated capability class.
GetRepCapItem
Gets the root interface pointer of a child repeated capability instance.
Syntax
Section titled “Syntax”template <typename RepCapClass, typename ItfType>HRESULT GetRepCapItem(CComBSTR bstrInstanceName, ItfType** ppRepCap);Parameters
Section titled “Parameters”RepCapClass
bstrInstanceName
[in] Physical name or virtual name of the desired repeated capability instance.
ppRepCap
[out] Pointer to the root interface of the repeated capability instance identified by the RepCapClass and bstrInstanceName parameters.
Return value
Section titled “Return value”Returns S_OK if successful, otherwise a failure HRESULT.
Remarks
Section titled “Remarks”The signature of this function is specifically designed to match that of the standard Item method found on all collection-style repeated capabilities.
Example
Section titled “Example”The following example demonstrates use of the GetRepCapItem function.
HRESULT Acme4321::IAcme4321Channels_get_Item(BSTR Name, IAcme4321Channel** val){ HRESULT hr = S_OK;
hr = GetRepCapItem<Acme4321Channel>(Name, val);
return hr;}