APIENTRY做什么?

lhj*_*362 19 winapi

我第一次遇到它,在msdn上找不到专门的页面.APIENTRY是什么意思?

Soa*_*Box 19

APIENTRY是WINAPI的别名.

WINAPI本身是用于Windows API调用的调用约定类型的定义,即stdcall.

基本上这是向编译器解释在调用此函数时如何处理堆栈和参数.除非要为这些类型的函数创建函数指针,否则通常不需要担心它.


Mar*_*ins 9

It's just a #define for WINAPI, which is the standard decoration for a Windows entrypoint.

#define APIENTRY    WINAPI
Run Code Online (Sandbox Code Playgroud)