Home | Previous Page | Next Page   Function Descriptions >

mi_put_int8( )

The mi_put_int8( ) function copies an mi_int8 (INT8) value, converting any difference in alignment or byte order on the server computer to that of the client computer.

Syntax

mi_unsigned_char1 *mi_put_int8(data_ptr, int8_ptr)
   mi_unsigned_char1 *data_ptr;
   mi_int8 *int8_ptr;
data_ptr
is a pointer to the buffer to which to copy the mi_int8 value.
int8_ptr
is a pointer to the buffer from which to copy the mi_int8 value.
Valid in Client LIBMI Application? Valid in User-Defined Routine?
No Yes

Usage

The mi_put_int8( ) function copies the mi_int8 value from the buffer that int8_ptr references into the user-defined buffer that data_ptr references. Upon completion, mi_put_int8( ) returns the address of the next position to which data can be copied in the data_ptr buffer. The function returns the data_ptr address advanced by nbytes bytes, ready for copying in the next value. In other words, if n is the length of the value that int8_ptr identifies, the returned address is n bytes advanced from the original buffer address in data_ptr.

The mi_put_int8( ) function is useful in a send support function of an opaque data type that contains an mi_int8 value. Use this function to send an mi_int8 field of an opaque-type internal structure to a client application (which possibly has unaligned data buffers).

Return Values

An mi_unsigned_char1 pointer
is the new address in the data_ptr data buffer.
NULL
indicates that the function was not successful.

Related Topics

See also the descriptions of mi_get_int8( ), mi_put_bytes( ), mi_put_date( ), mi_put_datetime( ), mi_put_decimal( ), mi_put_double_precision( ), mi_put_integer( ), mi_put_interval( ), mi_put_lo_handle( ), mi_put_money( ), mi_put_real( ), mi_put_smallint( ), and mi_put_string( ).

For more information on the use of mi_put_int8( ) in a send support function, see the IBM Informix: DataBlade API Programmer's Guide.

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