WebSphere Message Service Clients for C/C++ and .NET, Version 1.2 Operating Systems: Linux, 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. Here is an example of one of these functions, 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
This parameter is a pointer to a character array that contains the string to be passed to XMS.
length
This parameter is 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 allow XMS to calculate its length.
Related concepts
Object handles in C
Getting and setting properties in C
C functions that return a string by value
C functions that return a byte array by value
C functions that return a string or byte array by reference
Handling errors in C
Using message and exception listener functions in C

Concept topic

Terms of Use | Rate this page

Last updated: 24 Mar 2006

© Copyright IBM Corporation 2005, 2006. All Rights Reserved.