[reflection] Use coop handles for MonoMethod icalls (#4272)
[mono.git] / mono / io-layer / posix.c
index 2856d4fcd615cf7dbb973f27830bc391c66255df..995795bb32614fa12c11936e497f01991ef1c231 100644 (file)
 
 #include <mono/io-layer/wapi.h>
 #include <mono/io-layer/wapi-private.h>
-#include <mono/io-layer/handles-private.h>
 #include <mono/io-layer/io-private.h>
 #include <mono/io-layer/io-trace.h>
 #include <mono/utils/mono-logger-internals.h>
+#include <mono/metadata/w32handle.h>
 
 static guint32
 convert_from_flags(int flags)
@@ -101,8 +101,8 @@ gpointer _wapi_stdhandle_create (int fd, const gchar *name)
        file_handle.sharemode=0;
        file_handle.attrs=0;
 
-       handle = _wapi_handle_new_fd (WAPI_HANDLE_CONSOLE, fd, &file_handle);
-       if (handle == _WAPI_HANDLE_INVALID) {
+       handle = mono_w32handle_new_fd (MONO_W32HANDLE_CONSOLE, fd, &file_handle);
+       if (handle == INVALID_HANDLE_VALUE) {
                g_warning ("%s: error creating file handle", __func__);
                SetLastError (ERROR_GEN_FAILURE);
                return(INVALID_HANDLE_VALUE);