IWebBrowser2::Type Property

Gets the user type name of the contained document object.


HRESULT IWebBrowser2::get_Type(BSTR *pType);


  • pType
    Pointer to a variable of type BSTR that receives the type name. For example, this method returns "HTML Document" if the document supports the IHTMLDocument2 interface. The caller frees this buffer with the SysFreeString function.

Return Value

Returns one of the following values.

S_OK The operation completed successfully.
E_FAIL The operation failed.
E_OUTOFMEMORY There is insufficient memory to complete the operation.


The WebBrowser object delegates this method to the top-level frame. If no frame exists, it returns E_FAIL.