setupapi: SetLastError to ERROR_SUCCESS on success.

This commit is contained in:
James Hawkins 2007-03-28 01:57:33 -05:00 committed by Alexandre Julliard
parent 672952d2b6
commit 405b96e979
2 changed files with 3 additions and 4 deletions

View File

@ -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;
}

View File

@ -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)