What does APIENTRY do?

前端 未结 2 1900
伪装坚强ぢ
伪装坚强ぢ 2020-12-18 19:27

I encountered it first time and found no dedicated page on msdn. What does APIENTRY mean?

相关标签:
2条回答
  • 2020-12-18 19:30

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

    #define APIENTRY    WINAPI
    
    0 讨论(0)
  • 2020-12-18 19:43

    APIENTRY is an alias for WINAPI.

    WINAPI itself is a definition for the type of calling convention used for windows API calls, the stdcall.

    Basically this is explaining to the compiler how to handle the stack and arguments when calling this function. You don't usually need to worry about it unless you are making function pointers to these types of functions.

    0 讨论(0)
提交回复
热议问题