Fix yet another invalid use of WriteFile.

This patch has already been submitted to Wine, but as they don't care currently, I applied it manually here and updated "wininet_ros.diff" accordingly.

svn path=/trunk/; revision=33984
This commit is contained in:
Colin Finck 2008-06-15 16:04:03 +00:00
parent 5ffe9e945e
commit 6846255313
2 changed files with 15 additions and 2 deletions

View file

@ -1689,7 +1689,9 @@ static DWORD HTTP_ReadChunked(WININETHTTPREQW *req, void *buffer, DWORD size, DW
if (req->lpszCacheFile)
{
if (!WriteFile(req->hCacheFile, p, bytes_read, NULL, NULL))
DWORD dwBytesWritten;
if (!WriteFile(req->hCacheFile, p, bytes_read, &dwBytesWritten, NULL))
WARN("WriteFile failed: %u\n", GetLastError());
}
p += bytes_read;

View file

@ -1,5 +1,5 @@
--- D:/Wine-CVS/wine/dlls/wininet/http.c Wed May 28 14:33:28 2008
+++ D:/ReactOS-Trunk/reactos/dll/win32/wininet/http.c Sat May 31 11:59:23 2008
+++ D:/ReactOS-Trunk/reactos/dll/win32/wininet/http.c Sun Jun 15 18:16:06 2008
@@ -61,6 +61,8 @@
#include "wine/debug.h"
#include "wine/unicode.h"
@ -20,6 +20,17 @@
if(!res)
WARN("WriteFile failed: %u\n", GetLastError());
}
@@ -1686,7 +1689,9 @@
if (req->lpszCacheFile)
{
- if (!WriteFile(req->hCacheFile, p, bytes_read, NULL, NULL))
+ DWORD dwBytesWritten;
+
+ if (!WriteFile(req->hCacheFile, p, bytes_read, &dwBytesWritten, NULL))
WARN("WriteFile failed: %u\n", GetLastError());
}
p += bytes_read;
--- D:/Wine-CVS/wine/dlls/wininet/internet.c Wed May 28 14:33:28 2008
+++ D:/ReactOS-Trunk/reactos/dll/win32/wininet/internet.c Fri May 30 18:04:29 2008
@@ -3101,19 +3101,22 @@