void mi_set_varlen(varlen_ptr, data_len)
mi_lvarchar *varlen_ptr;
mi_integer data_len;
The mi_set_varlen( ) function sets the data length to data_len in the varying-length structure that varlen_ptr references. Uses for mi_set_varlen( ) include:
The mi_set_varlen( ) function sets the data length in the varying-length descriptor. If you specify a data length larger than the current data portion, this function does not reallocate the data portion. Therefore, when you change the data length with mi_set_varlen( ), make sure that the new value does not exceed the size of the data portion.
The data in a varying-length structure is not null terminated. Make sure that you use mi_set_varlen( ) to set the length of the actual varying-length data, not including any null terminator.
Although the varlen_ptr argument is declared as a pointer to an mi_lvarchar value, you can also use the mi_set_varlen( ) function to set data length in other varying-length data types, such as mi_sendrecv.
None.
See also the descriptions of mi_get_varlen( ), mi_new_var( ), mi_set_vardata( ), mi_set_vardata_align( ), mi_set_varptr( ), and mi_var_free( ).
For information on when to set the length of a varying-length structure, see the IBM Informix: DataBlade API Programmer's Guide.