1
0
mirror of synced 2024-12-22 17:23: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; FPath: String;
FMainPath: String; FMainPath: String;
FUserPath: String; FUserPath: String;
FProgramDataPath: String;
function GetVersion(): TX2AppVersion; function GetVersion(): TX2AppVersion;
protected protected
@ -183,6 +184,9 @@ type
//:$ Contains the path to the user's Application Data //:$ Contains the path to the user's Application Data
property UserPath: String read FUserPath; 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 //:$ Contains the application's version information
property Version: TX2AppVersion read GetVersion; property Version: TX2AppVersion read GetVersion;
end; end;
@ -431,6 +435,13 @@ begin
SHGetPathFromIDList(pIDL, @cPath); SHGetPathFromIDList(pIDL, @cPath);
FUserPath := FixPath(cPath); FUserPath := FixPath(cPath);
FillChar(cPath, SizeOf(cPath), #0);
SHGetSpecialFolderLocation(0, CSIDL_COMMON_APPDATA, pIDL);
SHGetPathFromIDList(pIDL, @cPath);
FProgramDataPath := FixPath(cPath);
finally finally
ifMalloc := nil; ifMalloc := nil;
end; end;