Module: wine Branch: master Commit: a3a4751a763846ee9beb72c21059ffbf10ec3482 URL: https://source.winehq.org/git/wine.git/?a=commit;h=a3a4751a763846ee9beb72c21...
Author: Zebediah Figura z.figura12@gmail.com Date: Wed May 22 11:15:42 2019 -0500
setupapi: Implement device-specific co-installers in SetupDiCallClassInstaller().
Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/setupapi/devinst.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index 6ef5df3..07288e5 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))