Click or drag to resize

GetRoot

Gets a pointer to the main driver class.

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

Returns a pointer to the main driver class.

Remarks

This function always returns a pointer to the main driver class, even if it is called from the main driver. Thus, GetRoot if safe to call from any driver function.

Example

The following example demonstrates use of the GetRoot function.

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

  Acme4321* pRoot = GetRoot();

  return hr;
}
See Also

Other Resources

Download a complete CHM version of this documentation here.