Click or drag to resize

GetParent

Gets the parent repeated capability instance.

template <typename T>
T* GetParent() const;
Return Value

Returns a pointer to the parent repeated capability instance.

Remarks

If the calling code is not on a repeated capability or the calling code is on the main driver class, this function returns a pointer to the main driver class. Thus, GetParent if safe to call from any driver function.

Example

The following example demonstrates use of the GetParent function.

C++
// CoAcme4321Channel.cpp
HRESULT Acme4321Channel::Configure(double dOffset)
{
  HRESULT hr = S_OK;

  CString strParentName = GetParent()->GetInstanceName();

  return hr;
}
See Also

Other Resources

Download a complete CHM version of this documentation here.