|
-
Apr 12th, 2001, 06:16 AM
#1
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.
-
Apr 12th, 2001, 02:50 PM
#2
Do you want to find out given the EXE name? Or the window title? Or the handle?
-
Apr 12th, 2001, 02:54 PM
#3
Monday Morning Lunatic
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.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Apr 13th, 2001, 03:38 AM
#4
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|