The mi_stream_length() function

The mi_stream_length() function obtains the length of an open stream.

Syntax

mi_integer mi_stream_length(strm_desc, len)
   MI_STREAM *strm_desc;
   mi_int8 *len;
strm_desc
A pointer to a stream descriptor for an open stream.
len
A pointer to an eight-byte integer (mi_int8).
Valid in client LIBMI application? Valid in user-defined routine?
No Yes

Usage

The mi_stream_length() function gets the length the data in the stream that strm_desc references. The function returns the length of the stream data in the len parameter.

Return values

MI_OK
The function was successful.
MI_STREAM_EBADARG
The stream descriptor that strm_desc references is invalid or that the specified length is less than zero.
MI_STREAM_ENIMPL
The stream class does not implement the stream-length function.
MI_ERROR
The function was not successful.
MI_STREAM_EFAIL
The function was not successful for a file stream.