On 2014-07-12 17:07, Lauri Kenttä wrote:
I'm sorry if I missed something, but at least MSDN clearly states that this is usually an optional argument.
http://msdn.microsoft.com/en-us/library/windows/desktop/aa365747%28v=vs.85%2...
For example, "lpNumberOfBytesWritten [out, optional]" "Use NULL for this parameter if this is an asynchronous operation to avoid potentially erroneous results." "This parameter can be NULL only when the lpOverlapped parameter is not NULL."
It can only be NULL for asynchronous writes. Notice the last sentence. Invocations with both lpNumberOfBytesWritten = NULL and lpOverlapped = NULL always crash on Windows.