flat assembler
Message board for the users of flat assembler.

Index > Windows > format PE console 4.0 DLL

Author
Thread Post new topic Reply to topic
fantasia



Joined: 02 Jul 2012
Posts: 10
fantasia 02 Jul 2012, 16:15
Hello everyone,

I have never written a DLL before and I thought I would start learning how to write one from the bottom up. Hence, I chose to use FASM.

I have examined the DLL example in the FASM EXAMPLES directory and noticed that it uses the: format PE GUI 4.0 DLL directive. I wondered if anybody could tell me if format PE console 4.0 DLL makes sense?

Thanks!
Post 02 Jul 2012, 16:15
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20451
Location: In your JS exploiting you and your system
revolution 02 Jul 2012, 16:45
fantasia wrote:
I wondered if anybody could tell me if format PE console 4.0 DLL makes sense?
No, it doesn't make sense. A DLL would be very unlikely to ever (maybe never?) to need a console window.
Post 02 Jul 2012, 16:45
View user's profile Send private message Visit poster's website Reply with quote
fantasia



Joined: 02 Jul 2012
Posts: 10
fantasia 03 Jul 2012, 08:19
So what do the CONSOLE and GUI directives do, then?

From Revolution's reply, I gather that the CONSOLE directive creates a console window when the program runs. Does this then mean that the GUI directive might create a GUI?

I don't understand how his might be.
Post 03 Jul 2012, 08:19
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20451
Location: In your JS exploiting you and your system
revolution 03 Jul 2012, 08:25
For GUI programs the OS will do nothing.
For CONSOLE programs the OS will create a default console.

Both types can create a GUI if they wish to.

Also both can create additional consoles if they wish to.
Post 03 Jul 2012, 08:25
View user's profile Send private message Visit poster's website Reply with quote
fantasia



Joined: 02 Jul 2012
Posts: 10
fantasia 03 Jul 2012, 08:59
Thank you, again, Revolution.

The minimal DLL that I have been attempting to write (using format PE console 4.0 DLL) is not been working. I will change the source to use GUI instead of CONSOLE and see if that works.
Post 03 Jul 2012, 08:59
View user's profile Send private message Reply with quote
fantasia



Joined: 02 Jul 2012
Posts: 10
fantasia 03 Jul 2012, 09:15
The problem which I have been blaming on my mis-application of the CONSOLE directive, has not been fixed by using GUI, instead.

I have started a new thread explaining the error I am getting:

http://board.flatassembler.net/topic.php?t=14398
Post 03 Jul 2012, 09:15
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.