Surprisingly, this returns FALSE / nbytes = 0 / GetLastError = ERROR_INVALID_HANDLE on WinXP if the number of bytes exceeds some maximum and the handle refers to a pipe. Since you don't know what kind of handle you're writing to in write_overlapped, it seems reasonable to do the write in chunks.
Sorry, I made a mistake. The value returned by GetLastError() is 1450 / ERROR_NO_SYSTEM_RESOURCES. -Robert -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple