Daffy
Daffy

Reputation: 851

How can I dynamically import a DLL into my program? (vb.net)

Is there a way I can import a DLL at runtime? For example, like this:

Dim lib = ImportDLL("library.dll")
Dim result = lib.someNamespace.someClass.someFunction(arg1, arg2)

Upvotes: 1

Views: 1264

Answers (1)

Alex R.
Alex R.

Reputation: 4754

You're probably referring to reflection. There are a bunch of articles in the net like the one from Microsoft. This codeproject is also a good walkthrough.

Upvotes: 2

Related Questions