1
0
mirror of synced 2024-12-22 09:13:07 +01:00

Added: App.ProgramDataPath property

This commit is contained in:
Mark van Renswoude 2015-02-28 19:52:44 +00:00
parent d762903951
commit 29c1cab091

View File

@ -144,6 +144,7 @@ type
FPath: String;
FMainPath: String;
FUserPath: String;
FProgramDataPath: String;
function GetVersion(): TX2AppVersion;
protected
@ -183,6 +184,9 @@ type
//:$ Contains the path to the user's Application Data
property UserPath: String read FUserPath;
//:$ Contains the path to the system's Program Data
property ProgramDataPath: String read FProgramDataPath;
//:$ Contains the application's version information
property Version: TX2AppVersion read GetVersion;
end;
@ -431,6 +435,13 @@ begin
SHGetPathFromIDList(pIDL, @cPath);
FUserPath := FixPath(cPath);
FillChar(cPath, SizeOf(cPath), #0);
SHGetSpecialFolderLocation(0, CSIDL_COMMON_APPDATA, pIDL);
SHGetPathFromIDList(pIDL, @cPath);
FProgramDataPath := FixPath(cPath);
finally
ifMalloc := nil;
end;