0
/*
* Wrapper from
* int func(int a, int b, int c, unsigned int d, signed int e);
* to
* int __usercall func<eax>(int a<eax>, int b<ecx>, int c, unsigned int d, signed int e);
*/
int func(int a, int b, int c, unsigned int d, signed int e)
{
__asm
{
push e
push d
push c
mov ecx, b
mov eax, a
call __usercall_func // access violation somewhere inside here
add esp, 12
}
}
什么是__usercall_func?如果它是一个指针,你应该使用'call dword ptr [__usercall_func]' – Abyx 2010-11-05 02:33:55
另外,你应该在__usercall函数调用之后清除堆栈,添加'add esp,12'(尽管如果没有它,如果有ebp frame和esp检查被禁用) – Abyx 2010-11-05 02:37:20