Returns the extensibility object for the ActiveX designer.
HRESULT GetExtensibilityObject(
IDispatch **ppvObjOut
);
Parameter
ppvObjOut
[out] Pointer to an IDispatch interface.
Return Values
The return value obtained from the returned HRESULT is one of the following:
Return Value | Meaning |
S_OK | Success. |
E_FAIL | The method failed for an unknown reason. |
E_NOTIMPL | The run-time and design-time objects are the same, or the designer does not support programmatic manipulation. |
E_OUTOFMEMORY | Not enough memory to complete the operation. |
E_POINTER | The ppvObjOut parameter is not a valid pointer. |
Comments
If the ActiveX designer can be programmatically manipulated, its IDispatch interface is available in two ways. If the visual designer implements IActiveDesigner, the IDispatch interface is available through GetExtensibilityObject. If the visual designer does not implement IActiveDesigner, objects must call QueryInterface to get the IDispatch interface.
In Visual Basic 5.0, the extensibility object for the visual designer is available to add-ins (servers that extend the integrated development environment (IDE)) through the extensibility object of the IDE.
You may implement this method without implementing the other methods of the interface.
Example
The following example creates a new extensibility object and returns its address to the caller:
STDMETHODIMP CMyDesigner::GetExtensibilityObject ( IDispatch **ppExtensibilityObject ) { if (!ppExtensibilityObject) return E_POINTER; *ppExtensibilityObject = new CMyAddInTopLevelAutomationObject; return (*ppExtensibilityObject) ? S_OK : E_OUTOFMEMORY; }