The mi_stream_open_str() function
The mi_stream_open_str() function opens a new stream on a character string.
Syntax
mi_integer mi_stream_open_str(strm_desc, str_ptr, str_len)
MI_STREAM *strm_desc;
char *str_ptr;
mi_integer str_len;
- strm_desc
- A pointer to a stream descriptor.
- str_ptr
- A pointer to a character string.
- str_len
- The length of the character string that str_ptr references.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
No | Yes |
Usage
The mi_stream_open_str() function
initializes and opens a data stream on the character string that str_ptr references.
This function returns a stream descriptor that identifies the string
stream. This function is a constructor function for a stream descriptor.
It allocates the new stream descriptor in the current memory duration.
Tip: The stream operates on a copy of the passed string, so
changes to the string are not reflected in the stream, and changes
to the stream are not reflected in the string.
Return values
- An MI_STREAM pointer
- A pointer to the newly opened stream on the specified string data.
- NULL
- The function was not successful.