&是什么QUOT; WINAPI"在主要功能是什么意思? [英] What does "WINAPI" in main function mean?
本文介绍了&是什么QUOT; WINAPI"在主要功能是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
能否请您给我解释一下在 WINAPI
字的WinMain()
功能?
Could you please explain to me the WINAPI
word in the WinMain()
function?
在最简单的方法。
#include <windows.h>
int -->WINAPI<-- WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
MessageBox(NULL, "Goodbye, cruel world!", "Note", MB_OK);
return 0;
}
难道只是某些Windows时髦的模式?
Is it just some Windows funky mode?
这是什么呢?或者说,这是什么C ++功能,我还没有遇到过?
What does it do? Or rather what is this C++ feature I haven't encountered yet?
推荐答案
WINAPI
是计算结果为的 __ STDCALL
,指定了调用约定的地方被调用者清除栈微软特定的关键字。该函数的调用者和被调用需要在调用约定达成一致,以避免破坏堆栈。
WINAPI
is a macro that evaluates to __stdcall
, a Microsoft-specific keyword that specifies a calling convention where the callee cleans the stack. The function's caller and callee need to agree on a calling convention to avoid corrupting the stack.
这篇关于&是什么QUOT; WINAPI&QUOT;在主要功能是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文