The mi_stream_getpos() function
The mi_stream_getpos() function returns the current seek position of an open stream.
Syntax
mi_integer mi_stream_getpos(strm_desc, seek_pos)
MI_STREAM *strm_desc;
mi_int8 *seek_pos;
- strm_desc
- A pointer to a stream descriptor for an open stream.
- seek_pos
- 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_getpos() function obtains the current seek position of the stream that strm_desc references. The stream seek position is the offset for the next read or write operation on the stream. The mi_stream_getpos() function returns this seek position in the mi_int8 variable that seek_pos references.
Return values
- MI_OK
- The seek_pos variable contains the current stream seek position, measured in the number of bytes from the beginning of the stream.
- MI_STREAM_EBADARG
- The stream descriptor that strm_desc references or the seek_pos value is invalid.
- MI_STREAM_ENIMPL
- The stream class does not implement the seek position.
- MI_ERROR
- The function was not successful.