d3dx9_36: Do not omit mandatory argument to WriteFile.

Thomas Faber thomas.faber at reactos.org
Sat Jul 12 04:19:40 CDT 2014


From 92547d22cffcbaeab83eaf1d9250fdc7c2365e23 Mon Sep 17 00:00:00 2001
From: Thomas Faber <thomas.faber at reactos.org>
Date: Sat, 12 Jul 2014 10:32:44 +0200
Subject: d3dx9_36: Do not omit mandatory argument to WriteFile.

---
 dlls/d3dx9_36/util.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/d3dx9_36/util.c b/dlls/d3dx9_36/util.c
index 3b3f308..94899cf 100644
--- a/dlls/d3dx9_36/util.c
+++ b/dlls/d3dx9_36/util.c
@@ -181,6 +181,7 @@ HRESULT write_buffer_to_file(const WCHAR *dst_filename, ID3DXBuffer *buffer)
     HRESULT hr = S_OK;
     void *buffer_pointer;
     DWORD buffer_size;
+    DWORD bytes_written;
     HANDLE file = CreateFileW(dst_filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
     if (file == INVALID_HANDLE_VALUE)
         return HRESULT_FROM_WIN32(GetLastError());
@@ -188,7 +189,7 @@ HRESULT write_buffer_to_file(const WCHAR *dst_filename, ID3DXBuffer *buffer)
     buffer_pointer = ID3DXBuffer_GetBufferPointer(buffer);
     buffer_size = ID3DXBuffer_GetBufferSize(buffer);
 
-    if (!WriteFile(file, buffer_pointer, buffer_size, NULL, NULL))
+    if (!WriteFile(file, buffer_pointer, buffer_size, &bytes_written, NULL))
         hr = HRESULT_FROM_WIN32(GetLastError());
 
     CloseHandle(file);
-- 
1.9.0.msysgit.0



More information about the wine-patches mailing list