diff --git a/rostests/winetests/setupapi/devinst.c b/rostests/winetests/setupapi/devinst.c index 828465d2e5d..c31a3ffebe1 100644 --- a/rostests/winetests/setupapi/devinst.c +++ b/rostests/winetests/setupapi/devinst.c @@ -833,6 +833,7 @@ static void testGetDeviceInterfaceDetail(void) "\\\\?\\root#legacy_bogus#0000#{6a55b5a4-3f65-11db-b704-0011955c2bdb}"; static const char path_w2k[] = "\\\\?\\root#legacy_bogus#0000#{6a55b5a4-3f65-11db-b704-0011955c2bdb}\\"; + SP_DEVINFO_DATA devinfo; LPBYTE buf = HeapAlloc(GetProcessHeap(), 0, size); SP_DEVICE_INTERFACE_DETAIL_DATA_A *detail = (SP_DEVICE_INTERFACE_DETAIL_DATA_A *)buf; @@ -860,9 +861,12 @@ static void testGetDeviceInterfaceDetail(void) !lstrcmpiA(path_w2k, detail->DevicePath), "Unexpected path %s\n", detail->DevicePath); /* Check SetupDiGetDeviceInterfaceDetailW */ - ret = pSetupDiGetDeviceInterfaceDetailW(set, &interfaceData, NULL, 0, &size, NULL); + memset(&devinfo, 0, sizeof(devinfo)); + devinfo.cbSize = sizeof(devinfo); + ret = pSetupDiGetDeviceInterfaceDetailW(set, &interfaceData, NULL, 0, &size, &devinfo); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got error code: %d\n", GetLastError()); + ok(devinfo.DevInst, "Expected DevInst to be set\n"); ok(expectedsize == size || (expectedsize + sizeof(WCHAR)) == size /* W2K adds a backslash */, "SetupDiGetDeviceInterfaceDetailW returned wrong reqsize, got %d\n", diff --git a/rostests/winetests/setupapi/misc.c b/rostests/winetests/setupapi/misc.c index 09e0fb8e41f..04b2171ff82 100644 --- a/rostests/winetests/setupapi/misc.c +++ b/rostests/winetests/setupapi/misc.c @@ -29,6 +29,7 @@ #include "winuser.h" #include "winreg.h" #include "setupapi.h" +#include "cfgmgr32.h" #include "wine/test.h" @@ -816,6 +817,14 @@ static void test_SetupLogError(void) SetupCloseLog(); } +static void test_CM_Get_Version(void) +{ + WORD ret; + + ret = CM_Get_Version(); + ok(ret == 0x0400, "got version %#x\n", ret); +} + START_TEST(misc) { HMODULE hsetupapi = GetModuleHandleA("setupapi.dll"); @@ -849,4 +858,5 @@ START_TEST(misc) test_defaultcallback(); test_SetupLogError(); + test_CM_Get_Version(); }