473,385 Members | 1,593 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,385 software developers and data experts.

AppDomain for Multiple Instances?

I have an application that works, now I want to make the user able to run
several menu options at the same time. So they could choose option A from the
menu, be interacting with it, then choose option B also, and switch between
the two of them. The two options share the same code, but I do not want them
to interact at all in terms of sharing data.

Is the use of AppDomains the right way to do this? I would run
AppDomain.ExecuteAssemblyByName, and it would start a new domain with option
A, then when the user chooses option B, it would have its own AppDomain for
B. Is that what AppDomains are for?

I have not worked with AppDomains before, I just wanted some indication that
this was what they are for, and the right way to do this, before I spend a
lot of time learning how they work. Thanks very much.

Nov 9 '06 #1
3 1609
Thanks for your reply. The application is basically WinForms, with some C and
C++ functions that it uses. We have attempted to make separate data, but we
have lots of interactions between the sessions. Would starting a thread for
it help, it seemed to me that another thread would share the data anyway,
unless it was in a separate AppDomain. Thanks.

"Vadym Stetsyak" wrote:
Hello, Richard!

What application you're talking about, WinForms?

Why can't you create 2 copies of data and let each option work with its
own copy?

IMO AppDomains isn't the option for you.

RMI have an application that works, now I want to make the user able
RMto run
RMseveral menu options at the same time. So they could choose option A
RMfrom the
RMmenu, be interacting with it, then choose option B also, and switch
RMbetween
RMthe two of them. The two options share the same code, but I do not
RMwant them
RMto interact at all in terms of sharing data.

RMIs the use of AppDomains the right way to do this? I would run
RMAppDomain.ExecuteAssemblyByName, and it would start a new domain
RMwith option
RMA, then when the user chooses option B, it would have its own
RMAppDomain for
RMB. Is that what AppDomains are for?

RMI have not worked with AppDomains before, I just wanted some
RMindication that
RMthis was what they are for, and the right way to do this, before I
RMspend a
RMlot of time learning how they work. Thanks very much.
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot
Nov 9 '06 #2
Hello, Richard!

In what form data "lives" in your application? How do you access it?

Is it possible to make a copy of that data?

You wrote on Thu, 9 Nov 2006 11:40:01 -0800:

RMThanks for your reply. The application is basically WinForms, with
RMsome C and
RMC++ functions that it uses. We have attempted to make separate data,
RMbut we
RMhave lots of interactions between the sessions. Would starting a
RMthread for
RMit help, it seemed to me that another thread would share the data
RManyway,
RMunless it was in a separate AppDomain. Thanks.

RM"Vadym Stetsyak" wrote:
>Hello, Richard!
>What application you're talking about, WinForms?
>Why can't you create 2 copies of data and let each option work with
its
own copy?
>IMO AppDomains isn't the option for you.
> RMI have an application that works, now I want to make the user
able
RMto run
RMseveral menu options at the same time. So they could choose option
A
RMfrom the
RMmenu, be interacting with it, then choose option B also, and
switch
RMbetween
RMthe two of them. The two options share the same code, but I do not
RMwant them
RMto interact at all in terms of sharing data.
>RMIs the use of AppDomains the right way to do this? I would run
RMAppDomain.ExecuteAssemblyByName, and it would start a new domain
RMwith option
RMA, then when the user chooses option B, it would have its own
RMAppDomain for
RMB. Is that what AppDomains are for?
>RMI have not worked with AppDomains before, I just wanted some
RMindication that
RMthis was what they are for, and the right way to do this, before I
RMspend a
RMlot of time learning how they work. Thanks very much.
>--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot
--
With best regards, Vadym Stetsyak.
Blog: http://vadmyst.blogspot.com
Nov 9 '06 #3
Most of the data is in a SQL database, so it is fine, it handles multiple
users. There is also program data, that is on the C side. The C program calls
into C#, the C# does not have data saved from call to call. But the menu is
in C#, which calls different C functions, which in turn call C# functions for
the user interface. It appears that what we need is for the multiple threads
of C to be more independent of each other, which is what led me to an
AppDomain. Thanks for the help.

"Vadym Stetsyak" wrote:
Hello, Richard!

In what form data "lives" in your application? How do you access it?

Is it possible to make a copy of that data?

You wrote on Thu, 9 Nov 2006 11:40:01 -0800:

RMThanks for your reply. The application is basically WinForms, with
RMsome C and
RMC++ functions that it uses. We have attempted to make separate data,
RMbut we
RMhave lots of interactions between the sessions. Would starting a
RMthread for
RMit help, it seemed to me that another thread would share the data
RManyway,
RMunless it was in a separate AppDomain. Thanks.

RM"Vadym Stetsyak" wrote:
Hello, Richard!
What application you're talking about, WinForms?
Why can't you create 2 copies of data and let each option work with
its
own copy?
IMO AppDomains isn't the option for you.
RMI have an application that works, now I want to make the user
able
RMto run
RMseveral menu options at the same time. So they could choose option
A
RMfrom the
RMmenu, be interacting with it, then choose option B also, and
switch
RMbetween
RMthe two of them. The two options share the same code, but I do not
RMwant them
RMto interact at all in terms of sharing data.
RMIs the use of AppDomains the right way to do this? I would run
RMAppDomain.ExecuteAssemblyByName, and it would start a new domain
RMwith option
RMA, then when the user chooses option B, it would have its own
RMAppDomain for
RMB. Is that what AppDomains are for?
RMI have not worked with AppDomains before, I just wanted some
RMindication that
RMthis was what they are for, and the right way to do this, before I
RMspend a
RMlot of time learning how they work. Thanks very much.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot

--
With best regards, Vadym Stetsyak.
Blog: http://vadmyst.blogspot.com
Nov 10 '06 #4

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

Similar topics

4
by: Daylor | last post by:
in win32 process , when u create new process,u have new main thread. i know,appDomain r logical procces,that exists in 1 win32 process. the q: is there way to create second appDomain (the...
0
by: Matthias | last post by:
Hello, I try to write a program in J# that loads and unloads assemblies dynamically. So far I know, this is only possible by using different appdomains. To be able to use the loaded classes...
7
by: Dave L | last post by:
I am inquiring about the feasability of being able to determine when an object of a certain type is instantiated. I have a base type that I want to be able to determine when each instance is...
4
by: Alan Zhong | last post by:
is it true that more than one process can be run within one appdomain? if yes, how does it work (in code)? i use AppDomain.CurrentDomain.ExecuteAssembly(....) twice in a row, the second one...
5
by: F. Prefect | last post by:
Hello, (sorry for reposting this.) We are having the following scenario: A ASP.NET Application (C#) is using a managed C++ assembly, which is a thin wrapper around an old C++ lib. (We are...
0
by: Vince | last post by:
My current project (a desktop application that’s currently developed on .net v1.1) call for 1) Use ngen.exe to improve the startup speed. 2) Use multiple AppDomain to reduce the memory...
10
by: =?Utf-8?B?U3RlZmFuIEJhcmxvdw==?= | last post by:
This has been working perfectly for months. Since we switched from ASP.NET 1.1 to 2.0, we have constant and sporadic issues with updating our applications. Touching the web.config works about...
1
by: José Joye | last post by:
I'm currently trying to load an instance of a given class within a secondary appDomain and access it from within my main AppDomain. Everything is fine and working if the class in the second...
2
by: siger99 | last post by:
Hi, I try to use a 3rd party assembly ( basically a layer of managed C++ around a native C++ lib). Unfortunately, it was developped for NET 1.1 and knows only the default AppDomain. When I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.