ReactOS 0.4.15-dev-8061-g57b775e
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
14 : szIdentifier(Identifier), iCategory(Category)
15{
16}
17
19{
20}
21
23 CConfigParser *Parser,
24 const CStringW &PkgName,
25 AppsCategories Category,
26 const CPathW &BasePath)
27 : CAppInfo(PkgName, Category), m_Parser(Parser), m_ScrnshotRetrieved(false), m_LanguagesLoaded(false)
28{
31 m_Parser->GetString(L"URLDownload", m_szUrlDownload);
32 m_Parser->GetString(L"Description", szComments);
33
34 CPathW IconPath = BasePath;
35 IconPath += L"icons";
36
38 if (m_Parser->GetString(L"Icon", IconName))
39 {
41 }
42 else
43 {
44 // inifile.ico
45 IconPath += (szIdentifier + L".ico");
46 }
47
49 {
51 }
52
53 INT iSizeBytes;
54
55 if (m_Parser->GetInt(L"SizeBytes", iSizeBytes))
56 {
59 }
60
61 m_Parser->GetString(L"URLSite", m_szUrlSite);
62}
63
65{
66 delete m_Parser;
67}
68
69VOID
71{
72 RichEdit->SetText(szDisplayName, CFE_BOLD);
73 InsertVersionInfo(RichEdit);
75 InsertLanguageInfo(RichEdit);
76
82}
83
84int
86{
87 int nLeft = 0, nRight = 0;
88
89 while (true)
90 {
91 CStringW leftPart = left.Tokenize(L".", nLeft);
92 CStringW rightPart = right.Tokenize(L".", nRight);
93
94 if (leftPart.IsEmpty() && rightPart.IsEmpty())
95 return 0;
96 if (leftPart.IsEmpty())
97 return -1;
98 if (rightPart.IsEmpty())
99 return 1;
100
101 int leftVal, rightVal;
102
103 if (!StrToIntExW(leftPart, STIF_DEFAULT, &leftVal))
104 leftVal = 0;
105 if (!StrToIntExW(rightPart, STIF_DEFAULT, &rightVal))
106 rightVal = 0;
107
108 if (leftVal > rightVal)
109 return 1;
110 if (rightVal < leftVal)
111 return -1;
112 }
113}
114
115VOID
117{
118 CStringW szRegName;
119 m_Parser->GetString(DB_REGNAME, szRegName);
120
122 if (bIsInstalled)
123 {
124 CStringW szInstalledVersion;
125 CStringW szNameVersion = szDisplayName + L" " + szDisplayVersion;
126 BOOL bHasInstalledVersion = ::GetInstalledVersion(&szInstalledVersion, szRegName) ||
127 ::GetInstalledVersion(&szInstalledVersion, szDisplayName) ||
128 ::GetInstalledVersion(&szInstalledVersion, szNameVersion);
129
130 if (bHasInstalledVersion)
131 {
132 BOOL bHasUpdate = CompareVersion(szInstalledVersion, szDisplayVersion) < 0;
133 if (bHasUpdate)
134 {
136 RichEdit->LoadAndInsertText(IDS_AINFO_VERSION, szInstalledVersion, 0);
137 }
138 else
139 {
141 }
142 }
143 else
144 {
146 }
147 }
148 else
149 {
151 }
152
154}
155
158{
159 INT IntBuffer;
160 m_Parser->GetInt(L"LicenseType", IntBuffer);
161 CStringW szLicenseString;
162 m_Parser->GetString(L"License", szLicenseString);
163 LicenseType licenseType;
164
165 if (IsKnownLicenseType(IntBuffer))
166 {
167 licenseType = static_cast<LicenseType>(IntBuffer);
168 }
169 else
170 {
171 licenseType = LICENSE_NONE;
172 if (szLicenseString.CompareNoCase(L"Freeware") == 0)
173 {
174 licenseType = LICENSE_FREEWARE;
175 szLicenseString = L"";
176 }
177 }
178
179 CStringW szLicense;
180 switch (licenseType)
181 {
183 szLicense.LoadStringW(IDS_LICENSE_OPENSOURCE);
184 break;
185 case LICENSE_FREEWARE:
186 szLicense.LoadStringW(IDS_LICENSE_FREEWARE);
187 break;
188 case LICENSE_TRIAL:
189 szLicense.LoadStringW(IDS_LICENSE_TRIAL);
190 break;
191 default:
192 return szLicenseString;
193 }
194
195 if (!szLicenseString.IsEmpty())
196 szLicense += L" (" + szLicenseString + L")";
197 return szLicense;
198}
199
200VOID
202{
204 {
206 }
207
208 if (m_LanguageLCIDs.GetSize() == 0)
209 {
210 return;
211 }
212
213 const INT nTranslations = m_LanguageLCIDs.GetSize();
214 CStringW szLangInfo;
215 CStringW szLoadedTextAvailability;
216 CStringW szLoadedAInfoText;
217
218 szLoadedAInfoText.LoadStringW(IDS_AINFO_LANGUAGES);
219
222 {
223 szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_AVAILABLE_TRANSLATION);
224 if (nTranslations > 1)
225 {
228 szLangInfo.Format(buf, nTranslations - 1);
229 }
230 else
231 {
232 szLangInfo.LoadStringW(IDS_LANGUAGE_SINGLE);
233 szLangInfo = L" (" + szLangInfo + L")";
234 }
235 }
236 else if (m_LanguageLCIDs.Find(lcEnglish) >= 0)
237 {
238 szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_ENGLISH_TRANSLATION);
239 if (nTranslations > 1)
240 {
243 szLangInfo.Format(buf, nTranslations - 1);
244 }
245 else
246 {
247 szLangInfo.LoadStringW(IDS_LANGUAGE_SINGLE);
248 szLangInfo = L" (" + szLangInfo + L")";
249 }
250 }
251 else
252 {
253 szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_NO_TRANSLATION);
254 }
255
256 RichEdit->InsertText(szLoadedAInfoText, CFE_BOLD);
257 RichEdit->InsertText(szLoadedTextAvailability, NULL);
258 RichEdit->InsertText(szLangInfo, CFE_ITALIC);
259}
260
261VOID
263{
264 m_LanguagesLoaded = true;
265
266 CStringW szBuffer;
267 if (!m_Parser->GetString(L"Languages", szBuffer))
268 {
269 return;
270 }
271
272 // Parse parameter string
273 int iIndex = 0;
274 while (true)
275 {
276 CStringW szLocale = szBuffer.Tokenize(L"|", iIndex);
277 if (szLocale.IsEmpty())
278 break;
279
280 szLocale = L"0x" + szLocale;
281
282 INT iLCID;
283 if (StrToIntExW(szLocale, STIF_SUPPORT_HEX, &iLCID))
284 {
285 m_LanguageLCIDs.Add(static_cast<LCID>(iLCID));
286 }
287 }
288}
289
290BOOL
292{
294}
295
296BOOL
298{
299 return FALSE;
300}
301
302BOOL
304{
306 return !Path.IsEmpty();
307}
308
309#define MAX_SCRNSHOT_NUM 16
310BOOL
312{
314 {
315 static_assert(MAX_SCRNSHOT_NUM < 10000, "MAX_SCRNSHOT_NUM is too big");
316 for (int i = 0; i < MAX_SCRNSHOT_NUM; i++)
317 {
318 CStringW ScrnshotField;
319 ScrnshotField.Format(L"Screenshot%d", i + 1);
320 CStringW ScrnshotLocation;
321 if (!m_Parser->GetString(ScrnshotField, ScrnshotLocation))
322 {
323 // We stop at the first screenshot not found,
324 // so screenshots _have_ to be consecutive
325 break;
326 }
327
328 if (PathIsURLW(ScrnshotLocation.GetString()))
329 {
330 m_szScrnshotLocation.Add(ScrnshotLocation);
331 }
332 }
333 m_ScrnshotRetrieved = true;
334 }
335
336 if (m_szScrnshotLocation.GetSize() > 0)
337 {
339 }
340
341 return !Path.IsEmpty();
342}
343
344VOID
346{
347 Url = m_szUrlDownload;
348 m_Parser->GetString(L"SHA1", Sha1);
349 INT iSizeBytes;
350
351 if (m_Parser->GetInt(L"SizeBytes", iSizeBytes))
352 {
353 SizeInBytes = (ULONG)iSizeBytes;
354 }
355 else
356 {
357 SizeInBytes = 0;
358 }
359}
360
361VOID
363{
364 License = LicenseString();
365 Size = m_szSize;
366 UrlSite = m_szUrlSite;
367 UrlDownload = m_szUrlDownload;
368}
369
372{
375 if (str.CompareNoCase(DB_GENINSTSECTION) == 0)
376 return INSTALLER_GENERATE;
377 else
378 return INSTALLER_UNKNOWN;
379}
380
381BOOL
383{
384 ATLASSERT(FALSE && "Should not be called");
385 return FALSE;
386}
387
389 HKEY Key,
390 const CStringW &KeyName,
391 AppsCategories Category, UINT KeyInfo)
392 : CAppInfo(KeyName, Category), m_hKey(Key), m_KeyInfo(KeyInfo)
393{
394 if (GetApplicationRegString(L"DisplayName", szDisplayName))
395 {
399 }
400}
401
403{
404}
405
406VOID
408 CAppRichEdit *RichEdit,
409 UINT StringID,
410 const CStringW &String,
411 DWORD TextFlags)
412{
413 CStringW Tmp;
415 {
416 RichEdit->InsertTextWithString(StringID, Tmp, TextFlags);
417 }
418}
419
420VOID
422{
423 RichEdit->SetText(szDisplayName, CFE_BOLD);
424 RichEdit->InsertText(L"\n", 0);
425
427 AddApplicationRegString(RichEdit, IDS_INFO_PUBLISHER, L"Publisher", 0);
428 AddApplicationRegString(RichEdit, IDS_INFO_REGOWNER, L"RegOwner", 0);
429 AddApplicationRegString(RichEdit, IDS_INFO_PRODUCTID, L"ProductID", 0);
431 AddApplicationRegString(RichEdit, IDS_INFO_HELPPHONE, L"HelpTelephone", 0);
432 AddApplicationRegString(RichEdit, IDS_INFO_README, L"Readme", 0);
433 AddApplicationRegString(RichEdit, IDS_INFO_CONTACT, L"Contact", 0);
434 AddApplicationRegString(RichEdit, IDS_INFO_UPDATEINFO, L"URLUpdateInfo", CFM_LINK);
435 AddApplicationRegString(RichEdit, IDS_INFO_INFOABOUT, L"URLInfoAbout", CFM_LINK);
437
439 {
441 }
442
444 AddApplicationRegString(RichEdit, IDS_INFO_INSTLOCATION, L"InstallLocation", 0);
445 AddApplicationRegString(RichEdit, IDS_INFO_INSTALLSRC, L"InstallSource", 0);
446
448 {
450 }
451
454}
455
456VOID
458{
459 DWORD dwInstallTimeStamp;
460 SYSTEMTIME InstallLocalTime;
461 if (GetApplicationRegString(L"InstallDate", m_szInstallDate))
462 {
463 ZeroMemory(&InstallLocalTime, sizeof(InstallLocalTime));
464 // Check if we have 8 characters to parse the datetime.
465 // Maybe other formats exist as well?
467 if (m_szInstallDate.GetLength() == 8)
468 {
469 InstallLocalTime.wYear = wcstol(m_szInstallDate.Left(4).GetString(), NULL, 10);
470 InstallLocalTime.wMonth = wcstol(m_szInstallDate.Mid(4, 2).GetString(), NULL, 10);
471 InstallLocalTime.wDay = wcstol(m_szInstallDate.Mid(6, 2).GetString(), NULL, 10);
472 }
473 }
474 // It might be a DWORD (Unix timestamp). try again.
475 else if (GetApplicationRegDword(L"InstallDate", &dwInstallTimeStamp))
476 {
477 FILETIME InstallFileTime;
478 SYSTEMTIME InstallSystemTime;
479
480 UnixTimeToFileTime(dwInstallTimeStamp, &InstallFileTime);
481 FileTimeToSystemTime(&InstallFileTime, &InstallSystemTime);
482
483 // convert to localtime
484 SystemTimeToTzSpecificLocalTime(NULL, &InstallSystemTime, &InstallLocalTime);
485 }
486
487 // convert to readable date string
488 int cchTimeStrLen = GetDateFormatW(LOCALE_USER_DEFAULT, 0, &InstallLocalTime, NULL, 0, 0);
489
491 LOCALE_USER_DEFAULT, // use default locale for current user
492 0, &InstallLocalTime, NULL, m_szInstallDate.GetBuffer(cchTimeStrLen), cchTimeStrLen);
494}
495
496VOID
498{
499 DWORD dwWindowsInstaller = 0;
500 if (GetApplicationRegDword(L"WindowsInstaller", &dwWindowsInstaller) && dwWindowsInstaller)
501 {
502 // MSI has the same info in Uninstall / modify, so manually build it
504 }
505 else
506 {
508 }
509 DWORD dwNoModify = 0;
510 if (!GetApplicationRegDword(L"NoModify", &dwNoModify))
511 {
512 CStringW Tmp;
513 if (GetApplicationRegString(L"NoModify", Tmp))
514 {
515 dwNoModify = Tmp.GetLength() > 0 ? (Tmp[0] == '1') : 0;
516 }
517 else
518 {
519 dwNoModify = 0;
520 }
521 }
522 if (!dwNoModify)
523 {
524 if (dwWindowsInstaller)
525 {
527 }
528 else
529 {
531 }
532 }
533}
534
535BOOL
537{
538 return !szDisplayName.IsEmpty();
539}
540
541BOOL
543{
545 {
547 }
548
549 return !m_szModifyString.IsEmpty();
550}
551
552BOOL
554{
556 return !Path.IsEmpty();
557}
558
559BOOL
561{
562 return FALSE;
563}
564
565VOID
567{
568 ATLASSERT(FALSE && "Should not be called");
569}
570
571VOID
573{
574 ATLASSERT(FALSE && "Should not be called");
575}
576
579{
580 CRegKey reg;
582 {
583 return INSTALLER_GENERATE;
584 }
585 return INSTALLER_UNKNOWN;
586}
587
588BOOL
590{
592 {
593 return UninstallGenerated(*this, Flags);
594 }
595
596 BOOL bModify = Flags & UCF_MODIFY;
598 {
600 }
601
603 if ((Flags & (UCF_MODIFY | UCF_SILENT)) == UCF_SILENT)
604 {
605 DWORD msi = 0;
606 msi = GetApplicationRegDword(L"WindowsInstaller", &msi) && msi;
607 if (msi)
608 {
609 cmd += L" /qn";
610 }
611 else
612 {
613 CStringW silentcmd;
614 if (GetApplicationRegString(L"QuietUninstallString", silentcmd) && !silentcmd.IsEmpty())
615 {
616 cmd = silentcmd;
617 }
618 }
619 }
620
622
623 if (bSuccess && !bModify)
624 WriteLogMessage(EVENTLOG_SUCCESS, MSG_SUCCESS_REMOVE, szDisplayName);
625
626 return bSuccess;
627}
628
629BOOL
631{
632 ULONG nChars = 0;
633 // Get the size
634 if (m_hKey.QueryStringValue(lpKeyName, NULL, &nChars) != ERROR_SUCCESS)
635 {
636 String.Empty();
637 return FALSE;
638 }
639
640 LPWSTR Buffer = String.GetBuffer(nChars);
641 LONG lResult = m_hKey.QueryStringValue(lpKeyName, Buffer, &nChars);
642 if (nChars > 0 && Buffer[nChars - 1] == UNICODE_NULL)
643 nChars--;
644 String.ReleaseBuffer(nChars);
645
646 if (lResult != ERROR_SUCCESS)
647 {
648 String.Empty();
649 return FALSE;
650 }
651
652 if (String.Find('%') >= 0)
653 {
654 CStringW Tmp;
656 if (dwLen > 0)
657 {
658 BOOL bSuccess = ExpandEnvironmentStringsW(String, Tmp.GetBuffer(dwLen), dwLen) == dwLen;
659 Tmp.ReleaseBuffer(dwLen - 1);
660 if (bSuccess)
661 {
662 String = Tmp;
663 }
664 else
665 {
666 String.Empty();
667 return FALSE;
668 }
669 }
670 }
671
672 return TRUE;
673}
674
675BOOL
677{
678 DWORD dwSize = sizeof(DWORD), dwType;
679 if (RegQueryValueExW(m_hKey, lpKeyName, NULL, &dwType, (LPBYTE)lpValue, &dwSize) != ERROR_SUCCESS ||
680 dwType != REG_DWORD)
681 {
682 return FALSE;
683 }
684
685 return TRUE;
686}
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
PRTL_UNICODE_STRING_BUFFER Path
#define MAX_SCRNSHOT_NUM
Definition: appinfo.cpp:309
int CompareVersion(const CStringW &left, const CStringW &right)
Definition: appinfo.cpp:85
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:87
#define DB_REGNAME
Definition: appinfo.h:82
BOOL IsKnownLicenseType(INT x)
Definition: appinfo.h:19
#define DB_GENINSTSECTION
Definition: appinfo.h:86
#define DB_INSTALLER
Definition: appinfo.h:83
UninstallCommandFlags
Definition: appinfo.h:67
@ UCF_SILENT
Definition: appinfo.h:70
@ UCF_MODIFY
Definition: appinfo.h:69
InstallerType
Definition: appinfo.h:74
@ INSTALLER_UNKNOWN
Definition: appinfo.h:75
@ INSTALLER_GENERATE
Definition: appinfo.h:76
BOOL UninstallGenerated(CInstalledApplicationInfo &AppInfo, UninstallCommandFlags Flags)
Definition: geninst.cpp:812
AppsCategories
Definition: appinfo.h:25
@ Identifier
Definition: asmpp.cpp:95
BOOL WriteLogMessage(WORD wType, DWORD dwEventID, LPCWSTR lpMsg)
Definition: misc.cpp:224
BOOL StartProcess(const CStringW &Path, BOOL Wait)
Definition: misc.cpp:83
BOOL GetInstalledVersion(CStringW *pszVersion, const CStringW &szRegName)
Definition: misc.cpp:277
void UnixTimeToFileTime(DWORD dwUnixTime, LPFILETIME pFileTime)
Definition: misc.cpp:340
#define IDS_AINFO_AVAILABLEVERSION
Definition: resource.h:167
#define IDS_INFO_INSTALLSRC
Definition: resource.h:155
#define IDS_STATUS_NOTINSTALLED
Definition: resource.h:195
#define IDS_AINFO_SIZE
Definition: resource.h:163
#define IDS_INFO_REGOWNER
Definition: resource.h:148
#define IDS_INFO_VERSION
Definition: resource.h:142
#define IDS_LICENSE_TRIAL
Definition: resource.h:206
#define IDS_AINFO_VERSION
Definition: resource.h:161
#define IDS_LICENSE_FREEWARE
Definition: resource.h:205
#define IDS_INFO_HELPLINK
Definition: resource.h:145
#define IDS_LANGUAGE_MORE_PLACEHOLDER
Definition: resource.h:213
#define IDS_LANGUAGE_SINGLE
Definition: resource.h:212
#define IDS_INFO_INSTALLDATE
Definition: resource.h:158
#define IDS_AINFO_PACKAGE_NAME
Definition: resource.h:172
#define IDS_INFO_HELPPHONE
Definition: resource.h:146
#define IDS_AINFO_LICENSE
Definition: resource.h:165
#define IDS_STATUS_UPDATE_AVAILABLE
Definition: resource.h:197
#define IDS_LANGUAGE_NO_TRANSLATION
Definition: resource.h:210
#define IDS_INFO_INSTLOCATION
Definition: resource.h:154
#define IDS_INFO_COMMENTS
Definition: resource.h:153
#define IDS_AINFO_LANGUAGES
Definition: resource.h:168
#define IDS_INFO_UPDATEINFO
Definition: resource.h:151
#define IDS_AINFO_DESCRIPTION
Definition: resource.h:162
#define IDS_AINFO_URLSITE
Definition: resource.h:164
#define IDS_INFO_CONTACT
Definition: resource.h:150
#define IDS_INFO_MODIFYPATH
Definition: resource.h:157
#define IDS_INFO_UNINSTALLSTR
Definition: resource.h:156
#define IDS_LICENSE_OPENSOURCE
Definition: resource.h:204
#define IDS_LANGUAGE_AVAILABLE_PLACEHOLDER
Definition: resource.h:214
#define IDS_INFO_PRODUCTID
Definition: resource.h:149
#define IDS_INFO_README
Definition: resource.h:147
#define IDS_AINFO_URLDOWNLOAD
Definition: resource.h:166
#define IDS_LANGUAGE_AVAILABLE_TRANSLATION
Definition: resource.h:209
#define IDS_INFO_PUBLISHER
Definition: resource.h:144
#define IDS_STATUS_INSTALLED
Definition: resource.h:194
#define IDS_LANGUAGE_ENGLISH_TRANSLATION
Definition: resource.h:211
#define IDS_INFO_INFOABOUT
Definition: resource.h:152
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:104
CStringW szDisplayIcon
Definition: appinfo.h:101
CAppInfo(const CStringW &Identifier, AppsCategories Category)
Definition: appinfo.cpp:13
CStringW szDisplayName
Definition: appinfo.h:102
CStringW szDisplayVersion
Definition: appinfo.h:103
virtual ~CAppInfo()
Definition: appinfo.cpp:18
const CStringW szIdentifier
Definition: appinfo.h:98
VOID InsertTextWithString(UINT StringID, const CStringW &Text, DWORD TextFlags)
Definition: appview.cpp:260
VOID LoadAndInsertText(UINT uStringID, const CStringW &szText, DWORD TextFlags)
Definition: appview.cpp:236
virtual InstallerType GetInstallerType() const override
Definition: appinfo.cpp:371
CAvailableApplicationInfo(CConfigParser *Parser, const CStringW &PkgName, AppsCategories Category, const CPathW &BasePath)
Definition: appinfo.cpp:22
CSimpleArray< LCID > m_LanguageLCIDs
Definition: appinfo.h:134
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override
Definition: appinfo.cpp:362
virtual BOOL RetrieveScreenshot(CStringW &Path) override
Definition: appinfo.cpp:311
virtual VOID GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override
Definition: appinfo.cpp:345
virtual BOOL CanModify() override
Definition: appinfo.cpp:297
virtual BOOL Valid() const override
Definition: appinfo.cpp:291
virtual BOOL UninstallApplication(UninstallCommandFlags Flags) override
Definition: appinfo.cpp:382
VOID InsertLanguageInfo(CAppRichEdit *RichEdit)
Definition: appinfo.cpp:201
CConfigParser * m_Parser
Definition: appinfo.h:128
virtual BOOL RetrieveIcon(CStringW &Path) const override
Definition: appinfo.cpp:303
CSimpleArray< CStringW > m_szScrnshotLocation
Definition: appinfo.h:129
virtual VOID ShowAppInfo(CAppRichEdit *RichEdit) override
Definition: appinfo.cpp:70
VOID InsertVersionInfo(CAppRichEdit *RichEdit)
Definition: appinfo.cpp:116
BOOL GetString(const CStringW &KeyName, CStringW &ResultString)
BOOL GetInt(const CStringW &KeyName, INT &iResult)
virtual VOID ShowAppInfo(CAppRichEdit *RichEdit) override
Definition: appinfo.cpp:421
virtual BOOL RetrieveScreenshot(CStringW &Path) override
Definition: appinfo.cpp:560
BOOL GetApplicationRegDword(LPCWSTR lpKeyName, DWORD *lpValue)
Definition: appinfo.cpp:676
CStringW m_szUninstallString
Definition: appinfo.h:181
virtual BOOL Valid() const override
Definition: appinfo.cpp:536
virtual BOOL RetrieveIcon(CStringW &Path) const override
Definition: appinfo.cpp:553
BOOL GetApplicationRegString(LPCWSTR lpKeyName, CStringW &String)
Definition: appinfo.cpp:630
VOID AddApplicationRegString(CAppRichEdit *RichEdit, UINT StringID, const CStringW &String, DWORD TextFlags)
Definition: appinfo.cpp:407
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override
Definition: appinfo.cpp:572
CInstalledApplicationInfo(HKEY Key, const CStringW &KeyName, AppsCategories Category, UINT KeyInfo)
Definition: appinfo.cpp:388
virtual BOOL CanModify() override
Definition: appinfo.cpp:542
virtual InstallerType GetInstallerType() const override
Definition: appinfo.cpp:578
virtual BOOL UninstallApplication(UninstallCommandFlags Flags) override
Definition: appinfo.cpp:589
virtual VOID GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override
Definition: appinfo.cpp:566
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:1210
static const WCHAR IconPath[]
Definition: install.c:51
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
Definition: path.c:1777
LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
Definition: string.c:2388
BOOL WINAPI StrToIntExW(LPCWSTR lpszStr, DWORD dwFlags, LPINT lpiRet)
Definition: string.c:970
BOOL WINAPI PathIsURLW(LPCWSTR lpstrPath)
Definition: url.c:2432
static BOOLEAN bSuccess
Definition: drive.cpp:433
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:1452
#define STIF_DEFAULT
Definition: shlwapi.h:1451
#define false
Definition: stdbool.h:37
WORD wYear
Definition: winbase.h:905
WORD wMonth
Definition: winbase.h:906
WORD wDay
Definition: winbase.h:908
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:1712
#define EVENTLOG_SUCCESS
Definition: winnt_old.h:2833
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185