|
-
Apr 27th, 2013, 01:35 PM
#1
Thread Starter
New Member
Public vs. Public Shared (Function/Sub) When Invoking DLL...
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....
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....
Last edited by xblshun; Apr 27th, 2013 at 01:43 PM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|