The ifx_lo_to_buffer() function

The ifx_lo_to_buffer() function copies a specified number of bytes from a smart large object into a user-defined buffer.

Syntax

mint ifx_lo_to_buffer(LO_ptr, size, buf_ptr)
   ifx_lo_t *LO_ptr;

   mint size;
   char **buf_ptr;

   mint error;
LO_ptr
The LO-pointer structure for the smart large object from which you want to copy the data.
size
A mint that identifies the number of bytes to copy from the smart large object
buf_ptr
A doubly indirect pointer to a user-defined buffer to which you want to copy the data.
error
Contains the address of the mint that holds the error code that ifx_lo_to_buffer() sets

Usage

The ifx_lo_to_buffer() function copies bytes, up to the size that the size argument specifies from the smart large object that the LO_ptr argument identifies. The read operation from the smart large object starts at a zero-byte offset. If the smart large object is smaller than the size value, ifx_lo_to_buffer()copies only the number of bytes in the smart large object. If the smart large object contains more than size bytes, the ifx_lo_to_buffer() function only copies up to size bytes into the user-defined buffer.

When buf_ptr is NULL, ifx_lo_to_buffer() allocates the memory for the user-defined buffer. Otherwise, the function assumes that you have allocated memory that buf_ptr identifies.

Return codes

0
The number of bytes copied from the smart large object to the user-defined buffer that buf_ptr identifies.
-1
The function was not successful.