TipcMsgGetNumFields get the number of fields in a message
msg
message to get number of fields from
num_fields_return
storage for number of fields
TRUE
if the number of fields was successfully retrieved from the message, FALSE
otherwise.
If TipcMsgGetNumFields fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcMsgGetNumFields gets the number of fields in a message. While it is possible to calculate the number of fields by using TipcMsgTraverse, TipcMsgGetNumFields is much faster.
If TipcMsgGetNumFields returns FALSE
, it does not store a value in num_fields_return
.
This example prints the number of fields in a message:
void print_num_fields(msg) T_IPC_MSG msg; { T_INT4 num_fields; if (!TipcMsgGetNumFields(msg, &num_fields)) {return
; /* error */
} TutOut("The message has %d fields.\n", num_fields); }/* print_num_fields */
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |