Multiple instance application

S

Sharon

Hi,

I'm using VS2005 to build CF v2 application.
I want to restart my application, when it's running, with some parameters at
command line.
For this I need to allow my application to load multiple instances.
In CF1 I did it with FindWindow to find my application window, And
SetWindowText to change it's name.
But in CF2 I cannot do that because the window class name is the nameof my
application, And I cannot change the window's class name.
Is there a way to allow multiple instances of my application, Or to restart
my application?


Thanks,
Sharon
 
G

Guest

I would write a native llauncher app that handles command-line params for
subsequent launches, then use a MsgQueue or MessageWindow to pipe that info
to the managed app.

-Chris
 
S

Sharon

Thnaks for the reply,

I must restart my application because I want it to launch different.
Maybe it's an idea to launch a native application and wait to the managed
application to close, and then launch it again.
But I prefer aone appliocation only.

Any other solution ?


Thanks,
Sharon
 
J

John Roberts

What/who is responsible for relaunching the application with the new
parameters?
 
J

John Roberts

Then wouldn't CreateProcess work? I'm not sure what mechanism stops the
shell from starting multiple instances, but I'm guessing it is 'higher' than
CreateProcess which you can use to start as many instances as you like.
 
G

Guest

It still won't work. It's part of the PPC CF runtimes, so no matter how you
invoke it (and keep in mind SheelExecute is how Explorer launches anyway).

-Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top