Thomas Faber : d3dxof: Do not omit mandatory argument to WriteFile.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Jul 14 14:52:31 CDT 2014
Module: wine
Branch: master
Commit: 21b821677394ce760ad4e3065031f2d358961bab
URL: http://source.winehq.org/git/wine.git/?a=commit;h=21b821677394ce760ad4e3065031f2d358961bab
Author: Thomas Faber <thomas.faber at reactos.org>
Date: Sat Jul 12 10:33:21 2014 +0200
d3dxof: Do not omit mandatory argument to WriteFile.
---
dlls/d3dxof/d3dxof.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dxof/d3dxof.c b/dlls/d3dxof/d3dxof.c
index 4172c62..8ca5793 100644
--- a/dlls/d3dxof/d3dxof.c
+++ b/dlls/d3dxof/d3dxof.c
@@ -136,6 +136,7 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV
HRESULT hr;
LPBYTE file_buffer;
DWORD file_size;
+ DWORD bytes_written;
TRACE("(%p/%p)->(%p,%x,%p)\n", This, iface, pvSource, dwLoadOptions, ppEnumObj);
@@ -240,7 +241,7 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV
file = CreateFileA(tmp, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, 0, NULL);
if (file != INVALID_HANDLE_VALUE)
{
- WriteFile(file, file_buffer, file_size, NULL, NULL);
+ WriteFile(file, file_buffer, file_size, &bytes_written, NULL);
CloseHandle(file);
}
}
@@ -304,6 +305,7 @@ static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates(IDirectXFile* iface, LP
parse_buffer buf;
HRESULT hr;
LPBYTE decomp_buffer = NULL;
+ DWORD bytes_written;
ZeroMemory(&buf, sizeof(buf));
buf.buffer = pvData;
@@ -325,7 +327,7 @@ static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates(IDirectXFile* iface, LP
file = CreateFileA(tmp, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, 0, NULL);
if (file != INVALID_HANDLE_VALUE)
{
- WriteFile(file, pvData, cbSize, NULL, NULL);
+ WriteFile(file, pvData, cbSize, &bytes_written, NULL);
CloseHandle(file);
}
}
More information about the wine-cvs
mailing list