I want this to be a function, and not a macro:
Pcall MACRO name:REQ,items:VARARG
LOCAL arg
FOR arg,<items>
push arg
ENDM
call name
ENDM
[quote][/quote]
I get errors that VARARG must be used in C calling convention or something. Is it possible to make a function out of this?
Something like that:
Pcall PROC C Function:dword, Nbr_Items:dword, Items:VARARG
mov eax,Nbr_Items
Push_Params: dec eax
push Items[eax * 4]
jnz Push_Params
call Function
ret
Pcall ENDP
Use it like that:
invoke Pcall, addr myproc, 3, 4, 5, 6