_lwrite function

[This function is provided for compatibility with 16-bit versions of Windows. New applications should use the WriteFile function.]

Writes data to the specified file.

Syntax

UINT _lwrite(
  HFILE hFile,
  LPCCH lpBuffer,
  UINT  uBytes
);

Parameters

hFile

A handle to the file that receives the data. This handle is created by _lcreat.

lpBuffer

The buffer that contains the data to be added.

uBytes

The number of bytes to write to the file.

Return Value

If the function succeeds, the return value is the number of bytes written to the file. Otherwise, the return value is HFILE_ERROR. To get extended error information, use the GetLastError function.

Requirements

   
Target Platform Windows
Header winbase.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

See Also

WriteFile