Difference between callback function and non-callback one

Started by
0 comments, last by MJP 11 years, 5 months ago
typedef VOID (CALLBACK* PCALLBACKEVENT)(u32 nEvent, u32 controlID, Control* pControl, void* userContext);

In DXUTility library I see that callback functions are declared but this is nonsense. In fact I may skip word 'callback' and the effect will be the same
Advertisement
It's not "nonsense", it specifies the calling convention. When you're dealing with function pointers you have to make sure that the calling convention matches, otherwise very bad things will happen. If you're using x64 there's only one calling convention, so don't usually have to worry about it.

This topic is closed to new replies.

Advertisement