Click or drag to resize

GetInstanceName

Gets the physical name of the repeated capability instance.

const CString& GetInstanceName() const;
Return Value

Returns the physical name of the repeated capability instance.

Example

The following example demonstrates use of the GetInstanceName function.

C++
// 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;
}
See Also

Download a complete CHM version of this documentation here.