mi_unsigned_char1 *mi_get_lo_handle(data_ptr, LO_hdl)
mi_unsigned_char1 *data_ptr;
MI_LO_HANDLE *LO_hdl;
The mi_get_lo_handle( ) function copies a value from the user-defined buffer that data_ptr references into a new smart large object that LO_hdl references. It is a constructor function for an LO handle. The function allocates a new LO handle in the current memory duration.
Upon completion, mi_get_lo_handle( ) returns the address of the next position from which data can be copied from the data_ptr buffer. The function returns the data_ptr address advanced by n bytes, ready for a subsequent copy. In other words, if n is the length of the LO handle that LO_hdl identifies, the returned address is n bytes advanced from the original buffer address in data_ptr.
The mi_get_lo_handle( ) function is useful in a receive support function of an opaque data type that contains a smart large object. Use this function to receive an LO-handle field of an opaque-type internal structure from a client application (which possibly has unaligned data buffers).
See also the descriptions of mi_get_bytes( ), mi_get_date( ), mi_get_datetime( ), mi_get_decimal( ), mi_get_double_precision( ), mi_get_int8( ), mi_get_integer( ), mi_get_interval( ), mi_get_money( ), mi_get_real( ), mi_get_smallint( ), mi_get_string( ), and mi_put_lo_handle( ).
For more information on the use of mi_get_lo_handle( ) in a receive support function, see the IBM Informix: DataBlade API Programmer's Guide.