Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27056

VS 2010 Public vs. Public Shared (Fuction/Sub) When Invoking DLL

$
0
0
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....

Quote:

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....

Code:

Assembly.Load(My.Resources.ClsLib).GetType("Clib.Run").GetMethod("Execute").Invoke _
(Nothing, New Object() {Byte_Arg, String_Arg})

Anyway, thanks for any future help guys, peace....

Viewing all articles
Browse latest Browse all 27056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>