informix
Informix DataBlade API Programmer's Manual
DataBlade API 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

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 with the mi_free() function to free this string memory when it is no longer needed.

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

Return Values

mi_string * 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 the descriptions of the following functions: mi_alloc(), mi_free(), mi_new_var(), mi_string_to_lvarchar(), mi_var_copy(), mi_var_free(), and mi_var_to_buffer().

For more information, see Varying-Length Data Structures.


Informix DataBlade API Programmer's Manual, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved