[RAPPS]
[reactos.git] / reactos / base / applications / rapps / winmain.c
index 6fa869f..f7b3dbd 100644 (file)
@@ -115,7 +115,7 @@ FreeInstalledAppList(VOID)
 
 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];
@@ -127,7 +127,7 @@ EnumInstalledAppProc(INT ItemIndex, LPWSTR lpName, INSTALLED_INFO Info)
     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);
 
@@ -158,13 +158,13 @@ FreeAvailableAppList(VOID)
 
 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;
     }
@@ -173,16 +173,16 @@ EnumAvailableAppProc(APPLICATION_INFO Info)
          - 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;