本文介紹了“APIENTRY _tWinMain"和“WINAPI WinMain"不同之處的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
這兩個函數有什么區別?:
What are the difference from these 2 function?:
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
推薦答案
_tWinMain
只是 tchar.h 中相應版本的 #define
快捷方式WinMain
.
_tWinMain
is just a #define
shortcut in tchar.h to the appropriate version of WinMain
.
如果定義了_UNICODE
,則_tWinMain
擴展為wWinMain
.否則,_tWinMain
與 WinMain
相同.
If _UNICODE
is defined, then _tWinMain
expands to wWinMain
. Otherwise, _tWinMain
is the same as WinMain
.
相關的宏看起來是這樣的(其實還有很多其他的代碼穿插):
The relevant macro looks something like this (there's actually a lot of other code interspersed):
#ifdef _UNICODE
#define _tWinMain wWinMain
#else
#define _tWinMain WinMain
#endif
這篇關于“APIENTRY _tWinMain"和“WINAPI WinMain"不同之處的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!