Game Development Community

Launch anothe .exe program during game play

by Steven Chiu · in Torque Game Engine · 11/02/2007 (11:17 am) · 6 replies

My project need to launch another application during game play. I use the createprocess api without success and TGE crash right the way. Is that possible?

#1
11/11/2007 (2:40 am)
I don't know the answer to your question (sorry), but just wanted to jump in and say that sounds like a poor design choice.

But it's not good policy for programs to launch other programs, on the whole. I've supported such systems...in my professional career. And cried.
#2
11/11/2007 (2:51 am)
Well, the engine has the ability to launch a web browser. Why don't you track down how that works?

Edit: So I just looked at it and the gotoWebPage ConsoleFunction simply calls into the platform code which does a CreateProcess.

Just look at that method for an example: winWindow.cc about line 1599
#3
11/17/2007 (1:46 pm)
Hi Steven,
I just did this in my project I used this to get me going. thread 20580 hope this helps.
#4
11/17/2007 (5:31 pm)
I recently got this working in a project I'm working on.

I tracked down the function shellexecute, and made my own console function to execute exactly what I wanted. This requires including windows.h and the .h file containing the shellexecuteinfo structure, which ever that was... This is of course windows specific only.
#5
11/17/2007 (6:33 pm)
Guys, thanks for sharing this. I'll try as you suggested.
#6
11/29/2007 (8:53 am)
Here is anothe thread also that I used that worked great.

garagegames.com/mg/forums/result.thread.php?qt=65907