![]() | GetRepCapItemName |
Gets the physical name or virtual name of the repeated capability instance.
template <typename RepCapClass> HRESULT GetRepCapItemName(long lIndex, BSTR* pbstrInstanceName);
Template parameter identifying the repeated capability class.
[in] One-based index of the desired repeated capability instance.
[out] Virtual name of repeated capability instance. If no virtual name was mapped to the physical name, then the physical name is returned.
Returns S_OK if successful, otherwise a failure HRESULT.
The signature of this function is specifically designed to match that of the standard Name property found on all repeated capabilities.
The following example demonstrates use of the GetRepCapItemName function.
// CoAcme4321.cpp HRESULT Acme4321::IAcme4321Channels_get_Name(long Index, BSTR* val) { HRESULT hr = S_OK; hr = GetRepCapItemName<Acme4321Channel>(Index, val); return hr; }