informix
Informix DataBlade API Programmer's Manual
DataBlade API Function Descriptions

mi_file_write()

The mi_file_write() function writes a specified number of bytes from a buffer to an open operating-system file.

Syntax

Usage

The mi_file_write() function writes nbytes bytes of data to the file that the fd file descriptor identifies. The write begins at the current seek position for fd. You can use the mi_file_tell() function to obtain the current seek position. The function writes this data from the user-allocated buffer that buf references.

This function can access files on the server computer from a C UDR.

Return Values

>=0 is the actual number of bytes that the function has written to the open file.
MI_ERROR indicates that the function was not successful.

The mi_file_write() function does not throw an MI_Exception event when it encounters a runtime error. Therefore, it does not cause callbacks to be invoked.

Related Topics

See the descriptions of the following functions: mi_file_open(), mi_file_read(), mi_file_seek(), and mi_file_tell().


Informix DataBlade API Programmer's Manual, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved