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;
|
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user