소스 검색

* Win32Check compatibility

git-svn-id: trunk@2832 -
peter 19 년 전
부모
커밋
a6c5ca657f
1개의 변경된 파일12개의 추가작업 그리고 1개의 파일을 삭제
  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;