BOOL
CALLBACK
-EnumInstalledAppProc(INT ItemIndex, LPWSTR lpName, INSTALLED_INFO Info)
+EnumInstalledAppProc(INT ItemIndex, LPWSTR lpName, PINSTALLED_INFO Info)
{
PINSTALLED_INFO ItemInfo;
WCHAR szText[MAX_PATH];
ItemInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(INSTALLED_INFO));
if (!ItemInfo) return FALSE;
- *ItemInfo = Info;
+ RtlCopyMemory(ItemInfo, Info, sizeof(INSTALLED_INFO));
Index = ListViewAddItem(ItemIndex, 0, lpName, (LPARAM)ItemInfo);
BOOL
CALLBACK
-EnumAvailableAppProc(APPLICATION_INFO Info)
+EnumAvailableAppProc(PAPPLICATION_INFO Info)
{
PAPPLICATION_INFO ItemInfo;
INT Index;
- if (!SearchPatternMatch(Info.szName, szSearchPattern) &&
- !SearchPatternMatch(Info.szDesc, szSearchPattern))
+ if (!SearchPatternMatch(Info->szName, szSearchPattern) &&
+ !SearchPatternMatch(Info->szDesc, szSearchPattern))
{
return TRUE;
}
- no RegName was supplied (so we cannot determine whether the application is installed or not) or
- a RegName was supplied and the application is not installed
*/
- if (!*Info.szRegName || (!IsInstalledApplication(Info.szRegName, FALSE) && !IsInstalledApplication(Info.szRegName, TRUE)))
+ if (!*Info->szRegName || (!IsInstalledApplication(Info->szRegName, FALSE) && !IsInstalledApplication(Info->szRegName, TRUE)))
{
ItemInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(APPLICATION_INFO));
if (!ItemInfo) return FALSE;
- *ItemInfo = Info;
+ RtlCopyMemory(ItemInfo, Info, sizeof(APPLICATION_INFO));
- Index = ListViewAddItem(Info.Category, 0, Info.szName, (LPARAM)ItemInfo);
- ListView_SetItemText(hListView, Index, 1, Info.szVersion);
- ListView_SetItemText(hListView, Index, 2, Info.szDesc);
+ Index = ListViewAddItem(Info->Category, 0, Info->szName, (LPARAM)ItemInfo);
+ ListView_SetItemText(hListView, Index, 1, Info->szVersion);
+ ListView_SetItemText(hListView, Index, 2, Info->szDesc);
}
return TRUE;