CALLBACK is only defined to be nothing if it was not previously defined,
e.g. by an included file or compiler flag. Defining it could also
control the behavior of subsequently included files.
I think Juha called it: Some code processor, orthogonal to the
traditional too chain, may look for CALLBACKs. A very similar mechanism
is used with Apple's Interface Builder in the form of the IBOutlet
macro. In fact, Objective-C actions (a flavor of callbacks) are
generally marked with the IBAction macro, whose definition is the moral
equivalent of "#define IBAction void".
"CALLBACK" may be used by some code processors, in my experience that
is generally not the case, for a number of reasons:
1) On Windows CALLBACK specifies a calling convention, while using it
to mark a function conceptually as a "CALLBACK" won't generally cause
any harm, it's more for specifying calling conventions rather than
conceptual intentions. So, despite the name "CALLBACK", it's not
really a good choice for identifying callback functions in general.
2) Many Windows programmers tend to get sloppy about it and specify
either __stdcall directory, or use WINAPI, or some other application-
specific macro. The word "CALLBACK" itself may not be a reliable
choice for identifying callback functions. For example, a window
procedure in the Windows API uses "CALLBACK" in the documentation
(
http://msdn.microsoft.com/en-us/library/ms633573(VS.85).aspx ), but
it is not unusual to see a programmer doing this instead:
LRESULT WINAPI mywndproc (HWND, UINT, WPARAM, LPARAM);
A code processor designed to do something with callback functions
would probably be better served by requiring you to use some other
macro besides "CALLBACK" to specify such functions, thus making your
declaration of a function as a callback function independent of your
use of standard Windows macros.
I can tell you that, AFAIK, the Visual Studio IDE itself does not use
the presence of "CALLBACK" for any code processing tasks.
Jason