2 * coree.h: mscoree.dll functions
5 * Kornel Pal <http://www.kornelpal.hu/>
7 * Copyright (C) 2008 Kornel Pal
8 * Licensed under the MIT license. See LICENSE file in the project root for full license information.
11 #ifndef __MONO_COREE_H__
12 #define __MONO_COREE_H__
19 #include <mono/io-layer/io-layer.h>
20 #include <mono/utils/mono-compiler.h>
23 #define STATUS_SUCCESS 0x00000000L
24 #define STATUS_INVALID_IMAGE_FORMAT 0xC000007BL
26 STDAPI MonoFixupCorEE(HMODULE ModuleHandle);
28 /* Defined by the linker. */
30 #ifdef __MINGW64_VERSION_MAJOR
31 #define __ImageBase __MINGW_LSYMBOL(_image_base__)
33 #define __ImageBase _image_base__
36 extern IMAGE_DOS_HEADER __ImageBase;
38 extern HMODULE coree_module_handle;
40 HMODULE WINAPI MonoLoadImage(LPCWSTR FileName);
41 STDAPI MonoFixupExe(HMODULE ModuleHandle);
43 gchar* mono_get_module_file_name (HMODULE module_handle);
44 void mono_load_coree (const char* file_name);
45 void mono_fixup_exe_image (MonoImage* image);
47 /* Declared in image.c. */
48 MonoImage* mono_image_open_from_module_handle (HMODULE module_handle, char* fname, gboolean has_entry_point, MonoImageOpenStatus* status);
50 #endif /* HOST_WIN32 */
52 #endif /* __MONO_COREE_H__ */