Share via

IWebBrowser2::Parent Property

Gets the parent of the object.


HRESULT IWebBrowser2::get_Parent(IDispatch **ppDisp);


  • ppDisp
    Address of a pointer to a variable of type IDispatch interface that receives the parent.

Return Value

Returns one of the following values.

S_OK The operation completed successfully.
E_FAIL The operation failed.
E_NOINTERFACE No such interface is supported.


If the WebBrowser control is in a frame, this method returns the automation interface of the document object in the containing window. Otherwise, it delegates to the top-level control, if there is one.

The InternetExplorer application always returns a pointer to itself.

See Also

IWebBrowser2::get_Application, IWebBrowser2::get_Container, IWebBrowser2::get_Document