IOleControlSite::GetExtendedControl

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

HRESULT GetExtendedControl(
  IDispatch** ppDisp  //Address of output variable that receives the 
                      // IDispatch interface pointer
);
 

Parameters

ppDisp
[out] Address of 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 IDispatch::Release when *ppDisp is no longer needed.

Return Values

This method supports the standard return values E_OUTOFMEMORY and E_UNEXPECTED, as well as the following:

S_OK
The extended control's IDispatch is returned in ppDisp.
E_NOTIMPL
The container does not implement extended controls.
E_POINTER
The address in ppDisp or *ppDisp is not valid. For example, it may be NULL.

Remarks

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.

QuickInfo

  Windows NT: Use version 4.0 or later.
  Windows: Use Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in ocidl.h.