The mi_stream_setpos() function
The mi_stream_setpos() function sets the stream seek position for the next read or write operation on an open stream.
Syntax
mi_integer mi_stream_setpos(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 the seek position of the stream that the strm_desc stream descriptor references.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
No | Yes |
Important: Enterprise Replication does
not support this function.
Usage
The mi_stream_setpos() function uses the seek_pos argument to determine the new seek position of the stream that strm_desc references. This stream seek position is the offset for the next read or write operation on the stream.
Return values
- MI_OK
- The new stream seek position has been set to seek_pos.
- MI_STREAM_EBADARG
- The stream descriptor that strm_desc references or the seek_pos value is invalid, or that the specified seek position is past the end of the data.
- MI_STREAM_ENIMPL
- The stream class does not implement the seek position.
- MI_ERROR
- The function was not successful.