Hi,
It is trivial to load an assembly in a new Application Domain. Is there
any way of loading an assembly in a new process?
I tried using the Process class like this:
Process p = new Process()
p.StartInfo.Fil eName = mStartupFile
p.StartInfo.Use ShellExecute = False
p.StartInfo.Win dowStyle = ProcessWindowSt yle.Hidden
p.StartInfo.Red irectStandardOu tput = True
p.Start()
string text = p.StandardOutpu t.ReadToEnd()
p.WaitForExit()
Though this works for exes, it doesn't for DLL assemblies. On my system
Dll is associated with Dependency Walker so it just opens the assembly
up in it.
How would I go about doing a LoadAssembly in a seperate process?
Thanks...
Ali 4 5724
> How would I go about doing a LoadAssembly in a seperate process?
You could write a simple EXE that does nothing more than load the DLL you
want and invoke a method in it.
Mattias
<al*****@gmail. com> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.com.. . Hi,
It is trivial to load an assembly in a new Application Domain. Is there any way of loading an assembly in a new process?
I tried using the Process class like this:
Process p = new Process() p.StartInfo.Fil eName = mStartupFile p.StartInfo.Use ShellExecute = False p.StartInfo.Win dowStyle = ProcessWindowSt yle.Hidden p.StartInfo.Red irectStandardOu tput = True p.Start() string text = p.StandardOutpu t.ReadToEnd() p.WaitForExit()
Though this works for exes, it doesn't for DLL assemblies. On my system Dll is associated with Dependency Walker so it just opens the assembly up in it.
How would I go about doing a LoadAssembly in a seperate process?
Thanks...
Ali
You can only load assemblies in your own process, not in a spawned process.
So it's up to the spawned process to load the assembly.
What exactly do you wan't to achieve, as I see no use for such remote
assembly loading?
Willy.
Hi,
I have got a variety of code written in a .net assembly. There is a
workflow engine in C++ that depends a lot on this code. The guys
working on the engine are worried about issues like .NET framework
memory leaks. For example we have been burned once by the XmlSerializer
leak.
So, the engine guys want a mechanism by which they could unload the
assembly and get rid of the .NET memory leaks and then reload it.
Another restriction we have is that the .net assembly has to be loaded
in-process with the engine.
I tried doing this with an Appdomain. I created a new Appdomain and
loaded my assembly in the engine using a proxy etc. Now the assembly
does get unloaded and the Appdomain destroyed but the memory leaked
remains.
So, now I was thinking of loading my assembly out of process... but
that's not allowed either due to several other problems in interaction
with the engine.
It is important to note that we are NOT worried about our own memory
leaks that we could control one way or the other but we are worried
about the leaks in the framework. Is there any solution to this problem
other than dumping .net?
Thanks...
Ali
<al*****@gmail. com> wrote in message
news:11******** **************@ g47g2000cwa.goo glegroups.com.. . Hi,
I have got a variety of code written in a .net assembly. There is a workflow engine in C++ that depends a lot on this code. The guys working on the engine are worried about issues like .NET framework memory leaks. For example we have been burned once by the XmlSerializer leak.
How did you solve it?
So, the engine guys want a mechanism by which they could unload the assembly and get rid of the .NET memory leaks and then reload it. Another restriction we have is that the .net assembly has to be loaded in-process with the engine.
I tried doing this with an Appdomain. I created a new Appdomain and loaded my assembly in the engine using a proxy etc. Now the assembly does get unloaded and the Appdomain destroyed but the memory leaked remains.
What leak? Did you identified the leak?
So, now I was thinking of loading my assembly out of process... but that's not allowed either due to several other problems in interaction with the engine.
It is important to note that we are NOT worried about our own memory leaks that we could control one way or the other but we are worried about the leaks in the framework. Is there any solution to this problem other than dumping .net?
Please explain how you can control your own leaks? And what leaks you are
talking about (what kind of memory? Did you run a profiler/debugger to
correctly identify the kindk of leak?.
Willy. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Nick Malik |
last post by:
reposting to a wider audience
"Nick Malik" <nickmalik@hotmail.nospam.com> wrote in message
news:WYONc.203854$XM6.119642@attbi_s53...
> My turn to ask a question
>
> I am working on a plug-in for Sharepoint that will allow a developer to
add
> workflow rules. One of the rules will inform the adapter that it should
> load a DLL that the developer writes, find a method that matches a
|
by: Nick Malik |
last post by:
My turn to ask a question
I am working on a plug-in for Sharepoint that will allow a developer to add
workflow rules. One of the rules will inform the adapter that it should
load a DLL that the developer writes, find a method that matches a
particular interface, and call it.
I know, in general, I should be looking at the reflection classes. Does
anyone have any design advice for me, or good working examples that would
serve as a...
|
by: JonS. |
last post by:
Hey All,
I'm currently working on a program that dynamically loads assemblies from a
directory each into their own seperate AppDomains using a somewhat logical
extension of Eric Gunnerson's article found at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp05162002.asp
Now the problem I'm having is that, though I've created a remote loader,
when I try to load an assembly from a method in the...
|
by: Pete Davis |
last post by:
I'm confused about what precisely the limitations are on loading plugins in
separate app domains. In all my previous apps that supported plugins, I've
loaded them into the same domain as the app, but I've just started playing
around with separate AppDomains and I'm finding that I'm not having problems
where I expected I would, so maybe someone can help me understand a bit
better.
I've read that objects instantiated in separate AppDomains...
|
by: joannax |
last post by:
Hi,
I am an experienced programmer in several languages, but new to VB .NET. I
am designing an application which consists of a single "menu" program/form
that selectively transfers control to several other programs/forms. This is
straightforward when all the forms are in one assembly. But I need this to
be modular and dynamic so that each program loaded can be in its own .exe and
the central program can load and execute it then regain...
| |
by: john |
last post by:
Maybe I haven't had that "a-ha" moment yet, but I think the new
approach to web projects is a step in the wrong direction. My main
beef is that control over the assembly generation process has been
taken away from us! I also don't agree with the logic behind a web
site not having a project file, but I'll save that for another thread!
Here's our scenario:
We have a web project that runs in a non-managed sharepoint directory.
The web...
|
by: R Reyes |
last post by:
Can someone please explain to me why I can't get the MS Word Interop assembly
to work in my VS2005 project? I'm trying to manipulate MS Word from my Web
Form application and I can't get passed this screen below. Please help,
thanks in advance...
Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify...
|
by: BrianKer |
last post by:
Hi! It's my first discussion on this forum.
First I have a exe like this below (the object can invoke by console)
public class DynamicLoad
{
public Type AssemblyType = null;
public Assembly TestAssembly1 = null;
public DynamicLoad ()
{
string load_path = "..\OuterAssembly1\OuterAssembly1.dll";
TestAssembly1 = Assembly.LoadFrom(load_path);
|
by: =?Utf-8?B?TWFyaw==?= |
last post by:
We've got a wierd failure happening on just one machine. One part of our
product uses a 3rd party search implementation (dtSearch). DtSearch has a
native core (dten600.dll), late-bound, and a managed wrapper
(dtSearchNetApi2.dll).
For reasons unknown our build and msi packaging process includes
dtSearchNetApi2.dll but not dten600.dll in all packages, as well as a couple
of assemblies that reference it, even though they are not used by...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |