Archived

This topic is now archived and is closed to further replies.

please .... CALLBACK

This topic is 5588 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello CALLBACK means the function name will be passed as a parameter in another function call. and CALLBACK means the operating sytem will call the function preceeded with the CALLBACK keyword. and it takes it's parameters from the system. Is this correct? [edited by - HappyToLearnC on August 27, 2002 3:38:25 AM]

Share this post


Link to post
Share on other sites
Actually, on windows, CALLBACK evaluates to __stdcall like most of the API. A callback function is "called back" by another function, that can be a system function or one of your own functions. The WndProc is the most widely known callback - and in that case the system does call it supplying the arguments. EnumWindows also takes a callback function and the system supplies the parameters there too. EnumWindows is more representative of most callback functions. WndProc is somewhat unique in that the WNDCLASS intervenes.

Share this post


Link to post
Share on other sites
In windef.h:
#define CALLBACK __stdcall

A function doesn''t even need to be declared as __stdcall to be used as a callback function. The purpose of __stdcall is to ensure that parameters are passed in a particular way (and stuff). This allows different compilers/languages to interact.

Share this post


Link to post
Share on other sites