Products | Versions |
---|---|
TIBCO SmartSockets | - |
Not Applicable | - |
Resolution:
Use the functions TutGetOutputfunc and TutSetOutputFunc.
(NOTE the cast using T_ENTRY_VA. )
(This is not in the coding examples in the Utility Manual as of 6.4r2 . )
#include <rtworks/ipc.h>
T_OUT_VA_FUNC save_func;
// NOTE THE T_ENTRY_VA CAST - required for cross platform compatability.
static void T_ENTRY_VA redirect_io_func(T_STR format_str, va_list arg_list);
int main(void)
{
save_func = TutGetOutputFunc(); // save address of function we use for screen I/O.
// Hide RTclient connection information.
TutSetOutputFunc(redirect_io_func);
TipcSrvCreate(T_IPC_CONN_FULL); // connect to RTserver
TutSetOutputFunc(save_func); // restore address of function which uses screen I/O .
// Real application work goes here.
TipcSrvDestroyT_IPC_SRV_CONN_NONE);
TutExit(T_EXIT_SUCCESS);
}
// Function to quiey Screen I/O
static void T_ENTRY_VA redirect_io_func(T_STR format_str, va_list arg_list)
{
// do_nothing and return. Remember, you first have to do_nothing :)
return(T_EXIT_SUCCESS);
}