ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

mscoree_private.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Copyright 2008 Alistair Leslie-Hughes
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2.1 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Lesser General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
00018  */
00019 
00020 #ifndef __MSCOREE_PRIVATE__
00021 #define __MSCOREE_PRIVATE__
00022 
00023 extern char *WtoA(LPCWSTR wstr) DECLSPEC_HIDDEN;
00024 
00025 extern HRESULT CLRMetaHost_CreateInstance(REFIID riid, void **ppobj) DECLSPEC_HIDDEN;
00026 
00027 extern HRESULT WINAPI CLRMetaHost_GetVersionFromFile(ICLRMetaHost* iface,
00028     LPCWSTR pwzFilePath, LPWSTR pwzBuffer, DWORD *pcchBuffer) DECLSPEC_HIDDEN;
00029 
00030 typedef struct tagASSEMBLY ASSEMBLY;
00031 
00032 HRESULT assembly_create(ASSEMBLY **out, LPCWSTR file) DECLSPEC_HIDDEN;
00033 HRESULT assembly_release(ASSEMBLY *assembly) DECLSPEC_HIDDEN;
00034 HRESULT assembly_get_runtime_version(ASSEMBLY *assembly, LPSTR *version) DECLSPEC_HIDDEN;
00035 
00036 /* Mono embedding */
00037 typedef struct _MonoDomain MonoDomain;
00038 typedef struct _MonoAssembly MonoAssembly;
00039 typedef struct _MonoAssemblyName MonoAssemblyName;
00040 typedef struct _MonoType MonoType;
00041 typedef struct _MonoImage MonoImage;
00042 typedef struct _MonoClass MonoClass;
00043 typedef struct _MonoObject MonoObject;
00044 typedef struct _MonoString MonoString;
00045 typedef struct _MonoMethod MonoMethod;
00046 typedef struct _MonoProfiler MonoProfiler;
00047 
00048 typedef struct loaded_mono loaded_mono;
00049 typedef struct RuntimeHost RuntimeHost;
00050 
00051 typedef struct CLRRuntimeInfo
00052 {
00053     ICLRRuntimeInfo ICLRRuntimeInfo_iface;
00054     LPCWSTR mono_libdir;
00055     DWORD major;
00056     DWORD minor;
00057     DWORD build;
00058     int mono_abi_version;
00059     WCHAR mono_path[MAX_PATH];
00060     WCHAR mscorlib_path[MAX_PATH];
00061     struct RuntimeHost *loaded_runtime;
00062 } CLRRuntimeInfo;
00063 
00064 struct RuntimeHost
00065 {
00066     ICorRuntimeHost ICorRuntimeHost_iface;
00067     ICLRRuntimeHost ICLRRuntimeHost_iface;
00068     const CLRRuntimeInfo *version;
00069     loaded_mono *mono;
00070     struct list domains;
00071     MonoDomain *default_domain;
00072     CRITICAL_SECTION lock;
00073     LONG ref;
00074 };
00075 
00076 typedef struct CorProcess
00077 {
00078     struct list entry;
00079     ICorDebugProcess *pProcess;
00080 } CorProcess;
00081 
00082 typedef struct CorDebug
00083 {
00084     ICorDebug ICorDebug_iface;
00085     ICorDebugProcessEnum ICorDebugProcessEnum_iface;
00086     LONG ref;
00087 
00088     ICLRRuntimeHost *runtimehost;
00089 
00090     /* ICorDebug Callback */
00091     ICorDebugManagedCallback *pCallback;
00092     ICorDebugManagedCallback2 *pCallback2;
00093 
00094     /* Debug Processes */
00095     struct list processes;
00096 } CorDebug;
00097 
00098 extern HRESULT get_runtime_info(LPCWSTR exefile, LPCWSTR version, LPCWSTR config_file,
00099     DWORD startup_flags, DWORD runtimeinfo_flags, BOOL legacy, ICLRRuntimeInfo **result) DECLSPEC_HIDDEN;
00100 
00101 extern HRESULT ICLRRuntimeInfo_GetRuntimeHost(ICLRRuntimeInfo *iface, RuntimeHost **result) DECLSPEC_HIDDEN;
00102 
00103 extern HRESULT MetaDataDispenser_CreateInstance(IUnknown **ppUnk) DECLSPEC_HIDDEN;
00104 
00105 typedef struct parsed_config_file
00106 {
00107     struct list supported_runtimes;
00108 } parsed_config_file;
00109 
00110 typedef struct supported_runtime
00111 {
00112     struct list entry;
00113     LPWSTR version;
00114 } supported_runtime;
00115 
00116 extern HRESULT parse_config_file(LPCWSTR filename, parsed_config_file *result) DECLSPEC_HIDDEN;
00117 
00118 extern void free_parsed_config_file(parsed_config_file *file) DECLSPEC_HIDDEN;
00119 
00120 typedef enum {
00121     MONO_IMAGE_OK,
00122     MONO_IMAGE_ERROR_ERRNO,
00123     MONO_IMAGE_MISSING_ASSEMBLYREF,
00124     MONO_IMAGE_IMAGE_INVALID
00125 } MonoImageOpenStatus;
00126 
00127 typedef MonoAssembly* (*MonoAssemblyPreLoadFunc)(MonoAssemblyName *aname, char **assemblies_path, void *user_data);
00128 
00129 typedef void (*MonoProfileFunc)(MonoProfiler *prof);
00130 
00131 struct loaded_mono
00132 {
00133     HMODULE mono_handle;
00134     HMODULE glib_handle;
00135 
00136     BOOL is_started;
00137     BOOL is_shutdown;
00138 
00139     MonoImage* (CDECL *mono_assembly_get_image)(MonoAssembly *assembly);
00140     MonoAssembly* (CDECL *mono_assembly_open)(const char *filename, MonoImageOpenStatus *status);
00141     MonoClass* (CDECL *mono_class_from_mono_type)(MonoType *type);
00142     MonoClass* (CDECL *mono_class_from_name)(MonoImage *image, const char* name_space, const char *name);
00143     MonoMethod* (CDECL *mono_class_get_method_from_name)(MonoClass *klass, const char *name, int param_count);
00144     void (CDECL *mono_config_parse)(const char *filename);
00145     MonoAssembly* (CDECL *mono_domain_assembly_open) (MonoDomain *domain, const char *name);
00146     void (CDECL *mono_free)(void *);
00147     void (CDECL *mono_install_assembly_preload_hook)(MonoAssemblyPreLoadFunc func, void *user_data);
00148     int (CDECL *mono_jit_exec)(MonoDomain *domain, MonoAssembly *assembly, int argc, char *argv[]);
00149     MonoDomain* (CDECL *mono_jit_init)(const char *file);
00150     int (CDECL *mono_jit_set_trace_options)(const char* options);
00151     MonoDomain* (CDECL *mono_object_get_domain)(MonoObject *obj);
00152     MonoObject* (CDECL *mono_object_new)(MonoDomain *domain, MonoClass *klass);
00153     void* (CDECL *mono_object_unbox)(MonoObject *obj);
00154     void (CDECL *mono_profiler_install)(MonoProfiler *prof, MonoProfileFunc shutdown_callback);
00155     MonoType* (CDECL *mono_reflection_type_from_name)(char *name, MonoImage *image);
00156     MonoObject* (CDECL *mono_runtime_invoke)(MonoMethod *method, void *obj, void **params, MonoObject **exc);
00157     void (CDECL *mono_runtime_object_init)(MonoObject *this_obj);
00158     void (CDECL *mono_runtime_quit)(void);
00159     void (CDECL *mono_runtime_set_shutting_down)(void);
00160     void (CDECL *mono_set_dirs)(const char *assembly_dir, const char *config_dir);
00161     char* (CDECL *mono_stringify_assembly_name)(MonoAssemblyName *aname);
00162     void (CDECL *mono_thread_pool_cleanup)(void);
00163     void (CDECL *mono_thread_suspend_all_other_threads)(void);
00164     void (CDECL *mono_threads_set_shutting_down)(void);
00165     MonoString* (CDECL *mono_string_new)(MonoDomain *domain, const char *str);
00166 };
00167 
00168 /* loaded runtime interfaces */
00169 extern void unload_all_runtimes(void) DECLSPEC_HIDDEN;
00170 
00171 extern void expect_no_runtimes(void) DECLSPEC_HIDDEN;
00172 
00173 extern HRESULT RuntimeHost_Construct(const CLRRuntimeInfo *runtime_version,
00174     loaded_mono *loaded_mono, RuntimeHost** result) DECLSPEC_HIDDEN;
00175 
00176 extern HRESULT RuntimeHost_GetInterface(RuntimeHost *This, REFCLSID clsid, REFIID riid, void **ppv) DECLSPEC_HIDDEN;
00177 
00178 extern HRESULT RuntimeHost_GetIUnknownForObject(RuntimeHost *This, MonoObject *obj, IUnknown **ppUnk) DECLSPEC_HIDDEN;
00179 
00180 extern HRESULT RuntimeHost_CreateManagedInstance(RuntimeHost *This, LPCWSTR name,
00181     MonoDomain *domain, MonoObject **result) DECLSPEC_HIDDEN;
00182 
00183 extern HRESULT RuntimeHost_Destroy(RuntimeHost *This) DECLSPEC_HIDDEN;
00184 
00185 HRESULT WINAPI CLRMetaHost_GetRuntime(ICLRMetaHost* iface, LPCWSTR pwzVersion, REFIID iid, LPVOID *ppRuntime) DECLSPEC_HIDDEN;
00186 
00187 extern HRESULT CorDebug_Create(ICLRRuntimeHost *runtimehost, IUnknown** ppUnk) DECLSPEC_HIDDEN;
00188 
00189 #endif   /* __MSCOREE_PRIVATE__ */

Generated on Sun May 27 2012 04:24:48 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.