#include "CallFunc.h" #include "Class.h" #include "stdlib.h" double fit(double *x, double *y) { return 0; } int main(void) { long addr, offset; char *title = "fcn"; double i = 0; double j = 3; int k = 6; // "char*,(double*)(double*,double*),double,double,int" // does not seem to work even... char *cproto = "char*,void*,double,double,int"; G__ClassInfo *klass = new G__ClassInfo ("TF1"); G__CallFunc *func = new G__CallFunc(); G__MethodInfo *minfo = new G__MethodInfo(klass->GetMethod("TF1", cproto, &offset)); func->SetArg((long)title); func->SetArg((long)fit); func->SetArg((double)i); func->SetArg((double)j); func->SetArg((long)k); if (minfo->InterfaceMethod()) func->SetFunc(*minfo); printf("%s\n", minfo->GetPrototype()); addr = func->ExecInt((void*)((long)NULL + offset)); return 1; }