ntoskrnl/tests: Test retrieving SPDRP_CONFIGFLAGS.
This commit is contained in:
parent
34031227ca
commit
3a254079b9
1 changed files with 24 additions and 0 deletions
|
@ -1631,6 +1631,15 @@ static void test_pnp_devices(void)
|
|||
if (ret)
|
||||
ok(GetLastError() == ERROR_INVALID_DATA, "got error %#lx\n", GetLastError());
|
||||
|
||||
ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_CONFIGFLAGS,
|
||||
&type, (BYTE *)&dword, sizeof(dword), NULL);
|
||||
todo_wine ok(ret, "got error %#lx\n", GetLastError());
|
||||
if (ret)
|
||||
{
|
||||
ok(!dword, "got flags %#lx\n", dword);
|
||||
ok(type == REG_DWORD, "got type %lu\n", type);
|
||||
}
|
||||
|
||||
ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_DEVTYPE,
|
||||
&type, (BYTE *)&dword, sizeof(dword), NULL);
|
||||
ok(!ret, "expected failure\n");
|
||||
|
@ -1740,6 +1749,7 @@ static void test_pnp_driver(struct testsign_context *ctx)
|
|||
SC_HANDLE manager, service;
|
||||
BOOL ret, need_reboot;
|
||||
HANDLE catalog, file;
|
||||
DWORD dword, type;
|
||||
unsigned int i;
|
||||
HDEVINFO set;
|
||||
FILE *f;
|
||||
|
@ -1798,11 +1808,25 @@ static void test_pnp_driver(struct testsign_context *ctx)
|
|||
ret = SetupDiCallClassInstaller(DIF_REGISTERDEVICE, set, &device);
|
||||
ok(ret, "failed to register device, error %#lx\n", GetLastError());
|
||||
|
||||
ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_CONFIGFLAGS,
|
||||
&type, (BYTE *)&dword, sizeof(dword), NULL);
|
||||
ok(!ret, "expected failure\n");
|
||||
ok(GetLastError() == ERROR_INVALID_DATA, "got error %#lx\n", GetLastError());
|
||||
|
||||
GetFullPathNameA("winetest.inf", sizeof(path), path, NULL);
|
||||
ret = UpdateDriverForPlugAndPlayDevicesA(NULL, hardware_id, path, INSTALLFLAG_FORCE, &need_reboot);
|
||||
ok(ret, "failed to install device, error %#lx\n", GetLastError());
|
||||
ok(!need_reboot, "expected no reboot necessary\n");
|
||||
|
||||
ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_CONFIGFLAGS,
|
||||
&type, (BYTE *)&dword, sizeof(dword), NULL);
|
||||
todo_wine ok(ret, "got error %#lx\n", GetLastError());
|
||||
if (ret)
|
||||
{
|
||||
ok(!dword, "got flags %#lx\n", dword);
|
||||
ok(type == REG_DWORD, "got type %lu\n", type);
|
||||
}
|
||||
|
||||
/* Tests. */
|
||||
|
||||
test_pnp_devices();
|
||||
|
|
Loading…
Add table
Reference in a new issue