[mythtv] Ticket #4702: Win32 configuration patches

buzz davidbuzz at gmail.com
Fri Jul 4 02:17:10 UTC 2008

extract from http://blogs.msdn.com/junfeng/archive/2004/02/06/68531.aspx:

In VisualStudio case, there are actually two binaries: devenv.com and
devenv.exe. Devenv.com is a Console app. Devenv.exe is a GUI app. When
you type devenv, because of the Win32 probing rule, devenv.com is
executed. If there is no input, devenv.com launches devenv.exe, and
exits itself. If there are inputs, devenv.com handles them as normal
Console app.

In ildasm case, there is only one binary: ildasm.exe. It is first
compiled as a GUI application. Later editbin.exe is used to mark it as
console subsystem. In its main method it determines if it needs to be
run as console mode or GUI mode. If need to run as GUI mode, it
relaunches itself as a GUI app.


On Fri, Jul 4, 2008 at 4:09 AM, Andrei Tanas <andrei at tanas.ca> wrote:
>> Comment(by nigel):
>>  The stuff to redirect the console output will be needed later, but I
>>  wanted to do it some different way (e.g. if invoked from a DOS shell,
>> to
>>  still generate the output instead of always writing to a logfile)
> Do you have an idea how to do this? In Windows, console and gui are different subsystems, executables have a flag in PE header, if it's marked as gui, Windows will not allocate a console and stdin/stdout handler will not be initialized. It is possible to start as gui and then allocate console at run time, but this will create a new console window, as far as I know.
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

More information about the mythtv-dev mailing list