WebSphere Message Service Client for C/C++, Version 2.0.2 Operating Systems: AIX, Linux, Solaris, Windows

C functions that accept a string as input

This topic describes the interface used by C functions that accept a string as an input parameter.

In the C API, certain functions accept a string as an input parameter. Each of these functions uses the same interface for passing a string to XMS. The following example of C code illustrates the function, xmsSetStringProperty() in the PropertyContext class:
xmsRC xmsSetStringProperty(xmsHObj object,
                           xmsCHAR *propertyName,
                           xmsCHAR *propertyValue,
                           xmsINT length,
                           xmsHErrorBlock errorBlock);
Two input parameters control passing a string to XMS:
propertyValue
A pointer to a character array that contains the string to be passed to XMS.
length
The length of the string in bytes. If the string is null terminated with no embedded null characters, you can specify XMSC_CALCULATE_STRING_SIZE instead and XMS calculates its length.

Concept topic

Terms of Use | Rate this page

Last updated: 24 May 2011

(C) Copyright IBM Corporation 2005, 2011. All Rights Reserved.