Also scan HKEY_CURRENT_USER for shell namespace extensions in

MyComputer.
This commit is contained in:
Michael Jung 2005-11-23 15:17:22 +01:00 committed by Alexandre Julliard
parent ae8a912605
commit b2647030c4
1 changed files with 24 additions and 21 deletions

View File

@ -274,6 +274,7 @@ static BOOL CreateMyCompEnumList(IEnumIDList *list, DWORD dwFlags)
WCHAR wszDriveName[] = {'A', ':', '\\', '\0'};
DWORD dwDrivemap = GetLogicalDrives();
HKEY hkey;
UINT i;
while (ret && wszDriveName[0]<='Z')
{
@ -284,8 +285,9 @@ static BOOL CreateMyCompEnumList(IEnumIDList *list, DWORD dwFlags)
}
TRACE("-- (%p)-> enumerate (mycomputer shell extensions)\n",list);
if (ret && !RegOpenKeyExW(HKEY_LOCAL_MACHINE, MyComputer_NameSpaceW,
0, KEY_READ, &hkey))
for (i=0; i<2; i++) {
if (ret && !RegOpenKeyExW(i == 0 ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER,
MyComputer_NameSpaceW, 0, KEY_READ, &hkey))
{
WCHAR iid[50];
int i=0;
@ -312,6 +314,7 @@ static BOOL CreateMyCompEnumList(IEnumIDList *list, DWORD dwFlags)
RegCloseKey(hkey);
}
}
}
return ret;
}