Home | Previous Page | Next Page   Function Descriptions >

mi_stream_getpos( )

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
is a pointer to a stream descriptor for an open stream.
seek_pos
is 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
indicates that 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
indicates that the stream descriptor that strm_desc references or the seek_pos value is invalid.
MI_STREAM_ENIMPL
indicates that the stream class does not implement the seek position.
MI_ERROR
indicates that the function was not successful.

Related Topics

See also the descriptions of mi_stream_open_fio( ), mi_stream_open_mi_lvarchar( ), mi_stream_open_str( ), mi_stream_read( ), mi_stream_seek( ), mi_stream_setpos( ), mi_stream_tell( ), and mi_stream_write( ).

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]