From 904ac4164fe4dcd82889cc13a2b53134dc41730d Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Wed, 19 Sep 2007 17:56:28 -0700 Subject: [PATCH] Implement SetupDiGetClassDescriptionExA --- dlls/setupapi/devinst.c | 48 +++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 46 insertions(+), 2 deletions(-) diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index 0b6c847..75dddb4 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -1325,8 +1325,52 @@ BOOL WINAPI SetupDiGetClassDescriptionEx PCSTR MachineName, PVOID Reserved) { - FIXME("\n"); - return FALSE; + HKEY hKey; + DWORD dwLength; + + hKey = SetupDiOpenClassRegKeyExA(ClassGuid, + KEY_ALL_ACCESS, + DIOCR_INSTALLER, + MachineName, + Reserved); + if (hKey == INVALID_HANDLE_VALUE) + { + WARN("SetupDiOpenClassRegKeyExA() failed (Error %u)\n", GetLastError()); + return FALSE; + } + + if (RequiredSize != NULL) + { + dwLength = 0; + if (RegQueryValueExA(hKey, + NULL, + NULL, + NULL, + NULL, + &dwLength)) + { + RegCloseKey(hKey); + return FALSE; + } + + *RequiredSize = dwLength; + } + + dwLength = ClassDescriptionSize; + if (RegQueryValueExA(hKey, + NULL, + NULL, + NULL, + (LPBYTE)ClassDescription, + &dwLength)) + { + RegCloseKey(hKey); + return FALSE; + } + + RegCloseKey(hKey); + + return TRUE; } /*********************************************************************** -- 1.4.1