-
I've spent a lot of time trying to figure this out. I need a way of telling whether a program is a console program without running it.
It has to be possible because windows determines that when you look at the properties for a file. If it uses the console, there's some extra tabs.
I can't just test to see if the program runs in DOS, because Win32 Console programs also do it.
I hope I explained that right. Let me know if you don't understand.
-
Do you want to find out given the EXE name? Or the window title? Or the handle?
-
Nope, only real DOS (16-bit, or 32-bit with overlay handler) programs get the extra tabs. Console programs don't have them because they're still fully 32-bit Windows programs.
I don't have specifics, but look at the EXE file header, if there's a PE section (portable executable) it won't have the tabs.
-
cmd.exe also has extra tabs. They aren't the same ones, but they are there.
I assumed that when you check other win32 console programs, it was the same way, but I just checked and it's not. So it looks like you're right, parksie.
I did find out how to tell if a program is a DOS program using GetFileVersionInfo, so that isn't a problem.
Now I just need a way of determining if something is a win32 console program. Any ideas? Is it even possible?