IOleControlSite::GetExtendedControl method

Retrieves an IDispatch pointer to the extended control that the container uses to wrap the real control.


HRESULT GetExtendedControl(
  IDispatch **ppDisp



A pointer to an IDispatch pointer variable that receives the interface pointer to the extended control. If an error occurs, the implementation must set *ppDisp to NULL. On success, the caller is responsible for calling Release when *ppDisp is no longer needed.

Return Value

This method can return the standard return values E_OUTOFMEMORY and E_UNEXPECTED, as well as the following values.

Return code Description
The method completed successfully.
The container does not implement extended controls.
The address in ppDisp or *ppDisp is not valid. For example, it may be NULL.


This method gives the real control access to whatever properties and methods the container maintains in the extended control. These properties and methods would otherwise be inaccessible to the control.

Notes to Callers

The returned pointer is the responsibility of the caller, which must release it when it is no longer needed.


Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header ocidl.h

See Also