Module: wine Branch: master Commit: 6b50538f123d0b62e773f749dd32a18bd8e3157f URL: http://source.winehq.org/git/wine.git/?a=commit;h=6b50538f123d0b62e773f749dd...
Author: Juan Lang juan.lang@gmail.com Date: Thu Sep 20 09:15:16 2007 -0700
setupapi: 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 9476ee2..10bf481 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -1325,8 +1325,52 @@ BOOL WINAPI SetupDiGetClassDescriptionExA( 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; }
/***********************************************************************