informix
Informix DataBlade API Programmer's Manual
DataBlade API Function Descriptions

mi_set_varptr()

The mi_set_varptr() function sets the data pointer in a varying-length structure (such as mi_lvarchar).

Syntax

Usage

The mi_set_varptr() function sets the data pointer in the varying-length structure that varlen_ptr references to the buffer that data_ptr references. Use this function to set the data pointer in a varying-length structure to point to a data portion that you allocate.

Make sure that you allocate the data_ptr buffer with a memory duration appropriate to the use of the data portion.

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() to set the data pointer in this structure.

Although the varlen_ptr argument is declared as a pointer to an mi_lvarchar, you can also use the mi_set_varptr() function to set the data pointer in other varying-length data types, such as mi_sendrecv.

Return Values

None.

Related Topics

See the description of the following functions: mi_new_var(), mi_set_vardata(), mi_set_vardata_align(), mi_set_varptr(), and mi_var_free().

For information on how to set the data pointer of a varying-length structure, see Setting the Data Pointer.


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