Home All Groups Group Topic Archive Search About

AppDomain just like Winword

Author
4 Jul 2006 6:16 AM
Shahzad Godil
I am able to keep same process for my different instance of my application
when we are launching "New Document" in our application using
AppDomain.CurrentDomain.ExecuteAssembly.  Only issue is that one instance is
running, on double click on exe in explorer, it is creating seperate process
of my application.

What I want just like Winword.  Either we do double click on application or
launch from code, it should run in same process.

Thanks
Shahzad Godil

Author
4 Jul 2006 5:58 PM
Michael Nemtsev
Hello Shahzad,

The problem is that  AppDomain.CurrentDomain.ExecuteAssembly run specified
programm into default domain and you can't unload it without unloading all
app.
You need to run you app into separate domain, use AppDomainManager and AppDomain.Load
for this

SG> I am able to keep same process for my different instance of my
SG> application when we are launching "New Document" in our application
SG> using AppDomain.CurrentDomain.ExecuteAssembly.  Only issue is that
SG> one instance is running, on double click on exe in explorer, it is
SG> creating seperate process of my application.
SG>
SG> What I want just like Winword.  Either we do double click on
SG> application or launch from code, it should run in same process.
SG>
SG> Thanks
SG> Shahzad Godil
---
WBR,
Michael  Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

AddThis Social Bookmark Button