利用SHGetSpecialFolderLocation取得网上邻居的ItemID,作为Root的参数传给下面的函数。<br><br>function BrowseForFolder(Caption: String; Root: PItemIDList;<br> Flags: Cardinal = 0): PItemIDList;<br>var<br> BrowseInfo: TBrowseInfo;<br> Buffer: PChar;<br>begin<br> FillChar(BrowseInfo, SizeOf(BrowseInfo), 0);<br> Buffer := SHAlloc(MAX_PATH);<br> with BrowseInfo do<br> begin<br> hwndOwner := Application.Handle;<br> pidlRoot := Root;<br> pszDisplayName := Buffer;<br> lpszTitle := PChar(Caption);<br> ulFlags := Flags;<br> end;<br> Result := SHBrowseForFolder(BrowseInfo);<br> SHFree(Buffer);<br>end;<br><br>