M
monkey999
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.A4Click(Sender: TObject);
var
ShellUIHelper: ISHellUIHelper;
url, title: Olevariant;
begin
Title :=WebBrowser1.LocationName;
Url :=WebBrowser1.LocationURL;
if Url <> '' then
begin
//ShellUIHelper := CreateComObject(CLSID_SHELLUIHELPER) as IShellUIHelper;
ShellUIHelper.AddFavorite(url, title);
end;
end;
上面这段程序提示说,未声明的标示符,CreateComObject,如何声明?
var
ShellUIHelper: ISHellUIHelper;
url, title: Olevariant;
begin
Title :=WebBrowser1.LocationName;
Url :=WebBrowser1.LocationURL;
if Url <> '' then
begin
//ShellUIHelper := CreateComObject(CLSID_SHELLUIHELPER) as IShellUIHelper;
ShellUIHelper.AddFavorite(url, title);
end;
end;
上面这段程序提示说,未声明的标示符,CreateComObject,如何声明?