ReactOS 0.4.16-dev-1142-g8029339
appinfo.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Applications Manager
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Classes for working with available applications
5 * COPYRIGHT: Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org)
6 * Copyright 2020 He Yang (1160386205@qq.com)
7 * Copyright 2021-2023 Mark Jansen <mark.jansen@reactos.org>
8 */
9
10#include "rapps.h"
11#include "appview.h"
12
13static inline AppsCategories
15{
16 if (Category <= ENUM_LASTCATEGORY)
17 return Category;
18 return ENUM_CAT_OTHER; // Treat future categories we don't know as Other
19}
20
22 : szIdentifier(Identifier), iCategory(Category)
23{
24}
25
27{
28}
29
31 CConfigParser *Parser,
32 const CStringW &PkgName,
33 AppsCategories Category,
34 const CPathW &BasePath)
35 : CAppInfo(PkgName, ClampAvailableCategory(Category)), m_Parser(Parser), m_ScrnshotRetrieved(false), m_LanguagesLoaded(false)
36{
39 m_Parser->GetString(L"URLDownload", m_szUrlDownload);
40 m_Parser->GetString(L"Description", szComments);
41
42 CPathW IconPath = BasePath;
43 IconPath += L"icons";
44
46 if (m_Parser->GetString(L"Icon", IconName))
47 {
49 }
50 else
51 {
52 // inifile.ico
53 IconPath += (szIdentifier + L".ico");
54 }
55
57 {
59 }
60
61 INT iSizeBytes;
62
63 if (m_Parser->GetInt(L"SizeBytes", iSizeBytes))
64 {
67 }
68
69 m_Parser->GetString(L"URLSite", m_szUrlSite);
70}
71
73{
74 delete m_Parser;
75}
76
77VOID
79{
80 RichEdit->SetText(szDisplayName, CFE_BOLD);
81 InsertVersionInfo(RichEdit);
83 InsertLanguageInfo(RichEdit);
84
90}
91
92int
94{
95 int nLeft = 0, nRight = 0;
96
97 while (true)
98 {
99 CStringW leftPart = left.Tokenize(L".", nLeft);
100 CStringW rightPart = right.Tokenize(L".", nRight);
101
102 if (leftPart.IsEmpty() && rightPart.IsEmpty())
103 return 0;
104 if (leftPart.IsEmpty())
105 return -1;
106 if (rightPart.IsEmpty())
107 return 1;
108
109 int leftVal, rightVal;
110
111 if (!StrToIntExW(leftPart, STIF_DEFAULT, &leftVal))
112 leftVal = 0;
113 if (!StrToIntExW(rightPart, STIF_DEFAULT, &rightVal))
114 rightVal = 0;
115
116 if (leftVal > rightVal)
117 return 1;
118 if (rightVal < leftVal)
119 return -1;
120 }
121}
122
123VOID
125{
126 CStringW szRegName;
127 m_Parser->GetString(DB_REGNAME, szRegName);
128
130 if (bIsInstalled)
131 {
132 CStringW szInstalledVersion;
133 CStringW szNameVersion = szDisplayName + L" " + szDisplayVersion;
134 BOOL bHasInstalledVersion = ::GetInstalledVersion(&szInstalledVersion, szRegName) ||
135 ::GetInstalledVersion(&szInstalledVersion, szDisplayName) ||
136 ::GetInstalledVersion(&szInstalledVersion, szNameVersion);
137
138 if (bHasInstalledVersion)
139 {
140 BOOL bHasUpdate = CompareVersion(szInstalledVersion, szDisplayVersion) < 0;
141 if (bHasUpdate)
142 {
144 RichEdit->LoadAndInsertText(IDS_AINFO_VERSION, szInstalledVersion, 0);
145 }
146 else
147 {
149 }
150 }
151 else
152 {
154 }
155 }
156 else
157 {
159 }
160
162}
163
166{
167 INT IntBuffer;
168 m_Parser->GetInt(L"LicenseType", IntBuffer);
169 CStringW szLicenseString;
170 m_Parser->GetString(L"License", szLicenseString);
171 LicenseType licenseType;
172
173 if (IsKnownLicenseType(IntBuffer))
174 licenseType = static_cast<LicenseType>(IntBuffer);
175 else
176 licenseType = LICENSE_NONE;
177
178 if (licenseType == LICENSE_NONE || licenseType == LICENSE_FREEWARE)
179 {
180 if (szLicenseString.CompareNoCase(L"Freeware") == 0)
181 {
182 licenseType = LICENSE_FREEWARE;
183 szLicenseString = L""; // Don't display as "Freeware (Freeware)"
184 }
185 }
186
187 CStringW szLicense;
188 switch (licenseType)
189 {
191 szLicense.LoadStringW(IDS_LICENSE_OPENSOURCE);
192 break;
193 case LICENSE_FREEWARE:
194 szLicense.LoadStringW(IDS_LICENSE_FREEWARE);
195 break;
196 case LICENSE_TRIAL:
197 szLicense.LoadStringW(IDS_LICENSE_TRIAL);
198 break;
199 default:
200 return szLicenseString;
201 }
202
203 if (!szLicenseString.IsEmpty())
204 szLicense += L" (" + szLicenseString + L")";
205 return szLicense;
206}
207
208VOID
210{
212 {
214 }
215
216 if (m_LanguageLCIDs.GetSize() == 0)
217 {
218 return;
219 }
220
221 const INT nTranslations = m_LanguageLCIDs.GetSize();
222 CStringW szLangInfo;
223 CStringW szLoadedTextAvailability;
224 CStringW szLoadedAInfoText;
225
226 szLoadedAInfoText.LoadStringW(IDS_AINFO_LANGUAGES);
227
230 {
231 szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_AVAILABLE_TRANSLATION);
232 if (nTranslations > 1)
233 {
236 szLangInfo.Format(buf, nTranslations - 1);
237 }
238 else
239 {
240 szLangInfo.LoadStringW(IDS_LANGUAGE_SINGLE);
241 szLangInfo = L" (" + szLangInfo + L")";
242 }
243 }
244 else if (m_LanguageLCIDs.Find(lcEnglish) >= 0)
245 {
246 szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_ENGLISH_TRANSLATION);
247 if (nTranslations > 1)
248 {
251 szLangInfo.Format(buf, nTranslations - 1);
252 }
253 else
254 {
255 szLangInfo.LoadStringW(IDS_LANGUAGE_SINGLE);
256 szLangInfo = L" (" + szLangInfo + L")";
257 }
258 }
259 else
260 {
261 szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_NO_TRANSLATION);
262 }
263
264 RichEdit->InsertText(szLoadedAInfoText, CFE_BOLD);
265 RichEdit->InsertText(szLoadedTextAvailability, NULL);
266 RichEdit->InsertText(szLangInfo, CFE_ITALIC);
267}
268
269VOID
271{
272 m_LanguagesLoaded = true;
273
274 CStringW szBuffer;
275 if (!m_Parser->GetString(L"Languages", szBuffer))
276 {
277 return;
278 }
279
280 // Parse parameter string
281 int iIndex = 0;
282 while (true)
283 {
284 CStringW szLocale = szBuffer.Tokenize(L"|", iIndex);
285 if (szLocale.IsEmpty())
286 break;
287
288 szLocale = L"0x" + szLocale;
289
290 INT iLCID;
291 if (StrToIntExW(szLocale, STIF_SUPPORT_HEX, &iLCID))
292 {
293 m_LanguageLCIDs.Add(static_cast<LCID>(iLCID));
294 }
295 }
296}
297
298BOOL
300{
302}
303
304BOOL
306{
307 return FALSE;
308}
309
310BOOL
312{
314 return !Path.IsEmpty();
315}
316
317#define MAX_SCRNSHOT_NUM 16
318BOOL
320{
322 {
323 static_assert(MAX_SCRNSHOT_NUM < 10000, "MAX_SCRNSHOT_NUM is too big");
324 for (int i = 0; i < MAX_SCRNSHOT_NUM; i++)
325 {
326 CStringW ScrnshotField;
327 ScrnshotField.Format(L"Screenshot%d", i + 1);
328 CStringW ScrnshotLocation;
329 if (!m_Parser->GetString(ScrnshotField, ScrnshotLocation))
330 {
331 // We stop at the first screenshot not found,
332 // so screenshots _have_ to be consecutive
333 break;
334 }
335
336 if (PathIsURLW(ScrnshotLocation.GetString()))
337 {
338 m_szScrnshotLocation.Add(ScrnshotLocation);
339 }
340 }
341 m_ScrnshotRetrieved = true;
342 }
343
344 if (m_szScrnshotLocation.GetSize() > 0)
345 {
347 }
348
349 return !Path.IsEmpty();
350}
351
352VOID
354{
355 Url = m_szUrlDownload;
356 m_Parser->GetString(L"SHA1", Sha1);
357 INT iSizeBytes;
358
359 if (m_Parser->GetInt(L"SizeBytes", iSizeBytes))
360 {
361 SizeInBytes = (ULONG)iSizeBytes;
362 }
363 else
364 {
365 SizeInBytes = 0;
366 }
367}
368
369VOID
371{
372 License = LicenseString();
373 Size = m_szSize;
374 UrlSite = m_szUrlSite;
375 UrlDownload = m_szUrlDownload;
376}
377
380{
383 if (str.CompareNoCase(DB_INSTALLER_GENERATE) == 0)
384 return INSTALLER_GENERATE;
385 if (str.CompareNoCase(DB_INSTALLER_EXEINZIP) == 0)
386 return INSTALLER_EXEINZIP;
387 return INSTALLER_UNKNOWN;
388}
389
390BOOL
392{
393 ATLASSERT(FALSE && "Should not be called");
394 return FALSE;
395}
396
398 HKEY Key,
399 const CStringW &KeyName,
400 AppsCategories Category, UINT KeyInfo)
401 : CAppInfo(KeyName, Category), m_hKey(Key), m_KeyInfo(KeyInfo)
402{
403 if (GetApplicationRegString(L"DisplayName", szDisplayName))
404 {
408 }
409}
410
412{
413}
414
415VOID
417 CAppRichEdit *RichEdit,
418 UINT StringID,
419 const CStringW &String,
420 DWORD TextFlags)
421{
422 CStringW Tmp;
424 {
425 RichEdit->InsertTextWithString(StringID, Tmp, TextFlags);
426 }
427}
428
429VOID
431{
432 RichEdit->SetText(szDisplayName, CFE_BOLD);
433 RichEdit->InsertText(L"\n", 0);
434
436 AddApplicationRegString(RichEdit, IDS_INFO_PUBLISHER, L"Publisher", 0);
437 AddApplicationRegString(RichEdit, IDS_INFO_REGOWNER, L"RegOwner", 0);
438 AddApplicationRegString(RichEdit, IDS_INFO_PRODUCTID, L"ProductID", 0);
440 AddApplicationRegString(RichEdit, IDS_INFO_HELPPHONE, L"HelpTelephone", 0);
441 AddApplicationRegString(RichEdit, IDS_INFO_README, L"Readme", 0);
442 AddApplicationRegString(RichEdit, IDS_INFO_CONTACT, L"Contact", 0);
443 AddApplicationRegString(RichEdit, IDS_INFO_UPDATEINFO, L"URLUpdateInfo", CFM_LINK);
444 AddApplicationRegString(RichEdit, IDS_INFO_INFOABOUT, L"URLInfoAbout", CFM_LINK);
446
448 {
450 }
451
453 AddApplicationRegString(RichEdit, IDS_INFO_INSTLOCATION, L"InstallLocation", 0);
454 AddApplicationRegString(RichEdit, IDS_INFO_INSTALLSRC, L"InstallSource", 0);
455
457 {
459 }
460
463}
464
465VOID
467{
468 DWORD dwInstallTimeStamp;
469 SYSTEMTIME InstallLocalTime;
470 if (GetApplicationRegString(L"InstallDate", m_szInstallDate))
471 {
472 ZeroMemory(&InstallLocalTime, sizeof(InstallLocalTime));
473 // Check if we have 8 characters to parse the datetime.
474 // Maybe other formats exist as well?
476 if (m_szInstallDate.GetLength() == 8)
477 {
478 InstallLocalTime.wYear = wcstol(m_szInstallDate.Left(4).GetString(), NULL, 10);
479 InstallLocalTime.wMonth = wcstol(m_szInstallDate.Mid(4, 2).GetString(), NULL, 10);
480 InstallLocalTime.wDay = wcstol(m_szInstallDate.Mid(6, 2).GetString(), NULL, 10);
481 }
482 }
483 // It might be a DWORD (Unix timestamp). try again.
484 else if (GetApplicationRegDword(L"InstallDate", &dwInstallTimeStamp))
485 {
486 FILETIME InstallFileTime;
487 SYSTEMTIME InstallSystemTime;
488
489 UnixTimeToFileTime(dwInstallTimeStamp, &InstallFileTime);
490 FileTimeToSystemTime(&InstallFileTime, &InstallSystemTime);
491
492 // convert to localtime
493 SystemTimeToTzSpecificLocalTime(NULL, &InstallSystemTime, &InstallLocalTime);
494 }
495
496 // convert to readable date string
497 int cchTimeStrLen = GetDateFormatW(LOCALE_USER_DEFAULT, 0, &InstallLocalTime, NULL, 0, 0);
498
500 LOCALE_USER_DEFAULT, // use default locale for current user
501 0, &InstallLocalTime, NULL, m_szInstallDate.GetBuffer(cchTimeStrLen), cchTimeStrLen);
503}
504
505VOID
507{
508 DWORD dwWindowsInstaller = 0;
509 if (GetApplicationRegDword(L"WindowsInstaller", &dwWindowsInstaller) && dwWindowsInstaller)
510 {
511 // MSI has the same info in Uninstall / modify, so manually build it
513 }
514 else
515 {
517 }
518 DWORD dwNoModify = 0;
519 if (!GetApplicationRegDword(L"NoModify", &dwNoModify))
520 {
521 CStringW Tmp;
522 if (GetApplicationRegString(L"NoModify", Tmp))
523 {
524 dwNoModify = Tmp.GetLength() > 0 ? (Tmp[0] == '1') : 0;
525 }
526 else
527 {
528 dwNoModify = 0;
529 }
530 }
531 if (!dwNoModify)
532 {
533 if (dwWindowsInstaller)
534 {
536 }
537 else
538 {
540 }
541 }
542}
543
544BOOL
546{
547 return !szDisplayName.IsEmpty();
548}
549
550BOOL
552{
554 {
556 }
557
558 return !m_szModifyString.IsEmpty();
559}
560
561BOOL
563{
565 return !Path.IsEmpty();
566}
567
568BOOL
570{
571 return FALSE;
572}
573
574VOID
576{
577 ATLASSERT(FALSE && "Should not be called");
578}
579
580VOID
582{
583 ATLASSERT(FALSE && "Should not be called");
584}
585
588{
589 CRegKey reg;
591 {
592 return INSTALLER_GENERATE;
593 }
594 return INSTALLER_UNKNOWN;
595}
596
597BOOL
599{
601 {
602 return UninstallGenerated(*this, Flags);
603 }
604
605 BOOL bModify = Flags & UCF_MODIFY;
607 {
609 }
610
612 if ((Flags & (UCF_MODIFY | UCF_SILENT)) == UCF_SILENT)
613 {
614 DWORD msi = 0;
615 msi = GetApplicationRegDword(L"WindowsInstaller", &msi) && msi;
616 if (msi)
617 {
618 cmd += L" /qn";
619 }
620 else
621 {
622 CStringW silentcmd;
623 if (GetApplicationRegString(L"QuietUninstallString", silentcmd) && !silentcmd.IsEmpty())
624 {
625 cmd = silentcmd;
626 }
627 }
628 }
629
630 BOOL bSuccess = StartProcess(cmd, TRUE);
631
632 if (bSuccess && !bModify)
633 WriteLogMessage(EVENTLOG_SUCCESS, MSG_SUCCESS_REMOVE, szDisplayName);
634
635 return bSuccess;
636}
637
638BOOL
640{
641 ULONG nChars = 0;
642 // Get the size
643 if (m_hKey.QueryStringValue(lpKeyName, NULL, &nChars) != ERROR_SUCCESS)
644 {
645 String.Empty();
646 return FALSE;
647 }
648
649 LPWSTR Buffer = String.GetBuffer(nChars);
650 LONG lResult = m_hKey.QueryStringValue(lpKeyName, Buffer, &nChars);
651 if (nChars > 0 && Buffer[nChars - 1] == UNICODE_NULL)
652 nChars--;
653 String.ReleaseBuffer(nChars);
654
655 if (lResult != ERROR_SUCCESS)
656 {
657 String.Empty();
658 return FALSE;
659 }
660
661 if (String.Find('%') >= 0)
662 {
663 CStringW Tmp;
665 if (dwLen > 0)
666 {
667 BOOL bSuccess = ExpandEnvironmentStringsW(String, Tmp.GetBuffer(dwLen), dwLen) == dwLen;
668 Tmp.ReleaseBuffer(dwLen - 1);
669 if (bSuccess)
670 {
671 String = Tmp;
672 }
673 else
674 {
675 String.Empty();
676 return FALSE;
677 }
678 }
679 }
680
681 return TRUE;
682}
683
684BOOL
686{
687 DWORD dwSize = sizeof(DWORD), dwType;
688 if (RegQueryValueExW(m_hKey, lpKeyName, NULL, &dwType, (LPBYTE)lpValue, &dwSize) != ERROR_SUCCESS ||
689 dwType != REG_DWORD)
690 {
691 return FALSE;
692 }
693
694 return TRUE;
695}
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
PRTL_UNICODE_STRING_BUFFER Path
static AppsCategories ClampAvailableCategory(AppsCategories Category)
Definition: appinfo.cpp:14
#define MAX_SCRNSHOT_NUM
Definition: appinfo.cpp:317
int CompareVersion(const CStringW &left, const CStringW &right)
Definition: appinfo.cpp:93
LicenseType
Definition: appinfo.h:9
@ LICENSE_NONE
Definition: appinfo.h:10
@ LICENSE_OPENSOURCE
Definition: appinfo.h:11
@ LICENSE_TRIAL
Definition: appinfo.h:13
@ LICENSE_FREEWARE
Definition: appinfo.h:12
#define GENERATE_ARPSUBKEY
Definition: appinfo.h:100
#define DB_REGNAME
Definition: appinfo.h:92
BOOL IsKnownLicenseType(INT x)
Definition: appinfo.h:19
#define DB_INSTALLER
Definition: appinfo.h:93
#define DB_INSTALLER_EXEINZIP
Definition: appinfo.h:95
UninstallCommandFlags
Definition: appinfo.h:74
@ UCF_SILENT
Definition: appinfo.h:77
@ UCF_SAMEPROCESS
Definition: appinfo.h:78
@ UCF_MODIFY
Definition: appinfo.h:76
InstallerType
Definition: appinfo.h:83
@ INSTALLER_UNKNOWN
Definition: appinfo.h:84
@ INSTALLER_EXEINZIP
Definition: appinfo.h:86
@ INSTALLER_GENERATE
Definition: appinfo.h:85
#define DB_INSTALLER_GENERATE
Definition: appinfo.h:94
BOOL UninstallGenerated(CInstalledApplicationInfo &AppInfo, UninstallCommandFlags Flags)
Definition: geninst.cpp:837
AppsCategories
Definition: appinfo.h:25
@ ENUM_LASTCATEGORY
Definition: appinfo.h:44
@ ENUM_CAT_OTHER
Definition: appinfo.h:42
@ Identifier
Definition: asmpp.cpp:95
BOOL WriteLogMessage(WORD wType, DWORD dwEventID, LPCWSTR lpMsg)
Definition: misc.cpp:319
BOOL StartProcess(const CStringW &Path, BOOL Wait)
Definition: misc.cpp:176
BOOL GetInstalledVersion(CStringW *pszVersion, const CStringW &szRegName)
Definition: misc.cpp:372
void UnixTimeToFileTime(DWORD dwUnixTime, LPFILETIME pFileTime)
Definition: misc.cpp:435
#define IDS_AINFO_AVAILABLEVERSION
Definition: resource.h:177
#define IDS_INFO_INSTALLSRC
Definition: resource.h:165
#define IDS_STATUS_NOTINSTALLED
Definition: resource.h:205
#define IDS_AINFO_SIZE
Definition: resource.h:173
#define IDS_INFO_REGOWNER
Definition: resource.h:158
#define IDS_INFO_VERSION
Definition: resource.h:152
#define IDS_LICENSE_TRIAL
Definition: resource.h:216
#define IDS_AINFO_VERSION
Definition: resource.h:171
#define IDS_LICENSE_FREEWARE
Definition: resource.h:215
#define IDS_INFO_HELPLINK
Definition: resource.h:155
#define IDS_LANGUAGE_MORE_PLACEHOLDER
Definition: resource.h:223
#define IDS_LANGUAGE_SINGLE
Definition: resource.h:222
#define IDS_INFO_INSTALLDATE
Definition: resource.h:168
#define IDS_AINFO_PACKAGE_NAME
Definition: resource.h:182
#define IDS_INFO_HELPPHONE
Definition: resource.h:156
#define IDS_AINFO_LICENSE
Definition: resource.h:175
#define IDS_STATUS_UPDATE_AVAILABLE
Definition: resource.h:207
#define IDS_LANGUAGE_NO_TRANSLATION
Definition: resource.h:220
#define IDS_INFO_INSTLOCATION
Definition: resource.h:164
#define IDS_INFO_COMMENTS
Definition: resource.h:163
#define IDS_AINFO_LANGUAGES
Definition: resource.h:178
#define IDS_INFO_UPDATEINFO
Definition: resource.h:161
#define IDS_AINFO_DESCRIPTION
Definition: resource.h:172
#define IDS_AINFO_URLSITE
Definition: resource.h:174
#define IDS_INFO_CONTACT
Definition: resource.h:160
#define IDS_INFO_MODIFYPATH
Definition: resource.h:167
#define IDS_INFO_UNINSTALLSTR
Definition: resource.h:166
#define IDS_LICENSE_OPENSOURCE
Definition: resource.h:214
#define IDS_LANGUAGE_AVAILABLE_PLACEHOLDER
Definition: resource.h:224
#define IDS_INFO_PRODUCTID
Definition: resource.h:159
#define IDS_INFO_README
Definition: resource.h:157
#define IDS_AINFO_URLDOWNLOAD
Definition: resource.h:176
#define IDS_LANGUAGE_AVAILABLE_TRANSLATION
Definition: resource.h:219
#define IDS_INFO_PUBLISHER
Definition: resource.h:154
#define IDS_STATUS_INSTALLED
Definition: resource.h:204
#define IDS_LANGUAGE_ENGLISH_TRANSLATION
Definition: resource.h:221
#define IDS_INFO_INFOABOUT
Definition: resource.h:162
LONG QueryStringValue(LPCTSTR pszValueName, LPTSTR pszValue, ULONG *pnChars) noexcept
Definition: atlbase.h:1240
int GetSize() const
Definition: atlsimpcoll.h:104
BOOL Add(const T &t)
Definition: atlsimpcoll.h:58
int Find(const T &t) const
Definition: atlsimpcoll.h:82
bool IsEmpty() const noexcept
Definition: atlsimpstr.h:394
void ReleaseBuffer(_In_ int nNewLength=-1)
Definition: atlsimpstr.h:387
PXSTR GetString() noexcept
Definition: atlsimpstr.h:367
int GetLength() const noexcept
Definition: atlsimpstr.h:362
void Empty() noexcept
Definition: atlsimpstr.h:253
int CompareNoCase(_In_z_ PCXSTR psz) const
Definition: cstringt.h:743
CStringT Left(int nCount) const
Definition: cstringt.h:776
void __cdecl Format(UINT nFormatID,...)
Definition: cstringt.h:818
CStringT & Trim()
Definition: cstringt.h:1046
CStringT Tokenize(_In_z_ PCXSTR pszTokens, _Inout_ int &iStart) const
Definition: cstringt.h:947
CStringT Mid(int iFirst, int nCount) const
Definition: cstringt.h:748
Definition: bufpool.h:45
CStringW szComments
Definition: appinfo.h:120
CStringW szDisplayIcon
Definition: appinfo.h:117
CAppInfo(const CStringW &Identifier, AppsCategories Category)
Definition: appinfo.cpp:21
CStringW szDisplayName
Definition: appinfo.h:118
CStringW szDisplayVersion
Definition: appinfo.h:119
virtual ~CAppInfo()
Definition: appinfo.cpp:26
const CStringW szIdentifier
Definition: appinfo.h:114
VOID InsertTextWithString(UINT StringID, const CStringW &Text, DWORD TextFlags)
Definition: appview.cpp:310
VOID LoadAndInsertText(UINT uStringID, const CStringW &szText, DWORD TextFlags)
Definition: appview.cpp:286
virtual InstallerType GetInstallerType() const override
Definition: appinfo.cpp:379
CAvailableApplicationInfo(CConfigParser *Parser, const CStringW &PkgName, AppsCategories Category, const CPathW &BasePath)
Definition: appinfo.cpp:30
CSimpleArray< LCID > m_LanguageLCIDs
Definition: appinfo.h:150
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override
Definition: appinfo.cpp:370
virtual BOOL RetrieveScreenshot(CStringW &Path) override
Definition: appinfo.cpp:319
virtual VOID GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override
Definition: appinfo.cpp:353
virtual BOOL CanModify() override
Definition: appinfo.cpp:305
virtual BOOL Valid() const override
Definition: appinfo.cpp:299
virtual BOOL UninstallApplication(UninstallCommandFlags Flags) override
Definition: appinfo.cpp:391
VOID InsertLanguageInfo(CAppRichEdit *RichEdit)
Definition: appinfo.cpp:209
CConfigParser * m_Parser
Definition: appinfo.h:144
virtual BOOL RetrieveIcon(CStringW &Path) const override
Definition: appinfo.cpp:311
CSimpleArray< CStringW > m_szScrnshotLocation
Definition: appinfo.h:145
virtual VOID ShowAppInfo(CAppRichEdit *RichEdit) override
Definition: appinfo.cpp:78
VOID InsertVersionInfo(CAppRichEdit *RichEdit)
Definition: appinfo.cpp:124
BOOL GetString(const CStringW &KeyName, CStringW &ResultString)
BOOL GetInt(const CStringW &KeyName, INT &iResult)
virtual VOID ShowAppInfo(CAppRichEdit *RichEdit) override
Definition: appinfo.cpp:430
virtual BOOL RetrieveScreenshot(CStringW &Path) override
Definition: appinfo.cpp:569
BOOL GetApplicationRegDword(LPCWSTR lpKeyName, DWORD *lpValue)
Definition: appinfo.cpp:685
CStringW m_szUninstallString
Definition: appinfo.h:197
virtual BOOL Valid() const override
Definition: appinfo.cpp:545
virtual BOOL RetrieveIcon(CStringW &Path) const override
Definition: appinfo.cpp:562
BOOL GetApplicationRegString(LPCWSTR lpKeyName, CStringW &String)
Definition: appinfo.cpp:639
VOID AddApplicationRegString(CAppRichEdit *RichEdit, UINT StringID, const CStringW &String, DWORD TextFlags)
Definition: appinfo.cpp:416
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override
Definition: appinfo.cpp:581
CInstalledApplicationInfo(HKEY Key, const CStringW &KeyName, AppsCategories Category, UINT KeyInfo)
Definition: appinfo.cpp:397
virtual BOOL CanModify() override
Definition: appinfo.cpp:551
virtual InstallerType GetInstallerType() const override
Definition: appinfo.cpp:587
virtual BOOL UninstallApplication(UninstallCommandFlags Flags) override
Definition: appinfo.cpp:598
virtual VOID GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override
Definition: appinfo.cpp:575
VOID InsertText(LPCWSTR lpszText, DWORD dwEffects)
Definition: crichedit.h:77
VOID SetText(LPCWSTR lpszText, DWORD dwEffects)
Definition: crichedit.h:91
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
LPCTSTR IconName
Definition: desktop.c:53
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
#define MAX_PATH
Definition: compat.h:34
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
Definition: environ.c:519
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:188
BOOL WINAPI SystemTimeToTzSpecificLocalTime(CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation, CONST SYSTEMTIME *lpUniversalTime, LPSYSTEMTIME lpLocalTime)
Definition: timezone.c:377
LCID WINAPI GetUserDefaultLCID(void)
Definition: locale.c:1211
static const WCHAR IconPath[]
Definition: install.c:51
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
Definition: path.c:1783
BOOL WINAPI StrToIntExW(LPCWSTR lpszStr, DWORD dwFlags, int *lpiRet)
Definition: string.c:970
LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
Definition: string.c:2394
BOOL WINAPI PathIsURLW(LPCWSTR lpstrPath)
Definition: url.c:2432
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLdouble GLdouble right
Definition: glext.h:10859
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLint left
Definition: glext.h:7726
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static int reg
Definition: i386-dis.c:1290
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
INT WINAPI GetDateFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCWSTR lpFormat, LPWSTR lpDateStr, INT cchOut)
Definition: lcformat.c:989
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
unsigned int UINT
Definition: ndis.h:50
#define KEY_READ
Definition: nt_native.h:1023
#define DWORD
Definition: nt_native.h:44
#define LOCALE_USER_DEFAULT
#define UNICODE_NULL
#define SORT_DEFAULT
#define MAKELCID(lgid, srtid)
#define L(x)
Definition: ntvdm.h:50
long LONG
Definition: pedump.c:60
#define CFE_BOLD
Definition: richedit.h:406
#define CFE_ITALIC
Definition: richedit.h:407
#define CFE_LINK
Definition: richedit.h:411
#define CFM_LINK
Definition: richedit.h:337
const WCHAR * str
#define REG_DWORD
Definition: sdbapi.c:596
#define MAKELANGID(p, s)
Definition: nls.h:15
#define LANG_ENGLISH
Definition: nls.h:52
#define SUBLANG_DEFAULT
Definition: nls.h:168
DWORD LCID
Definition: nls.h:13
#define STIF_SUPPORT_HEX
Definition: shlwapi.h:1487
#define STIF_DEFAULT
Definition: shlwapi.h:1486
#define false
Definition: stdbool.h:37
WORD wYear
Definition: winbase.h:936
WORD wMonth
Definition: winbase.h:937
WORD wDay
Definition: winbase.h:939
Definition: ftp_var.h:139
unsigned char * LPBYTE
Definition: typedefs.h:53
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
Definition: wdfdevice.h:2699
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2433
#define ZeroMemory
Definition: winbase.h:1743
#define EVENTLOG_SUCCESS
Definition: winnt_old.h:2870
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185