cniGetResourceProperty

Use the resourceManager to obtain the value of the property.

Obtains the value of the property propertyName as managed by the resourceManager

Syntax

CciSize cniGetResourceProperty(
  int*              returnCode,
  CciChar*          resourceManager,
  CciChar*          propertyName,
  CciChar*          value,
  CciSize           length);

Parameters

returnCode
The return code from the function (output).
Possible return codes are:
  • CCI_SUCCESS
  • CCI_EXCEPTION
  • CCI_BUFFER_TOO_SMALL
resourceManager
The address of the resource manager controlling the properties (input).
propertyName
The name of the object for which the value is required.
value
The value of the buffer, already allocated, that you use.
length
The size of the buffer, already allocated, that you use.

If this size is not sufficient, the function fails with returnCode set to CCI_BUFFER_TOO_SMALL, and returns the required buffer size; that is, the string length plus one null terminator character.

You should then allocate the required size for the buffer, and call this function again; this function copies the property string into this buffer.

This usage pattern allows you to manage the memory on your system.

This function performs the same task as the mqsireportproperties command.

Return values

None or CCI_BUFFER_TOO_SMALL. If any other error occurs, the returnCode parameter indicates the reason for the error.