WriteFile lpNumberOfBytesWritten less than nNumberOfBytesToWrite

When called, WriteFilecan the returned one lpNumberOfBytesWrittenbe smaller nNumberOfBytesToWritein synchronous recording mode, where the error was not executed (return is TRUE)? Writing is done to a file (not a socket, pipe, or other special descriptor). lpOverlappednot used.

This is not entirely clear from the docs .

+5
source share
1 answer

The documentation states:

The WriteFile function returns when one of the following conditions occurs:

  • The number of bytes requested is recorded.
  • ( ). . "".
  • , .
  • .

, , . *lpNumberOfBytesWritten nNumberOfBytesToWrite, , , .

+5

All Articles