shell32: Query for localized string in HCR_GetClassName.

This commit is contained in:
Michael Jung 2006-02-14 10:41:29 +01:00 committed by Alexandre Julliard
parent ac615ce5a0
commit bbeeb4b5ad
1 changed files with 8 additions and 4 deletions

View File

@ -287,8 +287,11 @@ BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len)
szDest[0] = 0;
if (HCR_RegOpenClassIDKey(riid, &hkey))
{
if (!RegQueryValueExW(hkey, swEmpty, 0, NULL, (LPBYTE)szDest, &len))
{
static const WCHAR wszLocalizedString[] =
{ 'L','o','c','a','l','i','z','e','d','S','t','r','i','n','g', 0 };
if (!RegLoadMUIStringW(hkey, wszLocalizedString, szDest, len, NULL, 0, NULL) ||
!RegQueryValueExW(hkey, swEmpty, 0, NULL, (LPBYTE)szDest, &len))
{
ret = TRUE;
}
RegCloseKey(hkey);
@ -319,8 +322,9 @@ BOOL HCR_GetClassNameA(REFIID riid, LPSTR szDest, DWORD len)
szDest[0] = 0;
if (HCR_RegOpenClassIDKey(riid, &hkey))
{
if (!RegQueryValueExA(hkey,"",0,NULL,(LPBYTE)szDest,&len))
{
if (!RegLoadMUIStringA(hkey,"LocalizedString",szDest,len,NULL,0,NULL) ||
!RegQueryValueExA(hkey,"",0,NULL,(LPBYTE)szDest,&len))
{
ret = TRUE;
}
RegCloseKey(hkey);