Commit f6c4388e authored by Peter Ganten's avatar Peter Ganten Committed by Alexandre Julliard

Return an error if lpOverlapped is provided to ReadFile / WriteFile.

parent 4249a91b
...@@ -1135,6 +1135,11 @@ BOOL WINAPI ReadFile( HANDLE hFile, LPVOID buffer, DWORD bytesToRead, ...@@ -1135,6 +1135,11 @@ BOOL WINAPI ReadFile( HANDLE hFile, LPVOID buffer, DWORD bytesToRead,
if (bytesRead) *bytesRead = 0; /* Do this before anything else */ if (bytesRead) *bytesRead = 0; /* Do this before anything else */
if (!bytesToRead) return TRUE; if (!bytesToRead) return TRUE;
if ( overlapped ) {
SetLastError ( ERROR_INVALID_PARAMETER );
return FALSE;
}
req->handle = hFile; req->handle = hFile;
server_call_fd( REQ_GET_READ_FD, -1, &unix_handle ); server_call_fd( REQ_GET_READ_FD, -1, &unix_handle );
if (unix_handle == -1) return FALSE; if (unix_handle == -1) return FALSE;
...@@ -1166,6 +1171,11 @@ BOOL WINAPI WriteFile( HANDLE hFile, LPCVOID buffer, DWORD bytesToWrite, ...@@ -1166,6 +1171,11 @@ BOOL WINAPI WriteFile( HANDLE hFile, LPCVOID buffer, DWORD bytesToWrite,
if (bytesWritten) *bytesWritten = 0; /* Do this before anything else */ if (bytesWritten) *bytesWritten = 0; /* Do this before anything else */
if (!bytesToWrite) return TRUE; if (!bytesToWrite) return TRUE;
if ( overlapped ) {
SetLastError ( ERROR_INVALID_PARAMETER );
return FALSE;
}
req->handle = hFile; req->handle = hFile;
server_call_fd( REQ_GET_WRITE_FD, -1, &unix_handle ); server_call_fd( REQ_GET_WRITE_FD, -1, &unix_handle );
if (unix_handle == -1) return FALSE; if (unix_handle == -1) return FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment