This question already has an answer here:
这个问题在这里已有答案:
- What does a “CALLBACK” declaration in C do? 4 answers
- C中的“CALLBACK”声明有什么作用? 4个答案
I'm a bit confused with this definition in an example provided by microsoft using TAPI in Windows Mobile 5.0. What does CALLBACK
do in this case? What is the purpose of it?
在Windows Mobile 5.0中使用TAPI的microsoft提供的示例中,我对此定义有点困惑。在这种情况下,CALLBACK做了什么?它的目的是什么?
BOOL CALLBACK DialingProc (HWND, UINT, WPARAM, LPARAM);
BOOL CALLBACK DialingProc(HWND,UINT,WPARAM,LPARAM);
The implementation looks the same BOOL and CALLBACK
.
该实现看起来与BOOL和CALLBACK相同。
BOOL CALLBACK DialingProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
//Some code here...
}
I've been following http://c.learncodethehardway.org/book/ which is great but haven't really seen anything in regards to this... Also did a couple searches but no luck- maybe i don't know what i'm searching for here?
我一直在关注http://c.learncodethehardway.org/book/这很棒但是没有真正看到任何关于这个...也做了几次搜索但没有运气 - 也许我不知道是什么我在这里寻找?
1 个解决方案
#1
2
CALLBACK
is #define
d as __stdcall
stdcall is a calling convention that determines how arguments are passed. WinAPI uses this very often. See What does "CALLBACK" in a Windows API function declaration mean?
CALLBACK是#defined,因为__stdcall stdcall是一个调用约定,用于确定参数的传递方式。 WinAPI经常使用它。请参阅Windows API函数声明中的“CALLBACK”是什么意思?
#1
2
CALLBACK
is #define
d as __stdcall
stdcall is a calling convention that determines how arguments are passed. WinAPI uses this very often. See What does "CALLBACK" in a Windows API function declaration mean?
CALLBACK是#defined,因为__stdcall stdcall是一个调用约定,用于确定参数的传递方式。 WinAPI经常使用它。请参阅Windows API函数声明中的“CALLBACK”是什么意思?