Read DLL's dynamically and interact with them

Posted on 2004-08-28
Last Modified: 2010-04-23
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!
Question by:bobnunny
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 37

Accepted Solution

gregoryyoung earned 250 total points
ID: 11922070
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

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
It’s quite interesting for me as I worked with Excel using for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question