Commit d930a0cc authored by Claire Girka's avatar Claire Girka Committed by Alexandre Julliard

ntoskrnl/tests: Add test for getting SPDRP_BASE_CONTAINERID from PnP driver.

parent f7f109d9
......@@ -228,7 +228,10 @@ static NTSTATUS query_id(struct device *device, IRP *irp, BUS_QUERY_ID_TYPE type
}
case BusQueryContainerID:
return STATUS_NOT_SUPPORTED;
if (!(id = ExAllocatePool(PagedPool, 39 * sizeof(WCHAR))))
return STATUS_NO_MEMORY;
wcscpy(id, L"{12345678-1234-1234-1234-123456789123}");
break;
default:
ok(0, "Unexpected ID query type %#x.\n", type);
......
......@@ -1462,6 +1462,7 @@ static void test_pnp_devices(void)
static const char expect_compat_id[] = "winetest_compat\0winetest_compat_1\0";
char buffer[200];
WCHAR buffer_w[200];
SP_DEVICE_INTERFACE_DETAIL_DATA_A *iface_detail = (void *)buffer;
SP_DEVICE_INTERFACE_DATA iface = {sizeof(iface)};
SP_DEVINFO_DATA device = {sizeof(device)};
......@@ -1646,6 +1647,11 @@ static void test_pnp_devices(void)
ok(size == sizeof(expect_hardware_id), "got size %lu\n", size);
ok(!memcmp(buffer, expect_hardware_id, size), "got hardware IDs %s\n", debugstr_an(buffer, size));
/* Using the WCHAR variant because Windows returns a WCHAR for this property even when using SetupDiGetDeviceRegistryPropertyA */
ret = SetupDiGetDeviceRegistryPropertyW(set, &device, SPDRP_BASE_CONTAINERID,
&type, (BYTE *)buffer_w, sizeof(buffer_w), &size);
todo_wine ok(ret, "got error %#lx\n", GetLastError());
ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_COMPATIBLEIDS,
&type, (BYTE *)buffer, sizeof(buffer), &size);
ok(ret, "got error %#lx\n", GetLastError());
......
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