2017-08-02 12:50:53 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <windef.h>
|
|
|
|
#include <atlstr.h>
|
|
|
|
|
2020-07-21 14:13:39 +00:00
|
|
|
class CInstalledApplicationInfo
|
2017-08-02 12:50:53 +00:00
|
|
|
{
|
2021-10-03 18:35:13 +00:00
|
|
|
private:
|
|
|
|
BOOL m_IsUserKey;
|
|
|
|
REGSAM m_WowKey;
|
|
|
|
HKEY m_hSubKey;
|
|
|
|
|
|
|
|
CStringW m_szKeyName;
|
|
|
|
|
2020-07-21 14:13:39 +00:00
|
|
|
public:
|
2021-10-03 18:35:13 +00:00
|
|
|
CInstalledApplicationInfo(BOOL bIsUserKey, REGSAM RegWowKey, HKEY hKey, const CStringW& szKeyName);
|
|
|
|
~CInstalledApplicationInfo();
|
2020-07-21 14:13:39 +00:00
|
|
|
|
2021-10-03 18:35:13 +00:00
|
|
|
VOID EnsureDetailsLoaded();
|
2019-04-28 03:27:53 +00:00
|
|
|
|
2020-07-24 08:07:43 +00:00
|
|
|
BOOL GetApplicationRegString(LPCWSTR lpKeyName, ATL::CStringW& String);
|
|
|
|
BOOL GetApplicationRegDword(LPCWSTR lpKeyName, DWORD *lpValue);
|
[RAPPS] Display custom applications icons for installed applications CORE-17257 (#3144)
* [RAPPS] Display custom applications icons for installed applications
- Implement `RetrieveIcon` helper function in `CInstalledApplicationInfo` class, which retrueves the current app's icon from registry, same as it done for `CAvailableApplicationInfo`.
- Use it for loading the icon in `CAppsListView::AddInstalledApplication` function, via `ExtractIconW`. Load default Rapps icon only when the app has no its custom icon.
- Retrieve `DisplayIcon` value from registry in `CInstalledApps::Enum` function, same as other registry values (like app name, description, etc).Store it in `szDisplayIcon` string, which is used in `CInstalledApplicationInfo::RetrieveIcon` for retrieving the data of that value.
- Increase `LISTVIEW_ICON_SIZE` macro from 24 to 32, so 32x32 icon size is now used instead of 24x24. This makes displayed icons more accurate, since most of apps contain 32x32 icon, so they look a bit distorted with 24x24 size.
2020-09-20 17:19:59 +00:00
|
|
|
BOOL RetrieveIcon(ATL::CStringW& IconLocation);
|
2020-07-21 14:13:39 +00:00
|
|
|
BOOL UninstallApplication(BOOL bModify);
|
|
|
|
LSTATUS RemoveFromRegistry();
|
|
|
|
|
2021-10-03 18:35:13 +00:00
|
|
|
// These fields are always loaded
|
|
|
|
BOOL bIsUpdate;
|
|
|
|
CStringW szDisplayIcon;
|
|
|
|
CStringW szDisplayName;
|
|
|
|
CStringW szDisplayVersion;
|
|
|
|
CStringW szComments;
|
|
|
|
|
|
|
|
// These details are loaded on demand
|
|
|
|
CStringW szPublisher;
|
|
|
|
CStringW szRegOwner;
|
|
|
|
CStringW szProductID;
|
|
|
|
CStringW szHelpLink;
|
|
|
|
CStringW szHelpTelephone;
|
|
|
|
CStringW szReadme;
|
|
|
|
CStringW szContact;
|
|
|
|
CStringW szURLUpdateInfo;
|
|
|
|
CStringW szURLInfoAbout;
|
|
|
|
CStringW szInstallDate;
|
|
|
|
CStringW szInstallLocation;
|
|
|
|
CStringW szInstallSource;
|
|
|
|
CStringW szUninstallString;
|
|
|
|
CStringW szModifyPath;
|
2020-07-21 14:13:39 +00:00
|
|
|
|
2017-08-02 12:50:53 +00:00
|
|
|
};
|
2017-09-09 20:38:06 +00:00
|
|
|
|
2020-07-21 14:13:39 +00:00
|
|
|
typedef BOOL(CALLBACK *APPENUMPROC)(CInstalledApplicationInfo * Info, PVOID param);
|
2017-08-02 12:50:53 +00:00
|
|
|
|
2020-07-21 14:13:39 +00:00
|
|
|
class CInstalledApps
|
|
|
|
{
|
|
|
|
ATL::CAtlList<CInstalledApplicationInfo *> m_InfoList;
|
|
|
|
|
|
|
|
public:
|
|
|
|
BOOL Enum(INT EnumType, APPENUMPROC lpEnumProc, PVOID param);
|
|
|
|
|
|
|
|
VOID FreeCachedEntries();
|
|
|
|
};
|
2017-08-02 12:50:53 +00:00
|
|
|
|