ret = pSetupDiInstallClassA(NULL, tmpfile, 0, NULL);
ok(ret, "SetupDiInstallClassA failed: %08x\n", GetLastError());
- ok(!RegDeleteKeyW(HKEY_LOCAL_MACHINE, classKey),
+ ok(!RegDeleteKeyW(HKEY_LOCAL_MACHINE, classKey),
"Couldn't delete classkey\n");
DeleteFile(tmpfile);
ret = remove_device();
ok(ret, "Expected a device to be removed\n");
- }
+}
}
else
{
trace("We are most likely on Wine\n");
devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, bogus);
devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, devclass);
- }
+ }
else
{
clean_devclass_key();
- }
+}
}
}
GetLastError());
ok(!lstrcmpiA(path, detail->DevicePath) ||
!lstrcmpiA(path_w2k, detail->DevicePath), "Unexpected path %s\n",
- detail->DevicePath);
+ detail->DevicePath);
/* Check SetupDiGetDeviceInterfaceDetailW */
- ret = pSetupDiGetDeviceInterfaceDetailW(set, &interfaceData, NULL, 0, &size, NULL);
+ ret = pSetupDiGetDeviceInterfaceDetailW(set, &interfaceData, NULL, 0, &size, NULL);
ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER,
"Expected ERROR_INSUFFICIENT_BUFFER, got error code: %d\n", GetLastError());
ok(expectedsize == size ||
trace("We are most likely on Wine\n");
devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, bogus);
devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, devclass);
- }
+ }
else
{
clean_devclass_key();
- }
+}
}
}
if (key != INVALID_HANDLE_VALUE)
{
classKeyCreated = TRUE;
- RegCloseKey(key);
+ RegCloseKey(key);
/* The class key should have been created */
ok(!RegOpenKeyW(HKEY_LOCAL_MACHINE, classKey, &key),
"Expected registry key to exist\n");
RegCloseKey(key);
- SetLastError(0xdeadbeef);
- key = pSetupDiOpenDevRegKey(set, &devInfo, DICS_FLAG_GLOBAL, 0,
- DIREG_DRV, 0);
- todo_wine
- ok(key == INVALID_HANDLE_VALUE &&
+ SetLastError(0xdeadbeef);
+ key = pSetupDiOpenDevRegKey(set, &devInfo, DICS_FLAG_GLOBAL, 0,
+ DIREG_DRV, 0);
+ todo_wine
+ ok(key == INVALID_HANDLE_VALUE &&
(GetLastError() == ERROR_INVALID_DATA ||
GetLastError() == ERROR_ACCESS_DENIED), /* win2k3 */
"Expected ERROR_INVALID_DATA or ERROR_ACCESS_DENIED, got %08x\n", GetLastError());
- key = pSetupDiOpenDevRegKey(set, &devInfo, DICS_FLAG_GLOBAL, 0,
- DIREG_DRV, KEY_READ);
- ok(key != INVALID_HANDLE_VALUE, "SetupDiOpenDevRegKey failed: %08x\n",
- GetLastError());
- pSetupDiDestroyDeviceInfoList(set);
- }
+ key = pSetupDiOpenDevRegKey(set, &devInfo, DICS_FLAG_GLOBAL, 0,
+ DIREG_DRV, KEY_READ);
+ ok(key != INVALID_HANDLE_VALUE, "SetupDiOpenDevRegKey failed: %08x\n",
+ GetLastError());
+ pSetupDiDestroyDeviceInfoList(set);
+ }
else
classKeyCreated = FALSE;
/* Wine doesn't delete the information currently */
trace("We are most likely on Wine\n");
devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, bogus);
- devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, classKey);
- }
+ devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, classKey);
+}
else if (classKeyCreated)
{
/* There should only be a class key entry, so a simple
todo_wine
ok(!lstrcmpiA(path, detail->DevicePath) ||
!lstrcmpiA(path_w2k, detail->DevicePath), "Unexpected path %s\n",
- detail->DevicePath);
+ detail->DevicePath);
HeapFree(GetProcessHeap(), 0, detail);
}
}
trace("We are most likely on Wine\n");
devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, bogus);
devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, devclass);
- }
+}
else
{
clean_devclass_key();
/* Wine doesn't delete the information currently */
trace("We are most likely on Wine\n");
RegDeleteKeyA(HKEY_LOCAL_MACHINE, bogus);
- }
+}
}
static void testDeviceRegistryPropertyW(void)
/* Wine doesn't delete the information currently */
trace("We are most likely on Wine\n");
RegDeleteKeyW(HKEY_LOCAL_MACHINE, bogus);
- }
+}
}
START_TEST(devinst)
{
HDEVINFO set;
- init_function_pointers();
+ init_function_pointers();
/* Win9x/WinMe does things totally different so we skip all the tests
*