Commit babb1019 authored by Jeff Smith's avatar Jeff Smith Committed by Alexandre Julliard

setupapi: Clear error on SetupDiDestroyDeviceInfoList success.

parent f9028142
......@@ -2854,6 +2854,7 @@ BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO devinfo)
}
heap_free(set);
SetLastError(ERROR_SUCCESS);
return TRUE;
}
......
......@@ -2711,7 +2711,7 @@ static void test_class_installer(void)
SetLastError(0xdeadbeef);
ret = SetupDiDestroyDeviceInfoList(set);
ok(ret, "Failed to destroy device list.\n");
todo_wine ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError());
ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError());
ok(*coinst_callback_count == 1, "Got %d callbacks.\n", *coinst_callback_count);
ok(*coinst_last_message == DIF_DESTROYPRIVATEDATA, "Got unexpected message %#x.\n", *coinst_last_message);
......@@ -2746,7 +2746,7 @@ static void test_class_installer(void)
SetLastError(0xdeadbeef);
ret = SetupDiDestroyDeviceInfoList(set);
ok(ret, "Failed to destroy device list.\n");
todo_wine ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError());
ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError());
/* Test returning ERROR_DI_DO_DEFAULT. */
......@@ -2775,7 +2775,7 @@ static void test_class_installer(void)
SetLastError(0xdeadbeef);
ret = SetupDiDestroyDeviceInfoList(set);
ok(ret, "Failed to destroy device list.\n");
todo_wine ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError());
ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError());
/* The default entry point is ClassInstall(). */
......@@ -2798,7 +2798,7 @@ static void test_class_installer(void)
SetLastError(0xdeadbeef);
ret = SetupDiDestroyDeviceInfoList(set);
ok(ret, "Failed to destroy device list.\n");
todo_wine ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError());
ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError());
ok(*coinst_callback_count == 1, "Got %d callbacks.\n", *coinst_callback_count);
ok(*coinst_last_message == DIF_DESTROYPRIVATEDATA, "Got unexpected message %#x.\n", *coinst_last_message);
......@@ -2869,7 +2869,7 @@ static void test_class_coinstaller(void)
SetLastError(0xdeadbeef);
ret = SetupDiDestroyDeviceInfoList(set);
ok(ret, "Failed to destroy device list.\n");
todo_wine ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError());
ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError());
todo_wine ok(*coinst_callback_count == 1, "Got %d callbacks.\n", *coinst_callback_count);
todo_wine ok(*coinst_last_message == DIF_DESTROYPRIVATEDATA, "Got unexpected message %#x.\n", *coinst_last_message);
......@@ -2901,7 +2901,7 @@ static void test_class_coinstaller(void)
SetLastError(0xdeadbeef);
ret = SetupDiDestroyDeviceInfoList(set);
ok(ret, "Failed to destroy device list.\n");
todo_wine ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError());
ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError());
/* The default entry point is CoDeviceInstall(). */
......@@ -2927,7 +2927,7 @@ static void test_class_coinstaller(void)
SetLastError(0xdeadbeef);
ret = SetupDiDestroyDeviceInfoList(set);
ok(ret, "Failed to destroy device list.\n");
todo_wine ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError());
ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError());
ok(*coinst_callback_count == 1, "Got %d callbacks.\n", *coinst_callback_count);
ok(*coinst_last_message == DIF_DESTROYPRIVATEDATA, "Got unexpected message %#x.\n", *coinst_last_message);
......@@ -2978,7 +2978,7 @@ static void test_call_class_installer(void)
SetLastError(0xdeadbeef);
ret = SetupDiDestroyDeviceInfoList(set);
ok(ret, "Failed to destroy device list.\n");
todo_wine ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError());
ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError());
load_resource("coinst.dll", "C:\\windows\\system32\\winetest_coinst.dll");
......
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