Page 1 of 1

[wxExecute] redirecting and hiding

Posted: Wed May 13, 2009 3:06 pm
by MoonKid
(Sorry, for x-post in the dev-newsgroup! I forgot to use the forum first.)

For example I call wxExecute this way

Code: Select all

wxArrayString arr;
wxExecute("MyApp.exe", arr, wxEXEC_ASYNC);
The flag ASYNC indicate that my application doesn't wait till MyApp.exe ends.
But it waits because of the 'arr' parameter.
Am I right?

But I need the 'arr' parameter (redirecting) to hide MyApp.exe.

So what can I do?
I want to hide MyApp.exe but I don't want to wait for MyApp.exe. I just want to start/execute it without care about when it ends.

Understand my problem?
Is it possible to solve that problem?

I am thinking about a workaround with a thread. I could call wxExecute() in an separate thread.

Posted: Thu May 14, 2009 9:47 pm
by AkiraDev
It probably would indeed work.
A thread would indeed work, as long as you're sure that you either don't need the arr object or that the main thread won't access it until MyApp.exe is done writing to it.