[runtime] Use the return_if_nok () macros in socket-io.c.
[mono.git] / mono / metadata / coree.h
index 7420bc37dc0c778c8feebec8b19870ce1766cca4..a9c6a7cb76a750902db71952d766bb7a42aa15f8 100644 (file)
 #define __MONO_COREE_H__
 
 #include <config.h>
+#include <glib.h>
 
-#ifdef PLATFORM_WIN32
+#ifdef HOST_WIN32
 
 #include <mono/io-layer/io-layer.h>
+#include <mono/utils/mono-compiler.h>
 #include "image.h"
 
+#define STATUS_SUCCESS 0x00000000L
+#define STATUS_INVALID_IMAGE_FORMAT 0xC000007BL
+
 STDAPI MonoFixupCorEE(HMODULE ModuleHandle);
-STDAPI MonoFixupExe(HMODULE ModuleHandle);
 
-extern HMODULE mono_module_handle;
+/* Defined by the linker. */
+#ifndef _MSC_VER
+#ifdef __MINGW64_VERSION_MAJOR
+#define __ImageBase __MINGW_LSYMBOL(_image_base__)
+#else
+#define __ImageBase _image_base__
+#endif
+#endif
+extern IMAGE_DOS_HEADER __ImageBase;
+
 extern HMODULE coree_module_handle;
 
+HMODULE WINAPI MonoLoadImage(LPCWSTR FileName);
+STDAPI MonoFixupExe(HMODULE ModuleHandle);
+
 gchar* mono_get_module_file_name (HMODULE module_handle);
-void mono_load_coree ();
+void mono_load_coree (const char* file_name);
 void mono_fixup_exe_image (MonoImage* image);
 
 /* Declared in image.c. */
-MonoImage* mono_image_open_from_module_handle (HMODULE module_handle, const char* fname, MonoImageOpenStatus* status);
+MonoImage* mono_image_open_from_module_handle (HMODULE module_handle, char* fname, gboolean has_entry_point, MonoImageOpenStatus* status);
 
-#endif /* PLATFORM_WIN32 */
+#endif /* HOST_WIN32 */
 
 #endif /* __MONO_COREE_H__ */