Sigues poniendo mal tú código...
Debes hacerlo así más o menos...
Código Delphi
[-]
function GetSpecialFolder(nFolder: Integer): String;
var
Path: array[0..MAX_PATH] of Char;
begin
ShlObj.SHGetSpecialFolderPath(0, Path, nFolder, false);
Result := Path;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Edit1.Text := GetSpecialFolder(CSIDL_INTERNET_CACHE);
end;