Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 140
  • Last Modified:

Read DLL's dynamically and interact with them

I know this is rather involved, but I'd like to know of a way (Reflection maybe?) to read a folder of DLL's that meet predefined standards (specific properties, methods, and events MUST be overloaded and present) and take actions based on them.  For example, if I have a DLL called Customer with New, Locator, and Entry methods, how can I get a master program to sense it's there and USE those methods.  Thanx!
0
bobnunny
Asked:
bobnunny
1 Solution
 
gregoryyoungCommented:
you would have to use Reflection ...

The Assembly object lets you open the Assembly ...
You can then use reflections specifically the Type object to run through the objects in the assembly.

I would personally recommend using interfaces to define the functionality in your plugins ...

In fact here is a complete code example using interfaces http://www.developerfusion.com/show/4371/1/redir/
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now