Преглед изворни кода

Call Errno2inoutres for nativent failure calling NtClose inside do_close

git-svn-id: trunk@29096 -
pierre пре 10 година
родитељ
комит
8df8c22848
1 измењених фајлова са 8 додато и 1 уклоњено
  1. 8 1
      rtl/nativent/sysfile.inc

+ 8 - 1
rtl/nativent/sysfile.inc

@@ -27,10 +27,17 @@ end;
 
 
 procedure do_close(h : thandle);
+var
+  res: LongInt;
 begin
   if do_isdevice(h) then
     Exit;
-  NtClose(h);
+  res:=NtClose(h);
+  if res <> STATUS_SUCCESS then
+    begin
+      errno:=res;
+      Errno2InOutRes;
+    end;
 end;