IWebBrowser2::Name Property

Retrieves the frame name or application name of the object.


HRESULT IWebBrowser2::get_Name(BSTR *pbstrName);


  • pbstrName
    Pointer to a variable of type BSTR that receives the name of the frame that contains the WebBrowser Control, or an empty string if unnamed. The InternetExplorer automation object returns the application name. The caller frees this buffer with the SysFreeString function.

Return Value

Returns S_OK if successful, or an error value otherwise.


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