Hi,
I'm looking at making a piece of software which will have a central
executable file, and a list of DLLs (kind of like Office "add-ins")
that will provide different functionalities - the idea being I can
write new modules as and when they're needed, and distribute them to
customers as necessary.
Could anyone provide any advice as to the best way to go about this? I
was thinking a list of "installed" modules could be stored in the
registry. I'm then hoping that I could do something along the lines of
loop through the list, and create an array of "modules" by referring to
different objects in different DLLs.
Is it possible to load a DLL by name, and create an instance of an
object by name (i.e. dynamically, at runtime - not at designtime)? If
so, how do I do this? I'm envisaging that all modules will have
objects implementing the same interface.
Thank you in advance for your help!
Stuart Jones
To e-mail me, replace the part of my e-mail after the @ with
university-college.oxon.org 4 1163
Stu <st**********@univ.ox.ac.uk> wrote: I'm looking at making a piece of software which will have a central executable file, and a list of DLLs (kind of like Office "add-ins") that will provide different functionalities - the idea being I can write new modules as and when they're needed, and distribute them to customers as necessary.
Could anyone provide any advice as to the best way to go about this? I was thinking a list of "installed" modules could be stored in the registry. I'm then hoping that I could do something along the lines of loop through the list, and create an array of "modules" by referring to different objects in different DLLs.
Is it possible to load a DLL by name, and create an instance of an object by name (i.e. dynamically, at runtime - not at designtime)? If so, how do I do this? I'm envisaging that all modules will have objects implementing the same interface.
Thank you in advance for your help!
Have a look at http://www.pobox.com/~skeet/csharp/plugin.html
It's mostly for people who are already having problems, but it gives
you a little bit of framework to see what you need to do.
(You have my sympathy by the way - but I suppose someone has to go to
Oxford ;)
--
Jon Skeet - <sk***@pobox.com> http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Have a look at articles I wrote in September 2003 and August 2005 from http://emoreau.s2i.com/
--
HTH
Éric Moreau, MCSD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Concept S2i inc. ( www.s2i.com) http://emoreau.s2i.com/
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om... Stu <st**********@univ.ox.ac.uk> wrote: I'm looking at making a piece of software which will have a central executable file, and a list of DLLs (kind of like Office "add-ins") that will provide different functionalities - the idea being I can write new modules as and when they're needed, and distribute them to customers as necessary.
Could anyone provide any advice as to the best way to go about this? I was thinking a list of "installed" modules could be stored in the registry. I'm then hoping that I could do something along the lines of loop through the list, and create an array of "modules" by referring to different objects in different DLLs.
Is it possible to load a DLL by name, and create an instance of an object by name (i.e. dynamically, at runtime - not at designtime)? If so, how do I do this? I'm envisaging that all modules will have objects implementing the same interface.
Thank you in advance for your help!
Have a look at http://www.pobox.com/~skeet/csharp/plugin.html
It's mostly for people who are already having problems, but it gives you a little bit of framework to see what you need to do.
(You have my sympathy by the way - but I suppose someone has to go to Oxford ;)
-- Jon Skeet - <sk***@pobox.com> http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet If replying to the group, please do not mail me too
Eric Moreau wrote: Have a look at articles I wrote in September 2003 and August 2005 from http://emoreau.s2i.com/
Have a look at http://www.pobox.com/~skeet/csharp/plugin.html
It's mostly for people who are already having problems, but it gives you a little bit of framework to see what you need to do.
(You have my sympathy by the way - but I suppose someone has to go to Oxford ;)
-- Jon Skeet - <sk***@pobox.com> http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet If replying to the group, please do not mail me too
Thank you both for your help - it's exactly the sort of stuff I had in
mind :-)
Have a peaceful Christmas and a prosperous New Year!
(And as for Oxford - I just never liked Cambridge's nasty duck-egg blue
from an early age...)
Stu <st**********@univ.ox.ac.uk> wrote: Thank you both for your help - it's exactly the sort of stuff I had in mind :-)
My pleasure. Do ask if anything else goes wrong - in my experience,
it's rare to get this kind of thing working first time :)
Have a peaceful Christmas and a prosperous New Year!
Likewise.
(And as for Oxford - I just never liked Cambridge's nasty duck-egg blue from an early age...)
Yeah. I think we let you have the nicer colour to make up for
everything else.
--
Jon Skeet - <sk***@pobox.com> http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: simon |
last post by:
On code behind file:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
Dim ctrl As New LinkButton
ctrl.ID =...
|
by: Earl Teigrob |
last post by:
I am building a custom control that I want to server as a container for child
controls that can be dynamically added to this control. I can persist the
child controls that are added to my custom...
|
by: Harry |
last post by:
Hello,
I have a page with a RadioButtonList and a PlaceHolder control. The
RadioButtonList's AutoPostBack attribute is set to TRUE and its
SelectedIndexChanged event loads one of three...
|
by: Adman |
last post by:
Hi all...
At my work, we have a large number of dlls. Each dll is typically a
single class, and each class has any number of methods in it. We have
"core" objects that generally contain...
|
by: Dan Dorey |
last post by:
I actually have two questions here, but I'll start by giving an outline
of what I'm trying to do.
I'm building an app with a simple plugin architecture (all in the same
app domain). I have each...
|
by: Andrew Robinson |
last post by:
I have a page that can load a number of different user controls. Each of
these user controls inherits from a common base class and the controls are
loaded based on application state, status, etc...
|
by: David McCallum |
last post by:
I'm not infront of my computer just now, but I seem to remember when my app
is being executed the output console shows all the DLLs being loaded.
Is there anyway to load these DLLs as and when...
|
by: dudeja.rajat |
last post by:
Hi,
I'm using the ctypes module to load my dlls.
I have some 10 dlls the names of those are passed to a fucntion which
then loads the passed dll.
Now every dll has a getversion function....
|
by: Gabriel Genellina |
last post by:
En Tue, 26 Aug 2008 07:42:50 -0300, <dudeja.rajat@gmail.comescribi�:
Use getattr - same as with any other object.
Suppose some_dll is your loaded DLL, then:
function = getattr(some_dll,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |