I'm new to C++ and trying to understand what these two macros are doing in this FileMaker Plugin Example.
#define FMX_PROC(retType) retType __stdcall
#define FMX_PROCPTR(retType, name) typedef retType (__stdcall *name)
So far I understand that they are both macros, and that the FMX_PROCPTR
is a pointer to a function that takes those two arguments, and that __stdcall is some sort of calling convention (decided to not dig to much into what that means).
What I don't understand are the ends of each lines, the parts that come after FMX_PROC(retType)
and FMX_PROCPT(retType, name)
.
It's possible that it is the spacing that is confusing me, but is retType __stdcall
the return type for FMX_PROC(retType)
? Or is it giving the argument a type?
Somewhere else in the code FMX_PROC(retType)
is used like this
static FMX_PROC(fmx::errcode) Do_FMmp_ConvertToBase( short /* funcId */, const fmx::ExprEnv& /* environment */, const fmx::DataVect& dataVect, fmx::Data& results )