TipcMsgFieldSetSize set the size of a message pointer field
field
message pointer field to resize
size
new size (usually in bytes)
TRUE
if field size set successfully, FALSE
if error occurred.
If TipcMsgFieldSetSize fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcMsgFieldSetSize sets the size of a message pointer field (one created with a TipcMsgAppend*Ptr function). For scalar and binary field types, the size
argument is specified in bytes. For all array field types (including MSG_ARRAY), the size
argument is specified in elements. For individual MSG fields, the size
argument must always be zero.
None
The TipcMsgAppend*Ptr functions
This example sets the size of a message pointer field:
T_CHAR str[80]; T_IPC_MSG_FIELD field; str[0] = '\0'; if (!TipcMsgAppendStrPtr(msg, str, &field)) {return
; /* error */
} strcpy(str, "This is the field data."); if (!TipcMsgFieldSetSize(field, strlen(str) + 1)) {return
; /* error */
}
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |