Просмотр исходного кода

Call Errno2inoutres for nativent failure calling NtClose inside do_close

git-svn-id: trunk@29096 -
pierre 10 лет назад
Родитель
Сommit
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;