ReactOS 0.4.16-dev-2357-g35d0dfe
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
23extern char *WtoA(const WCHAR *wstr) __WINE_DEALLOC(free) __WINE_MALLOC;
24
25extern HRESULT CLRMetaHost_CreateInstance(REFIID riid, void **ppobj);
27
29 LPCWSTR pwzFilePath, LPWSTR pwzBuffer, DWORD *pcchBuffer);
30
31typedef struct _VTableFixup {
36
37typedef struct tagASSEMBLY ASSEMBLY;
38
40
47
48#define WINE_MONO_VERSION "9.4.0"
49
50/* Mono embedding */
51typedef struct _MonoDomain MonoDomain;
52typedef struct _MonoAssembly MonoAssembly;
53typedef struct _MonoAssemblyName MonoAssemblyName;
54typedef struct _MonoType MonoType;
55typedef struct _MonoImage MonoImage;
56typedef struct _MonoClass MonoClass;
57typedef struct _MonoObject MonoObject;
58typedef struct _MonoString MonoString;
59typedef struct _MonoMethod MonoMethod;
60typedef struct _MonoProfiler MonoProfiler;
61typedef struct _MonoThread MonoThread;
62
63typedef struct RuntimeHost RuntimeHost;
64
65typedef struct CLRRuntimeInfo
66{
67 ICLRRuntimeInfo ICLRRuntimeInfo_iface;
73
75{
81};
82
83typedef struct CorProcess
84{
85 struct list entry;
88
89typedef struct CorDebug
90{
94
96
97 /* ICorDebug Callback */
100
101 /* Debug Processes */
104
105extern HRESULT get_runtime_info(LPCWSTR exefile, LPCWSTR version, LPCWSTR config_file,
106 IStream *config_stream, DWORD startup_flags, DWORD runtimeinfo_flags, BOOL legacy,
107 ICLRRuntimeInfo **result);
108
109extern BOOL get_mono_path(LPWSTR path, BOOL skip_local);
110
111extern MonoDomain* get_root_domain(void);
112
113extern HRESULT ICLRRuntimeInfo_GetRuntimeHost(ICLRRuntimeInfo *iface, RuntimeHost **result);
114
116
117typedef struct parsed_config_file
118{
122
123typedef struct supported_runtime
124{
125 struct list entry;
128
129extern WCHAR **private_path;
130
132
134
136
137typedef enum {
143
144typedef MonoAssembly* (CDECL *MonoAssemblyPreLoadFunc)(MonoAssemblyName *aname, char **assemblies_path, void *user_data);
145
146#define WINE_PRELOAD_CONTINUE 0
147#define WINE_PRELOAD_SKIP_PRIVATE_PATH 1
148#define WINE_PRELOAD_SKIP_GAC 2
149#define WINE_PRELOAD_SET_GAC 4
150
151typedef MonoAssembly* (CDECL *WineMonoAssemblyPreLoadFunc)(MonoAssemblyName *aname, char **assemblies_path, int *flags, void *user_data);
152
154
155typedef void (CDECL *MonoPrintCallback) (const char *string, INT is_stdout);
156typedef void (*MonoLogCallback) (const char *log_domain, const char *log_level, const char *message, INT fatal, void *user_data);
157
158typedef enum {
169
170extern BOOL is_mono_started;
171
176extern void (CDECL *mono_callspec_set_assembly)(MonoAssembly *assembly);
178extern MonoClass* (CDECL *mono_class_from_name)(MonoImage *image, const char* name_space, const char *name);
179extern MonoMethod* (CDECL *mono_class_get_method_from_name)(MonoClass *klass, const char *name, int param_count);
182extern BOOL (CDECL *mono_domain_set)(MonoDomain *domain, BOOL force);
183extern void (CDECL *mono_domain_set_config)(MonoDomain *domain,const char *base_dir,const char *config_file_name);
185extern int (CDECL *mono_jit_exec)(MonoDomain *domain, MonoAssembly *assembly, int argc, char *argv[]);
186extern MonoDomain* (CDECL *mono_jit_init_version)(const char *domain_name, const char *runtime_version);
187extern MonoImage* (CDECL *mono_image_open_from_module_handle)(HMODULE module_handle, char* fname, UINT has_entry_point, MonoImageOpenStatus* status);
195extern void (CDECL *mono_runtime_object_init)(MonoObject *this_obj);
196extern void (CDECL *mono_runtime_quit)(void);
199extern void (CDECL *mono_thread_manage)(void);
200extern void (CDECL *mono_trace_set_print_handler)(MonoPrintCallback callback);
201extern void (CDECL *mono_trace_set_printerr_handler)(MonoPrintCallback callback);
202
203/* loaded runtime interfaces */
204extern void expect_no_runtimes(void);
205
207
208extern void RuntimeHost_ExitProcess(RuntimeHost *This, INT exitcode);
209
211
213
216
218
219HRESULT WINAPI CLRMetaHost_GetRuntime(ICLRMetaHost* iface, LPCWSTR pwzVersion, REFIID iid, LPVOID *ppRuntime);
220
221extern HRESULT CorDebug_Create(ICLRRuntimeHost *runtimehost, IUnknown** ppUnk);
222
224
225extern HRESULT get_file_from_strongname(WCHAR* stringnameW, WCHAR* assemblies_path, int path_length);
226
227extern void runtimehost_init(void);
228extern void runtimehost_uninit(void);
229
230extern void CDECL mono_print_handler_fn(const char *string, INT is_stdout);
231extern void CDECL mono_log_handler_fn(const char *log_domain, const char *log_level, const char *message, INT fatal, void *user_data);
232
233#endif /* __MSCOREE_PRIVATE__ */
static long path_length
Definition: maze.c:116
Definition: list.h:37
#define free
Definition: debug_ros.c:5
#define CDECL
Definition: compat.h:29
static const WCHAR version[]
Definition: asmname.c:66
static void * user_data
Definition: metahost.c:106
#define __WINE_DEALLOC(...)
Definition: corecrt.h:334
#define __WINE_MALLOC
Definition: corecrt.h:340
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
method
Definition: dragdrop.c:54
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLenum func
Definition: glext.h:6028
GLenum const GLfloat * params
Definition: glext.h:5645
GLbitfield flags
Definition: glext.h:7161
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
char string[160]
Definition: util.h:11
static IPrintDialogCallback callback
Definition: printdlg.c:326
static HMODULE hmodule
Definition: rasapi.c:29
MonoObject *CDECL * mono_object_new(MonoDomain *domain, MonoClass *klass)
HRESULT get_runtime_info(LPCWSTR exefile, LPCWSTR version, LPCWSTR config_file, IStream *config_stream, DWORD startup_flags, DWORD runtimeinfo_flags, BOOL legacy, ICLRRuntimeInfo **result)
Definition: metahost.c:1904
void(* MonoLogCallback)(const char *log_domain, const char *log_level, const char *message, INT fatal, void *user_data)
struct _MonoObject MonoObject
MonoImage *CDECL * mono_image_open_from_module_handle(HMODULE module_handle, char *fname, UINT has_entry_point, MonoImageOpenStatus *status)
void RuntimeHost_ExitProcess(RuntimeHost *This, INT exitcode)
MonoImage *CDECL * mono_get_corlib(void)
struct _MonoThread MonoThread
BOOL(WINAPI * NativeEntryPointFunc)(HINSTANCE, DWORD, LPVOID)
MonoImage *CDECL * mono_assembly_get_image(MonoAssembly *assembly)
MonoAssembly *(CDECL * WineMonoAssemblyPreLoadFunc)(MonoAssemblyName *aname, char **assemblies_path, int *flags, void *user_data)
HRESULT RuntimeHost_GetInterface(RuntimeHost *This, REFCLSID clsid, REFIID riid, void **ppv)
void expect_no_runtimes(void)
Definition: metahost.c:454
void runtimehost_uninit(void)
HRESULT create_monodata(REFCLSID clsid, LPVOID *ppObj)
MonoThread *CDECL * mono_thread_attach(MonoDomain *domain)
MonoDomain *CDECL * mono_object_get_domain(MonoObject *obj)
MonoAssembly int argc
HRESULT WINAPI CLRMetaHost_GetVersionFromFile(ICLRMetaHost *iface, LPCWSTR pwzFilePath, LPWSTR pwzBuffer, DWORD *pcchBuffer)
Definition: metahost.c:1157
void CDECL mono_log_handler_fn(const char *log_domain, const char *log_level, const char *message, INT fatal, void *user_data)
Definition: mscoree_main.c:265
void(CDECL * MonoProfileFunc)(MonoProfiler *prof)
MonoObject *CDECL * mono_runtime_invoke(MonoMethod *method, void *obj, void **params, MonoObject **exc)
HRESULT assembly_get_native_entrypoint(ASSEMBLY *assembly, NativeEntryPointFunc *func)
Definition: assembly.c:303
HRESULT get_file_from_strongname(WCHAR *stringnameW, WCHAR *assemblies_path, int path_length)
Definition: metahost.c:1687
HRESULT assembly_release(ASSEMBLY *assembly)
Definition: assembly.c:694
HRESULT CLRMetaHostPolicy_CreateInstance(REFIID riid, void **ppobj)
Definition: metahost.c:1385
HRESULT parse_config_stream(IStream *stream, parsed_config_file *result)
Definition: config.c:658
MonoAssembly * assembly
char * WtoA(const WCHAR *wstr) __WINE_DEALLOC(free) __WINE_MALLOC
MonoString *CDECL * mono_string_new(MonoDomain *domain, const char *str)
MonoDomain *CDECL * mono_domain_get_by_id(int id)
MonoAssembly *CDECL * mono_assembly_open(const char *filename, MonoImageOpenStatus *status)
HRESULT assembly_from_hmodule(ASSEMBLY **out, HMODULE hmodule)
Definition: assembly.c:244
MonoDomain *CDECL * mono_domain_get(void)
HRESULT assembly_get_vtable_fixups(ASSEMBLY *assembly, VTableFixup **fixups, DWORD *count)
Definition: assembly.c:293
void runtimehost_init(void)
HRESULT parse_config_file(LPCWSTR filename, parsed_config_file *result)
Definition: config.c:678
MonoMethod *CDECL * mono_object_get_virtual_method(MonoObject *obj, MonoMethod *method)
BOOL is_mono_started
Definition: metahost.c:80
MonoAssembly *(CDECL * MonoAssemblyPreLoadFunc)(MonoAssemblyName *aname, char **assemblies_path, void *user_data)
void CDECL mono_print_handler_fn(const char *string, INT is_stdout)
Definition: mscoree_main.c:225
MonoAssembly int char * argv[]
struct _MonoProfiler MonoProfiler
HRESULT RuntimeHost_CreateManagedInstance(RuntimeHost *This, LPCWSTR name, MonoDomain *domain, MonoObject **result)
MonoAssembly *CDECL * mono_assembly_load_from(MonoImage *image, const char *fname, MonoImageOpenStatus *status)
void(CDECL * MonoPrintCallback)(const char *string, INT is_stdout)
const char * base_dir
MonoType *CDECL * mono_reflection_type_from_name(char *name, MonoImage *image)
HRESULT assembly_get_runtime_version(ASSEMBLY *assembly, LPSTR *version)
Definition: assembly.c:865
void *CDECL * mono_object_unbox(MonoObject *obj)
const char *CDECL * mono_assembly_name_get_name(MonoAssemblyName *aname)
struct _MonoString MonoString
MonoClass *CDECL * mono_class_from_mono_type(MonoType *type)
HRESULT assembly_create(ASSEMBLY **out, LPCWSTR file)
Definition: assembly.c:641
MonoMethod *CDECL * mono_class_get_method_from_name(MonoClass *klass, const char *name, int param_count)
const char const char * config_file_name
struct _MonoMethod MonoMethod
void *CDECL * mono_marshal_get_vtfixup_ftnptr(MonoImage *image, DWORD token, WORD type)
struct _MonoAssemblyName MonoAssemblyName
struct _MonoAssembly MonoAssembly
HRESULT CLRMetaHost_CreateInstance(REFIID riid, void **ppobj)
Definition: metahost.c:1281
struct _MonoImage MonoImage
MonoAotMode
@ MONO_AOT_MODE_NONE
@ MONO_AOT_MODE_INTERP
@ MONO_AOT_MODE_LLVMONLY
@ MONO_AOT_MODE_LLVMONLY_INTERP
@ MONO_AOT_MODE_NORMAL
@ MONO_AOT_MODE_INTERP_ONLY
@ MONO_AOT_MODE_FULL
@ MONO_AOT_MODE_HYBRID
@ MONO_AOT_MODE_INTERP_LLVMONLY
HRESULT RuntimeHost_Construct(CLRRuntimeInfo *runtime_version, RuntimeHost **result)
struct _MonoType MonoType
BOOL get_mono_path(LPWSTR path, BOOL skip_local)
Definition: metahost.c:874
HRESULT CorDebug_Create(ICLRRuntimeHost *runtimehost, IUnknown **ppUnk)
Definition: cordebug.c:763
HRESULT RuntimeHost_GetIUnknownForObject(RuntimeHost *This, MonoObject *obj, IUnknown **ppUnk)
MonoClass *CDECL * mono_class_from_name(MonoImage *image, const char *name_space, const char *name)
HRESULT ICLRRuntimeInfo_GetRuntimeHost(ICLRRuntimeInfo *iface, RuntimeHost **result)
Definition: metahost.c:703
void free_parsed_config_file(parsed_config_file *file)
Definition: config.c:696
BOOL force
HRESULT MetaDataDispenser_CreateInstance(IUnknown **ppUnk)
Definition: metadata.c:189
WCHAR ** private_path
HRESULT WINAPI CLRMetaHost_ExitProcess(ICLRMetaHost *iface, INT32 iExitCode)
Definition: metahost.c:1244
MonoImageOpenStatus
@ MONO_IMAGE_OK
@ MONO_IMAGE_MISSING_ASSEMBLYREF
@ MONO_IMAGE_ERROR_ERRNO
@ MONO_IMAGE_IMAGE_INVALID
MonoDomain *CDECL * mono_jit_init_version(const char *domain_name, const char *runtime_version)
struct _MonoDomain MonoDomain
struct _VTableFixup VTableFixup
MonoDomain * get_root_domain(void)
Definition: metahost.c:366
HRESULT WINAPI CLRMetaHost_GetRuntime(ICLRMetaHost *iface, LPCWSTR pwzVersion, REFIID iid, LPVOID *ppRuntime)
Definition: metahost.c:1149
struct _MonoClass MonoClass
const CLSID * clsid
Definition: msctf.cpp:50
unsigned int UINT
Definition: ndis.h:50
#define LPVOID
Definition: nt_native.h:45
#define BOOL
Definition: nt_native.h:43
#define DWORD
Definition: nt_native.h:44
long LONG
Definition: pedump.c:60
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
const WCHAR * str
struct RuntimeHost * loaded_runtime
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
CRITICAL_SECTION lock
CLRRuntimeInfo * version
ICorRuntimeHost ICorRuntimeHost_iface
Definition: cookie.c:42
Definition: fci.c:127
Definition: tftpd.h:60
Definition: name.c:39
struct list supported_runtimes
Definition: ps.c:97
Definition: parse.h:23
HANDLE HINSTANCE
Definition: typedefs.h:77
int32_t INT32
Definition: typedefs.h:58
int32_t INT
Definition: typedefs.h:58
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383
#define WINAPI
Definition: msvc.h:6
void fatal(const char *msg)
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
char * LPSTR
Definition: xmlstorage.h:182