Initial
Исходный код версии 2.0
This commit is contained in:
24
sources/shared_units/__history/cde_dir.pas;2
Normal file
24
sources/shared_units/__history/cde_dir.pas;2
Normal file
@@ -0,0 +1,24 @@
|
||||
unit cde_dir;
|
||||
{$mode delphi}
|
||||
{$codepage UTF8}
|
||||
interface
|
||||
uses LazFileUtils, sysutils, windows, shlobj;
|
||||
{stdcalls}
|
||||
function GetCDEPath: String; STDCALL;
|
||||
implementation
|
||||
function GetCDEPath: String;
|
||||
begin
|
||||
SetCurrentDirUTF8(ExtractFilePath(ParamStr(0)));
|
||||
SetCurrentDirUTF8('..\');
|
||||
Result:= IncludeTrailingBackslash(GetCurrentDirUTF8);
|
||||
end;
|
||||
function GetSpecialPath(const CSIDL: Word): String;
|
||||
var s: String;
|
||||
begin
|
||||
SetLength(s, MAX_PATH);
|
||||
if not SHGetSpecialFolderPath(0, PChar(s), CSIDL, True) then
|
||||
s:= '';
|
||||
Result:= s;
|
||||
end;
|
||||
|
||||
end.
|
Reference in New Issue
Block a user