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