[Mono-list] mono/embedded

Jonathan Mitchell lists at mugginsoft.com
Tue Oct 25 07:31:00 UTC 2016



From mono/metadat/assembly.h

/* Installs a function which is called each time a new assembly is loaded. */
typedef void  (*MonoAssemblyLoadFunc)         (MonoAssembly *assembly, void* user_data);
MONO_API void          mono_install_assembly_load_hook (MonoAssemblyLoadFunc func, void* user_data);

 * Installs a new function which is used to search the list of loaded 
 * assemblies for a given assembly name.
typedef MonoAssembly *(*MonoAssemblySearchFunc)         (MonoAssemblyName *aname, void* user_data);
MONO_API void          mono_install_assembly_search_hook (MonoAssemblySearchFunc func, void* user_data);
MONO_API void 	      mono_install_assembly_refonly_search_hook (MonoAssemblySearchFunc func, void* user_data);

MONO_API MonoAssembly* mono_assembly_invoke_search_hook (MonoAssemblyName *aname);

 * Installs a new search function which is used as a last resort when loading 
 * an assembly fails. This could invoke AssemblyResolve events.
MONO_API void          
mono_install_assembly_postload_search_hook (MonoAssemblySearchFunc func, void* user_data);

MONO_API void          
mono_install_assembly_postload_refonly_search_hook (MonoAssemblySearchFunc func, void* user_data);


> On 25 Oct 2016, at 01:22, Wolfgang Mauer <wolfgang.mauer at kabelmail.de> wrote:
> Hi,
> do everyone know if there is something like “AppDomain.CurrentDomain.AssemblyResolve” in embedded Mono?
> Thanks
> Von: Mono-list [mailto:mono-list-bounces at lists.xamarin.com] Im Auftrag von Wolfgang Mauer
> Gesendet: Sonntag, 23. Oktober 2016 19:59
> An: mono-list at lists.xamarin.com
> Betreff: [Mono-list] mono/embedded
> Hi all,
> i try to make a kind of stub-loader with mono/embedded.
> I have read the documentation at http://www.mono-project.com/docs/advanced/embedding/ and tried a lot of samples.
> None of them examples work(mono 4.6.1/ubuntu 16.10)
> I like to have a executable(c/c++) that load an c# assembly and run the public constructor
> The assembly constructor will load gtk-sharp(referenced) and call 
>                 Application.Init();
>                 ….
> Application.Run();
> But with all my testing the different mono methods the assembly/ctor never will get called, and no error occurred.
> Have someone a really working sample with new versions of mono/ubuntu ?
> Thanks a lot!
> /Wolfgang
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.dot.net
> http://lists.dot.net/mailman/listinfo/mono-list

More information about the Mono-list mailing list