mirror of
https://github.com/reactos/reactos.git
synced 2025-05-28 05:28:14 +00:00
[SETUPAPI] SetupDiCallClassInstaller: Use the class GUID enclosed in curly brackets as a sub key name to retrieve the class co-installer.
This commit is contained in:
parent
abf9bd2d68
commit
35bd6571bd
1 changed files with 4 additions and 5 deletions
|
@ -4288,16 +4288,16 @@ BOOL WINAPI SetupDiCallClassInstaller(
|
||||||
&hKey);
|
&hKey);
|
||||||
if (rc == ERROR_SUCCESS)
|
if (rc == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
LPWSTR lpGuidString;
|
WCHAR szGuidString[40];
|
||||||
if (UuidToStringW((UUID*)&DeviceInfoData->ClassGuid, &lpGuidString) == RPC_S_OK)
|
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)
|
if (rc == ERROR_SUCCESS && dwRegType == REG_MULTI_SZ)
|
||||||
{
|
{
|
||||||
LPWSTR KeyBuffer = HeapAlloc(GetProcessHeap(), 0, dwLength);
|
LPWSTR KeyBuffer = HeapAlloc(GetProcessHeap(), 0, dwLength);
|
||||||
if (KeyBuffer != NULL)
|
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)
|
if (rc == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
LPWSTR ptr;
|
LPWSTR ptr;
|
||||||
|
@ -4319,7 +4319,6 @@ BOOL WINAPI SetupDiCallClassInstaller(
|
||||||
HeapFree(GetProcessHeap(), 0, KeyBuffer);
|
HeapFree(GetProcessHeap(), 0, KeyBuffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RpcStringFreeW(&lpGuidString);
|
|
||||||
}
|
}
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue