_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


LONG _lwrite(
   HFile  hFile,
   LPCSTR lpBuffer,
   UINT   cbWrite
);

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.

cbWrite

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

Header

Winbase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

WriteFile

 

 

Show: