flat assembler
Message board for the users of flat assembler.

Index > Windows > convert winapi 32 reference syntax to FASM syntax (newbie)

Author
Thread Post new topic Reply to topic
DQ



Joined: 26 Mar 2004
Posts: 3
DQ
I got a stupid newbie question here.
Fasm looks really great. To get some documentation on winapi i downloaded a win 32 api reference. But the syntax seems to be in C. Really annoying, I can read lot about functions, what kind of data they return. But i can't use it when i dont know the exact syntax when i have to convert the winapis definition of functions and structs.
Checking out the examples that comes with FASM isn't really good enough.
If i f.ex . want to use LoadBitmap or GetDIBsection i get into big trouble.
A user in here wrote: 'simply play with the examples...' Come on that can't be true, that i have to guess. Is there any documention that i misssed out there that could give hand?

I need a SIMPLE and straightforward definition of functioncalls to USER32 etc. all types of arguments and data types in FASM syntax. it gotta be possible to get??? Why make a great assembler and no solid documentation?

I haven't got the half trouble with the Intel instruction set, since i have tried Assembly on other computers many years ago.


A few examples are welcome, they will be invested i many hours of coding, and I plan to fix the problem later with a FASM and Winapi for MORONS.

_________________
.......
Post 26 Mar 2004, 03:29
View user's profile Send private message Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
why don't you look in EXAMPLES directory?

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 26 Mar 2004, 04:06
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
DQ



Joined: 26 Mar 2004
Posts: 3
DQ
???
I thought i was quite clear in my English, but apparently not.

But what the heck, fortunately i got a freind that's programmer so he'll help my out, as he told me (to give you ANOTHER reason than the one above, try read MY example Wink ):" the examples are stupid f.ex because of the naming of the Labels and constants (msg MSG): u can't really grasp whats going on if you don't know it beforehand. Programmers are surppoesed to write comments.
- I'll get it elsewhere, like a cheating husband.

But maybe there is a newer version of FASM with more than 5 examples?? Well last time i checked the Examples link on the net was 'under construction', and the tutorial had something about DOS.
Post 26 Mar 2004, 09:27
View user's profile Send private message Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex
DQ,

Did you download Fasmw? (Flat assembler for Win32 GUI )
It contains various GUI examples.

http://flatassembler.net/fasmw151.zip

_________________
Code it... That's all...
Post 26 Mar 2004, 10:43
View user's profile Send private message Visit poster's website Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo
DQ wrote:
u can't really grasp whats going on if you don't know it beforehand.


You need to know what's going on when programming for Win32 platform. No matter what language you are using. The win32.hlp is written with C language in mind but still is the main guide used by win32 coders in any language.

Learning assembly is one thing but learning platform specific topics is a totally different beast.
To learn how win32 work you need to follow this steps:
1. To read some book about the matter (You will find mostly in C or C++).
2. To play with the examples Smile (there are a lot inside this board or in board.win32asmcommunity.net or in the member's web pages)

Notes: If you jump the first step you will have a hard time figuring out how examples work but it is possible however.
Download Fresh at fresh.flatassembler.net and Ollydbg debugger.
Post 26 Mar 2004, 12:48
View user's profile Send private message Yahoo Messenger Reply with quote
_ensein



Joined: 10 Oct 2003
Posts: 3
_ensein
Quote:

I need a SIMPLE and straightforward definition of functioncalls to USER32
etc. all types of arguments and data types in FASM syntax. it gotta be
possible to get??? Why make a great assembler and no solid documentation?



allmost all function arguments are dwords (some functions from opengl for eg need qwords).
parameters can be a value or a pointer to any kind of data (structure).
people tell you to look for the examples because the use of win 32 api reference
is straight forward, most constants and structures are defined in FASM includes which
you can add to your prog with

include '%fasminc%\win32a.inc'


if you want to know how they are defined just go to include folder in FASM base dir and look for
the equates for win constants and structures or apia/apiw for function calls def...

if you're having trouble with a specific api or struct just post you're code and you will get more help..
Post 26 Mar 2004, 13:27
View user's profile Send private message Reply with quote
DQ



Joined: 26 Mar 2004
Posts: 3
DQ
Thanx alot for the answers.
And yes it seems theres only the hard way.

And _ensein: i got that trick from my friend as well. I gives at better undestanding of whats going on.

Apart from that i guessed my problem was to try to extend the template example so it could display a bitmap. So I was asking for trouble Sad

the C=64 was easier!

- DQ
Post 28 Mar 2004, 16:59
View user's profile Send private message Reply with quote
Intrinsic



Joined: 03 Feb 2004
Posts: 13
Intrinsic
QD, at the link below is some tutorials on win32 programming they may help you. And, on this board are the example code written in FASM syntax.

http://win32assembly.online.fr/

And long live the C64! Smile
Post 29 Mar 2004, 00:32
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-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.