flat assembler
Message board for the users of flat assembler.

flat assembler > Windows > Compilation format: console vs GUI vs DLL?

Author
Thread Post new topic Reply to topic
Mino



Joined: 14 Jan 2018
Posts: 160
Hello,
I have a little trouble distinguishing the differences between the different possible compilation formats:

Code:
format PE
    

Code:
format PE DLL
    

Code:
format PE console
    

Code:
format PE GUI
    

Code:
format ...
    


Both the PE and DLL format, I understand, but why have the choice between CONSOLE and GUI?
The executable stays the same, right?
So what's different between these two formats?

Also, are there other compilation formats (both for PE and ELF)?

_________________
The best way to predict the future is to invent it.
Post 02 Sep 2018, 21:08
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16127
Location: Hyperborea
Console format will open a console. STDIN, STDOUT and STDERR are directed to within the console window.

GUI format has no console attached.

You can compare FASM.exe and FASMW.exe to see the difference.


Last edited by revolution on 03 Sep 2018, 23:30; edited 2 times in total
Post 02 Sep 2018, 21:15
View user's profile Send private message Visit poster's website Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 1315
Mino wrote:
Both the PE and DLL format, I understand, but why have the choice between CONSOLE and GUI?
The executable stays the same, right?
So what's different between these two formats?
It just changes the subsystem field in the header.

https://docs.microsoft.com/en-us/windows/desktop/debug/pe-format#windows-subsystem

The PE format has headers and such like most file formats, and the "subsystem" is one of the fields in there.

You can also create your own console Window with a "GUI" if you want (in code), this is just a shortcut... Wink
Post 03 Sep 2018, 14:40
View user's profile Send private message Reply with quote
Mino



Joined: 14 Jan 2018
Posts: 160
Thanks for your answers Smile

So, if I understand correctly, the format defines what "features" the program will use on the OS.

Furs wrote:

The PE format has headers and such like most file formats, and the "subsystem" is one of the fields in there.
You can also create your own console Window with a "GUI" if you want (in code), this is just a shortcut... Wink


This means that you can create a GUI without manually importing libraries with the PE GUI format?

How do we do that?
Post 03 Sep 2018, 16:43
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16127
Location: Hyperborea
It doesn't change anything do to do with libraries or imports.

All it does is tell the OS to open a console window, or not to open a console window. Nothing else.
Post 03 Sep 2018, 21:28
View user's profile Send private message Visit poster's website Reply with quote
Mino



Joined: 14 Jan 2018
Posts: 160
It's clearer, thanks Smile
Post 03 Sep 2018, 23:23
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2018, Tomasz Grysztar.

Powered by rwasa.