Commit 405b96e9 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

setupapi: SetLastError to ERROR_SUCCESS on success.

parent 672952d2
......@@ -921,6 +921,7 @@ done:
MyFree( destW );
HeapFree( GetProcessHeap(), 0, sourceW );
HeapFree( GetProcessHeap(), 0, locationW );
if (ret) SetLastError(ERROR_SUCCESS);
return ret;
}
......@@ -980,6 +981,7 @@ BOOL WINAPI SetupCopyOEMInfW( PCWSTR source, PCWSTR location,
if (component) *component = p + 1;
if (required_size) *required_size = size;
if (ret) SetLastError(ERROR_SUCCESS);
return ret;
}
......
......@@ -243,11 +243,8 @@ static void test_SetupCopyOEMInf(void)
SetLastError(0xdeadbeef);
res = SetupCopyOEMInf(path, NULL, SPOST_NONE, SP_COPY_DELETESOURCE, NULL, 0, NULL, NULL);
ok(res == TRUE, "Expected TRUE, got %d\n", res);
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
ok(!file_exists(path), "Expected source inf to not exist\n");
todo_wine
{
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
}
}
START_TEST(misc)
......
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