#include<iostream>
extern "C" int __stdcall myfunc();//由于C++有函数重载功能,所以一定要申明为C形式的stdcall
void main() {
printf("%d",myfunc());
}
.model flat,stdcall
.code
myfunc proc
mov eax,1
ret 0
myfunc endp
end
#include<stdio.h>
extern int __stdcall myfunc();//注意此处与上面有区别
//extern "C" int __stdcall myfunc();//由于C++有函数重载功能,所以一定要申明为C形式的stdcall
void main() {
printf("%d",myfunc());
}