Return an error if lpOverlapped is provided to ReadFile / WriteFile.
diff --git a/files/file.c b/files/file.c
index bcd6071..2c373d2 100644
--- a/files/file.c
+++ b/files/file.c
@@ -1135,6 +1135,11 @@
if (bytesRead) *bytesRead = 0; /* Do this before anything else */
if (!bytesToRead) return TRUE;
+ if ( overlapped ) {
+ SetLastError ( ERROR_INVALID_PARAMETER );
+ return FALSE;
+ }
+
req->handle = hFile;
server_call_fd( REQ_GET_READ_FD, -1, &unix_handle );
if (unix_handle == -1) return FALSE;
@@ -1166,6 +1171,11 @@
if (bytesWritten) *bytesWritten = 0; /* Do this before anything else */
if (!bytesToWrite) return TRUE;
+ if ( overlapped ) {
+ SetLastError ( ERROR_INVALID_PARAMETER );
+ return FALSE;
+ }
+
req->handle = hFile;
server_call_fd( REQ_GET_WRITE_FD, -1, &unix_handle );
if (unix_handle == -1) return FALSE;