INFORMIX
DataBlade API Programmer's Manual
Chapter 12: DataBlade API Function Descriptions
Home Contents Index Master Index New Book

mi_put_string()

The mi_put_string() function copies a string value to a buffer, performing code-set conversion from server to client if necessary.

Syntax

Usage

The mi_put_string() function is useful for implementing send and receive functions for user-defined data types when aligned values such as an mi_string need to be written to possibly unaligned data buffers.

While other mi_put functions accept a preallocated buffer, mi_put_string() allocates memory for data to be copied. This allocation is why a pointer to the address is passed.

The returned address is advanced by the size of an mi_string value to permit a subsequent copy. In other words, if n is the length of the value in datap, the returned address is n bytes advanced from the original buffer address in datap.

Return Values

An address in the datap buffer.




DataBlade API Programmer's Manual, version 9.1
Copyright © 1998, Informix Software, Inc. All rights reserved.