Thomas Faber : d3dx9_36: 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: 5bd5c89596f66bb13a0f2ceb4be41dd24b438d83
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5bd5c89596f66bb13a0f2ceb4be41dd24b438d83
Author: Thomas Faber <thomas.faber at reactos.org>
Date: Sat Jul 12 10:32:44 2014 +0200
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);
More information about the wine-cvs
mailing list