From a3a4751a763846ee9beb72c21059ffbf10ec3482 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Wed, 22 May 2019 11:15:42 -0500 Subject: [PATCH] setupapi: Implement device-specific co-installers in SetupDiCallClassInstaller(). Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- dlls/setupapi/devinst.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index 6ef5df32881..07288e52656 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -3581,6 +3581,7 @@ BOOL WINAPI SetupDiCallClassInstaller(DI_FUNCTION function, HDEVINFO devinfo, SP '\\','C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t', '\\','C','o','n','t','r','o','l', '\\','C','o','D','e','v','i','c','e','I','n','s','t','a','l','l','e','r','s',0}; + static const WCHAR coinstallers32W[] = {'C','o','I','n','s','t','a','l','l','e','r','s','3','2',0}; static const WCHAR installer32W[] = {'I','n','s','t','a','l','l','e','r','3','2',0}; DWORD (CALLBACK *classinst_proc)(DI_FUNCTION, HDEVINFO, SP_DEVINFO_DATA *); DWORD ret = ERROR_DI_DO_DEFAULT; @@ -3614,6 +3615,18 @@ BOOL WINAPI SetupDiCallClassInstaller(DI_FUNCTION function, HDEVINFO devinfo, SP if (!coret) return FALSE; + if (!open_driver_key(device, KEY_READ, &coinst_key)) + { + if (!RegGetValueW(coinst_key, NULL, coinstallers32W, RRF_RT_REG_MULTI_SZ, NULL, NULL, &size)) + { + path = heap_alloc(size); + if (!RegGetValueW(coinst_key, NULL, coinstallers32W, RRF_RT_REG_MULTI_SZ, NULL, path, &size)) + coret = call_coinstallers(path, function, devinfo, device_data); + heap_free(path); + } + RegCloseKey(coinst_key); + } + if ((class_key = SetupDiOpenClassRegKey(&device->class, KEY_READ)) != INVALID_HANDLE_VALUE) { if (!RegGetValueW(class_key, NULL, installer32W, RRF_RT_REG_SZ, NULL, NULL, &size))