From: Vincent Povirk vincent@codeweavers.com
This function is only intended to be used for the entry point assembly.
Signed-off-by: Vincent Povirk vincent@codeweavers.com --- dlls/mscoree/corruntimehost.c | 10 ++++++---- dlls/mscoree/metahost.c | 2 -- dlls/mscoree/mscoree_private.h | 1 - 3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/dlls/mscoree/corruntimehost.c b/dlls/mscoree/corruntimehost.c index c79c4fd8d11..9f53555ee94 100644 --- a/dlls/mscoree/corruntimehost.c +++ b/dlls/mscoree/corruntimehost.c @@ -206,10 +206,11 @@ static BOOL RuntimeHost_GetMethod(MonoDomain *domain, const char *assemblyname, } else { - assembly = mono_domain_assembly_open(domain, assemblyname); + MonoImageOpenStatus status; + assembly = mono_assembly_open(assemblyname, &status); if (!assembly) { - ERR("Cannot load assembly %s\n", assemblyname); + ERR("Cannot load assembly %s, status=%i\n", assemblyname, status); return FALSE; }
@@ -1819,6 +1820,7 @@ HRESULT create_monodata(REFIID riid, LPVOID *ppObj ) MonoClass *klass; MonoObject *result; MonoDomain *prev_domain; + MonoImageOpenStatus status; IUnknown *unk = NULL; char *filenameA, *ns; char *classA; @@ -1828,11 +1830,11 @@ HRESULT create_monodata(REFIID riid, LPVOID *ppObj ) prev_domain = domain_attach(domain);
filenameA = WtoA(filename); - assembly = mono_domain_assembly_open(domain, filenameA); + assembly = mono_assembly_open(filenameA, &status); HeapFree(GetProcessHeap(), 0, filenameA); if (!assembly) { - ERR("Cannot open assembly %s\n", filenameA); + ERR("Cannot open assembly %s, status=%i\n", filenameA, status); domain_restore(prev_domain); goto cleanup; } diff --git a/dlls/mscoree/metahost.c b/dlls/mscoree/metahost.c index 9fa7978340d..9a299662e38 100644 --- a/dlls/mscoree/metahost.c +++ b/dlls/mscoree/metahost.c @@ -93,7 +93,6 @@ MonoClass* (CDECL *mono_class_from_mono_type)(MonoType *type); MonoClass* (CDECL *mono_class_from_name)(MonoImage *image, const char* name_space, const char *name); MonoMethod* (CDECL *mono_class_get_method_from_name)(MonoClass *klass, const char *name, int param_count); static void (CDECL *mono_config_parse)(const char *filename); -MonoAssembly* (CDECL *mono_domain_assembly_open)(MonoDomain *domain, const char *name); MonoDomain* (CDECL *mono_domain_get)(void); MonoDomain* (CDECL *mono_domain_get_by_id)(int id); BOOL (CDECL *mono_domain_set)(MonoDomain *domain,BOOL force); @@ -199,7 +198,6 @@ static HRESULT load_mono(LPCWSTR mono_path) LOAD_MONO_FUNCTION(mono_class_from_mono_type); LOAD_MONO_FUNCTION(mono_class_from_name); LOAD_MONO_FUNCTION(mono_class_get_method_from_name); - LOAD_MONO_FUNCTION(mono_domain_assembly_open); LOAD_MONO_FUNCTION(mono_domain_get); LOAD_MONO_FUNCTION(mono_domain_get_by_id); LOAD_MONO_FUNCTION(mono_domain_set); diff --git a/dlls/mscoree/mscoree_private.h b/dlls/mscoree/mscoree_private.h index 8ad95e385eb..f824cc9d5c1 100644 --- a/dlls/mscoree/mscoree_private.h +++ b/dlls/mscoree/mscoree_private.h @@ -157,7 +157,6 @@ extern void (CDECL *mono_callspec_set_assembly)(MonoAssembly *assembly) DECLSPEC extern MonoClass* (CDECL *mono_class_from_mono_type)(MonoType *type) DECLSPEC_HIDDEN; extern MonoClass* (CDECL *mono_class_from_name)(MonoImage *image, const char* name_space, const char *name) DECLSPEC_HIDDEN; extern MonoMethod* (CDECL *mono_class_get_method_from_name)(MonoClass *klass, const char *name, int param_count) DECLSPEC_HIDDEN; -extern MonoAssembly* (CDECL *mono_domain_assembly_open)(MonoDomain *domain, const char *name) DECLSPEC_HIDDEN; extern MonoDomain* (CDECL *mono_domain_get)(void) DECLSPEC_HIDDEN; extern MonoDomain* (CDECL *mono_domain_get_by_id)(int id) DECLSPEC_HIDDEN; extern BOOL (CDECL *mono_domain_set)(MonoDomain *domain, BOOL force) DECLSPEC_HIDDEN;