d3dxof: Do not omit mandatory argument to WriteFile.
Thomas Faber
thomas.faber at reactos.org
Sat Jul 12 04:19:44 CDT 2014
From f8f63ed00d93ede4d1612f458b958522436fb954 Mon Sep 17 00:00:00 2001
From: Thomas Faber <thomas.faber at reactos.org>
Date: Sat, 12 Jul 2014 10:33:21 +0200
Subject: 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);
}
}
--
1.9.0.msysgit.0
More information about the wine-patches
mailing list