Commit 5bd5c895 authored by Thomas Faber's avatar Thomas Faber Committed by Alexandre Julliard

d3dx9_36: Do not omit mandatory argument to WriteFile.

parent 21b82167
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment