The lld_read() function
This function reads from a large object, starting at the current position.
Syntax
API
mi_integer lld_read (io, buffer, bytes, error)
LLD_IO* io,
void* buffer,
mi_integer bytes,
mi_integer* error);
ESQL/C
int lld_read (LLD_IO* io,
void* buffer, int bytes,
int* error);
- io
- A pointer to an LLD_IO structure created with a previous call to the lld_open() function.
- buffer
- A pointer to a buffer into which to read the data. The buffer must be at least as large as the number of bytes specified in the bytes parameter.
- bytes
- The number of bytes to read.
- error
- An output parameter in which the function returns an error code.
Usage
Before calling this function, you must open the large object with a call to lld_open() and set the LLD_RDONLY or LLD_RDWR flag. The lld_read() function begins reading from the current position. By default, when you open a large object, the current position is the beginning of the object. You can call lld_seek() to change the current position.
Return codes
On success, the lld_read() function returns the number of bytes that it has read from the large object.
On
failure, for an API function, it returns MI_ERROR
;
for an ESQL/C function, it returns -1
.