Sign in to follow this  
anders211

Difference between callback function and non-callback one

Recommended Posts

anders211    250
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

Share this post


Link to post
Share on other sites
MJP    19754
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this