Home | Previous Page | Next Page   Function Descriptions >

mi_streamwrite_string( )

The mi_streamwrite_string( ) function writes an mi_string (CHAR(x)) value to a stream.

Syntax

mi_integer mi_streamwrite_string(stream, str_data, fparam_ptr)
   MI_STREAM *stream;
   mi_string *str_data;
   MI_FPARAM *fparam_ptr;
stream
is a pointer to the stream descriptor for the open stream to which to write the character string.
str_data
is a pointer to a buffer that contains the character string.
fparam_ptr
is a pointer to the MI_FPARAM structure for the user-defined routine that calls mi_streamwrite_string( ).
Valid in Client LIBMI Application? Valid in User-Defined Routine?
No Yes

Usage

The mi_streamwrite_string( ) function writes an mi_string value to the stream that stream references. The function writes the value that str_data references. The write 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_streamwrite_string( ) function is useful in a streamwrite( ) support function of an opaque data type that contains an mi_string value.

Global Language Support

If code-set conversion is required, the mi_streamwrite_string( ) function converts the mi_string value from the code set of the client locale to that of the server-processing locale. For more information about code-set conversion, see the IBM Informix: GLS User's Guide.

End of Global Language Support

Return Values

>=0
is the actual number of bytes that the function has written to the open stream.
MI_STREAM_EEOF
indicates that the end of the stream has been reached.
MI_STREAM_EBADARG
indicates that the stream descriptor that stream references or the value that str_data references is invalid.
MI_ERROR
indicates that the function was not successful.

Related Topics

See also the descriptions of mi_stream_getpos( ), mi_stream_read( ), mi_stream_tell( ), and mi_streamread_string( ).

For more information on the use of mi_streamwrite_string( ) in a streamwrite( ) support function, see the IBM Informix: DataBlade API Programmer's Guide.

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