setupapi: Set SPDRP_CONFIGFLAGS in SetupDiInstallDevice().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53387
This commit is contained in:
parent
3a254079b9
commit
b682102db4
2 changed files with 8 additions and 6 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue