Browse Source

+ delphi compatibility stuff

git-svn-id: trunk@7800 -
florian 18 years ago
parent
commit
728055586a
1 changed files with 25 additions and 1 deletions
  1. 25 1
      rtl/win/sysutils.pp

+ 25 - 1
rtl/win/sysutils.pp

@@ -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);