From: Werner L. <wl...@gn...> - 2012-02-03 05:20:32
|
>> Secondly, if you want to make a Windows GUI application write to a >> console if started from a console but do nothing if started as a >> GUI (similar to Unix applications), there is the nice trick of >> having two binaries, `foo.com' and `foo.exe'. You say `foo' on the >> command line, and Windows executes `foo.com', a command-line >> program. This in turn spawns `foo.exe', a GUI program, and >> communicates with it using stdout and friends which are redirected >> to pipes. > > I can't resist my curiosity on this one. > > Is the .com program a 16-bit, single segment tiny mode binary? Or > is this win32 console application renamed to .com? [...] AFAIK, it's a real 16-bit tiny binary. See this: http://code.google.com/p/dualsubsystem/ Werner |