IShellUIHelper3::AddToFavoritesBar Method

Adds a URL to the Favorites Bar.


HRESULT AddToFavoritesBar(
    BSTR Title,
    VARIANT *Type


[in] The URL of the page to add.
[in] The Title for this page.
[in] Pointer to a variable of type VARIANT of type VT_BSTR that specifies one of the following, or NULL.
The content is a Really Simple Syndication (RSS) feed.
The content is a Web Slice.

Return Value

Returns S_OK if successful, or an error value otherwise.


Caller must specify a non- NULL, non-empty URL and Title, and can optionally identify the URL as an RSS feed or a Web Slice. If the Type is a feed or slice, the function will subscribe using the Windows RSS Platform. When subscribing to a feed or a Web Slice, the Title is only used until the data can be retrieved from the server.

If no Type is specified, the item is simply added as a bookmark to the Favorites Bar .

Windows Internet Explorer 8 and later. For security reasons, the IShellUIHelper3::AddToFavoritesBar method must be called as a response to a user-initiated action, such a mouse click. If called from a different context, such as the onload event of the body element, the IShellUIHelper3::AddToFavoritesBar method fails silently.

See Also

Subscribing to Content with Web Slices