The mi_streamread_boolean() function
The mi_streamread_boolean() function reads an mi_boolean (BOOLEAN) value from a stream, converting any difference in the stream representation to that of the internal representation.
Syntax
mi_integer mi_streamread_boolean(strm_desc, bool_ptr)
MI_STREAM *strm_desc;
mi_boolean *bool_ptr;
- strm_desc
- A pointer to the stream descriptor for the open stream from which to read the mi_boolean value.
- bool_ptr
- A pointer to the buffer into which to copy the mi_boolean value.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
No | Yes |
Usage
The mi_streamread_boolean() function reads an mi_boolean value from the stream that strm_desc references. The function reads this value into the mi_boolean buffer that bool_ptr references. The read operation begins at the current stream seek position. You can use mi_stream_tell() or mi_stream_getpos() to obtain this seek position.
The mi_streamread_boolean() function is useful in a streamread() support function of an opaque data type that contains an mi_boolean value.
For more information about the use of mi_streamread_boolean() in a streamread() support function, see the Informix® DataBlade® API Programmer's Guide.
Return values
- >=0
- The number of bytes that the function has read from the open stream to the value that bool_ptr references.
- MI_STREAM_EEOF
- The end of the stream has been reached without any errors.
- MI_STREAM_EBADARG
- The stream descriptor that strm_desc references or the value that bool_ptr references is invalid.
- MI_ERROR
- The function was not successful.