Hi,
Try to run the application from command prompt (cmd.exe) then if it's
a winform application the application's main form is opened as window,
if not, the program is started and output is visible inside command
prompt as just a guess to verify, better ideas may exist.
Thanks,
Onur Güzel
You will need to study the Portable Executable (PE) file format.
http://www.microsoft.com/whdc/system/platform/firmware/PECOFF.mspx
Then you can open the .exe file with a BinaryReader and pick out the
information you need.
Eq.
One way would be to use the "Debug Help" library
(http://msdn.microsoft.com/en-us/library/ms679309(VS.85).aspx). You can
use the ImageNtHeader() function to retrieve the PE headers for the
executable, and then check the subsystem information to see whether it's
GUI or command-line.
Note that a console application can in fact create a GUI. It's not really
clear why you're trying to do this, but keep in mind that you may or may
not be able to reliably accomplish your goal, depending on what
applications you're dealing with and why you really want to know whether
they are console or GUI.
Pete
"Paul E Collins" <find_my_re...@CL4.org> wrote in message
news:qbSdnYbjK9r...@bt.com...
Which means a specific executable can be BOTH a console application and
a GUI application.
Mike
Well, that all depends on your definition of "GUI application". That's
true from a behavioral point of view, but it's not true from a PE
configuration point of view.
We don't have any information from the OP that would help us understand
why he wants this information at all, never mind which is the more
appropriate definition. :)
Pete