我正好有收藏,不过没有测试,详情请看:http://www.csdn.net/expert/topic/837/837068.xml?temp=.2934076由 njbudong(午夜游民)解答。procedure TForm1.ToolButton1Click(Sender: TObject);
label Write;
var Favorites:String;
    Search:TSearchRec;
begin
     Favorites:=GetFavoritesPath;
     if Favorites='' then  begin
          MessageBox(Handle,'访问收藏夹主键错误!','提示信息',MB_OK);
          exit;
     end;     Memo1.Clear;
     with Search,Memo1.Lines do
     begin
          if FindFirst(Favorites+'*.url',0,Search)=0 then
          begin
          Write:
        Add(GetFavoritesUrl(Favorites+Name));
     SetLength(Name,Length(Name)-4);
     Add(Name);
                     if FindNext(Search)=0 then
                     goto Write;     end;
     end;
end;

解决方案 »

  1.   

    获取IE收藏夹内容uses shlobj;...function GetIEFavorites(const favpath: string):TStrings;
    var searchrec:TSearchrec;
        str:TStrings;
        path,dir,filename:String;
        Buffer: array[0..2047] of Char;
        found:Integer;begin
      str:=TStringList.Create;
      //取在favourites 路径下的所有名字
      path:=FavPath+'\*.url';
      dir:=ExtractFilepath(path);
      found:=FindFirst(path,faAnyFile,searchrec);
      while found = 0 do
      begin
        //从files变量读URLs
        SetString(filename, Buffer,
                  GetPrivateProfileString('InternetShortcut',
                  PChar('URL'), NIL, Buffer, SizeOf(Buffer),
                  PChar(dir+searchrec.Name)));
        str.Add(filename);
        found := FindNext(searchrec);
      end;
      found:=FindFirst(dir+'\*.*',faAnyFile,searchrec);
      while found=0 do
      begin
        if ((searchrec.Attr and faDirectory) > 0) and
            (searchrec.Name[1]<>'.') then
          str.AddStrings(GetIEFavorites(dir+'\'+searchrec.name));
        found := FindNext(searchrec);
    end;
    FindClose(searchrec);
    Result:=str;
    end;procedure TForm1.Button1Click(Sender: TObject);
    var pidl: PItemIDList;
        FavPath: array[0..MAX_PATH] of char;
    begin
      //获取收藏夹
      SHGetSpecialFolderLocation(Handle, CSIDL_FAVORITES, pidl);
      SHGetPathFromIDList(pidl, favpath);
      ListBox1.Items:=GetIEFavorites(StrPas(FavPath));
    end;
      

  2.   

    to johnsonrao(johnson):你给的代码可以,但有几处小错误,我自己已经搞定,也谢谢  naughtyboy(淘气男孩) 的解答。可以给分了!