1 /**
2  * \file
3  * mscoree.dll functions
4  *
5  * Author:
6  *   Kornel Pal <http://www.kornelpal.hu/>
7  *
8  * Copyright (C) 2008 Kornel Pal
9  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
10  */
11 
12 #ifndef __MONO_COREE_H__
13 #define __MONO_COREE_H__
14 
15 #include <config.h>
16 #include <glib.h>
17 
18 #ifdef HOST_WIN32
19 
20 #include <mono/utils/mono-compiler.h>
21 #include <mono/utils/w32api.h>
22 #include "image.h"
23 
24 #define STATUS_SUCCESS 0x00000000L
25 #define STATUS_INVALID_IMAGE_FORMAT 0xC000007BL
26 
27 MONO_API STDAPI MonoFixupCorEE(HMODULE ModuleHandle);
28 
29 /* Defined by the linker. */
30 #ifndef _MSC_VER
31 #ifdef __MINGW64_VERSION_MAJOR
32 #define __ImageBase __MINGW_LSYMBOL(_image_base__)
33 #else
34 #define __ImageBase _image_base__
35 #endif
36 #endif
37 extern IMAGE_DOS_HEADER __ImageBase;
38 
39 extern HMODULE coree_module_handle;
40 
41 HMODULE WINAPI MonoLoadImage(LPCWSTR FileName);
42 STDAPI MonoFixupExe(HMODULE ModuleHandle);
43 
44 gchar* mono_get_module_file_name (HMODULE module_handle);
45 void mono_load_coree (const char* file_name);
46 void mono_fixup_exe_image (MonoImage* image);
47 
48 /* Declared in image.c. */
49 MonoImage* mono_image_open_from_module_handle (HMODULE module_handle, char* fname, gboolean has_entry_point, MonoImageOpenStatus* status);
50 
51 #endif /* HOST_WIN32 */
52 
53 #endif /* __MONO_COREE_H__ */
54