Return an error if lpOverlapped is provided to ReadFile / WriteFile.
This commit is contained in:
parent
4249a91b0a
commit
f6c4388e61
10
files/file.c
10
files/file.c
@ -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,
|
|||||||
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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user