From 8df8c228486ed28d2da0a4290d0d57fc9222d439 Mon Sep 17 00:00:00 2001 From: pierre Date: Thu, 20 Nov 2014 22:37:25 +0000 Subject: [PATCH] Call Errno2inoutres for nativent failure calling NtClose inside do_close git-svn-id: trunk@29096 - --- rtl/nativent/sysfile.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rtl/nativent/sysfile.inc b/rtl/nativent/sysfile.inc index 6fbf8c8fe7..7681f65003 100644 --- a/rtl/nativent/sysfile.inc +++ b/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;