GetInstanceIndex
Gets the zero-based index of the repeated capability instance.
Syntax
Section titled “Syntax”int GetInstanceIndex() const;Return value
Section titled “Return value”Returns the zero-based index of the repeated capability instance.
Example
Section titled “Example”The following example demonstrates use of the GetInstanceIndex function.
HRESULT Acme4321::Configure(double dOffset){ HRESULT hr = S_OK;
// Format the command using the repeated capability index // GetInstanceIndex() is 0-based, the SCPI command is 1-based hr = io.Printf(_T("CH%d:OFFS %.15g"), GetInstanceIndex() + 1, dOffset);
return hr;}