Add '\' between "System\CurrentControlSet\Class" and the GUID when creating the registry key name
Don't return FALSE but INVALID_HANDLE_VALUE in SetupDiOpenClassRegKeyExW
Modified: trunk/reactos/lib/setupapi/devinst.c

Modified: trunk/reactos/lib/setupapi/devinst.c
--- trunk/reactos/lib/setupapi/devinst.c	2005-07-01 12:09:04 UTC (rev 16367)
+++ trunk/reactos/lib/setupapi/devinst.c	2005-07-01 15:29:06 UTC (rev 16368)
@@ -1182,12 +1182,13 @@
     DWORD RequiredSize;
     HKEY hClassKey;
 
+    Buffer[0] = '\\';
     if (!SetupGetLineTextW(NULL,
 			   hInf,
 			   Version,
 			   ClassGUID,
-			   Buffer,
-			   MAX_PATH,
+			   &Buffer[1],
+			   MAX_PATH - 1,
 			   &RequiredSize))
     {
 	return INVALID_HANDLE_VALUE;
@@ -1433,7 +1434,7 @@
     if (UuidToStringW((UUID*)ClassGuid, &lpGuidString) != RPC_S_OK)
     {
 	RegCloseKey(hClassesKey);
-	return FALSE;
+	return INVALID_HANDLE_VALUE;
     }
 
     if (RegOpenKeyExW(hClassesKey,
@@ -1444,7 +1445,7 @@
     {
 	RpcStringFreeW(&lpGuidString);
 	RegCloseKey(hClassesKey);
-	return FALSE;
+	return INVALID_HANDLE_VALUE;
     }
 
     RpcStringFreeW(&lpGuidString);