Home | Previous Page | Next Page   Function Descriptions >

mi_lvarchar_to_string( )

The mi_lvarchar_to_string( ) function returns the data in a varying-length structure as a null-terminated string.

Syntax

mi_string *mi_lvarchar_to_string(lv_ptr)
   mi_lvarchar *lv_ptr;
lv_ptr
is a pointer to the varying-length structure whose data is to be converted to a null-terminated string.
Valid in Client LIBMI Application? Valid in User-Defined Routine?
Yes Yes

Usage

The mi_lvarchar_to_string( ) function returns a null-terminated string for the data in the varying-length structure that lv_ptr references. This function allocates memory for the string it returns. Because mi_lvarchar_to_string( ) uses mi_alloc( ), this string memory has the current memory duration. You must use the mi_free( ) function to free this string memory when it is no longer needed.

Server Only

The mi_lvarchar_to_string( ) function allocates the string that it creates with the current memory duration.

End of Server Only

Return Values

An mi_string pointer
is a pointer to the newly allocated buffer that contains the string equivalent of the varying-length data.
NULL
indicates that the function was not successful.

Related Topics

See also the descriptions of mi_alloc( ), mi_free( ), mi_new_var( ), mi_string_to_lvarchar( ), mi_var_copy( ), mi_var_free( ), and mi_var_to_buffer( ).

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]