Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Re: re: running environment

Jugoslav_Dujic
Valued Contributor II
512 Views
See here.

Jugoslav
0 Kudos
1 Reply
Jugoslav_Dujic
Valued Contributor II
512 Views
I'm inclined to keep it simple and simply test the value of GetStdHandle(STD_OUTPUT_HANDLE).

Otherwise, the info on application's subsystem can be obtained by examining PE header of the .exe by opening it as file in binary mode or maybe by OpenProcess/ReadProcessMemory(search for "PE header" in Google c.o.m.p.win32 archives or see www.sysinternals.com). Maybe the info can be obtained by undocumented APIs such as NtQuerySystemInformation, but I'm not familiar with it (and I've never used any of these techniques either).

Jugoslav
0 Kudos
Reply