您的位置:首页 > 其它

使用另类方式调用函数

2004-08-29 01:00 302 查看
大家可以自己编译运行一下下面的代码,看看为什么是这样哦:)

#include <windows.h>
#include <stdio.h>
void __stdcall Test1()
{
printf("Test1/n");
}

void __stdcall Test2()
{
printf("Test2/n");
}

void __stdcall Test3()
{
printf("Test3/n");
}

int main(int argc, char* argv[])
{
__asm
{
push 0
push 0
mov eax, ExitProcess
push eax
lea eax, Test1
push eax
lea eax, Test2
push eax
lea eax, Test3
push eax
ret
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: