Browse Source

* Win32Check compatibility

git-svn-id: trunk@2832 -
peter 19 years ago
parent
commit
a6c5ca657f
1 changed files with 12 additions and 1 deletions
  1. 12 1
      rtl/win32/sysutils.pp

+ 12 - 1
rtl/win32/sysutils.pp

@@ -49,12 +49,23 @@ Var
   Win32BuildNumber   : dword;
   Win32CSDVersion    : ShortString;   // CSD record is 128 bytes only?
 
+{ Compatibility with Delphi }
+function Win32Check(res:boolean):boolean;
+
 
 implementation
 
   uses
     sysconst;
 
+function Win32Check(res:boolean):boolean;
+begin
+  if not res then
+    RaiseLastOSError;
+  result:=res;
+end;
+
+
 {$define HASCREATEGUID}
 {$define HASEXPANDUNCFILENAME}
 
@@ -357,7 +368,7 @@ begin
   if SetFileAttributes(PChar(FileName), Attr) then
     Result:=0
   else
-    Result := GetLastError;    
+    Result := GetLastError;
 end;