flat assembler
Message board for the users of flat assembler.

Index > Windows > kernel32.dll

Author
Thread Post new topic Reply to topic
pjd



Joined: 15 Jul 2007
Posts: 47
pjd 23 Jul 2007, 10:49
how do I find out what functions are in this thing and how to call each of them (argument details and so on) I can't seem to find anything on msdn
Post 23 Jul 2007, 10:49
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 23 Jul 2007, 11:33
MSDN doesn't care which function comes from which DLL. It divides functions by their purpose, not by DLL they come from.
Post 23 Jul 2007, 11:33
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
pjd



Joined: 15 Jul 2007
Posts: 47
pjd 23 Jul 2007, 13:15
in that case where are command line functions documented? Things like print a line or something
Post 23 Jul 2007, 13:15
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 23 Jul 2007, 14:12
As for "printing a line": at lowest level there is WriteFile function, that can write to standard output stream (it's handle is obtained by GetStdHandle). If you want to support console only, not any type of stream, then there is WriteConsole.

At higher level, there is standard C library which provides portability over operating system. You can look up "printf" or "print" or "put" from it.

By the way, calling these "command line functions" is not very precise naming...
Post 23 Jul 2007, 14:12
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6115
Location: Poland
MHajduk 23 Jul 2007, 15:08
pjd wrote:
how do I find out what functions are in this thing and how to call each of them (argument details and so on) I can't seem to find anything on msdn
You can use PETools program for listing names of all exported procedures.
Post 23 Jul 2007, 15:08
View user's profile Send private message Visit poster's website Reply with quote
pjd



Joined: 15 Jul 2007
Posts: 47
pjd 24 Jul 2007, 09:31
vid wrote:
By the way, calling these "command line functions" is not very precise naming...


I meant functions available when the program is in "console" mode (it's compiled with 'format PE console'. All I want is something similar to a list of system calls under a *nix
Post 24 Jul 2007, 09:31
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 24 Jul 2007, 10:13
Post 24 Jul 2007, 10:13
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
pjd



Joined: 15 Jul 2007
Posts: 47
pjd 24 Jul 2007, 11:02
does windows have file handles for stdout/stdin/stderr like linux?
Post 24 Jul 2007, 11:02
View user's profile Send private message Reply with quote
crc



Joined: 21 Jun 2003
Posts: 637
Location: Penndel, PA [USA]
crc 24 Jul 2007, 11:09
Post 24 Jul 2007, 11:09
View user's profile Send private message Visit poster's website Reply with quote
pjd



Joined: 15 Jul 2007
Posts: 47
pjd 24 Jul 2007, 13:19
Where do win 32 programs stick their return values?
Post 24 Jul 2007, 13:19
View user's profile Send private message Reply with quote
crc



Joined: 21 Jun 2003
Posts: 637
Location: Penndel, PA [USA]
crc 24 Jul 2007, 15:14
IIRC, the return value is in the EAX register.
Post 24 Jul 2007, 15:14
View user's profile Send private message Visit poster's website Reply with quote
vador



Joined: 12 Nov 2006
Posts: 68
Location: Madagascar
vador 25 Jul 2007, 08:15
Quote:

I meant functions available when the program is in "console" mode (it's compiled with 'format PE console'. All I want is something similar to a list of system calls under a *nix

All API functions are available in console mode. You can even call CreateWindow in a console app...
Post 25 Jul 2007, 08:15
View user's profile Send private message Reply with quote
pjd



Joined: 15 Jul 2007
Posts: 47
pjd 25 Jul 2007, 12:46
vador wrote:
All API functions are available in console mode. You can even call CreateWindow in a console app...

So what exactly is the difference?
Post 25 Jul 2007, 12:46
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 25 Jul 2007, 20:31
it is just extra flag in executable, that causes windows to create console window for application (if there it isn't started from console already). That's all.
Post 25 Jul 2007, 20:31
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
vador



Joined: 12 Nov 2006
Posts: 68
Location: Madagascar
vador 27 Jul 2007, 06:54
perhaps you need a complete example? (I'll try to post one if you need)
Post 27 Jul 2007, 06:54
View user's profile Send private message Reply with quote
pjd



Joined: 15 Jul 2007
Posts: 47
pjd 27 Jul 2007, 13:38
that would be brilliant.
strangely my first working windows app (that just exited) has stopped working.
Do you know where I could find a tutorial explaining how I need to change my Linux orientated assumptions about assembler (I know the obvious things like an API instead of system calls)
Post 27 Jul 2007, 13:38
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.