RE: [GD-Windows] Restarting game exe
Brought to you by:
vexxed72
From: George G. \(BattleGoat\) \(E-mail\) <ge...@ba...> - 2004-09-09 01:05:21
|
Yeah, CreateProcess() was on the list of possibles (that and ShellExecute(), though the latter is not available in Win98). It just seems a bit kludgy - ie, for an unknown amount of time you have two instances of your game running, depending upon how Windows dishes out the execution. Maybe that's why I couldn't find a better way - there is no better way :-) -- George. - George Geczy - Lead Programmer, BattleGoat Studios - www.supremeruler2010.com - "Designing the Next Generation of Intelligent Strategy Games" > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...]On Behalf Of > Jon Watte > Sent: Wednesday, September 08, 2004 5:45 PM > To: gam...@li... > Subject: RE: [GD-Windows] Restarting game exe > > > > Get your EXE path by getting the module path of your main module. > > Then use CreateProcess() to create the new process, and > ExitProcess() your > current process. > > If you're looking for "exec()" then there might be emulation > of that, but > the basic NT kernel primitive is somewhat different, so it > won't be quite > what you'd be used to from UNIX. > > Cheers, > > / h+ > |