Skip to content

GetInstanceName

Gets the physical name of the repeated capability instance.

const CString& GetInstanceName() const;

Returns the physical name of the repeated capability instance.

The following example demonstrates use of the GetInstanceName function.

CoAcme4321.cpp
HRESULT Acme4321::Configure(double dOffset)
{
HRESULT hr = S_OK;
// Format the command using the repeated capability physical name
// "CH1", "CH2", "CH3", ...
hr = io.Printf(_T("%s:OFFS %.15g"), LPCTSTR(GetInstanceName()), dOffset);
return hr;
}