Calling DLL

sh3rIIf

Newcomer
Joined
Sep 25, 2003
Messages
15
Location
Jhb, RSA
I'm busy with a app that needs to call a sub in a DLL to which I don't know the name. In other words, the DLL name will be supplied in a registry setting and the app will then need to call a sub in that DLL.

Sort of like a plug-in. The problem is that I can't reference the DLL because I won't know the name of the DLL until run-time. Is this even possible?
 
You need the System.Reflection namespace
Create an Assembly class for the DLL (If it's a .Net DLL)
You need to create an instance of the class that owns the function(This should implement a certain Interface)
Then you can access the functions, There is a tutorial in the Tutor's section or you can use the search feature on the forums
 
Back
Top