write
int write (int fileHandle, const void *buffer, unsigned int numberOfBytes);
Purpose
A data block stored in the specified buffer is written to the specified file handle. The function returns the number of bytes successfully written. The file position indicator is advanced by the number of characters successfully written.
![]() |
Note This function is not in the ANSI standard. To use this function, you must include lowlvlio.h in your program or interactive window. |
Parameters
Input | ||
Name | Type | Description |
fileHandle | int | Specifies the file handle to which data is written. |
buffer | const void * | Contains a pointer to the data block written to the specified file handle. |
numberOfBytes | unsigned int | Specifies the number of bytes to be written. If a write error is encountered, the number of bytes actually written can be less than the number specified in this parameter. |
Return Value
Name | Type | Description |
bytesWritten | int | Contains the number of bytes successfully written. If a write error is encountered, the returned value can be less than that specified in the number_ofBytes parameter. If an error occurs, write sets errno to a nonzero value. |
Additional Information
Library: ANSI C Library
Include file: lowlvlio.h
LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later