|
The mi_get_vardata() accessor function returns a pointer to the data contained in a varying-length structure (such as mi_lvarchar).
The mi_get_vardata() function obtains a pointer to the data portion of the varying-length structure that varlen_ptr references.
Important: The varying-length structure that "varlen_ptr" references is an opaque structure. Do not access the fields of this structure directly. Instead, use mi_get_vardata() to obtain the data pointer from this structure.
The data in a varying-length structure is not null terminated. Do not use null termination to determine end of the data that the mi_get_vardata() returns. Instead, use the mi_get_varlen() function to obtain the actual data length, which you can then use to access the varying-length data.
Although the varlen_ptr argument is declared as a pointer to an mi_lvarchar, you can also use the mi_get_vardata() function to obtain data from other varying-length data types, such as mi_sendrecv.
char * | is a pointer to the data in the varying-length structure. |
NULL | indicates that the function was not successful. |
See the description of the following functions: mi_get_vardata_align(), mi_get_varlen(), mi_new_var(), mi_set_vardata(), and mi_var_free().
For more information, see Accessing a Varying-Length Structure.