From f2c20e6e07e76a43c421decee8cb701889a807c7 Mon Sep 17 00:00:00 2001 From: Luke Usher Date: Wed, 24 Aug 2016 20:47:39 +0100 Subject: [PATCH] Temporarily disable NtClose for EmuHandle instances. It was causing symbolic link entries to corrupt, there are issues with EmuFile, EmuNtOpenSymbolicLinkObject and other related areas that need to be addressed before this can be re-enabled --- src/CxbxKrnl/EmuKrnl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/CxbxKrnl/EmuKrnl.cpp b/src/CxbxKrnl/EmuKrnl.cpp index 73d4cc7f5..d13adfe42 100644 --- a/src/CxbxKrnl/EmuKrnl.cpp +++ b/src/CxbxKrnl/EmuKrnl.cpp @@ -2977,7 +2977,11 @@ XBSYSAPI EXPORTNUM(187) xboxkrnl::NTSTATUS NTAPI xboxkrnl::NtClose { EmuHandle *iEmuHandle = EmuHandleToPtr(Handle); - delete iEmuHandle; + // HACK: Do not delete emuhandle + // There is an issue with EmuHandle/EmuNtObject causing referencing counting to not function + // Consider translating the entirity of EmuFile & EmuKrnl from Dxbx + //delete iEmuHandle; + EmuWarning("EmuKrnl::NtClose : EmuHandle not deleted"); ret = STATUS_SUCCESS; }