Click or drag to resize

GetRepCapItemName

Gets the physical name or virtual name of the repeated capability instance.

template <typename RepCapClass>
HRESULT GetRepCapItemName(long lIndex, BSTR* pbstrInstanceName);
Parameters
RepCapClass

Template parameter identifying the repeated capability class.

lIndex

[in] One-based index of the desired repeated capability instance.

pbstrInstanceName

[out] Virtual name of repeated capability instance. If no virtual name was mapped to the physical name, then the physical name is returned.

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 Name property found on all repeated capabilities.

Example

The following example demonstrates use of the GetRepCapItemName function.

C++
// CoAcme4321.cpp
HRESULT Acme4321::IAcme4321Channels_get_Name(long Index, BSTR* val)
{
    HRESULT hr = S_OK;

    hr = GetRepCapItemName<Acme4321Channel>(Index, val);

    return hr;
}
See Also

Download a complete CHM version of this documentation here.