thx a lot. If you would also know how to do it on Ubuntu, would you send me an example/link as well?
For Linux/Unix you normally do a fork(); (to duplicate the current process) and then exec*(a few different functions to choose from) to replace the newly forked process with the one you specify.
pid_t pID = fork();
if (pID == 0) {
//this is the process created by fork, so we execute here
execl("./MyGraphicEngine", "./MyGraphicEngine", (char*)0); //execl never returns unless there is an error, it overwrites the calling process
} else if (pID<0) {
//for failed
std::cerr "Error message about the failed fork"<<std::endl;
exit(1);
} else {
//code that we only execute on the parent process, fork again to launch another process for example or whatever else you want to do.
pid_t pID2 = fork();
if (pID2==0) {
execl("./MyGraphicEngine", "./MyGraphicEngine", (char*)0);
} else if (pID2<0) {
std:cerr "Error message about the failed fork"<<stdl::endl;
}
}