From 8da00cd97c22016976bab93c41a1299348bb4605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sun, 11 Apr 2021 11:37:23 +0200 Subject: [PATCH] [SETUPAPI] Fix CM_Open_Class_Key_ExW, when pClassGuid is used Braces around GUID were missing. --- dll/win32/setupapi/cfgmgr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dll/win32/setupapi/cfgmgr.c b/dll/win32/setupapi/cfgmgr.c index b052553e9ac..b63feb46c44 100644 --- a/dll/win32/setupapi/cfgmgr.c +++ b/dll/win32/setupapi/cfgmgr.c @@ -35,7 +35,8 @@ I_ScPnPGetServiceName(IN SERVICE_STATUS_HANDLE hServiceStatus, /* Registry key and value names */ -static const WCHAR Backslash[] = {'\\', 0}; +static const WCHAR BackslashOpenBrace[] = {'\\', '{', 0}; +static const WCHAR CloseBrace[] = {'}', 0}; static const WCHAR Class[] = {'C','l','a','s','s',0}; static const WCHAR ControlClass[] = {'S','y','s','t','e','m','\\', @@ -6343,8 +6344,9 @@ CM_Open_Class_Key_ExW( return CR_INVALID_DATA; } - lstrcatW(szKeyName, Backslash); + lstrcatW(szKeyName, BackslashOpenBrace); lstrcatW(szKeyName, lpGuidString); + lstrcatW(szKeyName, CloseBrace); } if (Disposition == RegDisposition_OpenAlways)