ReactOS 0.4.15-dev-7897-g78dc504
mscoree_private.h
Go to the documentation of this file.
1/*
2 *
3 * Copyright 2008 Alistair Leslie-Hughes
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20#ifndef __MSCOREE_PRIVATE__
21#define __MSCOREE_PRIVATE__
22
23#include <stdarg.h>
24
25#define WIN32_NO_STATUS
26#define _INC_WINDOWS
27#define COM_NO_WINDOWS_H
28
29#define COBJMACROS
30
31#include <windef.h>
32#include <winbase.h>
33#include <winreg.h>
34#include <objbase.h>
35#include <cor.h>
36#include <cordebug.h>
37#include <metahost.h>
38
39#include <wine/list.h>
40#include <wine/unicode.h>
41
42#include <wine/debug.h>
44
45extern char *WtoA(LPCWSTR wstr) DECLSPEC_HIDDEN;
46
48
50 LPCWSTR pwzFilePath, LPWSTR pwzBuffer, DWORD *pcchBuffer) DECLSPEC_HIDDEN;
51
52typedef struct _VTableFixup {
57
58typedef struct tagASSEMBLY ASSEMBLY;
59
65
66/* Mono embedding */
67typedef struct _MonoDomain MonoDomain;
68typedef struct _MonoAssembly MonoAssembly;
69typedef struct _MonoAssemblyName MonoAssemblyName;
70typedef struct _MonoType MonoType;
71typedef struct _MonoImage MonoImage;
72typedef struct _MonoClass MonoClass;
73typedef struct _MonoObject MonoObject;
74typedef struct _MonoString MonoString;
75typedef struct _MonoMethod MonoMethod;
76typedef struct _MonoProfiler MonoProfiler;
77typedef struct _MonoThread MonoThread;
78
79typedef struct loaded_mono loaded_mono;
80typedef struct RuntimeHost RuntimeHost;
81
82typedef struct CLRRuntimeInfo
83{
94
96{
101 struct list domains;
105};
106
107typedef struct CorProcess
108{
109 struct list entry;
112
113typedef struct CorDebug
114{
118
120
121 /* ICorDebug Callback */
124
125 /* Debug Processes */
128
129extern HRESULT get_runtime_info(LPCWSTR exefile, LPCWSTR version, LPCWSTR config_file,
130 DWORD startup_flags, DWORD runtimeinfo_flags, BOOL legacy, ICLRRuntimeInfo **result) DECLSPEC_HIDDEN;
131
133
135
136typedef struct parsed_config_file
137{
140
141typedef struct supported_runtime
142{
143 struct list entry;
146
148
150
151typedef enum {
157
158typedef MonoAssembly* (*MonoAssemblyPreLoadFunc)(MonoAssemblyName *aname, char **assemblies_path, void *user_data);
159
161
163{
166
169
175 MonoMethod* (CDECL *mono_class_get_method_from_name)(MonoClass *klass, const char *name, int param_count);
176 void (CDECL *mono_config_parse)(const char *filename);
178 void (CDECL *mono_free)(void *);
179 MonoImage* (CDECL *mono_image_open_from_module_handle)(HMODULE module_handle, char* fname, UINT has_entry_point, MonoImageOpenStatus* status);
180 void (CDECL *mono_install_assembly_preload_hook)(MonoAssemblyPreLoadFunc func, void *user_data);
181 int (CDECL *mono_jit_exec)(MonoDomain *domain, MonoAssembly *assembly, int argc, char *argv[]);
183 int (CDECL *mono_jit_set_trace_options)(const char* options);
188 void (CDECL *mono_profiler_install)(MonoProfiler *prof, MonoProfileFunc shutdown_callback);
191 void (CDECL *mono_runtime_object_init)(MonoObject *this_obj);
192 void (CDECL *mono_runtime_quit)(void);
193 void (CDECL *mono_runtime_set_shutting_down)(void);
194 void (CDECL *mono_set_dirs)(const char *assembly_dir, const char *config_dir);
196 void (CDECL *mono_thread_pool_cleanup)(void);
197 void (CDECL *mono_thread_suspend_all_other_threads)(void);
198 void (CDECL *mono_threads_set_shutting_down)(void);
201};
202
203/* loaded runtime interfaces */
204extern void unload_all_runtimes(void) DECLSPEC_HIDDEN;
205
206extern void expect_no_runtimes(void) DECLSPEC_HIDDEN;
207
208extern HRESULT RuntimeHost_Construct(const CLRRuntimeInfo *runtime_version,
210
212
214
217
219
221
223
225
226extern void runtimehost_init(void);
227extern void runtimehost_uninit(void);
228
229#endif /* __MSCOREE_PRIVATE__ */
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
Definition: list.h:37
#define DECLSPEC_HIDDEN
Definition: precomp.h:8
#define CDECL
Definition: compat.h:29
#define MAX_PATH
Definition: compat.h:34
static const WCHAR version[]
Definition: asmname.c:66
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
method
Definition: dragdrop.c:54
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLenum func
Definition: glext.h:6028
GLenum const GLfloat * params
Definition: glext.h:5645
GLuint64EXT * result
Definition: glext.h:11304
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
Definition: glfuncs.h:210
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
const char * filename
Definition: ioapi.h:137
BOOL legacy
Definition: mkisofs.c:131
static HMODULE hmodule
Definition: rasapi.c:29
struct _MonoObject MonoObject
struct _MonoThread MonoThread
HRESULT assembly_from_hmodule(ASSEMBLY **out, HMODULE hmodule) DECLSPEC_HIDDEN
Definition: assembly.c:245
void runtimehost_uninit(void)
HRESULT CLRMetaHost_CreateInstance(REFIID riid, void **ppobj) DECLSPEC_HIDDEN
Definition: metahost.c:1155
HRESULT MetaDataDispenser_CreateInstance(IUnknown **ppUnk) DECLSPEC_HIDDEN
Definition: metadata.c:169
HRESULT ICLRRuntimeInfo_GetRuntimeHost(ICLRRuntimeInfo *iface, RuntimeHost **result) DECLSPEC_HIDDEN
Definition: metahost.c:544
void expect_no_runtimes(void) DECLSPEC_HIDDEN
Definition: metahost.c:289
HRESULT RuntimeHost_Construct(const CLRRuntimeInfo *runtime_version, loaded_mono *loaded_mono, RuntimeHost **result) DECLSPEC_HIDDEN
HRESULT RuntimeHost_Destroy(RuntimeHost *This) DECLSPEC_HIDDEN
HRESULT parse_config_file(LPCWSTR filename, parsed_config_file *result) DECLSPEC_HIDDEN
Definition: config.c:419
HRESULT CorDebug_Create(ICLRRuntimeHost *runtimehost, IUnknown **ppUnk) DECLSPEC_HIDDEN
Definition: cordebug.c:742
void unload_all_runtimes(void) DECLSPEC_HIDDEN
Definition: metahost.c:266
HRESULT RuntimeHost_GetIUnknownForObject(RuntimeHost *This, MonoObject *obj, IUnknown **ppUnk) DECLSPEC_HIDDEN
HRESULT WINAPI CLRMetaHost_GetRuntime(ICLRMetaHost *iface, LPCWSTR pwzVersion, REFIID iid, LPVOID *ppRuntime) DECLSPEC_HIDDEN
Definition: metahost.c:1010
HRESULT RuntimeHost_GetInterface(RuntimeHost *This, REFCLSID clsid, REFIID riid, void **ppv) DECLSPEC_HIDDEN
MonoAssembly *(* MonoAssemblyPreLoadFunc)(MonoAssemblyName *aname, char **assemblies_path, void *user_data)
void runtimehost_init(void)
HRESULT WINAPI CLRMetaHost_GetVersionFromFile(ICLRMetaHost *iface, LPCWSTR pwzFilePath, LPWSTR pwzBuffer, DWORD *pcchBuffer) DECLSPEC_HIDDEN
Definition: metahost.c:1049
HRESULT assembly_get_vtable_fixups(ASSEMBLY *assembly, VTableFixup **fixups, DWORD *count) DECLSPEC_HIDDEN
Definition: assembly.c:294
HRESULT get_runtime_info(LPCWSTR exefile, LPCWSTR version, LPCWSTR config_file, DWORD startup_flags, DWORD runtimeinfo_flags, BOOL legacy, ICLRRuntimeInfo **result) DECLSPEC_HIDDEN
Definition: metahost.c:1247
struct _MonoProfiler MonoProfiler
HRESULT assembly_get_runtime_version(ASSEMBLY *assembly, LPSTR *version) DECLSPEC_HIDDEN
Definition: assembly.c:865
char * WtoA(LPCWSTR wstr) DECLSPEC_HIDDEN
Definition: mscoree_main.c:30
struct _MonoString MonoString
void free_parsed_config_file(parsed_config_file *file) DECLSPEC_HIDDEN
Definition: config.c:448
struct _MonoMethod MonoMethod
HRESULT create_monodata(REFIID riid, LPVOID *ppObj) DECLSPEC_HIDDEN
struct _MonoAssemblyName MonoAssemblyName
struct _MonoAssembly MonoAssembly
HRESULT RuntimeHost_CreateManagedInstance(RuntimeHost *This, LPCWSTR name, MonoDomain *domain, MonoObject **result) DECLSPEC_HIDDEN
struct _MonoImage MonoImage
struct _MonoType MonoType
HRESULT assembly_create(ASSEMBLY **out, LPCWSTR file) DECLSPEC_HIDDEN
Definition: assembly.c:641
MonoImageOpenStatus
@ MONO_IMAGE_OK
@ MONO_IMAGE_MISSING_ASSEMBLYREF
@ MONO_IMAGE_ERROR_ERRNO
@ MONO_IMAGE_IMAGE_INVALID
void(* MonoProfileFunc)(MonoProfiler *prof)
struct _MonoDomain MonoDomain
struct _VTableFixup VTableFixup
struct _MonoClass MonoClass
HRESULT assembly_release(ASSEMBLY *assembly) DECLSPEC_HIDDEN
Definition: assembly.c:694
REFCLSID clsid
Definition: msctf.c:82
unsigned int UINT
Definition: ndis.h:50
long LONG
Definition: pedump.c:60
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
static FILE * out
Definition: regtests2xml.c:44
const WCHAR * str
WCHAR mscorlib_path[MAX_PATH]
struct RuntimeHost * loaded_runtime
WCHAR mono_path[MAX_PATH]
ICLRRuntimeInfo ICLRRuntimeInfo_iface
ICorDebugProcessEnum ICorDebugProcessEnum_iface
struct list processes
ICorDebugManagedCallback * pCallback
ICLRRuntimeHost * runtimehost
ICorDebug ICorDebug_iface
ICorDebugManagedCallback2 * pCallback2
struct list entry
ICorDebugProcess * pProcess
ICLRRuntimeHost ICLRRuntimeHost_iface
const CLRRuntimeInfo * version
CRITICAL_SECTION lock
ICorRuntimeHost ICorRuntimeHost_iface
MonoDomain * default_domain
struct list domains
loaded_mono * mono
Definition: cookie.c:42
Definition: fci.c:127
HMODULE mono_handle
MonoAssembly int argc
void(CDECL *mono_threads_set_shutting_down)(void)
MonoClass *CDECL * mono_class_from_mono_type(MonoType *type)
MonoMethod *CDECL * mono_class_get_method_from_name(MonoClass *klass, const char *name, int param_count)
MonoObject *CDECL * mono_object_new(MonoDomain *domain, MonoClass *klass)
MonoAssembly *CDECL * mono_domain_assembly_open(MonoDomain *domain, const char *name)
HMODULE glib_handle
void(CDECL *mono_runtime_object_init)(MonoObject *this_obj)
MonoProfileFunc shutdown_callback
MonoImage *CDECL * mono_image_open_from_module_handle(HMODULE module_handle, char *fname, UINT has_entry_point, MonoImageOpenStatus *status)
MonoClass *CDECL * mono_class_from_name(MonoImage *image, const char *name_space, const char *name)
char *CDECL * mono_stringify_assembly_name(MonoAssemblyName *aname)
MonoAssembly * assembly
void(CDECL *mono_thread_suspend_all_other_threads)(void)
void *CDECL * mono_object_unbox(MonoObject *obj)
MonoAssembly *CDECL * mono_assembly_load_from(MonoImage *image, const char *fname, MonoImageOpenStatus *status)
void(CDECL *mono_thread_pool_cleanup)(void)
MonoDomain *CDECL * mono_object_get_domain(MonoObject *obj)
MonoDomain *CDECL * mono_jit_init(const char *file)
MonoAssembly *CDECL * mono_assembly_open(const char *filename, MonoImageOpenStatus *status)
MonoString *CDECL * mono_string_new(MonoDomain *domain, const char *str)
MonoObject *CDECL * mono_runtime_invoke(MonoMethod *method, void *obj, void **params, MonoObject **exc)
void(CDECL *mono_free)(void *)
MonoType *CDECL * mono_reflection_type_from_name(char *name, MonoImage *image)
int(CDECL *mono_jit_set_trace_options)(const char *options)
void(CDECL *mono_runtime_set_shutting_down)(void)
void(CDECL *mono_config_parse)(const char *filename)
const char * config_dir
MonoThread *CDECL * mono_thread_attach(MonoDomain *domain)
void(CDECL *mono_runtime_quit)(void)
MonoImage *CDECL * mono_assembly_get_image(MonoAssembly *assembly)
void *CDECL * mono_marshal_get_vtfixup_ftnptr(MonoImage *image, DWORD token, WORD type)
MonoAssembly int char * argv[]
Definition: name.c:39
struct list supported_runtimes
Definition: ps.c:97
#define WINAPI
Definition: msvc.h:6
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185