Added: App.ProgramDataPath property
This commit is contained in:
parent
d762903951
commit
29c1cab091
11
X2UtApp.pas
11
X2UtApp.pas
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user