Click to See Complete Forum and Search --> : Launching an executbale in another thread


Quell
February 12th, 2007, 12:28 PM
Hello.
how can i run an executable in another thread of the same process?
Thx

wildfrog
February 12th, 2007, 12:36 PM
I'm not exactly sure what you're asking for here, but you can use CreateThread to create a new thread, and then use CreateProcess to create a new process.

CreateProcess will start in its own main thread, so you don't need an extra thread to call CreateProcess.

- petter

TheCPUWizard
February 12th, 2007, 12:39 PM
how can i run an executable in another thread of the same process?


You cant (directly). Each Executable (.exe) runs in its own process unless you are willing to jump through some serious hoops. Even then you will probably not get the behavior you expect.