procedure TForm1.Button1Click(Sender: TObject);
var
p: procedure(Handle: THandle; Path: PChar); stdcall;
path: array[0..MAX_PATH] of char;
handle: HWnd;
pidl: PItemIDList;
begin
SHGetSpecialFolderLocation(Application.Handle,
CSIDL_FAVORITES, pidl);
handle:=LoadLibrary(PChar('shdocvw.dll'));
if handle<>0 then begin
p:=GetProcAddress(handle, PChar('DoOrganizeFavDlg'));
if Assigned(p) then begin
SHGetPathFromIDList(pidl, path);
p(Application.Handle, path);
end;
end;
FreeLibrary(handle);
end;