[ros-diffs] [hpoussin] 16368: Add '\' between "System\CurrentControlSet\Class" and the GUID when creating the registry key name

hpoussin at svn.reactos.com hpoussin at svn.reactos.com
Fri Jul 1 17:29:09 CEST 2005


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);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050701/cfd48dc3/attachment.html


More information about the Ros-diffs mailing list