Maik Justus wrote: >Hi, > >on windows flightgear open a extra console window for the text output. >When flightgear ends this window is closed regardless if there is any >info the user might want to read (e. g. error messages of the xml >parser). On windows you can not write thies messages to a file by "fgfs >some_parameters>file" the messages are not written to file, because they >are not written to standard output but to the extra window. (the extra >window is necessary, because you can do not need to start it from a >console window. I googled, if it is possible to detect, if flightgear is >started by a console and use than this for the output, but it seems, >that this is not possible ?!? >Therefore I added >#ifdef _MSC_VER > cerr << "Hit a key to continue..." << endl; > cin.get(); >#endif >to function >void fgExitCleanup() >but now it waits on every exit of flightgear. How can I detect, if a >problem occurred? (can I query the exitcode ?) > >Maik > > > I think your answer (including an example) might be here: http://support.microsoft.com/default.aspx?scid=kb;en-us;190351 It's an article that details launching a program as a child with its standard IO handles redirected to the parent. In your case, I believe you could implement it by creating an FGFS launcher that can do whatever you can imagine (like write to a file) everything that FGFS sends to stdout.
I haven't tried it yet, so I hope I'm not leading you astray. -- Reagan Thomas ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel