Author: ashaposhnikov
Date: Sun Sep 10 21:02:06 2017
New Revision: 75824
URL:
http://svn.reactos.org/svn/reactos?rev=75824&view=rev
Log:
[RAPPS] Stopped GCC whining (fixed GCC build)
Modified:
branches/GSoC_2017/rapps/reactos/base/applications/rapps/CMakeLists.txt
branches/GSoC_2017/rapps/reactos/base/applications/rapps/available.cpp
branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp
branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/available.h
branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/defines.h
branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/dialogs.h
branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/rapps.h
branches/GSoC_2017/rapps/reactos/base/applications/rapps/loaddlg.cpp
branches/GSoC_2017/rapps/reactos/base/applications/rapps/misc.cpp
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
==============================================================================
--- branches/GSoC_2017/rapps/reactos/base/applications/rapps/CMakeLists.txt [iso-8859-1]
(original)
+++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/CMakeLists.txt [iso-8859-1]
Sun Sep 10 21:02:06 2017
@@ -32,7 +32,10 @@
include/unattended.h
)
-add_definitions(-DUSE_CERT_PINNING)
+add_definitions(
+ -DUSE_CERT_PINNING
+ -D_ATL_NO_EXCEPTIONS)
+
file(GLOB_RECURSE rapps_rc_deps res/*.*)
add_rc_deps(rapps.rc ${rapps_rc_deps})
add_executable(rapps ${SOURCE} rapps.rc)
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/available.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
==============================================================================
--- branches/GSoC_2017/rapps/reactos/base/applications/rapps/available.cpp [iso-8859-1]
(original)
+++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/available.cpp [iso-8859-1]
Sun Sep 10 21:02:06 2017
@@ -19,9 +19,9 @@
// CAvailableApplicationInfo
CAvailableApplicationInfo::CAvailableApplicationInfo(const ATL::CStringW&
sFileNameParam)
- : m_Parser(sFileNameParam)
-{
- m_LicenseType = LicenseType::LICENSE_NONE;
+ : m_IsInstalled(FALSE), m_HasLanguageInfo(FALSE), m_HasInstalledVersion(FALSE),
m_Parser(sFileNameParam)
+{
+ m_LicenseType = LICENSE_NONE;
m_sFileName = sFileNameParam;
@@ -74,7 +74,8 @@
VOID CAvailableApplicationInfo::RetrieveInstalledVersion()
{
- ATL::CStringW szNameVersion = m_szName + L" " + m_szVersion;
+ ATL::CStringW szNameVersion;
+ szNameVersion = m_szName + L" " + m_szVersion;
m_HasInstalledVersion = ::GetInstalledVersion(&m_szInstalledVersion,
m_szRegName)
|| ::GetInstalledVersion(&m_szInstalledVersion, m_szName)
|| ::GetInstalledVersion(&m_szInstalledVersion, szNameVersion);
@@ -133,7 +134,7 @@
}
else
{
- m_LicenseType = LicenseType::LICENSE_NONE;
+ m_LicenseType = LICENSE_NONE;
}
}
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
==============================================================================
--- branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp [iso-8859-1]
(original)
+++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp [iso-8859-1] Sun Sep
10 21:02:06 2017
@@ -1,4 +1,4 @@
-/*
+/*
* PROJECT: ReactOS Applications Manager
* LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+)
* FILE: base/applications/rapps/gui.cpp
@@ -113,13 +113,13 @@
ATL::CStringW szLicense;
switch (Info->m_LicenseType)
{
- case LicenseType::LICENSE_OPENSOURCE:
+ case LICENSE_OPENSOURCE:
szLicense.LoadStringW(IDS_LICENSE_OPENSOURCE);
break;
- case LicenseType::LICENSE_FREEWARE:
+ case LICENSE_FREEWARE:
szLicense.LoadStringW(IDS_LICENSE_FREEWARE);
break;
- case LicenseType::LICENSE_TRIAL:
+ case LICENSE_TRIAL:
szLicense.LoadStringW(IDS_LICENSE_TRIAL);
break;
default:
@@ -368,8 +368,8 @@
public:
CAppsListView() :
+ bHasAllChecked(FALSE),
bAscending(TRUE),
- bHasAllChecked(FALSE),
bHasCheckboxes(FALSE)
{
}
@@ -557,11 +557,17 @@
class CSideTreeView :
public CUiWindow<CTreeView>
{
- HIMAGELIST hImageTreeView = ImageList_Create(TREEVIEW_ICON_SIZE, TREEVIEW_ICON_SIZE,
- GetSystemColorDepth() | ILC_MASK,
- 0, 1);
+ HIMAGELIST hImageTreeView;
public:
+ CSideTreeView() :
+ CUiWindow(),
+ hImageTreeView(ImageList_Create(TREEVIEW_ICON_SIZE, TREEVIEW_ICON_SIZE,
+ GetSystemColorDepth() | ILC_MASK,
+ 0, 1))
+ {
+ }
+
HTREEITEM AddItem(HTREEITEM hParent, ATL::CStringW &Text, INT Image, INT
SelectedImage, LPARAM lParam)
{
return CUiWindow<CTreeView>::AddItem(hParent,
const_cast<LPWSTR>(Text.GetString()), Image, SelectedImage, lParam);
@@ -603,7 +609,6 @@
~CSideTreeView()
{
DestroyImageList();
- CUiWindow<CTreeView>::~CUiWindow();
}
};
@@ -1352,7 +1357,7 @@
UpdateApplicationsList(-1);
}
- }
+ }
break;
case ID_UNINSTALL:
@@ -1409,7 +1414,7 @@
}
}
- static BOOL SearchPatternMatch(PCWSTR szHaystack, PCWSTR szNeedle)
+ static BOOL SearchPatternMatch(LPCWSTR szHaystack, LPCWSTR szNeedle)
{
if (!*szNeedle)
return TRUE;
@@ -1456,15 +1461,15 @@
HIMAGELIST hImageListView = ListView_GetImageList(hListView, LVSIL_SMALL);
- if (!SearchPatternMatch(Info->m_szName, szSearchPattern) &&
- !SearchPatternMatch(Info->m_szDesc, szSearchPattern))
+ if (!SearchPatternMatch(Info->m_szName.GetString(), szSearchPattern)
&&
+ !SearchPatternMatch(Info->m_szDesc.GetString(), szSearchPattern))
{
return TRUE;
}
/* Load icon from file */
ATL::CStringW szIconPath;
- szIconPath.Format(L"%lsicons\\%ls.ico", szFolderPath,
Info->m_szName);
+ szIconPath.Format(L"%lsicons\\%ls.ico", szFolderPath,
Info->m_szName.GetString());
hIcon = (HICON) LoadImageW(NULL,
szIconPath.GetString(),
IMAGE_ICON,
@@ -1481,7 +1486,7 @@
Index = ImageList_AddIcon(hImageListView, hIcon);
DestroyIcon(hIcon);
- Index = ListViewAddItem(Info->m_Category, Index, Info->m_szName, (LPARAM)
Info);
+ Index = ListViewAddItem(Info->m_Category, Index,
Info->m_szName.GetString(), (LPARAM) Info);
ListView_SetImageList(hListView, hImageListView, LVSIL_SMALL);
ListView_SetItemText(hListView, Index, 1,
const_cast<LPWSTR>(Info->m_szVersion.GetString()));
@@ -1515,7 +1520,7 @@
{
EnumType = SelectedEnumType;
}
-
+
//if previous one was INSTALLED purge the list
//TODO: make the Installed category a separate class to avoid doing this
if (bWasInInstalled)
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/available.h
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
==============================================================================
---
branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/available.h [iso-8859-1]
(original)
+++
branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/available.h [iso-8859-1]
Sun Sep 10 21:02:06 2017
@@ -19,7 +19,7 @@
inline BOOL IsLicenseType(INT x)
{
- return (x >= LicenseType::LICENSE_MIN && x <=
LicenseType::LICENSE_MAX);
+ return (x >= LICENSE_MIN && x <= LICENSE_MAX);
}
struct CAvailableApplicationInfo
@@ -60,9 +60,9 @@
VOID SetLastWriteTime(FILETIME* ftTime);
private:
- BOOL m_IsInstalled = FALSE;
- BOOL m_HasLanguageInfo = FALSE;
- BOOL m_HasInstalledVersion = FALSE;
+ BOOL m_IsInstalled;
+ BOOL m_HasLanguageInfo;
+ BOOL m_HasInstalledVersion;
CConfigParser m_Parser;
inline BOOL GetString(LPCWSTR lpKeyName, ATL::CStringW& ReturnedString);
@@ -86,7 +86,7 @@
static ATL::CStringW m_szSearchPath;
static BOOL InitializeStaticStrings();
-
+
ATL::CAtlList<CAvailableApplicationInfo*> m_InfoList;
public:
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/defines.h
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
==============================================================================
---
branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/defines.h [iso-8859-1]
(original)
+++
branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/defines.h [iso-8859-1]
Sun Sep 10 21:02:06 2017
@@ -61,10 +61,10 @@
inline BOOL IsAvailableEnum(INT x)
{
- return (x >= AppsCategories::ENUM_AVAILABLE_MIN && x <=
AppsCategories::ENUM_AVAILABLE_MAX);
+ return (x >= ENUM_AVAILABLE_MIN && x <= ENUM_AVAILABLE_MAX);
}
inline BOOL IsInstalledEnum(INT x)
{
- return (x >= AppsCategories::ENUM_INSTALLED_MIN && x <=
AppsCategories::ENUM_INSTALLED_MAX);
+ return (x >= ENUM_INSTALLED_MIN && x <= ENUM_INSTALLED_MAX);
}
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/dialogs.h
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
==============================================================================
---
branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/dialogs.h [iso-8859-1]
(original)
+++
branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/dialogs.h [iso-8859-1]
Sun Sep 10 21:02:06 2017
@@ -13,7 +13,6 @@
{
static ATL::CSimpleArray<DownloadInfo> AppsToInstallList;
static CDowloadingAppsListView DownloadsListView;
- static INT iCurrentApp;
static VOID Download(const DownloadInfo& DLInfo, BOOL bIsModal = FALSE);
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/rapps.h
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
==============================================================================
--- branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/rapps.h [iso-8859-1]
(original)
+++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/rapps.h [iso-8859-1]
Sun Sep 10 21:02:06 2017
@@ -1,5 +1,3 @@
-#pragma once
-
#ifndef _RAPPS_H
#define _RAPPS_H
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/loaddlg.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
==============================================================================
--- branches/GSoC_2017/rapps/reactos/base/applications/rapps/loaddlg.cpp [iso-8859-1]
(original)
+++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/loaddlg.cpp [iso-8859-1] Sun
Sep 10 21:02:06 2017
@@ -1,4 +1,4 @@
-/*
+/*
* PROJECT: ReactOS Applications Manager
* LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+)
* FILE: base/applications/rapps/loaddlg.cpp
@@ -51,17 +51,17 @@
#define CERT_SUBJECT_INFO "Domain Control Validated\r\n*.reactos.org"
#endif
-typedef enum
-{
- DLWaiting = IDS_STATUS_WAITING,
- DLDownloading = IDS_STATUS_DOWNLOADING,
- DLWaitingToInstall = IDS_STATUS_DOWNLOADED,
- DLInstalling = IDS_STATUS_INSTALLING,
- DLInstalled = IDS_STATUS_INSTALLED,
- DLFinished = IDS_STATUS_FINISHED
-} DOWNLOAD_STATUS;
-
-ATL::CStringW LoadStatusString(DOWNLOAD_STATUS StatusParam)
+enum DownloadStatus
+{
+ DLSTATUS_WAITING = IDS_STATUS_WAITING,
+ DLSTATUS_DOWNLOADING = IDS_STATUS_DOWNLOADING,
+ DLSTATUS_WAITING_INSTALL = IDS_STATUS_DOWNLOADED,
+ DLSTATUS_INSTALLING = IDS_STATUS_INSTALLING,
+ DLSTATUS_INSTALLED = IDS_STATUS_INSTALLED,
+ DLSTATUS_FINISHED = IDS_STATUS_FINISHED
+};
+
+ATL::CStringW LoadStatusString(DownloadStatus StatusParam)
{
ATL::CStringW szString;
szString.LoadStringW(StatusParam);
@@ -259,11 +259,11 @@
{
for (INT i = 0; i < arrInfo.GetSize(); ++i)
{
- AddRow(i, arrInfo[i].szName.GetString(), DOWNLOAD_STATUS::DLWaiting);
- }
- }
-
- VOID SetDownloadStatus(INT ItemIndex, DOWNLOAD_STATUS Status)
+ AddRow(i, arrInfo[i].szName.GetString(), DLSTATUS_WAITING);
+ }
+ }
+
+ VOID SetDownloadStatus(INT ItemIndex, DownloadStatus Status)
{
HWND hListView = GetWindow();
ATL::CStringW szBuffer = LoadStatusString(Status);
@@ -283,7 +283,7 @@
return InsertItem(&Item);
}
- VOID AddRow(INT RowIndex, LPCWSTR szAppName, const DOWNLOAD_STATUS Status)
+ VOID AddRow(INT RowIndex, LPCWSTR szAppName, const DownloadStatus Status)
{
ATL::CStringW szStatus = LoadStatusString(Status);
AddItem(RowIndex,
@@ -376,7 +376,6 @@
// CDownloadManager
ATL::CSimpleArray<DownloadInfo> CDownloadManager::AppsToInstallList;
CDowloadingAppsListView CDownloadManager::DownloadsListView;
-INT CDownloadManager::iCurrentApp;
VOID CDownloadManager::Download(const DownloadInfo &DLInfo, BOOL bIsModal)
{
@@ -549,6 +548,8 @@
PWSTR p, q;
HWND hDlg = static_cast<DownloadParam*>(param)->Dialog;
+ HWND Item;
+ INT iAppId;
ULONG dwContentLen, dwBytesWritten, dwBytesRead, dwStatus;
ULONG dwCurrentBytesRead = 0;
@@ -567,25 +568,21 @@
URL_COMPONENTS urlComponents;
size_t urlLength, filenameLength;
- const INT iAppId = iCurrentApp;
const ATL::CSimpleArray<DownloadInfo> &InfoArray =
static_cast<DownloadParam*>(param)->AppInfo;
LPCWSTR szCaption = static_cast<DownloadParam*>(param)->szCaption;
ATL::CStringW szNewCaption;
-
if (InfoArray.GetSize() <= 0)
{
MessageBox_LoadString(hMainWnd, IDS_UNABLE_TO_DOWNLOAD);
goto end;
}
- for (INT iAppId = 0; iAppId < InfoArray.GetSize(); ++iAppId)
- {
- const DownloadInfo &CurrentInfo = InfoArray[iAppId];
-
+ for (iAppId = 0; iAppId < InfoArray.GetSize(); ++iAppId)
+ {
// build the path for the download
- p = wcsrchr(CurrentInfo.szUrl.GetString(), L'/');
- q = wcsrchr(CurrentInfo.szUrl.GetString(), L'?');
+ p = wcsrchr(InfoArray[iAppId].szUrl.GetString(), L'/');
+ q = wcsrchr(InfoArray[iAppId].szUrl.GetString(), L'?');
// do we have a final slash separator?
if (!p)
@@ -600,7 +597,7 @@
filenameLength -= wcslen(q - 1) * sizeof(WCHAR);
// is this URL an update package for RAPPS? if so store it in a different place
- if (CurrentInfo.szUrl == APPLICATION_DATABASE_URL)
+ if (InfoArray[iAppId].szUrl == APPLICATION_DATABASE_URL)
{
bCab = TRUE;
if (!GetStorageDirectory(Path))
@@ -622,15 +619,15 @@
Path += L"\\";
Path += (LPWSTR) (p + 1);
- if (!bCab && CurrentInfo.szSHA1[0] &&
GetFileAttributesW(Path.GetString()) != INVALID_FILE_ATTRIBUTES)
+ if (!bCab && InfoArray[iAppId].szSHA1[0] &&
GetFileAttributesW(Path.GetString()) != INVALID_FILE_ATTRIBUTES)
{
// only open it in case of total correctness
- if (VerifyInteg(CurrentInfo.szSHA1.GetString(), Path))
+ if (VerifyInteg(InfoArray[iAppId].szSHA1.GetString(), Path))
goto run;
}
// Reset progress bar
- HWND Item = GetDlgItem(hDlg, IDC_DOWNLOAD_PROGRESS);
+ Item = GetDlgItem(hDlg, IDC_DOWNLOAD_PROGRESS);
if (Item)
{
SendMessageW(Item, PBM_SETPOS, 0, 0);
@@ -639,7 +636,7 @@
// Change caption to show the currently downloaded app
if (!bCab)
{
- szNewCaption.Format(szCaption, CurrentInfo.szName.GetString());
+ szNewCaption.Format(szCaption, InfoArray[iAppId].szName.GetString());
}
else
{
@@ -649,9 +646,9 @@
SetWindowTextW(hDlg, szNewCaption.GetString());
// Add the download URL
- SetDlgItemTextW(hDlg, IDC_DOWNLOAD_STATUS, CurrentInfo.szUrl.GetString());
-
- DownloadsListView.SetDownloadStatus(iAppId, DOWNLOAD_STATUS::DLDownloading);
+ SetDlgItemTextW(hDlg, IDC_DOWNLOAD_STATUS, InfoArray[iAppId].szUrl.GetString());
+
+ DownloadsListView.SetDownloadStatus(iAppId, DLSTATUS_DOWNLOADING);
// download it
bTempfile = TRUE;
@@ -680,7 +677,7 @@
if (!hOpen)
goto end;
- hFile = InternetOpenUrlW(hOpen, CurrentInfo.szUrl.GetString(), NULL, 0,
INTERNET_FLAG_PRAGMA_NOCACHE | INTERNET_FLAG_KEEP_CONNECTION, 0);
+ hFile = InternetOpenUrlW(hOpen, InfoArray[iAppId].szUrl.GetString(), NULL, 0,
INTERNET_FLAG_PRAGMA_NOCACHE | INTERNET_FLAG_KEEP_CONNECTION, 0);
if (!hFile)
{
@@ -702,13 +699,13 @@
memset(&urlComponents, 0, sizeof(urlComponents));
urlComponents.dwStructSize = sizeof(urlComponents);
- urlLength = CurrentInfo.szUrl.GetLength();
+ urlLength = InfoArray[iAppId].szUrl.GetLength();
urlComponents.dwSchemeLength = urlLength + 1;
urlComponents.lpszScheme = (LPWSTR) malloc(urlComponents.dwSchemeLength *
sizeof(WCHAR));
urlComponents.dwHostNameLength = urlLength + 1;
urlComponents.lpszHostName = (LPWSTR) malloc(urlComponents.dwHostNameLength *
sizeof(WCHAR));
- if (!InternetCrackUrlW(CurrentInfo.szUrl, urlLength + 1, ICU_DECODE | ICU_ESCAPE,
&urlComponents))
+ if (!InternetCrackUrlW(InfoArray[iAppId].szUrl, urlLength + 1, ICU_DECODE |
ICU_ESCAPE, &urlComponents))
goto end;
if (urlComponents.nScheme == INTERNET_SCHEME_HTTP || urlComponents.nScheme ==
INTERNET_SCHEME_HTTPS)
@@ -720,7 +717,7 @@
#ifdef USE_CERT_PINNING
// are we using HTTPS to download the RAPPS update package? check if the
certificate is original
if ((urlComponents.nScheme == INTERNET_SCHEME_HTTPS) &&
- (wcscmp(CurrentInfo.szUrl, APPLICATION_DATABASE_URL) == 0) &&
+ (wcscmp(InfoArray[iAppId].szUrl, APPLICATION_DATABASE_URL) == 0) &&
(!CertIsValid(hOpen, urlComponents.lpszHostName)))
{
MessageBox_LoadString(hMainWnd, IDS_CERT_DOES_NOT_MATCH);
@@ -752,7 +749,7 @@
}
dwCurrentBytesRead += dwBytesRead;
- dl->OnProgress(dwCurrentBytesRead, dwContentLen, 0,
CurrentInfo.szUrl.GetString());
+ dl->OnProgress(dwCurrentBytesRead, dwContentLen, 0,
InfoArray[iAppId].szUrl.GetString());
} while (dwBytesRead && !bCancelled);
CloseHandle(hOut);
@@ -763,7 +760,7 @@
/* if this thing isn't a RAPPS update and it has a SHA-1 checksum
verify its integrity by using the native advapi32.A_SHA1 functions */
- if (!bCab && CurrentInfo.szSHA1[0] != 0)
+ if (!bCab && InfoArray[iAppId].szSHA1[0] != 0)
{
ATL::CStringW szMsgText;
@@ -775,7 +772,7 @@
SendMessageW(GetDlgItem(hDlg, IDC_DOWNLOAD_STATUS), WM_SETTEXT, 0, (LPARAM)
Path.GetString());
// this may take a while, depending on the file size
- if (!VerifyInteg(CurrentInfo.szSHA1.GetString(), Path.GetString()))
+ if (!VerifyInteg(InfoArray[iAppId].szSHA1.GetString(), Path.GetString()))
{
if (!szMsgText.LoadStringW(IDS_INTEG_CHECK_FAIL))
goto end;
@@ -786,7 +783,7 @@
}
run:
- DownloadsListView.SetDownloadStatus(iAppId,
DOWNLOAD_STATUS::DLWaitingToInstall);
+ DownloadsListView.SetDownloadStatus(iAppId, DLSTATUS_WAITING_INSTALL);
// run it
if (!bCab)
@@ -801,7 +798,7 @@
if (ShellExecuteExW(&shExInfo))
{
- DownloadsListView.SetDownloadStatus(iAppId,
DOWNLOAD_STATUS::DLInstalling);
+ DownloadsListView.SetDownloadStatus(iAppId, DLSTATUS_INSTALLING);
//TODO: issue an install operation separately so that the apps could be
downloaded in the background
WaitForSingleObject(shExInfo.hProcess, INFINITE);
CloseHandle(shExInfo.hProcess);
@@ -825,10 +822,10 @@
DeleteFileW(Path.GetString());
}
- DownloadsListView.SetDownloadStatus(iAppId, DOWNLOAD_STATUS::DLFinished);
- }
-
- delete param;
+ DownloadsListView.SetDownloadStatus(iAppId, DLSTATUS_FINISHED);
+ }
+
+ delete static_cast<DownloadParam*>(param);
SendMessageW(hDlg, WM_CLOSE, 0, 0);
return 0;
}
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/misc.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
==============================================================================
--- branches/GSoC_2017/rapps/reactos/base/applications/rapps/misc.cpp [iso-8859-1]
(original)
+++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/misc.cpp [iso-8859-1] Sun Sep
10 21:02:06 2017
@@ -324,14 +324,14 @@
}
BOOL GetInstalledVersion_WowUser(ATL::CStringW* szVersionResult,
- const ATL::CStringW& RegName,
+ const ATL::CStringW& szRegName,
BOOL IsUserKey,
REGSAM keyWow)
{
BOOL bHasSucceded = FALSE;
ATL::CRegKey key;
ATL::CStringW szVersion;
- ATL::CStringW szPath =
L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + RegName;
+ ATL::CStringW szPath =
ATL::CStringW(L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\%ls") +
szRegName;
if (key.Open(IsUserKey ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE,
szPath.GetString(),
@@ -389,7 +389,7 @@
ATL::CStringW szBuffer;
GetStorageDirectory(szDir);
- szBuffer.Format(L"%ls\\rapps\\%ls", szDir, FileName);
+ szBuffer.Format(L"%ls\\rapps\\%ls", szDir.GetString(),
FileName.GetString());
return szBuffer;
}