Commit e3e0cb8e authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

mscoree: Replace uses of mono_domain_assembly_open.

This function is only intended to be used for the entry point assembly. Signed-off-by: 's avatarVincent Povirk <vincent@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 049e50bc
......@@ -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;
}
......
......@@ -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);
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment