https://git.reactos.org/?p=reactos.git;a=commitdiff;h=35bd6571bd423d2ac4b86…
commit 35bd6571bd423d2ac4b86e2db797bddcd98d05c5
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sat May 12 12:42:56 2018 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sat May 12 12:42:56 2018 +0200
[SETUPAPI] SetupDiCallClassInstaller: Use the class GUID enclosed in curly brackets as
a sub key name to retrieve the class co-installer.
---
dll/win32/setupapi/devinst.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/dll/win32/setupapi/devinst.c b/dll/win32/setupapi/devinst.c
index 1d83664bf2..2aaa4962e2 100644
--- a/dll/win32/setupapi/devinst.c
+++ b/dll/win32/setupapi/devinst.c
@@ -4288,16 +4288,16 @@ BOOL WINAPI SetupDiCallClassInstaller(
&hKey);
if (rc == ERROR_SUCCESS)
{
- LPWSTR lpGuidString;
- if (UuidToStringW((UUID*)&DeviceInfoData->ClassGuid,
&lpGuidString) == RPC_S_OK)
+ WCHAR szGuidString[40];
+ if (pSetupStringFromGuid(&DeviceInfoData->ClassGuid,
szGuidString, ARRAYSIZE(szGuidString)) == ERROR_SUCCESS)
{
- rc = RegQueryValueExW(hKey, lpGuidString, NULL, &dwRegType,
NULL, &dwLength);
+ rc = RegQueryValueExW(hKey, szGuidString, NULL, &dwRegType,
NULL, &dwLength);
if (rc == ERROR_SUCCESS && dwRegType == REG_MULTI_SZ)
{
LPWSTR KeyBuffer = HeapAlloc(GetProcessHeap(), 0, dwLength);
if (KeyBuffer != NULL)
{
- rc = RegQueryValueExW(hKey, lpGuidString, NULL, NULL,
(LPBYTE)KeyBuffer, &dwLength);
+ rc = RegQueryValueExW(hKey, szGuidString, NULL, NULL,
(LPBYTE)KeyBuffer, &dwLength);
if (rc == ERROR_SUCCESS)
{
LPWSTR ptr;
@@ -4319,7 +4319,6 @@ BOOL WINAPI SetupDiCallClassInstaller(
HeapFree(GetProcessHeap(), 0, KeyBuffer);
}
}
- RpcStringFreeW(&lpGuidString);
}
RegCloseKey(hKey);
}