Martin Tröster wrote:
How do I find out whether a function uses CDECL instead of STDCALL? I found the information (link lost unfortunately) that entries in the def file like [EMAIL PROTECTED] are called via STDCALL, whereas in case of testfunc2 without any @ specifying the space is CDECL. Is this guess right? If not, how else do I find this out?
The most safe one I have known is to disassemble it and look over the output. If the function have no parameters, you can declare it as either CDECL or STDCALL.

Suppose it have some parameters and its type is CDECL, you can find:
1. "lret" in the function
2. it will be called in a way like
pushl something1
pushl something2
call address of [EMAIL PROTECTED]
addl $8, %%esp

and for a STDCALL, there are:
1. something that is similar to "lret $8" in the function
2. it will be called in a way like
pushl something1
pushl something2
call address of [EMAIL PROTECTED]



Thanks again for any help!


Cheers,
Martin




Reply via email to