|
-
Apr 27th, 2013, 01:44 PM
#2
Re: Public vs. Public Shared (Function/Sub) When Invoking DLL...
A method, whether in a dll or not, has to be part of something. If it is part of a class, then it can't be called without an instance of the class unless it is Shared. If the function is part of a module, then it might appear that it doesn't have to be Shared, but that's because the Shared is hidden, since all members of a module are quietly turned into Shared members by the compilers. Therefore, if the method you are tying to invoke is a member of a class, then you either need to have an instance of the class, or the method has to be Shared. If the method is in a module, then it is already shared.
My usual boring signature: Nothing
 
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
|