0

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?

BOOL CALLBACK DialingProc (HWND, UINT, WPARAM, LPARAM);

The implementation looks the same BOOL and 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?

Dayan
  • 7,634
  • 11
  • 49
  • 76
  • I'm not sure what you're actually asking here? – psmears Nov 13 '15 at 13:21
  • @psmears Updated my question. – Dayan Nov 13 '15 at 13:22
  • 1
    Ah, I see, you're asking about CALLBACK - which is quite tricky to search for, as you tend to get a lot of irrelevant hits about callbacks in general. Does [this question](http://stackoverflow.com/questions/530504/what-does-a-callback-declaration-in-c-do) provide the answers you need? – psmears Nov 13 '15 at 13:25
  • @psmears I didn't find this one! Thanks. I got an answer here so I guess i'll keep the question. – Dayan Nov 13 '15 at 13:27

1 Answers1

2

CALLBACK is #defined 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?

Community
  • 1
  • 1
V. Kravchenko
  • 1,859
  • 10
  • 12