git-svn-id: trunk@29096 -
@@ -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;