call one XLL from another XLL

Dec 29, 2013 at 5:13 AM
Hi, guys, I am trying to use another way to call one XLL from another XLL. See the below chart, it is copying from PlanaTech. But it is still not working. I get a "#Name" in my Excel cell when I try it. I am sure the called XLL, CalDaysInYear2, is opened in Excel. Do you guys see any error in my code? Thank you so much.

Code for XLL:
CXlOper* CalDaysInYear3_Impl(CXlOper& xloResult, double DayCount, double Basis)
// End of generated code
// TODO - set the value of xloResult, or return another value
//        using CXlOper::RetXXX() or throw a CXlRuntimeException.
static int xlfEvaluate = 257;
static int xlUDF = 255;

CXlOper xloName, xloRef;
int rc = 0;
xloName = "CalDaysInYear2";
if (!rc)
    rc = xloRef.Excel(xlfEvaluate, 1, &xloName);
if (!rc)
    rc = xloResult.Excel(xlUDF, 2, &xloRef, &CXlOper(DayCount, Basis));
return xloResult.Ret();

code for CalDaysInYear2 Function
CXlOper* CalDaysInYear2_Impl(CXlOper& xloResult, double DayCount, double Basis)
 if (Basis==0)
 return xloResult.Ret();
Dec 29, 2013 at 5:48 AM
Dumb question time, but why not get PlanaTech to tell you?