Forum > Windows

C fastcall convention in FPC ?

(1/1)

440bx:
Hello,

I think I know the answer to the question I'm about to ask but, figured I'd ask in case I missed something.

I would like to use this API:
--- Code: C  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---PSLIST_ENTRY  FASTCALL InterlockedPushListSList(  _Inout_ PSLIST_HEADER ListHead,  _Inout_ PSLIST_ENTRY  List,  _Inout_ PSLIST_ENTRY  ListEnd,  _In_    ULONG         Count);The problem is, it uses MS C's fastcall convention and I don't know if there is a way to tell FPC to use that convention.

That's my question: is there a way to tell FPC to use MS C's fastcall convention when calling a function ?

Thank you for your help.

skalogryz:
i guess you'll need to create an asm wrapper to make the call.
but if you target 64-bit you don't need to do anything.

440bx:

--- Quote from: skalogryz on August 20, 2021, 02:03:05 am ---i guess you'll need to create an asm wrapper to make the call.
but if you target 64-bit you don't need to do anything.

--- End quote ---
That's what I thought.  Thank you Skalogryz

PascalDragon:

--- Quote from: 440bx on August 20, 2021, 12:21:39 am ---That's my question: is there a way to tell FPC to use MS C's fastcall convention when calling a function ?

--- End quote ---

FPC does not support Microsoft's fastcall calling convention. Patches welcome.

Navigation

[0] Message Index

Go to full version