classname_fieldname_at(vector)(char)(string)

This function returns the element of a vector at a specified position.

Prototype

    MCO_RET classname_fieldname_at( /*IN*/ classname *handle,
                          /*IN*/ uint2 index,
                          /*OUT*/ char *result,
                          /*IN*/ uint2 bufsize,
                          /*OUT*/ uint2 *len );

Arguments

handle
A pointer to a classname handle.
index
A uint2 that specifies the offset from the start of the vector from which to get the value.
result
A char pointer to receive the value of the element of the vector at a specified index.
bufsize
The size of the result buffer.
len
The number of bytes actually copied to the result buffer.

Description

This function returns the element of a vector at a specified position. This method is used for vector elements that are char or string elements. The size of the char or string element can be determined by first calling classname_fieldname_at_len().

Return Codes

MCO_S_OK
The vector element value was returned successfully.
MCO_E_INDEXLIMIT
Index is out of range.
MCO_E_TRANSACT
MCO_ERR_OBJECT_HANDLE
Related Topics Link IconRelated Topics