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) ...@@ -1820,12 +1820,9 @@ static void test_pnp_driver(struct testsign_context *ctx)
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);
}
/* Tests. */ /* Tests. */
......
...@@ -5163,6 +5163,7 @@ BOOL WINAPI SetupDiInstallDevice(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data) ...@@ -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 addserviceW[] = {'A','d','d','S','e','r','v','i','c','e',0};
static const WCHAR rootW[] = {'r','o','o','t','\\',0}; static const WCHAR rootW[] = {'r','o','o','t','\\',0};
WCHAR section_ext[LINE_LEN], subsection[LINE_LEN], inf_path[MAX_PATH], *extptr, *filepart; 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; UINT install_flags = SPINST_ALL;
HKEY driver_key, device_key; HKEY driver_key, device_key;
SC_HANDLE manager, service; SC_HANDLE manager, service;
...@@ -5210,6 +5211,10 @@ BOOL WINAPI SetupDiInstallDevice(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data) ...@@ -5210,6 +5211,10 @@ BOOL WINAPI SetupDiInstallDevice(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data)
return FALSE; 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) if (device->params.Flags & DI_NOFILECOPY)
install_flags &= ~SPINST_FILES; 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