OMret_str_val


Synopsis


char *OMret_str_val(
OMobj_id  object_id,
char  *buffer,
int  buffer_size );

char *OMret_name_str_val(
OMobj_id  parent_id,
OMobj_name  subobject_name,
char  *buffer,
int  buffer_size );

Description

This routine returns the string value for the object specified. It is an easier alternative to using the OMget_str_val routine but provides the same value.

It is used in one of two modes:

•      The string value is allocated with malloc and must be freed by the user

•      The memory to store the string is supplied by the caller. If the string is too large to fit, it is truncated.

Arguments

object_id

This specifies the object id of an object that has a string value.

buffer

If the value is NULL (or if the buffer_size parameter is 0) space is allocated for the string. If this argument is not NULL (and the buffer_size argument is greater than 0), this parameter specifies a pointer to memory in which to store the string. This pointer is returned by the function in this case.

buffer_size

Specifies the size of the buffer argument. If this argument is 0, the buffer argument is ignored.

Returned value

A pointer to a NULL terminated string containing the string value of the object specified. This value should be freed using the C routine free if the buffer argument is NULL or if buffer_size is 0.