Mail Archives: djgpp/2000/09/17/09:00:35
On Sat, 16 Sep 2000 19:29:54 GMT, dontmailme AT iname DOT com (Steamer)
wrote:
>AndrewJ wrote:
>
>> >> I'm not sure about that... unless Microsoft was trying to hide the existence of
>> >> console applications from the general computer user. "Hey, it runs in text
>> >> mode, it must be DOS or something... phear it!". Or somesuch nonsense.
>> >
>> >I think the main reason was simply to be the same as Windows 3.x, where
>> >there was no such thing as a console application. (If you run a Windows
>> >3.x program in a Windows 3.x DOS box it's the DOS part that gets executed,
>> >which typically just prints an error message and exits.)
>>
>> That couldn't be it, because console apps /can/ be run from a DOS box.
>
>Yes, of course, otherwise we wouldn't even be having this conversation.
>I think we must be talking at serious cross-purposes here.
>
>I'll have another go, although it's doubtful whether I'll have any
>more success this time. Elsewhere in this thread, you wrote:
>
>>Try using the Start->Run command to execute a
>>console application, like try pinging yourself (ping 127.0.0.1 -n 10, for
>>example). It still brings up a window that has the MSDOS icon in the upper
>>left corner, even though it is running a console application.
>
>The reason it does this is (presumably) because that's what it would
>do if you ran it in a DOS window. And the reason it would do that if
>you ran it in a DOS window is (presumably) because changing the icon
>when the console app starts up would be confusing.
>
>So the only question is, why does a DOS box have an MS-DOS icon in the
>first place, given that it's really a Win32 console window? This was
>what I assumed Damian Yerrick was asking. And my answer was: because
>of Windows 3.x.
>
>S
I won't claim to be able to clear the issue totally, but I'll add some
more fuel for the fire. It's been awhile since I was doing console vs
dos things - I might not have all this entirely correct, but I'll
offer it in the spirit of helping.
When you execute a dos app, windows runs the app in a dos virtual
machine. To that app, all pretty much appears that it's running on a
dos machine with no windows in sight.
When you execute a console app, that app is actually a windows app
with a console look. A console app is running in the windows space
just like all the other window apps.
When you execute a console windows app from a dos comand line, the
load stub tries to determine if windows is running and if it is, then
tells windows to execute the app. If windows isn't running, the stub
will simply print the "This application needs windows...." or whatever
the exact message is, I can't remember the wording right now.
You can do a simple test to see the difference, boot to dos only and
try a console app.
When I say a console app is merely simulating a console look, it's a
little deeper than that. There are some other steps you have to do to
write a true console app. things that involve setting up the messge
loop if I remember correctly.
Now on the other hand, some compilers even MS will let you create a
"console" app that is really just a dos app running with dpmi. These
apps run in a virtual dos machine. For those apps you get just about
the same thing as you would for a djgpp app when you run from a pure
dos command line. But when you run a dpmi server, the apps run fine.
I suspect it's this really a dos app vs a console app that this thread
is addressing. In that case there's not really much diference. As for
the icons, if I remember correctly if you run in a virtual dos box you
get the dos icon at least by default. If you run in windows space, you
get a windows icon if you don't select a different one.
I haven't seen a lot of actual console apps myself. One that comes to
mind is the 4dos Take Command app. It's actually a windows console
that spawns hidden dos windows/apps. The windows app is the user
interface and handles the input and output to the user. In that app
you can change the font to any font on your system instead of just a
few different sizes and you can resize the terminal to any size you
want.
As I said, I don't have any delusions that I can clear this up and I
don't claim that everything is technically flame proof. I'm offering
this informamtion for it's own face value.
Stan
- Raw text -