Click to See Complete Forum and Search --> : about the callback function


sandodo
July 7th, 2002, 10:30 PM
I am doing some source code on windows hook. The functions
JournalPlaybackFunc(), CallNextHookEx() and etc, I know,
are to build the loop to, for example, play back what recorded.
But the CALLBACks before the functions upset me, I am not clear
about what the functions are called through underground.
Does anybody can provide some information or drop
some web addresses on CALLBACK as referral?
Many thanks!

----------------------------------
:)

sandodo
July 9th, 2002, 09:41 PM
Does anybody has any information on the topic of CALLBACK?
I posted this thread a few days ago but nobody answered yet. :(

PaulWendt
July 9th, 2002, 11:21 PM
In the file windef.h, CALLBACK is #define'd as such:


#ifdef _MAC
#define CALLBACK PASCAL
#elif (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
#define CALLBACK __stdcall
#else
#define CALLBACK
#endif


On my system [with Visual Studio 6.0 SP5], CALLBACK winds up being __stdcall. __stdcall is just a way for Visual Studio to keep track of how arguments are to be pushed on the stack. There are others, too (eg: __fastcall, __cdecl, thiscall).

See the following links for details:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/_core___stdcall.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/_core___cdecl.asp

--Paul

sandodo
July 10th, 2002, 01:50 AM
Thanks a lot for your reply. Paul.