Assembly Function calling x64 VC++
So I am writing a wrapper for main and still provide a main like functionality, so user can define int main() or int main(argc, argv) and both works fine. I am able to do that for some compilers with inline assembly with pushing argc & argv onto stack before calling the user's main. However for x64 VC++, there is no inline assembly, so any suggestions on how I can achieve this?
Thanks!
我看到了两个明显的选择:用汇编语言编写代码,包含在汇编语言文件中,或者不用任何内联汇编在C ++中编写代码:
void my_entry_point() {
int argc = foo();
int argv = bar();
int ret = main(argc, argv);
exit_to_os(ret);
}
链接地址: http://www.djcxy.com/p/84336.html
下一篇: 组装函数调用x64 VC ++