Article ID: 182034
Article Last Modified on 3/16/2005
<SCRIPT LANGUAGE=VBSCRIPT> window.external.addFavorite "http://www.microsoft.com", "Microsoft" </SCRIPT>
#include "ExDisp.h"
IShellUIHelper* pShell = NULL;
HRESULT hr = CoCreateInstance(CLSID_ShellUIHelper, NULL, CLSCTX_SERVER,
IID_IShellUIHelper, (void**)&pShell);
if (hr == S_OK)
{
COleVariant vtTitle("Microsoft");
pShell->AddFavorite(OLESTR("http://www.microsoft.com"), &vtTitle);
pShell->Release();
}
NOTE: The \Inetsdk\Include directory must be listed first in the
Directories tab of the settings for the project.
Dim shellHelper As New ShellUIHelper shellHelper.AddFavorite "http://www.microsoft.com", "Microsoft"
183339 OC: window.external Supports All Methods of ShellUIHelper
Additional query words: IShellUIHelper AddFavorite
Keywords: kbhowto KB182034