News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Console program going GUI

Started by Sergiu FUNIERU, February 25, 2010, 11:37:43 PM

Previous topic - Next topic

Sergiu FUNIERU

The program in attachment was linked with:
WLink system nt file index.obj
instead of
WLink system win32 file index.obj

The executable works, starts as console, then displays a message box. I thought that console programs are confined to console. I expected an error or a warning, like when I try to run a Windows program under DOS.

Why does the program display the message box, instead of giving an error / warning?

hutch--

Console applications written in 32 bit code are still portable executable files, the differ only in the subsystem used.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

clive

Console applications can do anything that the Win32 API permits. This includes generating message boxs, windows, menus, etc.

-Clive
It could be a random act of randomness. Those happen a lot as well.

japheth

Quote from: hutch-- on February 26, 2010, 12:08:29 AM
Console applications written in 32 bit code are still portable executable files, the differ only in the subsystem used.

This is partially wrong. Both console and GUI application "use" the Win32 subsystem - other subsystems were OS/2 and Posix, but AFAIK those are no longer supported.

The difference between console and GUI is that the first ones have got a console window "pre-allocated" when they are launched, while the latter ones haven't.