write

LabWindows™/CVI™ 2013 Help

Edition Date: August 2013

Part Number: 370051Y-01

»View Product Info
Download Help (Windows Only)

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 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: ansi_c.h

LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later

WAS THIS ARTICLE HELPFUL?

Not Helpful