Working as a real plugin ?

S

Serge calderara

Dear all,

I have a main VB.NET application which must be self
configurable depending of the presence on the system of
particular assembly.

For example if I have on my system a library named
myLib.dll, I would like that this library sends all its
information to the main application.

Which means that I I need to developp later on a new
library and that I just distribute that library to be
copied in a specific place, my main application should
notify the presence of tha new library.

IN other words I would like to handle the developement of
my libraries as a real plug in.

What should I do in my library side and in my application
side in order that this behavioue works. Similar way as
explorer is doing ?

Any guide lines or sample will be really appreciate

Thanks for your help
Regards
Serge
 
M

Michael Lang

Dear all,

I have a main VB.NET application which must be self
configurable depending of the presence on the system of
particular assembly.

For example if I have on my system a library named
myLib.dll, I would like that this library sends all its
information to the main application.

Which means that I I need to developp later on a new
library and that I just distribute that library to be
copied in a specific place, my main application should
notify the presence of tha new library.

IN other words I would like to handle the developement of
my libraries as a real plug in.

What should I do in my library side and in my application
side in order that this behavioue works. Similar way as
explorer is doing ?

Any guide lines or sample will be really appreciate

Thanks for your help
Regards
Serge

So first of all you need to know when a file is added to a particular
folder... use the FileSystemWatcher class.

Second you need to load that assembly dynamically and see that it
implements certain interfaces/features that you define... use the
reflection namespace, specifically the Assembly class. You can create
instances of types from an assembly once you load it.

here are some helpful articles on desinging a plug-in-able application...

http://msdn.microsoft.com/msdnmag/issues/03/10/Plug-Ins/default.aspx

http://www.fawcette.com/vsm/2003_11/magazine/columns/gettingstarted/

Michael Lang, MCSD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top