|
@@ -51,9 +51,14 @@ Var
|
|
{ Compatibility with Delphi }
|
|
{ Compatibility with Delphi }
|
|
function Win32Check(res:boolean):boolean;inline;
|
|
function Win32Check(res:boolean):boolean;inline;
|
|
function WinCheck(res:boolean):boolean;
|
|
function WinCheck(res:boolean):boolean;
|
|
|
|
+function CheckWin32Version(Major,Minor : Integer ): Boolean;
|
|
|
|
+function CheckWin32Version(Major : Integer): Boolean;
|
|
|
|
+Procedure RaiseLastWin32Error;
|
|
|
|
|
|
function GetFileVersion(const AFileName: string): Cardinal;
|
|
function GetFileVersion(const AFileName: string): Cardinal;
|
|
|
|
|
|
|
|
+procedure GetFormatSettings;
|
|
|
|
+
|
|
implementation
|
|
implementation
|
|
|
|
|
|
uses
|
|
uses
|
|
@@ -73,6 +78,25 @@ function Win32Check(res:boolean):boolean;inline;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
+procedure RaiseLastWin32Error;
|
|
|
|
+ begin
|
|
|
|
+ RaiseLastOSError;
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+function CheckWin32Version(Major : Integer): Boolean;
|
|
|
|
+ begin
|
|
|
|
+ Result:=CheckWin32Version(Major,0)
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+function CheckWin32Version(Major,Minor: Integer): Boolean;
|
|
|
|
+ begin
|
|
|
|
+ Result:=(Win32MajorVersion>Major) or
|
|
|
|
+ ((Win32MajorVersion=Major) and (Win32MinorVersion>=Minor));
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+
|
|
function GetFileVersion(const AFileName:string):Cardinal;
|
|
function GetFileVersion(const AFileName:string):Cardinal;
|
|
var
|
|
var
|
|
{ usefull only as long as we don't need to touch different stack pages }
|
|
{ usefull only as long as we don't need to touch different stack pages }
|
|
@@ -901,7 +925,7 @@ Procedure LoadVersionInfo;
|
|
Var
|
|
Var
|
|
versioninfo : TOSVERSIONINFO;
|
|
versioninfo : TOSVERSIONINFO;
|
|
begin
|
|
begin
|
|
- kernel32dll:=0;
|
|
|
|
|
|
+ kernel32dll:=0;
|
|
GetDiskFreeSpaceEx:=nil;
|
|
GetDiskFreeSpaceEx:=nil;
|
|
versioninfo.dwOSVersionInfoSize:=sizeof(versioninfo);
|
|
versioninfo.dwOSVersionInfoSize:=sizeof(versioninfo);
|
|
GetVersionEx(versioninfo);
|
|
GetVersionEx(versioninfo);
|