本文介紹了“WINAPI"是什么?在主函數中是什么意思?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
你能解釋一下 WinMain()
函數中的 WINAPI
詞嗎?
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
,Microsoft 特定的關鍵字,指定被調用者清理堆棧的調用約定.函數的調用者和被調用者需要就調用約定達成一致,以避免破壞堆棧.
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.
這篇關于“WINAPI"是什么?在主函數中是什么意思?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!