Commit db412878 authored by David Adam's avatar David Adam Committed by Alexandre Julliard

d3dx9_36: Fix tests to make them pass in Windows.

parent 1d5cb9d2
......@@ -62,15 +62,20 @@ static const unsigned char noimage[4] = {
static HRESULT create_file(const char *filename, const unsigned char *data, const unsigned int size)
{
DWORD received;
HANDLE hfile;
hfile = CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);
hfile = CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
if(hfile == INVALID_HANDLE_VALUE) return HRESULT_FROM_WIN32(GetLastError());
WriteFile(hfile, data, size, NULL, NULL);
CloseHandle(hfile);
if(WriteFile(hfile, data, size, &received, NULL))
{
CloseHandle(hfile);
return D3D_OK;
}
return D3D_OK;
CloseHandle(hfile);
return D3DERR_INVALIDCALL;
}
static void test_D3DXGetImageInfo()
......
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