c++ - In an add-in in Excel, written in C(++), how does one get the name of the function which called into the addin? -
the title says all. have add-in excel, written in c++, , register several different functions in excel call same extern "c"
function in c++, dispatching on function called in excel. so, need able determine excel function called it.
edit:
since doesn't seem clear: have large plugin library excel, written in c++. extending it, , 1 of things want allow library support plugins itself, possibly written in other languages. (we use python lot higher level things, example.) when load 1 of these plugins, pointer functions need register, along information arguments, return values, etc. need way of registering these functions excel, excel user can access them. basic thought have single function in library, forward desired function (typically python function, i'd marshall excel arguments python list, call python function using pyobject_callobject
, , marshall return values xloper12
, return excel. when registering functions, pxprocedure
string name of marshalling function. pxtypetext
, pxfunctiontext
different each time. need somehow obtain pxfunctiontext
led excel call function, can map argument list (to know types actual arguments are) , address of function have call (the pyobject*
, in case of python).
for moment, grady player's suggestion thing comes mind; solve 2 problems @ once, since give me named first argument va_args
part well. raises more questions answers: how define macro c++ code, example? can't find combination of available functions in native c++ allow it.
Comments
Post a Comment