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

setupapi: Set SPDRP_CONFIGFLAGS in SetupDiInstallDevice().

parent 3a254079
......@@ -1820,12 +1820,9 @@ static void test_pnp_driver(struct testsign_context *ctx)
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);
}
ok(ret, "got error %#lx\n", GetLastError());
ok(!dword, "got flags %#lx\n", dword);
ok(type == REG_DWORD, "got type %lu\n", type);
/* Tests. */
......
......@@ -5163,6 +5163,7 @@ BOOL WINAPI SetupDiInstallDevice(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data)
static const WCHAR addserviceW[] = {'A','d','d','S','e','r','v','i','c','e',0};
static const WCHAR rootW[] = {'r','o','o','t','\\',0};
WCHAR section_ext[LINE_LEN], subsection[LINE_LEN], inf_path[MAX_PATH], *extptr, *filepart;
static const DWORD config_flags = 0;
UINT install_flags = SPINST_ALL;
HKEY driver_key, device_key;
SC_HANDLE manager, service;
......@@ -5210,6 +5211,10 @@ BOOL WINAPI SetupDiInstallDevice(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data)
return FALSE;
}
if (!SETUPDI_SetDeviceRegistryPropertyW(device, SPDRP_CONFIGFLAGS,
(BYTE *)&config_flags, sizeof(config_flags)))
ERR("Failed to set config flags, error %#lx.\n", GetLastError());
if (device->params.Flags & DI_NOFILECOPY)
install_flags &= ~SPINST_FILES;
......
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