473,406 Members | 2,847 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

ApplicationDomains

Can someone assist me in this quest? I've been trying in vein for some
time now to figure out how to use AppDomains as a way of making a
plugin architecture. Basically, here's my plan:

1) Load main assembly
2) Create new appdomain to "discover" all plugins and report them back
to the main assembly
3) Destroy discovery domain (To free assemblies/resources)
4) Create new appdomain and load advertised plugins into it

Now, the reason for this is so that if I have a new plugin, I can
destroy the plugin appdomain, start with step 2, and reload the new
plugins without having to reload the main assembly. So, I need to
learn how to do a couple of things:
A) Pass objects between appdomains
B) Call methods in my plugins from my main assembly

I plan to use this in a service project, basically all the
functionality of the service is in the plugins, with the main assembly
basically being a loader. This has been requested because one of the
DLL's the service uses has to be modified every 30 days, so the boos
wants to do this without having to shut down the service. he can live
with a few seconds interruption.
I plan on leaning heavily on a method I made that resembles CallByName,
plus some static methods. I also plan on using this in one of my
WinForm apps, making a custom MenuItem object that will also contain
the method to execute.
Here's the kicker, the boss is an old unix programmer, and this whole
thing started because he "heard" somewhere that one can simulate
unix/linux's functionality of CopyMemory to detach a running binary
from the file, update the file, then reattach the binary, effectivly
updating a binary without shutting it down.

So, any pointers?

Thanks,
Jody W
Nov 21 '05 #1
4 1222
There are 3 links about that subject at the bottom of this page of my web
site:

http://www.mztools.com/resources_addin_developers.htm

--
Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"Jody L. Whitlock" <ti*************@hotmail.com> escribió en el mensaje
news:e5**************@TK2MSFTNGP12.phx.gbl...
Can someone assist me in this quest? I've been trying in vein for some
time now to figure out how to use AppDomains as a way of making a
plugin architecture. Basically, here's my plan:

1) Load main assembly
2) Create new appdomain to "discover" all plugins and report them back
to the main assembly
3) Destroy discovery domain (To free assemblies/resources)
4) Create new appdomain and load advertised plugins into it

Now, the reason for this is so that if I have a new plugin, I can
destroy the plugin appdomain, start with step 2, and reload the new
plugins without having to reload the main assembly. So, I need to
learn how to do a couple of things:
A) Pass objects between appdomains
B) Call methods in my plugins from my main assembly

I plan to use this in a service project, basically all the
functionality of the service is in the plugins, with the main assembly
basically being a loader. This has been requested because one of the
DLL's the service uses has to be modified every 30 days, so the boos
wants to do this without having to shut down the service. he can live
with a few seconds interruption.
I plan on leaning heavily on a method I made that resembles CallByName,
plus some static methods. I also plan on using this in one of my
WinForm apps, making a custom MenuItem object that will also contain
the method to execute.
Here's the kicker, the boss is an old unix programmer, and this whole
thing started because he "heard" somewhere that one can simulate
unix/linux's functionality of CopyMemory to detach a running binary
from the file, update the file, then reattach the binary, effectivly
updating a binary without shutting it down.

So, any pointers?

Thanks,
Jody W

Nov 21 '05 #2
"Jody L. Whitlock" <ti*************@hotmail.com> schrieb:
Can someone assist me in this quest? I've been trying in vein for some
time now to figure out how to use AppDomains as a way of making a
plugin architecture. Basically, here's my plan:

1) Load main assembly
2) Create new appdomain to "discover" all plugins and report them back
to the main assembly
3) Destroy discovery domain (To free assemblies/resources)
4) Create new appdomain and load advertised plugins into it

Now, the reason for this is so that if I have a new plugin, I can
destroy the plugin appdomain, start with step 2, and reload the new
plugins without having to reload the main assembly. So, I need to
learn how to do a couple of things:
A) Pass objects between appdomains
B) Call methods in my plugins from my main assembly


AppDomains and Dynamic Loading
<URL:http://msdn.microsoft.com/library/en-us/dncscol/html/csharp05162002.asp>

Plug-in Manager
<URL:http://www.thecodeproject.com/csharp/DynamicPluginManager.asp>

Dynamically executing code in .Net
<URL:http://www.west-wind.com/presentations/DynamicCode/DynamicCode.htm>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3
Herfried K. Wagner [MVP] wrote:
"Jody L. Whitlock" <ti*************@hotmail.com> schrieb:
Can someone assist me in this quest? I've been trying in vein for
some time now to figure out how to use AppDomains as a way of
making a plugin architecture. Basically, here's my plan:

1) Load main assembly
2) Create new appdomain to "discover" all plugins and report them
back to the main assembly
3) Destroy discovery domain (To free assemblies/resources)
4) Create new appdomain and load advertised plugins into it

Now, the reason for this is so that if I have a new plugin, I can
destroy the plugin appdomain, start with step 2, and reload the new
plugins without having to reload the main assembly. So, I need to
learn how to do a couple of things:
A) Pass objects between appdomains
B) Call methods in my plugins from my main assembly


AppDomains and Dynamic Loading
<url:
http://msdn.microsoft.com/library/en...arp05162002.as
p>

Plug-in Manager
<url: http://www.thecodeproject.com/csharp/DynamicPluginManager.asp>

Dynamically executing code in .Net
<url:
http://www.west-wind.com/presentations/DynamicCode/DynamicCode.htm>


Wow, definatly not going to be simple to implement. Looks like I'm
also going to have to implement Remoting as well, and also translate
all the sample from C# to VB.NET. Fun, but thanks for the start, it's
more info than I had before.

Thanks,
Jody W
Nov 21 '05 #4
"Jody L. Whitlock" <ti*************@hotmail.com> schrieb:
AppDomains and Dynamic Loading
<url:
http://msdn.microsoft.com/library/en...arp05162002.as
p>

Plug-in Manager
<url: http://www.thecodeproject.com/csharp/DynamicPluginManager.asp>

Dynamically executing code in .Net
<url:
http://www.west-wind.com/presentations/DynamicCode/DynamicCode.htm>


Wow, definatly not going to be simple to implement. Looks like I'm
also going to have to implement Remoting as well, and also translate
all the sample from C# to VB.NET. Fun, but thanks for the start, it's
more info than I had before.


An implementation of loading and unloading application domains can be found
here:

<URL:http://dotnet.mvps.org/dotnet/articles/sharedfinalizer/SharedFinalizer.zip>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: GTi | last post by:
Does anyone have any good code for a self restarting application? Sometimes I need to exit my application and start it again, what is the best method of doing this in a windows form application....
0
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
0
BarryA
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...
1
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...
0
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...
0
marktang
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.