Hello,
I want to know the translation of each c++ call in masm call.
__cdecl is 'PROTO C' in masm
__clrcall
__stdcall 'PROTO'
__fastcall
__thiscall 'PROTO + 1 dword'
Masm offer this call
C, SYSCALL, STDCALL, PASCAL, FORTRAN, or BASIC.
By what can be translate the __clrcall and __fastcall in masm ?
The conventions for __fastcall are straightforward, but they vary with the compiler:
http://en.wikipedia.org/wiki/Fastcall
The _clrcall convention is Microsoft specific, and in the short time I spent looking I could not find any detailed information. Apparently a function can have both native and managed entry points, but I did not find any statement that the native entry point will always be present.
http://msdn2.microsoft.com/en-us/library/ec7sfckb.aspx
ToutEnMasm,
http://blogs.msdn.com/oldnewthing/archive/2004/01/08/48616.aspx
__cdecl : PROTO C
__stdcall : PROTO STDCALL
__clrcall : I have no idea
__fastcall : I think it just can't be done with MASM but the workaround is like this
Win32...
EXTERNDEF SYSCALL @Dns_ReadPacketName@28:PROC
Dns_ReadPacketName EQU <@Dns_ReadPacketName@28>
On Win64 platform, everything is like...
EXTERNDEF Dns_ReadPacketName:PROC
__thiscall : ECX + PROTO STDCALL (only a guess)