thiscall的清栈方式是callee,是不是类成员函数不能支持变长参数?该如何处理
thiscall的清栈方式是callee,是不是类成员函数不能支持变长参数?
如题,是不是只有cdecl才能支持变长参数,因为调用者清栈。
__stdcall
Callee
Pushes parameters on the stack, in reverse order (right to left)
__fastcall
Callee
Stored in registers, then pushed on stack
__thiscall
Callee
Pushed on stack; this pointer stored in ECX
------解决方案--------------------
印象中:
c++不支持变长参数,参数类型或数量不一,通过重载实现。
那么成员函数就更不能用变长参数了。
如题,是不是只有cdecl才能支持变长参数,因为调用者清栈。
__stdcall
Callee
Pushes parameters on the stack, in reverse order (right to left)
__fastcall
Callee
Stored in registers, then pushed on stack
__thiscall
Callee
Pushed on stack; this pointer stored in ECX
------解决方案--------------------
印象中:
c++不支持变长参数,参数类型或数量不一,通过重载实现。
那么成员函数就更不能用变长参数了。