|
The mi_set_vardata() accessor routine stores data in the data portion of the data in a varying-length structure (such as mi_lvarchar).
varlen_ptr | is a pointer to the varying-length structure. |
data_ptr | is a pointer to the data to insert. |
The mi_set_vardata() function copies the data that data_ptr references to the data field of the varying-length structure that varlen_ptr references. The function determines the number of bytes to copy from the data length information stored in the varlen_ptr varying-length structure. Therefore, use mi_set_varlen() to set the length of the data before you copy in the data.
Important: The varying-length structure that "varlen_ptr" references is an opaque structure. Do not access fields of this structure directly. Instead, use mi_set_vardata() or mi_set_vardata_align() to store the data in this structure.
The data in a varying-length structure is not null terminated. Do not copy the null terminator into the data portion of a varying-length structure.
Although the varlen_ptr argument is declared as a pointer to an mi_lvarchar, you can also use the mi_set_vardata() function to set data in other varying-length data types, such as mi_sendrecv.
None.
See the description of the following functions: mi_get_vardata(), mi_new_var(), mi_set_vardata_align(), mi_set_varlen(), mi_set_varptr(), and mi_var_free().
For more information, see Storing Varying-Length Data.