The MASM Forum

64 bit assembler => UASM Assembler Development => Topic started by: TimoVJL on November 03, 2018, 02:24:50 AM

Title: support for __thiscall
Post by: TimoVJL on November 03, 2018, 02:24:50 AM
M$ use _thiscall in richedit ITextHost with 32-bit.
Is it possible to support that too ?

In x86 in some level, it's possible to fake M$ __thiscall using __fastcall, but that needs fake headers too.
I already test it with C.
Title: Re: support for __thiscall
Post by: johnsa on November 03, 2018, 04:51:50 AM
Hi,

Yes it would be possible to implement, but it's quite a big job.

It might be easier to approach it temporarily as one would for COM, as it's a C++ specific convention.

So create a custom INVOKE macro and pass the this ptr in ecx before using a regular invoke with the balance of the arguments which are pushed right to left as per regular stdcall.