News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

support for __thiscall

Started by TimoVJL, November 03, 2018, 02:24:50 AM

Previous topic - Next topic

TimoVJL

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.
May the source be with you

johnsa

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.