[ResourceConsumption(ResourceScope.Machine)]
override protected bool ReleaseHandle()
{
+#if MONO
+ System.IO.MonoIOError error;
+ System.IO.MonoIO.Close (handle, out error);
+ return error == System.IO.MonoIOError.ERROR_SUCCESS;
+#else
return Win32Native.CloseHandle(handle);
+#endif
}
}
}
// Implements Microsoft.Win32.SafeHandles.SafeRegistryHandle
//
// ======================================================================================
-#if !FEATURE_PAL
+#if !FEATURE_PAL || (MONO && !MOBILE)
namespace Microsoft.Win32.SafeHandles {
using System;
using System.Security;
[ResourceConsumption(ResourceScope.Machine)]
override protected bool ReleaseHandle()
{
+#if MONO
+ NativeEventCalls.CloseEvent_internal (handle);
+ return true;
+#else
#if !FEATURE_CORECLR
if (!bIsMutex || Environment.HasShutdownStarted)
return Win32Native.CloseHandle(handle);
return bReturn;
#else
return Win32Native.CloseHandle(handle);
+#endif
#endif
}