Every time i call wsprintf i get an Aplication error.
Debuger shows that call user32.wsprintfA jumps somewere in user32.dll but not in the begining of wsprintf.

I'm using fasm 1.42 on win2k.
Any ideas?
Posted on 2002-12-09 07:59:20 by rdo
one of errors in ccall macro:

macro ccall proc,
param_num = 0
push arg
param_num = param_num + 4
call proc
add esp, param_num

Macro with variable number of parameters started from "forward" (by default) .
Posted on 2002-12-09 09:13:52 by tserk
Thanks for correction, i didn't know that.

But the problem still exists.
Posted on 2002-12-09 09:26:54 by rdo
if you use invoke instead of call it works :)
but of course without stack clearing

the problem is in the macro, you must use
Posted on 2002-12-09 09:57:49 by TBD
Now is ok, thanks a lot.

I got this macro from the teeth sample and i've thought it should be working.
Now i've learn my lesson :))
Posted on 2002-12-09 10:24:29 by rdo
Macro works ok at me:

buf rb 16
ccall [wsprintf], buf, "Value = %d", 5

The problem is that you didn't know how to use it, not in macro.
Posted on 2002-12-10 00:35:24 by wanderer
I didn't wanted to say that the author of macro is wrong, but that i was using something that i don't quite understand and i should clear that at first.
By the way the teeth program is the perfect sample because it contains almost everything a man can see in a windows application.
Posted on 2002-12-10 06:40:01 by rdo
Thanks for compliment ;)
Posted on 2002-12-11 13:03:26 by wanderer