What does a “CALLBACK” declaration in C do?

后端 未结 4 1954
Happy的楠姐
Happy的楠姐 2020-12-01 18:47

I was looking through some code from the SDL library and came across a function declared like this:

LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wPar         


        
4条回答
  •  盖世英雄少女心
    2020-12-01 19:32

    The "CALLBACK" is a calling convention. There are other kinds of calling conventions. CALLBACK is the same as __stdcall.

    http://www.codeguru.com/cpp/cpp/cpp_mfc/callbacks/article.php/c10557

    Some more information at Raymond Chen's blog:

    http://blogs.msdn.com/oldnewthing/archive/2004/01/08/48616.aspx

提交回复
热议问题