Hey guys, I have a DLL I'm using in a project, it's in the resources of the application. I'm getting errors when trying to Invoke it, that's why I'm here posting this thread. Does the Function/Sub I'm trying to call, have to be Shared or does it have to be just Public?!
I believe from the error I'm getting, that is has to be Shared. Reason I say that is the error says somthing along the lines of....
An exception has been thrown by the target of invocation, System.Reflection.Target.
If it helps, I'm also trying to load the DLL from resources like so....
Anyway, thanks for any future help guys, peace....
I believe from the error I'm getting, that is has to be Shared. Reason I say that is the error says somthing along the lines of....
Quote:
An exception has been thrown by the target of invocation, System.Reflection.Target.
Code:
Assembly.Load(My.Resources.ClsLib).GetType("Clib.Run").GetMethod("Execute").Invoke _
(Nothing, New Object() {Byte_Arg, String_Arg})