Commit f801ac97 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ntoskrnl: Set SPDRP_CONFIGFLAGS in install_device_driver().

parent b682102d
...@@ -256,6 +256,7 @@ static BOOL install_device_driver( DEVICE_OBJECT *device, HDEVINFO set, SP_DEVIN ...@@ -256,6 +256,7 @@ static BOOL install_device_driver( DEVICE_OBJECT *device, HDEVINFO set, SP_DEVIN
DIF_INSTALLDEVICE, DIF_INSTALLDEVICE,
DIF_NEWDEVICEWIZARD_FINISHINSTALL, DIF_NEWDEVICEWIZARD_FINISHINSTALL,
}; };
static const DWORD config_flags = 0;
NTSTATUS status; NTSTATUS status;
unsigned int i; unsigned int i;
...@@ -281,6 +282,14 @@ static BOOL install_device_driver( DEVICE_OBJECT *device, HDEVINFO set, SP_DEVIN ...@@ -281,6 +282,14 @@ static BOOL install_device_driver( DEVICE_OBJECT *device, HDEVINFO set, SP_DEVIN
sizeof_multiszW( ids ) * sizeof(WCHAR) ); sizeof_multiszW( ids ) * sizeof(WCHAR) );
ExFreePool( ids ); ExFreePool( ids );
/* Set the config flags. setupapi won't do this for us if we couldn't find
* a driver to install, but raw devices should still have this key
* populated. */
if (!SetupDiSetDeviceRegistryPropertyW( set, sp_device, SPDRP_CONFIGFLAGS,
(BYTE *)&config_flags, sizeof(config_flags) ))
ERR("Failed to set config flags, error %#lx.\n", GetLastError());
if (!SetupDiBuildDriverInfoList( set, sp_device, SPDIT_COMPATDRIVER )) if (!SetupDiBuildDriverInfoList( set, sp_device, SPDIT_COMPATDRIVER ))
{ {
ERR("Failed to build compatible driver list, error %#lx.\n", GetLastError()); ERR("Failed to build compatible driver list, error %#lx.\n", GetLastError());
......
...@@ -1633,12 +1633,9 @@ static void test_pnp_devices(void) ...@@ -1633,12 +1633,9 @@ static void test_pnp_devices(void)
ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_CONFIGFLAGS, ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_CONFIGFLAGS,
&type, (BYTE *)&dword, sizeof(dword), NULL); &type, (BYTE *)&dword, sizeof(dword), NULL);
todo_wine ok(ret, "got error %#lx\n", GetLastError()); 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);
ok(!dword, "got flags %#lx\n", dword);
ok(type == REG_DWORD, "got type %lu\n", type);
}
ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_DEVTYPE, ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_DEVTYPE,
&type, (BYTE *)&dword, sizeof(dword), NULL); &type, (BYTE *)&dword, sizeof(dword), NULL);
......
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