25 lines
		
	
	
		
			525 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			525 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| 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.
 |