From 2b27d9baed8cd767ca12c71b7b044fd47b066527 Mon Sep 17 00:00:00 2001 From: Paul Vriens Date: Mon, 26 May 2008 12:13:07 +0200 Subject: [PATCH] setupapi/tests: Skip tests on win9x. --- dlls/setupapi/tests/devinst.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c index 4b8dd5af8c3..986d1aef50c 100644 --- a/dlls/setupapi/tests/devinst.c +++ b/dlls/setupapi/tests/devinst.c @@ -727,6 +727,7 @@ static void testDevRegKey(void) '0','0','1','1','9','5','5','c','2','b','d','b','}',0}; BOOL ret; HDEVINFO set; + HKEY key = NULL; if (!pSetupDiCreateDeviceInfoList || !pSetupDiDestroyDeviceInfoList || !pSetupDiCreateDeviceInfoA || !pSetupDiOpenDevRegKey || @@ -736,12 +737,25 @@ static void testDevRegKey(void) skip("No SetupDiOpenDevRegKey\n"); return; } + + /* Check if we are on win9x */ + SetLastError(0xdeadbeef); + key = pSetupDiCreateDevRegKeyW(NULL, NULL, 0, 0, 0, NULL, NULL); + if (key == INVALID_HANDLE_VALUE && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + skip("We are on win9x where the tests introduce issues\n"); + return; + } + ok(key == INVALID_HANDLE_VALUE, + "Expected INVALID_HANDLE_VALUE, got %p\n", key); + ok(GetLastError() == ERROR_INVALID_HANDLE, + "Expected ERROR_INVALID_HANDLE, got %08x\n", GetLastError()); + set = pSetupDiCreateDeviceInfoList(&guid, NULL); ok(set != NULL, "SetupDiCreateDeviceInfoList failed: %d\n", GetLastError()); if (set) { SP_DEVINFO_DATA devInfo = { sizeof(devInfo), { 0 } }; - HKEY key = INVALID_HANDLE_VALUE; ret = pSetupDiCreateDeviceInfoA(set, "ROOT\\LEGACY_BOGUS\\0000", &guid, NULL, NULL, 0, &devInfo);