Hi, I'm searching about importing dll dynamicly and get his functions...
I found Assembly.LoadFrom() but I don't know how continue... There's GetNames() but I don't find help...
I know it's not really in Basic4PPC but if I find it'll be in Lib for Basic4PPC
With DoorEx library we can use the dll proprietes but only if it's already imported...
I do it in C#
Thanks for your help!
Edit:
Maybe I found but not sure:
And with Door library I return "target" as object? I test...
I found Assembly.LoadFrom() but I don't know how continue... There's GetNames() but I don't find help...
I know it's not really in Basic4PPC but if I find it'll be in Lib for Basic4PPC
With DoorEx library we can use the dll proprietes but only if it's already imported...
I do it in C#
Thanks for your help!
Edit:
Maybe I found but not sure:
B4X:
[COLOR=#008080]Assembly[/COLOR][SIZE=2] assembly = [/SIZE][SIZE=2][COLOR=#008080]Assembly[/COLOR][/SIZE][SIZE=2].LoadFrom( ASSEMBLY_NAME );
[/SIZE][SIZE=2][COLOR=#008000] // On obtient la classe.
[/COLOR][/SIZE][SIZE=2][COLOR=#008080] Type[/COLOR][/SIZE][SIZE=2] type = assembly.GetType( CLASS_NAME );
[/SIZE][SIZE=2][COLOR=#008000] // On obtient la méthode.
[/COLOR][/SIZE][SIZE=2][COLOR=#008080] MethodInfo[/COLOR][/SIZE][SIZE=2] method = type.GetMethod( METHOD_NAME );
[/SIZE][SIZE=2][COLOR=#008000] // On créer l'objet.
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff] object[/COLOR][/SIZE][SIZE=2] target = [/SIZE][SIZE=2][COLOR=#008080]Activator[/COLOR][/SIZE][SIZE=2].CreateInstance( type );[/SIZE]
Last edited: