У меня работает как-то так:
Цитата:
function GetSpecialFolderPath(Folder: Integer): string;
const
SHGFP_TYPE_CURRENT = 0;
var
Path: array [0 .. MAX_PATH] of Char;
begin
if Succeeded(SHGetFolderPath(0, Folder, 0, SHGFP_TYPE_CURRENT, @Path[0])) then
Result := Path
else
Result := '';
end;
function GetAppDataFolderPath: string;
begin
Result := GetSpecialFolderPath(CSIDL_LOCAL_APPDATA);
end;
...
AppDataMyFilePath := GetAppDataFolderPath + '\' + MyFileName;
...
|
|