__stdcall / CALLBACK
From: Chrynne Schumptze (ChrynneSchumptze_at_discussions.microsoft.com)
Date: 09/15/04
- Next message: William DePalo [MVP VC++]: "Re: COM - java interop"
- Previous message: PaulOBear: "Re: placement new and alignment"
- Next in thread: Igor Tandetnik: "Re: __stdcall / CALLBACK"
- Reply: Igor Tandetnik: "Re: __stdcall / CALLBACK"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 15 Sep 2004 09:01:04 -0700
Hi
I'm trying to make some functionality which will operate in a similar way to
the EnumWindows function, and I've got a function call defined as
typedef BOOL (CALLBACK *MATCHPROC)(_TCHAR*);
few questions:
1) I've noticed that CALLBACK is defined as __stdcall, in windows.h. If I
include <windows.h> and use the CALLBACK syntax, it works, but if I don't
include <windows.h> and use __stdcall then it gives "C2059: syntax error:
__stdcall".
Oddly, if I *don't* include windows.h and use __stdcall , that's also fine.
Why is this?
2) Is CALLBACK necessary? In order to make the called function "clean the
stack itself", is that right?
-- ----------------------------------- Gubarsky's Law of Cybernetic Entomology: There's always at least one more bug.
- Next message: William DePalo [MVP VC++]: "Re: COM - java interop"
- Previous message: PaulOBear: "Re: placement new and alignment"
- Next in thread: Igor Tandetnik: "Re: __stdcall / CALLBACK"
- Reply: Igor Tandetnik: "Re: __stdcall / CALLBACK"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|