+ delphi compatibility stuff

git-svn-id: trunk@7800 -
This commit is contained in:
florian 2007-06-24 20:29:05 +00:00
parent 5c58f69595
commit 728055586a

View File

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