|
@@ -113,11 +113,15 @@ procedure SetGlobalEnvironmentVariable(VariableName, VariableContent: string);
|
|
|
|
|
|
// Common Folder Locations
|
|
// Common Folder Locations
|
|
{$IFDEF MSWINDOWS}
|
|
{$IFDEF MSWINDOWS}
|
|
|
|
+{$IFNDEF WINSCP}
|
|
function GetCommonFilesFolder: string;
|
|
function GetCommonFilesFolder: string;
|
|
|
|
+{$ENDIF WINSCP}
|
|
{$ENDIF MSWINDOWS}
|
|
{$ENDIF MSWINDOWS}
|
|
function GetCurrentFolder: string;
|
|
function GetCurrentFolder: string;
|
|
{$IFDEF MSWINDOWS}
|
|
{$IFDEF MSWINDOWS}
|
|
|
|
+{$IFNDEF WINSCP}
|
|
function GetProgramFilesFolder: string;
|
|
function GetProgramFilesFolder: string;
|
|
|
|
+{$ENDIF WINSCP}
|
|
function GetWindowsFolder: string;
|
|
function GetWindowsFolder: string;
|
|
function GetWindowsSystemFolder: string;
|
|
function GetWindowsSystemFolder: string;
|
|
function GetWindowsTempFolder: string;
|
|
function GetWindowsTempFolder: string;
|
|
@@ -211,9 +215,11 @@ function GetWorkGroupName: WideString;
|
|
{$ENDIF MSWINDOWS}
|
|
{$ENDIF MSWINDOWS}
|
|
function GetDomainName: string;
|
|
function GetDomainName: string;
|
|
{$IFDEF MSWINDOWS}
|
|
{$IFDEF MSWINDOWS}
|
|
|
|
+{$IFNDEF WINSCP}
|
|
function GetRegisteredCompany: string;
|
|
function GetRegisteredCompany: string;
|
|
function GetRegisteredOwner: string;
|
|
function GetRegisteredOwner: string;
|
|
function GetWindowsProductId: string;
|
|
function GetWindowsProductId: string;
|
|
|
|
+{$ENDIF WINSCP}
|
|
function GetBIOSName: string;
|
|
function GetBIOSName: string;
|
|
function GetBIOSCopyright: string;
|
|
function GetBIOSCopyright: string;
|
|
function GetBIOSExtendedInfo: string;
|
|
function GetBIOSExtendedInfo: string;
|
|
@@ -226,7 +232,9 @@ function GetBIOSDate: TDateTime;
|
|
type
|
|
type
|
|
TJclTerminateAppResult = (taError, taClean, taKill);
|
|
TJclTerminateAppResult = (taError, taClean, taKill);
|
|
|
|
|
|
|
|
+{$IFNDEF WINSCP}
|
|
function RunningProcessesList(const List: TStrings; FullPath: Boolean = True): Boolean;
|
|
function RunningProcessesList(const List: TStrings; FullPath: Boolean = True): Boolean;
|
|
|
|
+{$ENDIF WINSCP}
|
|
|
|
|
|
{$IFDEF MSWINDOWS}
|
|
{$IFDEF MSWINDOWS}
|
|
function LoadedModulesList(const List: TStrings; ProcessID: DWORD; HandlesOnly: Boolean = False): Boolean;
|
|
function LoadedModulesList(const List: TStrings; ProcessID: DWORD; HandlesOnly: Boolean = False): Boolean;
|
|
@@ -250,17 +258,21 @@ function TerminateApp(ProcessID: DWORD; Timeout: Integer): TJclTerminateAppResul
|
|
|
|
|
|
{$IFDEF MSWINDOWS}
|
|
{$IFDEF MSWINDOWS}
|
|
{.$IFNDEF FPC}
|
|
{.$IFNDEF FPC}
|
|
|
|
+{$IFNDEF WINSCP}
|
|
function GetPidFromProcessName(const ProcessName: string): THandle;
|
|
function GetPidFromProcessName(const ProcessName: string): THandle;
|
|
function GetProcessNameFromWnd(Wnd: THandle): string;
|
|
function GetProcessNameFromWnd(Wnd: THandle): string;
|
|
function GetProcessNameFromPid(PID: DWORD): string;
|
|
function GetProcessNameFromPid(PID: DWORD): string;
|
|
|
|
+{$ENDIF WINSCP}
|
|
function GetMainAppWndFromPid(PID: DWORD): THandle;
|
|
function GetMainAppWndFromPid(PID: DWORD): THandle;
|
|
function GetWndFromPid(PID: DWORD; const WindowClassName: string): HWND;
|
|
function GetWndFromPid(PID: DWORD; const WindowClassName: string): HWND;
|
|
{.$ENDIF ~FPC}
|
|
{.$ENDIF ~FPC}
|
|
|
|
|
|
|
|
+{$IFNDEF WINSCP}
|
|
function GetShellProcessName: string;
|
|
function GetShellProcessName: string;
|
|
{.$IFNDEF FPC}
|
|
{.$IFNDEF FPC}
|
|
function GetShellProcessHandle: THandle;
|
|
function GetShellProcessHandle: THandle;
|
|
{.$ENDIF ~FPC}
|
|
{.$ENDIF ~FPC}
|
|
|
|
+{$ENDIF WINSCP}
|
|
|
|
|
|
// Version Information
|
|
// Version Information
|
|
type
|
|
type
|
|
@@ -292,12 +304,15 @@ type
|
|
|
|
|
|
var
|
|
var
|
|
{ in case of additions, don't forget to update initialization section! }
|
|
{ in case of additions, don't forget to update initialization section! }
|
|
|
|
+ {$IFNDEF WINSCP}
|
|
IsWin95: Boolean = False;
|
|
IsWin95: Boolean = False;
|
|
IsWin95OSR2: Boolean = False;
|
|
IsWin95OSR2: Boolean = False;
|
|
IsWin98: Boolean = False;
|
|
IsWin98: Boolean = False;
|
|
IsWin98SE: Boolean = False;
|
|
IsWin98SE: Boolean = False;
|
|
IsWinME: Boolean = False;
|
|
IsWinME: Boolean = False;
|
|
|
|
+ {$ENDIF}
|
|
IsWinNT: Boolean = False;
|
|
IsWinNT: Boolean = False;
|
|
|
|
+ {$IFNDEF WINSCP}
|
|
IsWinNT3: Boolean = False;
|
|
IsWinNT3: Boolean = False;
|
|
IsWinNT31: Boolean = False;
|
|
IsWinNT31: Boolean = False;
|
|
IsWinNT35: Boolean = False;
|
|
IsWinNT35: Boolean = False;
|
|
@@ -324,6 +339,7 @@ var
|
|
IsWinServer2022: Boolean = False;
|
|
IsWinServer2022: Boolean = False;
|
|
IsWinServer: Boolean = False;
|
|
IsWinServer: Boolean = False;
|
|
IsWin11: Boolean = False;
|
|
IsWin11: Boolean = False;
|
|
|
|
+ {$ENDIF}
|
|
|
|
|
|
const
|
|
const
|
|
PROCESSOR_ARCHITECTURE_INTEL = 0;
|
|
PROCESSOR_ARCHITECTURE_INTEL = 0;
|
|
@@ -338,6 +354,7 @@ const
|
|
const
|
|
const
|
|
Windows11InitialBuildNumber = 22000;
|
|
Windows11InitialBuildNumber = 22000;
|
|
|
|
|
|
|
|
+{$IFNDEF WINSCP}
|
|
function GetWindowsVersion: TWindowsVersion;
|
|
function GetWindowsVersion: TWindowsVersion;
|
|
function GetWindowsEdition: TWindowsEdition;
|
|
function GetWindowsEdition: TWindowsEdition;
|
|
function NtProductType: TNtProductType;
|
|
function NtProductType: TNtProductType;
|
|
@@ -347,11 +364,13 @@ function GetWindowsProductString: string;
|
|
function GetWindowsProductName: string;
|
|
function GetWindowsProductName: string;
|
|
function NtProductTypeString: string;
|
|
function NtProductTypeString: string;
|
|
function GetWindowsBuildNumber: Integer;
|
|
function GetWindowsBuildNumber: Integer;
|
|
|
|
+{$ENDIF WINSCP}
|
|
function GetWindowsMajorVersionNumber: Integer;
|
|
function GetWindowsMajorVersionNumber: Integer;
|
|
function GetWindowsMinorVersionNumber: Integer;
|
|
function GetWindowsMinorVersionNumber: Integer;
|
|
function GetWindowsVersionNumber: string;
|
|
function GetWindowsVersionNumber: string;
|
|
function GetWindowsServicePackVersion: Integer;
|
|
function GetWindowsServicePackVersion: Integer;
|
|
function GetWindowsServicePackVersionString: string;
|
|
function GetWindowsServicePackVersionString: string;
|
|
|
|
+{$IFNDEF WINSCP}
|
|
function GetWindowsDisplayVersion: string;
|
|
function GetWindowsDisplayVersion: string;
|
|
function GetWindowsReleaseId: Integer;
|
|
function GetWindowsReleaseId: Integer;
|
|
function GetWindowsReleaseName: String;
|
|
function GetWindowsReleaseName: String;
|
|
@@ -366,7 +385,6 @@ function GetWindows10ReleaseVersion: String; {$IFDEF SUPPORTS_DEPRECATED}depreca
|
|
function GetWindowsServerDisplayVersion: string; {$IFDEF SUPPORTS_DEPRECATED}deprecated {$IFDEF SUPPORTS_DEPRECATED_DETAILS}'Use GetWindowsDisplayVersion'{$ENDIF};{$ENDIF}
|
|
function GetWindowsServerDisplayVersion: string; {$IFDEF SUPPORTS_DEPRECATED}deprecated {$IFDEF SUPPORTS_DEPRECATED_DETAILS}'Use GetWindowsDisplayVersion'{$ENDIF};{$ENDIF}
|
|
function GetWindowsServerReleaseId: Integer; {$IFDEF SUPPORTS_DEPRECATED}deprecated {$IFDEF SUPPORTS_DEPRECATED_DETAILS}'Use GetWindowsReleaseId'{$ENDIF};{$ENDIF}
|
|
function GetWindowsServerReleaseId: Integer; {$IFDEF SUPPORTS_DEPRECATED}deprecated {$IFDEF SUPPORTS_DEPRECATED_DETAILS}'Use GetWindowsReleaseId'{$ENDIF};{$ENDIF}
|
|
function GetWindowsServerReleaseVersion: String; {$IFDEF SUPPORTS_DEPRECATED}deprecated {$IFDEF SUPPORTS_DEPRECATED_DETAILS}'Use GetWindowsReleaseVersion'{$ENDIF};{$ENDIF}
|
|
function GetWindowsServerReleaseVersion: String; {$IFDEF SUPPORTS_DEPRECATED}deprecated {$IFDEF SUPPORTS_DEPRECATED_DETAILS}'Use GetWindowsReleaseVersion'{$ENDIF};{$ENDIF}
|
|
-{$IFNDEF WINSCP}
|
|
|
|
function GetOpenGLVersion(const Win: THandle; out Version, Vendor: AnsiString): Boolean;
|
|
function GetOpenGLVersion(const Win: THandle; out Version, Vendor: AnsiString): Boolean;
|
|
{$ENDIF ~WINSCP}
|
|
{$ENDIF ~WINSCP}
|
|
function GetNativeSystemInfo(var SystemInfo: TSystemInfo): Boolean;
|
|
function GetNativeSystemInfo(var SystemInfo: TSystemInfo): Boolean;
|
|
@@ -375,7 +393,9 @@ function IsWindows64: Boolean;
|
|
function JclCheckWinVersion(Major, Minor: Integer): Boolean;
|
|
function JclCheckWinVersion(Major, Minor: Integer): Boolean;
|
|
{$ENDIF MSWINDOWS}
|
|
{$ENDIF MSWINDOWS}
|
|
|
|
|
|
|
|
+{$IFNDEF WINSCP}
|
|
function GetOSVersionString: string;
|
|
function GetOSVersionString: string;
|
|
|
|
+{$ENDIF}
|
|
|
|
|
|
// Hardware
|
|
// Hardware
|
|
{$IFDEF MSWINDOWS}
|
|
{$IFDEF MSWINDOWS}
|
|
@@ -1492,7 +1512,7 @@ uses
|
|
{$ENDIF MSWINDOWS}
|
|
{$ENDIF MSWINDOWS}
|
|
{$ENDIF ~HAS_UNITSCOPE}
|
|
{$ENDIF ~HAS_UNITSCOPE}
|
|
{$IFNDEF WINSCP}Jcl8087, JclIniFiles,{$ENDIF ~WINSCP}
|
|
{$IFNDEF WINSCP}Jcl8087, JclIniFiles,{$ENDIF ~WINSCP}
|
|
- JclSysUtils, JclFileUtils, {$IFNDEF WINSCP}JclAnsiStrings,{$ENDIF ~WINSCP} JclStrings;
|
|
|
|
|
|
+ JclSysUtils, JclFileUtils, JclAnsiStrings, JclStrings;
|
|
|
|
|
|
{$IFDEF WINSCP}
|
|
{$IFDEF WINSCP}
|
|
|
|
|
|
@@ -1559,6 +1579,8 @@ end;
|
|
{$ENDIF MSWINDOWS}
|
|
{$ENDIF MSWINDOWS}
|
|
{.$ENDIF FPC}
|
|
{.$ENDIF FPC}
|
|
|
|
|
|
|
|
+{$IFNDEF WINSCP}
|
|
|
|
+
|
|
//=== Registry helpers =======================================================
|
|
//=== Registry helpers =======================================================
|
|
|
|
|
|
const
|
|
const
|
|
@@ -1619,6 +1641,8 @@ begin
|
|
Result := RegReadHklmKeyIntegerValue(HKLM_CURRENT_VERSION_NT, Name, Def, ForceNative);
|
|
Result := RegReadHklmKeyIntegerValue(HKLM_CURRENT_VERSION_NT, Name, Def, ForceNative);
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+{$ENDIF WINSCP}
|
|
|
|
+
|
|
//=== Environment ============================================================
|
|
//=== Environment ============================================================
|
|
|
|
|
|
function DelEnvironmentVar(const Name: string): Boolean;
|
|
function DelEnvironmentVar(const Name: string): Boolean;
|
|
@@ -1966,7 +1990,6 @@ begin
|
|
end;
|
|
end;
|
|
SendMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0, LPARAM(PChar(cEnvironment)));
|
|
SendMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0, LPARAM(PChar(cEnvironment)));
|
|
end;
|
|
end;
|
|
-{$ENDIF ~WINSCP}
|
|
|
|
|
|
|
|
//=== Common Folders =========================================================
|
|
//=== Common Folders =========================================================
|
|
|
|
|
|
@@ -1979,6 +2002,8 @@ begin
|
|
'CommonFilesDir', '');
|
|
'CommonFilesDir', '');
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+{$ENDIF ~WINSCP}
|
|
|
|
+
|
|
{$ENDIF MSWINDOWS}
|
|
{$ENDIF MSWINDOWS}
|
|
|
|
|
|
function GetCurrentFolder: string;
|
|
function GetCurrentFolder: string;
|
|
@@ -2023,6 +2048,7 @@ end;
|
|
{$ENDIF MSWINDOWS}
|
|
{$ENDIF MSWINDOWS}
|
|
|
|
|
|
{$IFDEF MSWINDOWS}
|
|
{$IFDEF MSWINDOWS}
|
|
|
|
+{$IFNDEF WINSCP}
|
|
{ TODO : Check for documented solution }
|
|
{ TODO : Check for documented solution }
|
|
function GetProgramFilesFolder: string;
|
|
function GetProgramFilesFolder: string;
|
|
begin
|
|
begin
|
|
@@ -2030,6 +2056,7 @@ begin
|
|
// as we want the platform (x86/x64) specific common folder.
|
|
// as we want the platform (x86/x64) specific common folder.
|
|
Result := RegReadStringDef(HKEY_LOCAL_MACHINE, HKLM_CURRENT_VERSION_WINDOWS, 'ProgramFilesDir', '');
|
|
Result := RegReadStringDef(HKEY_LOCAL_MACHINE, HKLM_CURRENT_VERSION_WINDOWS, 'ProgramFilesDir', '');
|
|
end;
|
|
end;
|
|
|
|
+{$ENDIF WINSCP}
|
|
|
|
|
|
{ TODO : Check for documented solution }
|
|
{ TODO : Check for documented solution }
|
|
function GetWindowsFolder: string;
|
|
function GetWindowsFolder: string;
|
|
@@ -2516,6 +2543,7 @@ end;
|
|
{$ENDIF MSWINDOWS}
|
|
{$ENDIF MSWINDOWS}
|
|
|
|
|
|
{$IFDEF MSWINDOWS}
|
|
{$IFDEF MSWINDOWS}
|
|
|
|
+{$IFNDEF WINSCP}
|
|
function GetRegisteredCompany: string;
|
|
function GetRegisteredCompany: string;
|
|
begin
|
|
begin
|
|
{ TODO : check for MSDN documentation }
|
|
{ TODO : check for MSDN documentation }
|
|
@@ -2542,6 +2570,7 @@ begin
|
|
else
|
|
else
|
|
Result := ReadWindowsCurrentVersionStringValue('ProductId', '', True);
|
|
Result := ReadWindowsCurrentVersionStringValue('ProductId', '', True);
|
|
end;
|
|
end;
|
|
|
|
+{$ENDIF WINSCP}
|
|
|
|
|
|
{ TODO: Check supported platforms, maybe complete rewrite }
|
|
{ TODO: Check supported platforms, maybe complete rewrite }
|
|
|
|
|
|
@@ -2823,6 +2852,7 @@ end;
|
|
|
|
|
|
{$IFDEF MSWINDOWS}
|
|
{$IFDEF MSWINDOWS}
|
|
|
|
|
|
|
|
+{$IFNDEF WINSCP}
|
|
function RunningProcessesList(const List: TStrings; FullPath: Boolean): Boolean;
|
|
function RunningProcessesList(const List: TStrings; FullPath: Boolean): Boolean;
|
|
|
|
|
|
// This function always returns an empty string on Win9x
|
|
// This function always returns an empty string on Win9x
|
|
@@ -2954,6 +2984,7 @@ begin
|
|
List.EndUpdate;
|
|
List.EndUpdate;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
+{$ENDIF WINSCP}
|
|
|
|
|
|
{ TODO Windows 9x ? }
|
|
{ TODO Windows 9x ? }
|
|
|
|
|
|
@@ -3397,6 +3428,7 @@ begin
|
|
Result := taError;
|
|
Result := taError;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+{$IFNDEF WINSCP}
|
|
function GetProcessNameFromWnd(Wnd: THandle): string;
|
|
function GetProcessNameFromWnd(Wnd: THandle): string;
|
|
var
|
|
var
|
|
List: TStringList;
|
|
List: TStringList;
|
|
@@ -3464,6 +3496,7 @@ begin
|
|
List.Free;
|
|
List.Free;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
+{$ENDIF}
|
|
|
|
|
|
type
|
|
type
|
|
PSearch = ^TSearch;
|
|
PSearch = ^TSearch;
|
|
@@ -3538,6 +3571,7 @@ begin
|
|
Result := EnumWndStruct.ResultWnd;
|
|
Result := EnumWndStruct.ResultWnd;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+{$IFNDEF WINSCP}
|
|
function GetShellProcessName: string;
|
|
function GetShellProcessName: string;
|
|
const
|
|
const
|
|
cShellKey = HKLM_CURRENT_VERSION_NT + '\WinLogon';
|
|
cShellKey = HKLM_CURRENT_VERSION_NT + '\WinLogon';
|
|
@@ -3548,9 +3582,8 @@ const
|
|
begin
|
|
begin
|
|
if IsWinNT then
|
|
if IsWinNT then
|
|
Result := RegReadStringDef(HKEY_LOCAL_MACHINE, cShellKey, cShellValue, '')
|
|
Result := RegReadStringDef(HKEY_LOCAL_MACHINE, cShellKey, cShellValue, '')
|
|
-{$IFNDEF WINSCP}
|
|
|
|
else
|
|
else
|
|
- Result := IniReadString(PathAddSeparator(GetWindowsFolder) + cShellSystemIniFileName, cShellBootSection, cShellValue){$ENDIF ~WINSCP};
|
|
|
|
|
|
+ Result := IniReadString(PathAddSeparator(GetWindowsFolder) + cShellSystemIniFileName, cShellBootSection, cShellValue);
|
|
if Result = '' then
|
|
if Result = '' then
|
|
Result := cShellDefault;
|
|
Result := cShellDefault;
|
|
end;
|
|
end;
|
|
@@ -4234,10 +4267,13 @@ begin
|
|
else
|
|
else
|
|
Result := Win32BuildNumber;
|
|
Result := Win32BuildNumber;
|
|
end;
|
|
end;
|
|
|
|
+{$ENDIF WINSCP}
|
|
|
|
|
|
function GetWindowsMajorVersionNumber: Integer;
|
|
function GetWindowsMajorVersionNumber: Integer;
|
|
|
|
+{$IFNDEF WINSCP}
|
|
var
|
|
var
|
|
Ver: string;
|
|
Ver: string;
|
|
|
|
+{$ENDIF WINSCP}
|
|
begin
|
|
begin
|
|
{$IFNDEF WINSCP}
|
|
{$IFNDEF WINSCP}
|
|
// WINSCP: We have the manifest
|
|
// WINSCP: We have the manifest
|
|
@@ -4256,13 +4292,15 @@ begin
|
|
end;
|
|
end;
|
|
end
|
|
end
|
|
else
|
|
else
|
|
-{$ENDIF}
|
|
|
|
|
|
+{$ENDIF WINSCP}
|
|
Result := Win32MajorVersion;
|
|
Result := Win32MajorVersion;
|
|
end;
|
|
end;
|
|
|
|
|
|
function GetWindowsMinorVersionNumber: Integer;
|
|
function GetWindowsMinorVersionNumber: Integer;
|
|
|
|
+{$IFNDEF WINSCP}
|
|
var
|
|
var
|
|
Ver: string;
|
|
Ver: string;
|
|
|
|
+{$ENDIF WINSCP}
|
|
begin
|
|
begin
|
|
{$IFNDEF WINSCP}
|
|
{$IFNDEF WINSCP}
|
|
// WINSCP: We have the manifest
|
|
// WINSCP: We have the manifest
|
|
@@ -4281,7 +4319,7 @@ begin
|
|
end;
|
|
end;
|
|
end
|
|
end
|
|
else
|
|
else
|
|
-{$ENDIF}
|
|
|
|
|
|
+{$ENDIF WINSCP}
|
|
Result := Win32MinorVersion;
|
|
Result := Win32MinorVersion;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -4328,6 +4366,7 @@ begin
|
|
Result := '';
|
|
Result := '';
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+{$IFNDEF WINSCP}
|
|
function GetWindowsDisplayVersion: string;
|
|
function GetWindowsDisplayVersion: string;
|
|
begin
|
|
begin
|
|
// Starting with Windows 10 20H2, the DisplayVersion registry entry is being populated ("20H2")
|
|
// Starting with Windows 10 20H2, the DisplayVersion registry entry is being populated ("20H2")
|
|
@@ -4562,7 +4601,6 @@ begin
|
|
Result := '';
|
|
Result := '';
|
|
end;
|
|
end;
|
|
|
|
|
|
-{$IFNDEF WINSCP}
|
|
|
|
// Imports copied from OpenGL unit. Direct using of OpenGL unit might cause unexpected problems due
|
|
// Imports copied from OpenGL unit. Direct using of OpenGL unit might cause unexpected problems due
|
|
// setting 8087CW in the intialization section
|
|
// setting 8087CW in the intialization section
|
|
{
|
|
{
|
|
@@ -4832,6 +4870,7 @@ end;
|
|
|
|
|
|
{$ENDIF MSWINDOWS}
|
|
{$ENDIF MSWINDOWS}
|
|
|
|
|
|
|
|
+{$IFNDEF WINSCP}
|
|
function GetOSVersionString: string;
|
|
function GetOSVersionString: string;
|
|
{$IFDEF UNIX}
|
|
{$IFDEF UNIX}
|
|
var
|
|
var
|
|
@@ -4846,6 +4885,7 @@ begin
|
|
Result := Format('%s %s', [GetWindowsVersionString, GetWindowsServicePackVersionString]);
|
|
Result := Format('%s %s', [GetWindowsVersionString, GetWindowsServicePackVersionString]);
|
|
end;
|
|
end;
|
|
{$ENDIF MSWINDOWS}
|
|
{$ENDIF MSWINDOWS}
|
|
|
|
+{$ENDIF}
|
|
|
|
|
|
//=== Hardware ===============================================================
|
|
//=== Hardware ===============================================================
|
|
|
|
|
|
@@ -6603,8 +6643,10 @@ end;
|
|
procedure InitSysInfo;
|
|
procedure InitSysInfo;
|
|
var
|
|
var
|
|
SystemInfo: TSystemInfo;
|
|
SystemInfo: TSystemInfo;
|
|
|
|
+ {$IFNDEF WINSCP}
|
|
Kernel32FileName: string;
|
|
Kernel32FileName: string;
|
|
VerFixedFileInfo: TVSFixedFileInfo;
|
|
VerFixedFileInfo: TVSFixedFileInfo;
|
|
|
|
+ {$ENDIF}
|
|
begin
|
|
begin
|
|
{ processor information related initialization }
|
|
{ processor information related initialization }
|
|
|
|
|
|
@@ -6618,6 +6660,7 @@ begin
|
|
|
|
|
|
IsWinNT := Win32Platform = VER_PLATFORM_WIN32_NT;
|
|
IsWinNT := Win32Platform = VER_PLATFORM_WIN32_NT;
|
|
|
|
|
|
|
|
+ {$IFNDEF WINSCP}
|
|
Kernel32FileName := GetModulePath(GetModuleHandle(kernel32));
|
|
Kernel32FileName := GetModulePath(GetModuleHandle(kernel32));
|
|
VerFixedFileInfo.dwFileDateLS := 0;
|
|
VerFixedFileInfo.dwFileDateLS := 0;
|
|
if (not IsWinNT) and VersionFixedFileInfo(Kernel32FileName, VerFixedFileInfo) then
|
|
if (not IsWinNT) and VersionFixedFileInfo(Kernel32FileName, VerFixedFileInfo) then
|
|
@@ -6699,6 +6742,7 @@ begin
|
|
wvWin11:
|
|
wvWin11:
|
|
IsWin11 := True;
|
|
IsWin11 := True;
|
|
end;
|
|
end;
|
|
|
|
+ {$ENDIF}
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure FinalizeSysInfo;
|
|
procedure FinalizeSysInfo;
|