Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Difference between callback function and non-callback one


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 anders211   Members   -  Reputation: 202

Like
1Likes
Like

Posted 06 November 2012 - 01:24 PM

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

Sponsor:

#2 MJP   Moderators   -  Reputation: 11790

Like
0Likes
Like

Posted 07 November 2012 - 12:22 PM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS