#include "loader.h"
#include "marshal.h"
#include "coree.h"
-#include <mono/io-layer/io-layer.h>
#include <mono/utils/checked-build.h>
#include <mono/utils/mono-logger-internals.h>
#include <mono/utils/mono-path.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
+#include <mono/metadata/w32error.h>
#define INVALID_ADDRESS 0xffffffff
fname_utf16 = g_utf8_to_utf16 (absfname, -1, NULL, NULL, NULL);
module_handle = MonoLoadImage (fname_utf16);
if (status && module_handle == NULL)
- last_error = GetLastError ();
+ last_error = mono_w32error_get_last ();
/* mono_image_open_from_module_handle is called by _CorDllMain. */
image = g_hash_table_lookup (loaded_images, absfname);