TipcMsgFieldUpdateXmlPtr


Name

TipcMsgFieldUpdateXmlPtr — update the pointer of the message field returned by TipcMsgAppendXmlPtr

Synopsis

T_BOOL TipcMsgFieldUpdateXmlPtr(field, xml_data) 
T_IPC_MSG_FIELD field; 
T_XML xml_data; 

Arguments

field — message pointer field to update

xml_data — data for new message field

Return Values

TRUE if the pointer was successfully updated, FALSE otherwise.

Diagnostics

If TipcMsgFieldUpdateXmlPtr fails, it returns NULL and sets the global SmartSockets error number to one of:

Description

TipcMsgFieldUpdateXmlPtr updates the pointer of the message field returned by TipcMsgAppendXmlPtr. The contents of the pointer are not copied. Instead, the supplied pointer is entered directly into the message field's internal data structure. The caller is responsible for making sure that the pointer remains valid for the lifetime of the message field, and for freeing it, if necessary, when the message field has been destroyed.

See Also

TipcMsgAppendXmlPtr

Examples

This example changes the pointer of the XML field:

T_XML ptr1, ptr2; 
T_INT4 size1, size2; 
T_IPC_MSG_FIELD field; 
 
if (!TipcMsgAppendXmlPtr(msg, ptr1, size1, &field)) { 
  return;  /* error */ 
} 
 
if (!TipcMsgFieldUpdateXmlPtr(field, ptr2, size2)) { 
  return;  /* error */ 
} 

TIBCO SmartSockets™ Application Programming Interface
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com