WebSphere Message Service Clients for C/C++ and .NET, Version 1.2 Operating Systems: Linux, Windows

Getting and setting properties in C

A C application uses the functions in the PropertyContext class to get and set the properties of objects.

For each XMS data type, the PropertyContext class contains a function to get the value of a property with that data type and a function to set its value. For example, a C application can call the function xmsGetIntProperty() to get the value of an integer property and the function xmsSetIntProperty() to set its value.

Functions in the PropertyContext class can operate on any object that can have properties. Each individual class does not contain its own functions to get and set the properties of objects of that class. As a result, functions in the PropertyContext class accept only generic object handles as input. If an application is currently accessing an object using a handle with a data type that is related to the type of the object, the application must cast the handle to the generic object handle data type, xmsHObj, in order to get or set the properties of the object. For more information about generic object handles, see Object handles in C.

All objects can have properties except ErrorBlock, Iterator, and Property objects.

If an application sets the value of a property, the new value replaces any previous value the property had.


Concept topic

Terms of Use | Rate this page

Last updated: 7 Dec 2005

© Copyright IBM Corporation 2005. All Rights Reserved.