ReactOS 0.4.16-dev-747-gbc52d5f
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_GENINSTSECTION) == 0)
384 return INSTALLER_GENERATE;
385 else
386 return INSTALLER_UNKNOWN;
387}
388
389BOOL
391{
392 ATLASSERT(FALSE && "Should not be called");
393 return FALSE;
394}
395
397 HKEY Key,
398 const CStringW &KeyName,
399 AppsCategories Category, UINT KeyInfo)
400 : CAppInfo(KeyName, Category), m_hKey(Key), m_KeyInfo(KeyInfo)
401{
402 if (GetApplicationRegString(L"DisplayName", szDisplayName))
403 {
407 }
408}
409
411{
412}
413
414VOID
416 CAppRichEdit *RichEdit,
417 UINT StringID,
418 const CStringW &String,
419 DWORD TextFlags)
420{
421 CStringW Tmp;
423 {
424 RichEdit->InsertTextWithString(StringID, Tmp, TextFlags);
425 }
426}
427
428VOID
430{
431 RichEdit->SetText(szDisplayName, CFE_BOLD);
432 RichEdit->InsertText(L"\n", 0);
433
435 AddApplicationRegString(RichEdit, IDS_INFO_PUBLISHER, L"Publisher", 0);
436 AddApplicationRegString(RichEdit, IDS_INFO_REGOWNER, L"RegOwner", 0);
437 AddApplicationRegString(RichEdit, IDS_INFO_PRODUCTID, L"ProductID", 0);
439 AddApplicationRegString(RichEdit, IDS_INFO_HELPPHONE, L"HelpTelephone", 0);
440 AddApplicationRegString(RichEdit, IDS_INFO_README, L"Readme", 0);
441 AddApplicationRegString(RichEdit, IDS_INFO_CONTACT, L"Contact", 0);
442 AddApplicationRegString(RichEdit, IDS_INFO_UPDATEINFO, L"URLUpdateInfo", CFM_LINK);
443 AddApplicationRegString(RichEdit, IDS_INFO_INFOABOUT, L"URLInfoAbout", CFM_LINK);
445
447 {
449 }
450
452 AddApplicationRegString(RichEdit, IDS_INFO_INSTLOCATION, L"InstallLocation", 0);
453 AddApplicationRegString(RichEdit, IDS_INFO_INSTALLSRC, L"InstallSource", 0);
454
456 {
458 }
459
462}
463
464VOID
466{
467 DWORD dwInstallTimeStamp;
468 SYSTEMTIME InstallLocalTime;
469 if (GetApplicationRegString(L"InstallDate", m_szInstallDate))
470 {
471 ZeroMemory(&InstallLocalTime, sizeof(InstallLocalTime));
472 // Check if we have 8 characters to parse the datetime.
473 // Maybe other formats exist as well?
475 if (m_szInstallDate.GetLength() == 8)
476 {
477 InstallLocalTime.wYear = wcstol(m_szInstallDate.Left(4).GetString(), NULL, 10);
478 InstallLocalTime.wMonth = wcstol(m_szInstallDate.Mid(4, 2).GetString(), NULL, 10);
479 InstallLocalTime.wDay = wcstol(m_szInstallDate.Mid(6, 2).GetString(), NULL, 10);
480 }
481 }
482 // It might be a DWORD (Unix timestamp). try again.
483 else if (GetApplicationRegDword(L"InstallDate", &dwInstallTimeStamp))
484 {
485 FILETIME InstallFileTime;
486 SYSTEMTIME InstallSystemTime;
487
488 UnixTimeToFileTime(dwInstallTimeStamp, &InstallFileTime);
489 FileTimeToSystemTime(&InstallFileTime, &InstallSystemTime);
490
491 // convert to localtime
492 SystemTimeToTzSpecificLocalTime(NULL, &InstallSystemTime, &InstallLocalTime);
493 }
494
495 // convert to readable date string
496 int cchTimeStrLen = GetDateFormatW(LOCALE_USER_DEFAULT, 0, &InstallLocalTime, NULL, 0, 0);
497
499 LOCALE_USER_DEFAULT, // use default locale for current user
500 0, &InstallLocalTime, NULL, m_szInstallDate.GetBuffer(cchTimeStrLen), cchTimeStrLen);
502}
503
504VOID
506{
507 DWORD dwWindowsInstaller = 0;
508 if (GetApplicationRegDword(L"WindowsInstaller", &dwWindowsInstaller) && dwWindowsInstaller)
509 {
510 // MSI has the same info in Uninstall / modify, so manually build it
512 }
513 else
514 {
516 }
517 DWORD dwNoModify = 0;
518 if (!GetApplicationRegDword(L"NoModify", &dwNoModify))
519 {
520 CStringW Tmp;
521 if (GetApplicationRegString(L"NoModify", Tmp))
522 {
523 dwNoModify = Tmp.GetLength() > 0 ? (Tmp[0] == '1') : 0;
524 }
525 else
526 {
527 dwNoModify = 0;
528 }
529 }
530 if (!dwNoModify)
531 {
532 if (dwWindowsInstaller)
533 {
535 }
536 else
537 {
539 }
540 }
541}
542
543BOOL
545{
546 return !szDisplayName.IsEmpty();
547}
548
549BOOL
551{
553 {
555 }
556
557 return !m_szModifyString.IsEmpty();
558}
559
560BOOL
562{
564 return !Path.IsEmpty();
565}
566
567BOOL
569{
570 return FALSE;
571}
572
573VOID
575{
576 ATLASSERT(FALSE && "Should not be called");
577}
578
579VOID
581{
582 ATLASSERT(FALSE && "Should not be called");
583}
584
587{
588 CRegKey reg;
590 {
591 return INSTALLER_GENERATE;
592 }
593 return INSTALLER_UNKNOWN;
594}
595
596BOOL
598{
600 {
601 return UninstallGenerated(*this, Flags);
602 }
603
604 BOOL bModify = Flags & UCF_MODIFY;
606 {
608 }
609
611 if ((Flags & (UCF_MODIFY | UCF_SILENT)) == UCF_SILENT)
612 {
613 DWORD msi = 0;
614 msi = GetApplicationRegDword(L"WindowsInstaller", &msi) && msi;
615 if (msi)
616 {
617 cmd += L" /qn";
618 }
619 else
620 {
621 CStringW silentcmd;
622 if (GetApplicationRegString(L"QuietUninstallString", silentcmd) && !silentcmd.IsEmpty())
623 {
624 cmd = silentcmd;
625 }
626 }
627 }
628
630
631 if (bSuccess && !bModify)
632 WriteLogMessage(EVENTLOG_SUCCESS, MSG_SUCCESS_REMOVE, szDisplayName);
633
634 return bSuccess;
635}
636
637BOOL
639{
640 ULONG nChars = 0;
641 // Get the size
642 if (m_hKey.QueryStringValue(lpKeyName, NULL, &nChars) != ERROR_SUCCESS)
643 {
644 String.Empty();
645 return FALSE;
646 }
647
648 LPWSTR Buffer = String.GetBuffer(nChars);
649 LONG lResult = m_hKey.QueryStringValue(lpKeyName, Buffer, &nChars);
650 if (nChars > 0 && Buffer[nChars - 1] == UNICODE_NULL)
651 nChars--;
652 String.ReleaseBuffer(nChars);
653
654 if (lResult != ERROR_SUCCESS)
655 {
656 String.Empty();
657 return FALSE;
658 }
659
660 if (String.Find('%') >= 0)
661 {
662 CStringW Tmp;
664 if (dwLen > 0)
665 {
666 BOOL bSuccess = ExpandEnvironmentStringsW(String, Tmp.GetBuffer(dwLen), dwLen) == dwLen;
667 Tmp.ReleaseBuffer(dwLen - 1);
668 if (bSuccess)
669 {
670 String = Tmp;
671 }
672 else
673 {
674 String.Empty();
675 return FALSE;
676 }
677 }
678 }
679
680 return TRUE;
681}
682
683BOOL
685{
686 DWORD dwSize = sizeof(DWORD), dwType;
687 if (RegQueryValueExW(m_hKey, lpKeyName, NULL, &dwType, (LPBYTE)lpValue, &dwSize) != ERROR_SUCCESS ||
688 dwType != REG_DWORD)
689 {
690 return FALSE;
691 }
692
693 return TRUE;
694}
#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:97
#define DB_REGNAME
Definition: appinfo.h:91
BOOL IsKnownLicenseType(INT x)
Definition: appinfo.h:19
#define DB_GENINSTSECTION
Definition: appinfo.h:96
#define DB_INSTALLER
Definition: appinfo.h:92
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_GENERATE
Definition: appinfo.h:85
BOOL UninstallGenerated(CInstalledApplicationInfo &AppInfo, UninstallCommandFlags Flags)
Definition: geninst.cpp:815
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:254
BOOL StartProcess(const CStringW &Path, BOOL Wait)
Definition: misc.cpp:111
BOOL GetInstalledVersion(CStringW *pszVersion, const CStringW &szRegName)
Definition: misc.cpp:307
void UnixTimeToFileTime(DWORD dwUnixTime, LPFILETIME pFileTime)
Definition: misc.cpp:370
#define IDS_AINFO_AVAILABLEVERSION
Definition: resource.h:172
#define IDS_INFO_INSTALLSRC
Definition: resource.h:160
#define IDS_STATUS_NOTINSTALLED
Definition: resource.h:200
#define IDS_AINFO_SIZE
Definition: resource.h:168
#define IDS_INFO_REGOWNER
Definition: resource.h:153
#define IDS_INFO_VERSION
Definition: resource.h:147
#define IDS_LICENSE_TRIAL
Definition: resource.h:211
#define IDS_AINFO_VERSION
Definition: resource.h:166
#define IDS_LICENSE_FREEWARE
Definition: resource.h:210
#define IDS_INFO_HELPLINK
Definition: resource.h:150
#define IDS_LANGUAGE_MORE_PLACEHOLDER
Definition: resource.h:218
#define IDS_LANGUAGE_SINGLE
Definition: resource.h:217
#define IDS_INFO_INSTALLDATE
Definition: resource.h:163
#define IDS_AINFO_PACKAGE_NAME
Definition: resource.h:177
#define IDS_INFO_HELPPHONE
Definition: resource.h:151
#define IDS_AINFO_LICENSE
Definition: resource.h:170
#define IDS_STATUS_UPDATE_AVAILABLE
Definition: resource.h:202
#define IDS_LANGUAGE_NO_TRANSLATION
Definition: resource.h:215
#define IDS_INFO_INSTLOCATION
Definition: resource.h:159
#define IDS_INFO_COMMENTS
Definition: resource.h:158
#define IDS_AINFO_LANGUAGES
Definition: resource.h:173
#define IDS_INFO_UPDATEINFO
Definition: resource.h:156
#define IDS_AINFO_DESCRIPTION
Definition: resource.h:167
#define IDS_AINFO_URLSITE
Definition: resource.h:169
#define IDS_INFO_CONTACT
Definition: resource.h:155
#define IDS_INFO_MODIFYPATH
Definition: resource.h:162
#define IDS_INFO_UNINSTALLSTR
Definition: resource.h:161
#define IDS_LICENSE_OPENSOURCE
Definition: resource.h:209
#define IDS_LANGUAGE_AVAILABLE_PLACEHOLDER
Definition: resource.h:219
#define IDS_INFO_PRODUCTID
Definition: resource.h:154
#define IDS_INFO_README
Definition: resource.h:152
#define IDS_AINFO_URLDOWNLOAD
Definition: resource.h:171
#define IDS_LANGUAGE_AVAILABLE_TRANSLATION
Definition: resource.h:214
#define IDS_INFO_PUBLISHER
Definition: resource.h:149
#define IDS_STATUS_INSTALLED
Definition: resource.h:199
#define IDS_LANGUAGE_ENGLISH_TRANSLATION
Definition: resource.h:216
#define IDS_INFO_INFOABOUT
Definition: resource.h:157
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:114
CStringW szDisplayIcon
Definition: appinfo.h:111
CAppInfo(const CStringW &Identifier, AppsCategories Category)
Definition: appinfo.cpp:21
CStringW szDisplayName
Definition: appinfo.h:112
CStringW szDisplayVersion
Definition: appinfo.h:113
virtual ~CAppInfo()
Definition: appinfo.cpp:26
const CStringW szIdentifier
Definition: appinfo.h:108
VOID InsertTextWithString(UINT StringID, const CStringW &Text, DWORD TextFlags)
Definition: appview.cpp:309
VOID LoadAndInsertText(UINT uStringID, const CStringW &szText, DWORD TextFlags)
Definition: appview.cpp:285
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:144
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:390
VOID InsertLanguageInfo(CAppRichEdit *RichEdit)
Definition: appinfo.cpp:209
CConfigParser * m_Parser
Definition: appinfo.h:138
virtual BOOL RetrieveIcon(CStringW &Path) const override
Definition: appinfo.cpp:311
CSimpleArray< CStringW > m_szScrnshotLocation
Definition: appinfo.h:139
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:429
virtual BOOL RetrieveScreenshot(CStringW &Path) override
Definition: appinfo.cpp:568
BOOL GetApplicationRegDword(LPCWSTR lpKeyName, DWORD *lpValue)
Definition: appinfo.cpp:684
CStringW m_szUninstallString
Definition: appinfo.h:191
virtual BOOL Valid() const override
Definition: appinfo.cpp:544
virtual BOOL RetrieveIcon(CStringW &Path) const override
Definition: appinfo.cpp:561
BOOL GetApplicationRegString(LPCWSTR lpKeyName, CStringW &String)
Definition: appinfo.cpp:638
VOID AddApplicationRegString(CAppRichEdit *RichEdit, UINT StringID, const CStringW &String, DWORD TextFlags)
Definition: appinfo.cpp:415
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override
Definition: appinfo.cpp:580
CInstalledApplicationInfo(HKEY Key, const CStringW &KeyName, AppsCategories Category, UINT KeyInfo)
Definition: appinfo.cpp:396
virtual BOOL CanModify() override
Definition: appinfo.cpp:550
virtual InstallerType GetInstallerType() const override
Definition: appinfo.cpp:586
virtual BOOL UninstallApplication(UninstallCommandFlags Flags) override
Definition: appinfo.cpp:597
virtual VOID GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override
Definition: appinfo.cpp:574
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
static BOOLEAN bSuccess
Definition: drive.cpp:355
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:993
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:1478
#define STIF_DEFAULT
Definition: shlwapi.h:1477
#define false
Definition: stdbool.h:37
WORD wYear
Definition: winbase.h:930
WORD wMonth
Definition: winbase.h:931
WORD wDay
Definition: winbase.h:933
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:1737
#define EVENTLOG_SUCCESS
Definition: winnt_old.h:2862
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185