bbkxjy (2001-6-11 16:50:00) <br>试了一下,下面的也行,也要引用 shlobj :<br>function GetDesktopFolder: string;<br>var<br> Buffer: PChar;<br>begin<br> Result := '';<br> GetMem(Buffer, MAX_PATH);<br> try<br> if ShGetSpecialFolderPath(Application.Handle,Buffer, CSIDL_DESKTOP, False) then<br> SetString(Result, Buffer, StrLen(Buffer));<br> finally<br> FreeMem(Buffer); <br> end;<br>end; <br> <br>