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

This commit is contained in:
Peter Ganten 1999-12-11 23:08:00 +00:00 committed by Alexandre Julliard
parent 4249a91b0a
commit f6c4388e61
1 changed files with 10 additions and 0 deletions

View File

@ -1135,6 +1135,11 @@ BOOL WINAPI ReadFile( HANDLE hFile, LPVOID buffer, DWORD bytesToRead,
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 @@ BOOL WINAPI WriteFile( HANDLE hFile, LPCVOID buffer, DWORD bytesToWrite,
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;