![]() |
|
The mi_put_string() function copies an mi_string (CHAR(x)) value to a buffer.
The mi_put_string() function copies the mi_string value that string_buf references into the buffer that data_dptr references.
Tip: While other mi_put functions accept a preallocated buffer, mi_put_string() allocates memory for data to be copied. This allocation is why a pointer to the address is passed.
Upon completion, mi_put_string() returns the address of the next buffer to which data can be copied. The function advances the returned address by srcbytes bytes, ready for copying in the next value. In other words, if srcbytes is the length of the value that string_buf identifies, the returned address is srcbytes bytes advanced from the original buffer address in data_dptr.
The mi_put_string() function is useful in a send support function of an opaque data type that contains mi_string values. Use this function to send an aligned character value to a client application, which possibly has unaligned data buffers.
If code-set conversion is required, the mi_put_string() function converts the mi_string value from the code set of the server-processing locale to the code set of the client locale. For more information, see the Informix Guide to GLS Functionality.
mi_unsigned_char1 * | The new address in the data_ptr data buffer. |
NULL | The function was not successful. |
See the description of the following functions: mi_get_string(), mi_put_bytes(), mi_put_date(), mi_put_datetime(), mi_put_decimal(), mi_put_double_precision(), mi_put_int8(), mi_put_integer(), mi_put_interval(), mi_put_lo_handle(), mi_put_money(), mi_put_real(), and mi_put_smallint().
For more information on the use of mi_put_string() in a send support function, see Converting Opaque-Type Data With Machine-Specific Data Types.