Subversion Repositories fastphp

Rev

Rev 45 | Rev 61 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 45 Rev 49
Line 15... Line 15...
15
function GetWordUnderCaret(AMemo: TSynEdit): string;
15
function GetWordUnderCaret(AMemo: TSynEdit): string;
16
function MyVarToStr(v: Variant): string;
16
function MyVarToStr(v: Variant): string;
17
function FileSystemCaseSensitive: boolean;
17
function FileSystemCaseSensitive: boolean;
18
function HighColorWindows: boolean;
18
function HighColorWindows: boolean;
19
function GetTempDir: string;
19
function GetTempDir: string;
-
 
20
function GetSpecialFolder(const aCSIDL: Integer): string;
-
 
21
function GetMyDocumentsFolder: string;
20
 
22
 
21
implementation
23
implementation
22
 
24
 
-
 
25
uses
-
 
26
  ShlObj; // Needed for the CSIDL constants
-
 
27
 
23
function GetDosOutput(CommandLine: string; Work: string = ''): string;
28
function GetDosOutput(CommandLine: string; Work: string = ''): string;
24
var
29
var
25
  SA: TSecurityAttributes;
30
  SA: TSecurityAttributes;
26
  SI: TStartupInfo;
31
  SI: TStartupInfo;
27
  PI: TProcessInformation;
32
  PI: TProcessInformation;
Line 297... Line 302...
297
  end
302
  end
298
  else
303
  else
299
    RaiseLastOSError;
304
    RaiseLastOSError;
300
end;
305
end;
301
 
306
 
-
 
307
function SHGetFolderPath(hwnd: HWND; csidl: Integer; hToken: THandle;
-
 
308
  dwFlags: DWord; pszPath: LPWSTR): HRESULT; stdcall;
-
 
309
  external 'SHFolder.dll' name 'SHGetFolderPathW';
-
 
310
 
-
 
311
function GetSpecialFolder(const aCSIDL: Integer): string;
-
 
312
var
-
 
313
  FolderPath: array[0 .. MAX_PATH] of Char;
-
 
314
begin
-
 
315
  SetLastError(ERROR_SUCCESS);
-
 
316
  if SHGetFolderPath(0, aCSIDL, 0, 0, @FolderPath) = S_OK then
-
 
317
    Result := FolderPath;
-
 
318
end;
-
 
319
 
-
 
320
function GetMyDocumentsFolder: string;
-
 
321
begin
-
 
322
  Result := GetSpecialFolder(CSIDL_PERSONAL);
-
 
323
end;
-
 
324
 
302
end.
325
end.