时间: 2021-07-31 作者:daque
dll 文献:shdocvw.dll procedure doorganizefavdlg(h:hwnd;path:pchar);stdcall;external 'shdocvw.dll'; 第二个参数指定保藏夹的场所,即使第二个参数为nil的话,默许ie得保藏夹场所。 addurltofavorites doaddtofavdlg doaddtofavdlgw dofiledownload dofiledownloadex doorganizefavdlgw shaddsubscribefavorite setshellofflinestate softwareupdatemessagebox //增添到保藏夹 const clsid_shelluihelper: tguid = '{64ab4bb7-111e-11d1-8f79-00c04fc2fbe1}'; var shelluihelper: ishelluihelper; url, title: olevariant; begin url:='www.csdn.net' title:='华夏软硬件' shelluihelper :=createcomobject(clsid_shelluihelper) as ishelluihelper; shelluihelper.addfavorite(url, title); end; //整治保藏 var h: hwnd; p: procedure(handle: thandle; path: pchar); stdcall; begin h := loadlibrary(pchar('shdocvw.dll')); if h <> 0 then begin p := getprocaddress(h, pchar('doorganizefavdlg')); if assigned(p) then p(application.handle, pchar(favpath)); end; freelibrary(h); end; --------- 导出保藏夹 在vb中采用菜单的project | references 选项,在references对话框中采用microsoft internet controls项,而后在步调中介入以次语句: dim dc as new shdocvw.shelluihelper dc.importexportfavorites false, "c:\a.html" set dc = nothing 就不妨将保藏夹导出到 c:\a.htm 中了,即使要从文献导出到保藏夹,只有将上头的false改为true,将"c:\a.html"改为要导出的文献名就不妨了。