TutCbGetArgument get the callback argument of the specified callback
cb
callback to get argument for
arg_return
pointer to location for the argument
TRUE
if successful, FALSE
otherwise.
None
TutCbGetArgument returns the callback argument that is associated with cb
.
Pass in the address of a T_CB_ARG variable; otherwise, unexpected results may occur.
This example gets the argument of a callback and prints it out:
static void T_ENTRY time_change_cb(dummy, data, arg) T_PTR dummy;/* always NULL */
T_TIME_CHANGE_CB_DATA data; T_CB_ARG arg; { TutOut("Time change callback called, argument: %s\n", arg); if (T_STREQI(arg, "hello")) { TutCbSetArgument(data->cb, "bye"); } else { TutCbSetArgument(data->cb, "hello"); } } T_CB cb; T_PTR cb_arg; cb = TutTimeChangeCbCreate(time_change_cb, "hello");/* other code */
if (!TutCbGetArgument(cb, &cb_arg)) {/* error */
} TutOut("Callback argument: %s\n", (T_STR)cb_arg);
TIBCO SmartSockets™ Utilities Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |