I have a function in .dll library:
int DATA(ClientData clientData, Tcl_Interp *interp,
int argc, char *argv[])
{
static char rtn[100];
if (argc != 3) {
Tcl_SetResult(interp, "wrong number of arguments ", TCL_STATIC);
return TCL_ERROR;
}
if ( srl_data(customerID,argv[1],argv[2]) ) {
if (srl_status(rtn)) {
Tcl_SetResult(interp, rtn, TCL_STATIC);
return TCL_ERROR;
}
}
Tcl_SetResult(interp, "Data ok", TCL_STATIC);
return TCL_OK;
}
}
"foo" is the namespace for the above function.
From my tcl script, I called the function like this:
if {[catch {::foo:ATA $custID $custName $custValue} ERR]} { puts "$ERR"
} else {
puts "The DATA call is successful"
}
Unfortunately, it returns the error message:
Wrong number of arguments.
I've been hanging on this problem for 2 days. Please help!!!
int DATA(ClientData clientData, Tcl_Interp *interp,
int argc, char *argv[])
{
static char rtn[100];
if (argc != 3) {
Tcl_SetResult(interp, "wrong number of arguments ", TCL_STATIC);
return TCL_ERROR;
}
if ( srl_data(customerID,argv[1],argv[2]) ) {
if (srl_status(rtn)) {
Tcl_SetResult(interp, rtn, TCL_STATIC);
return TCL_ERROR;
}
}
Tcl_SetResult(interp, "Data ok", TCL_STATIC);
return TCL_OK;
}
}
"foo" is the namespace for the above function.
From my tcl script, I called the function like this:
if {[catch {::foo:ATA $custID $custName $custValue} ERR]} { puts "$ERR"
} else {
puts "The DATA call is successful"
}
Unfortunately, it returns the error message:
Wrong number of arguments.
I've been hanging on this problem for 2 days. Please help!!!