[SETUPAPI] Fix CM_Open_Class_Key_ExW, when pClassGuid is used
authorHervé Poussineau <hpoussin@reactos.org>
Sun, 11 Apr 2021 09:37:23 +0000 (11:37 +0200)
committerHervé Poussineau <hpoussin@reactos.org>
Sun, 11 Apr 2021 13:12:02 +0000 (15:12 +0200)
Braces around GUID were missing.

dll/win32/setupapi/cfgmgr.c

index b052553..b63feb4 100644 (file)
@@ -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)