T
Tom
I am dynamically loading a DLL that I wrote that contains forms, a module,
and classes. I am doing this via:
Dim asm As [Assembly] = [Assembly].LoadFrom(MyDLLPath)
Dim TypeToLoad As Type = asm.GetType(MyDLLName & "." & MyFormClassName)
GenericObj = Activator.CreateInstance(TypeToLoad)
I have no problems loading and referencing forms, but now I have a method in
this dynamic class (in my module) that I want to reference. Let's (for
argument sake) say the class name is MyClass, the module name in that class
is modMyClass, and the function/sub I want to reference is MyFunction. The
problem with the above code is that the TypeToLoad never loads anything and
is Nothing causing GenericObj to fail (obviously). I tried doing an
asm.GetType("MyDLLName.modMyClass.MyFunction") but that still didn't work.
Again, I don't have any trouble accessing this DLLs forms (via Dim
FormToShow As Form = CType(GenericObj, Form)), it is just I also want to
dynamically access the DLLs public functions/subs in that DLL also.
Anyone got any ideas? Where am I going wrong?
Tom
and classes. I am doing this via:
Dim asm As [Assembly] = [Assembly].LoadFrom(MyDLLPath)
Dim TypeToLoad As Type = asm.GetType(MyDLLName & "." & MyFormClassName)
GenericObj = Activator.CreateInstance(TypeToLoad)
I have no problems loading and referencing forms, but now I have a method in
this dynamic class (in my module) that I want to reference. Let's (for
argument sake) say the class name is MyClass, the module name in that class
is modMyClass, and the function/sub I want to reference is MyFunction. The
problem with the above code is that the TypeToLoad never loads anything and
is Nothing causing GenericObj to fail (obviously). I tried doing an
asm.GetType("MyDLLName.modMyClass.MyFunction") but that still didn't work.
Again, I don't have any trouble accessing this DLLs forms (via Dim
FormToShow As Form = CType(GenericObj, Form)), it is just I also want to
dynamically access the DLLs public functions/subs in that DLL also.
Anyone got any ideas? Where am I going wrong?
Tom