Reputation: 6378
I came across a function definition in c++ as follows: (source)
BOOL WINAPI GetProcessMemoryInfo(
_In_ HANDLE Process,
_Out_ PPROCESS_MEMORY_COUNTERS ppsmemCounters,
_In_ DWORD cb
);
What is the return type here. Is it BOOL WINAPI
or BOOL
? Where is this type defined?
Upvotes: 6
Views: 6669
Reputation:
BOOL
is a typedef for int
. WINAPI
is a macro specifying the calling convention (__stdcall, __cdecl etc.) of the function.
typedef int BOOL;
#define WINAPI __stdcall
See MSDN for details.
It's basically equivalent to:
int __stdcall ...
Upvotes: 12