From: Morris on
I use VS2008 and I need a solution that contains 2 executables (two
different processes) of which one should launch the other.
1. Does C# support such launching(with some paramters) an how?
2. Does VS2008 suport that-should I simply add the other excutables as I
would do with ordinary dll?
Thanks in advance
Morris


From: Stefan Hoffmann on
hi Morris,

On 06.02.2010 16:06, Morris wrote:
> I use VS2008 and I need a solution that contains 2 executables (two
> different processes) of which one should launch the other.
> 1. Does C# support such launching(with some paramters) an how?
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx


mfG
--> stefan <--
From: Peter Duniho on
Morris wrote:
> I use VS2008 and I need a solution that contains 2 executables (two
> different processes) of which one should launch the other.
> 1. Does C# support such launching(with some paramters) an how?

..NET does, yes. See Stefan's reply for the link to the docs for the
Process class.

> 2. Does VS2008 suport that-should I simply add the other excutables as I
> would do with ordinary dll?

There's no need to add the dynamically launched EXE as a reference, nor
would doing so help. For the Process class, you'll need the EXE to
exist as a file at a known location (e.g. in the same directory with the
main program), and pass that file path to the Process class.

Pete
From: Morris on
>
> There's no need to add the dynamically launched EXE as a reference, nor
> would doing so help. For the Process class, you'll need the EXE to exist
> as a file at a known location (e.g. in the same directory with the main
> program), and pass that file path to the Process class.
>
> Pete
Dear Pete,
Though there is no need I still think that it may be convinient to add it
because I may need to modify the second executable along the solution
development life time, as would be with any dll in the solution.
Is it posible?
Regards
Morris


From: Peter Duniho on
Morris wrote:
> Though there is no need I still think that it may be convinient to add it
> because I may need to modify the second executable along the solution
> development life time, as would be with any dll in the solution.
> Is it posible?

I don't understand that part of the question. You can add an EXE as a
reference, just as you can a DLL. But unless you're actually using the
contents of the EXE directly in your own code (e.g. using a class found
in there, reading a resource, etc.) what would the point be?

Pete