The function acedInvoke can not work
I defined myfun as following in lisp:(defun myfun() (* 2 180))
And the function works right in command state.
commandmyfun)
360
But when I spawn the function in ARX,it's can not work.
Here is my code:
+++++++++++++++++++++++++++++++++++++++++
struct resbuf *result = NULL, *list;
list = acutBuildList(RTSTR, "myfun", 0);
if (list != NULL)
{
int stat = acedInvoke(list, &result);
if (stat == RTERROR)
acdbFail(L"Cannot run \n");
acutRelRb(list);
}
if (result != NULL)
{
// Do somthing
acutRelRb(result);
}
else
AfxMessageBox(L"NULL");
+++++++++++++++++++++++++++++++++++++++++++
The result show "Cannot run " and result == NULL.
Please help me.
list = acutBuildList(RTSTR, "myfun", 0);
改为list = acutBuildList(RTSTR, _T("myfun"), 0);
即可
页:
[1]