ReactOS 0.4.15-dev-7918-g2a2556c
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(L"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)
135 else
137
138 RichEdit->LoadAndInsertText(IDS_AINFO_VERSION, szInstalledVersion, 0);
139 }
140 else
141 {
143 }
144 }
145 else
146 {
148 }
149
151}
152
155{
156 INT IntBuffer;
157 m_Parser->GetInt(L"LicenseType", IntBuffer);
158 CStringW szLicenseString;
159 m_Parser->GetString(L"License", szLicenseString);
160 LicenseType licenseType;
161
162 if (IsKnownLicenseType(IntBuffer))
163 {
164 licenseType = static_cast<LicenseType>(IntBuffer);
165 }
166 else
167 {
168 licenseType = LICENSE_NONE;
169 if (szLicenseString.CompareNoCase(L"Freeware") == 0)
170 {
171 licenseType = LICENSE_FREEWARE;
172 szLicenseString = L"";
173 }
174 }
175
176 CStringW szLicense;
177 switch (licenseType)
178 {
180 szLicense.LoadStringW(IDS_LICENSE_OPENSOURCE);
181 break;
182 case LICENSE_FREEWARE:
183 szLicense.LoadStringW(IDS_LICENSE_FREEWARE);
184 break;
185 case LICENSE_TRIAL:
186 szLicense.LoadStringW(IDS_LICENSE_TRIAL);
187 break;
188 default:
189 return szLicenseString;
190 }
191
192 if (!szLicenseString.IsEmpty())
193 szLicense += L" (" + szLicenseString + L")";
194 return szLicense;
195}
196
197VOID
199{
201 {
203 }
204
205 if (m_LanguageLCIDs.GetSize() == 0)
206 {
207 return;
208 }
209
210 const INT nTranslations = m_LanguageLCIDs.GetSize();
211 CStringW szLangInfo;
212 CStringW szLoadedTextAvailability;
213 CStringW szLoadedAInfoText;
214
215 szLoadedAInfoText.LoadStringW(IDS_AINFO_LANGUAGES);
216
219 {
220 szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_AVAILABLE_TRANSLATION);
221 if (nTranslations > 1)
222 {
225 szLangInfo.Format(buf, nTranslations - 1);
226 }
227 else
228 {
229 szLangInfo.LoadStringW(IDS_LANGUAGE_SINGLE);
230 szLangInfo = L" (" + szLangInfo + L")";
231 }
232 }
233 else if (m_LanguageLCIDs.Find(lcEnglish) >= 0)
234 {
235 szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_ENGLISH_TRANSLATION);
236 if (nTranslations > 1)
237 {
240 szLangInfo.Format(buf, nTranslations - 1);
241 }
242 else
243 {
244 szLangInfo.LoadStringW(IDS_LANGUAGE_SINGLE);
245 szLangInfo = L" (" + szLangInfo + L")";
246 }
247 }
248 else
249 {
250 szLoadedTextAvailability.LoadStringW(IDS_LANGUAGE_NO_TRANSLATION);
251 }
252
253 RichEdit->InsertText(szLoadedAInfoText, CFE_BOLD);
254 RichEdit->InsertText(szLoadedTextAvailability, NULL);
255 RichEdit->InsertText(szLangInfo, CFE_ITALIC);
256}
257
258VOID
260{
261 m_LanguagesLoaded = true;
262
263 CStringW szBuffer;
264 if (!m_Parser->GetString(L"Languages", szBuffer))
265 {
266 return;
267 }
268
269 // Parse parameter string
270 int iIndex = 0;
271 while (true)
272 {
273 CStringW szLocale = szBuffer.Tokenize(L"|", iIndex);
274 if (szLocale.IsEmpty())
275 break;
276
277 szLocale = L"0x" + szLocale;
278
279 INT iLCID;
280 if (StrToIntExW(szLocale, STIF_SUPPORT_HEX, &iLCID))
281 {
282 m_LanguageLCIDs.Add(static_cast<LCID>(iLCID));
283 }
284 }
285}
286
287BOOL
289{
291}
292
293BOOL
295{
296 return FALSE;
297}
298
299BOOL
301{
303 return !Path.IsEmpty();
304}
305
306#define MAX_SCRNSHOT_NUM 16
307BOOL
309{
311 {
312 static_assert(MAX_SCRNSHOT_NUM < 10000, "MAX_SCRNSHOT_NUM is too big");
313 for (int i = 0; i < MAX_SCRNSHOT_NUM; i++)
314 {
315 CStringW ScrnshotField;
316 ScrnshotField.Format(L"Screenshot%d", i + 1);
317 CStringW ScrnshotLocation;
318 if (!m_Parser->GetString(ScrnshotField, ScrnshotLocation))
319 {
320 // We stop at the first screenshot not found,
321 // so screenshots _have_ to be consecutive
322 break;
323 }
324
325 if (PathIsURLW(ScrnshotLocation.GetString()))
326 {
327 m_szScrnshotLocation.Add(ScrnshotLocation);
328 }
329 }
330 m_ScrnshotRetrieved = true;
331 }
332
333 if (m_szScrnshotLocation.GetSize() > 0)
334 {
336 }
337
338 return !Path.IsEmpty();
339}
340
341VOID
343{
344 Url = m_szUrlDownload;
345 m_Parser->GetString(L"SHA1", Sha1);
346 INT iSizeBytes;
347
348 if (m_Parser->GetInt(L"SizeBytes", iSizeBytes))
349 {
350 SizeInBytes = (ULONG)iSizeBytes;
351 }
352 else
353 {
354 SizeInBytes = 0;
355 }
356}
357
358VOID
360{
361 License = LicenseString();
362 Size = m_szSize;
363 UrlSite = m_szUrlSite;
364 UrlDownload = m_szUrlDownload;
365}
366
367BOOL
369{
370 ATLASSERT(FALSE && "Should not be called");
371 return FALSE;
372}
373
375 HKEY Key,
376 const CStringW &KeyName,
377 AppsCategories Category,
378 int KeyIndex)
379 : CAppInfo(KeyName, Category), m_hKey(Key), iKeyIndex(KeyIndex)
380{
381 if (GetApplicationRegString(L"DisplayName", szDisplayName))
382 {
386 }
387}
388
390{
391}
392
393VOID
395 CAppRichEdit *RichEdit,
396 UINT StringID,
397 const CStringW &String,
398 DWORD TextFlags)
399{
400 CStringW Tmp;
402 {
403 RichEdit->InsertTextWithString(StringID, Tmp, TextFlags);
404 }
405}
406
407VOID
409{
410 RichEdit->SetText(szDisplayName, CFE_BOLD);
411 RichEdit->InsertText(L"\n", 0);
412
414 AddApplicationRegString(RichEdit, IDS_INFO_PUBLISHER, L"Publisher", 0);
415 AddApplicationRegString(RichEdit, IDS_INFO_REGOWNER, L"RegOwner", 0);
416 AddApplicationRegString(RichEdit, IDS_INFO_PRODUCTID, L"ProductID", 0);
418 AddApplicationRegString(RichEdit, IDS_INFO_HELPPHONE, L"HelpTelephone", 0);
419 AddApplicationRegString(RichEdit, IDS_INFO_README, L"Readme", 0);
420 AddApplicationRegString(RichEdit, IDS_INFO_CONTACT, L"Contact", 0);
421 AddApplicationRegString(RichEdit, IDS_INFO_UPDATEINFO, L"URLUpdateInfo", CFM_LINK);
422 AddApplicationRegString(RichEdit, IDS_INFO_INFOABOUT, L"URLInfoAbout", CFM_LINK);
424
426 {
428 }
429
431 AddApplicationRegString(RichEdit, IDS_INFO_INSTLOCATION, L"InstallLocation", 0);
432 AddApplicationRegString(RichEdit, IDS_INFO_INSTALLSRC, L"InstallSource", 0);
433
435 {
437 }
438
441}
442
443VOID
445{
446 DWORD dwInstallTimeStamp;
447 SYSTEMTIME InstallLocalTime;
448 if (GetApplicationRegString(L"InstallDate", m_szInstallDate))
449 {
450 ZeroMemory(&InstallLocalTime, sizeof(InstallLocalTime));
451 // Check if we have 8 characters to parse the datetime.
452 // Maybe other formats exist as well?
454 if (m_szInstallDate.GetLength() == 8)
455 {
456 InstallLocalTime.wYear = wcstol(m_szInstallDate.Left(4).GetString(), NULL, 10);
457 InstallLocalTime.wMonth = wcstol(m_szInstallDate.Mid(4, 2).GetString(), NULL, 10);
458 InstallLocalTime.wDay = wcstol(m_szInstallDate.Mid(6, 2).GetString(), NULL, 10);
459 }
460 }
461 // It might be a DWORD (Unix timestamp). try again.
462 else if (GetApplicationRegDword(L"InstallDate", &dwInstallTimeStamp))
463 {
464 FILETIME InstallFileTime;
465 SYSTEMTIME InstallSystemTime;
466
467 UnixTimeToFileTime(dwInstallTimeStamp, &InstallFileTime);
468 FileTimeToSystemTime(&InstallFileTime, &InstallSystemTime);
469
470 // convert to localtime
471 SystemTimeToTzSpecificLocalTime(NULL, &InstallSystemTime, &InstallLocalTime);
472 }
473
474 // convert to readable date string
475 int cchTimeStrLen = GetDateFormatW(LOCALE_USER_DEFAULT, 0, &InstallLocalTime, NULL, 0, 0);
476
478 LOCALE_USER_DEFAULT, // use default locale for current user
479 0, &InstallLocalTime, NULL, m_szInstallDate.GetBuffer(cchTimeStrLen), cchTimeStrLen);
481}
482
483VOID
485{
486 DWORD dwWindowsInstaller = 0;
487 if (GetApplicationRegDword(L"WindowsInstaller", &dwWindowsInstaller) && dwWindowsInstaller)
488 {
489 // MSI has the same info in Uninstall / modify, so manually build it
491 }
492 else
493 {
495 }
496 DWORD dwNoModify = 0;
497 if (!GetApplicationRegDword(L"NoModify", &dwNoModify))
498 {
499 CStringW Tmp;
500 if (GetApplicationRegString(L"NoModify", Tmp))
501 {
502 dwNoModify = Tmp.GetLength() > 0 ? (Tmp[0] == '1') : 0;
503 }
504 else
505 {
506 dwNoModify = 0;
507 }
508 }
509 if (!dwNoModify)
510 {
511 if (dwWindowsInstaller)
512 {
514 }
515 else
516 {
518 }
519 }
520}
521
522BOOL
524{
525 return !szDisplayName.IsEmpty();
526}
527
528BOOL
530{
532 {
534 }
535
536 return !m_szModifyString.IsEmpty();
537}
538
539BOOL
541{
543 return !Path.IsEmpty();
544}
545
546BOOL
548{
549 return FALSE;
550}
551
552VOID
554{
555 ATLASSERT(FALSE && "Should not be called");
556}
557
558VOID
560{
561 ATLASSERT(FALSE && "Should not be called");
562}
563
564BOOL
566{
568 {
570 }
571
573
574 if (bSuccess && !bModify)
575 WriteLogMessage(EVENTLOG_SUCCESS, MSG_SUCCESS_REMOVE, szDisplayName);
576
577 return bSuccess;
578}
579
580BOOL
582{
583 ULONG nChars = 0;
584 // Get the size
585 if (m_hKey.QueryStringValue(lpKeyName, NULL, &nChars) != ERROR_SUCCESS)
586 {
587 String.Empty();
588 return FALSE;
589 }
590
591 LPWSTR Buffer = String.GetBuffer(nChars);
592 LONG lResult = m_hKey.QueryStringValue(lpKeyName, Buffer, &nChars);
593 if (nChars > 0 && Buffer[nChars - 1] == UNICODE_NULL)
594 nChars--;
595 String.ReleaseBuffer(nChars);
596
597 if (lResult != ERROR_SUCCESS)
598 {
599 String.Empty();
600 return FALSE;
601 }
602
603 if (String.Find('%') >= 0)
604 {
605 CStringW Tmp;
607 if (dwLen > 0)
608 {
609 BOOL bSuccess = ExpandEnvironmentStringsW(String, Tmp.GetBuffer(dwLen), dwLen) == dwLen;
610 Tmp.ReleaseBuffer(dwLen - 1);
611 if (bSuccess)
612 {
613 String = Tmp;
614 }
615 else
616 {
617 String.Empty();
618 return FALSE;
619 }
620 }
621 }
622
623 return TRUE;
624}
625
626BOOL
628{
629 DWORD dwSize = sizeof(DWORD), dwType;
630 if (RegQueryValueExW(m_hKey, lpKeyName, NULL, &dwType, (LPBYTE)lpValue, &dwSize) != ERROR_SUCCESS ||
631 dwType != REG_DWORD)
632 {
633 return FALSE;
634 }
635
636 return TRUE;
637}
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
PRTL_UNICODE_STRING_BUFFER Path
#define MAX_SCRNSHOT_NUM
Definition: appinfo.cpp:306
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
BOOL IsKnownLicenseType(INT x)
Definition: appinfo.h:19
AppsCategories
Definition: appinfo.h:25
@ Identifier
Definition: asmpp.cpp:95
BOOL WriteLogMessage(WORD wType, DWORD dwEventID, LPCWSTR lpMsg)
Definition: misc.cpp:227
BOOL StartProcess(const CStringW &Path, BOOL Wait)
Definition: misc.cpp:86
BOOL GetInstalledVersion(CStringW *pszVersion, const CStringW &szRegName)
Definition: misc.cpp:280
void UnixTimeToFileTime(DWORD dwUnixTime, LPFILETIME pFileTime)
Definition: misc.cpp:361
#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:80
CStringW szDisplayIcon
Definition: appinfo.h:77
CAppInfo(const CStringW &Identifier, AppsCategories Category)
Definition: appinfo.cpp:13
CStringW szDisplayName
Definition: appinfo.h:78
CStringW szDisplayVersion
Definition: appinfo.h:79
virtual ~CAppInfo()
Definition: appinfo.cpp:18
const CStringW szIdentifier
Definition: appinfo.h:74
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
CAvailableApplicationInfo(CConfigParser *Parser, const CStringW &PkgName, AppsCategories Category, const CPathW &BasePath)
Definition: appinfo.cpp:22
CSimpleArray< LCID > m_LanguageLCIDs
Definition: appinfo.h:108
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override
Definition: appinfo.cpp:359
virtual BOOL RetrieveScreenshot(CStringW &Path) override
Definition: appinfo.cpp:308
virtual BOOL UninstallApplication(BOOL bModify) override
Definition: appinfo.cpp:368
virtual VOID GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override
Definition: appinfo.cpp:342
virtual BOOL CanModify() override
Definition: appinfo.cpp:294
virtual BOOL Valid() const override
Definition: appinfo.cpp:288
VOID InsertLanguageInfo(CAppRichEdit *RichEdit)
Definition: appinfo.cpp:198
virtual BOOL RetrieveIcon(CStringW &Path) const override
Definition: appinfo.cpp:300
CSimpleArray< CStringW > m_szScrnshotLocation
Definition: appinfo.h:103
class CConfigParser * m_Parser
Definition: appinfo.h:102
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:408
virtual BOOL RetrieveScreenshot(CStringW &Path) override
Definition: appinfo.cpp:547
BOOL GetApplicationRegDword(LPCWSTR lpKeyName, DWORD *lpValue)
Definition: appinfo.cpp:627
CInstalledApplicationInfo(HKEY Key, const CStringW &KeyName, AppsCategories Category, int KeyIndex)
Definition: appinfo.cpp:374
CStringW m_szUninstallString
Definition: appinfo.h:150
virtual BOOL Valid() const override
Definition: appinfo.cpp:523
virtual BOOL RetrieveIcon(CStringW &Path) const override
Definition: appinfo.cpp:540
BOOL GetApplicationRegString(LPCWSTR lpKeyName, CStringW &String)
Definition: appinfo.cpp:581
virtual BOOL UninstallApplication(BOOL bModify) override
Definition: appinfo.cpp:565
VOID AddApplicationRegString(CAppRichEdit *RichEdit, UINT StringID, const CStringW &String, DWORD TextFlags)
Definition: appinfo.cpp:394
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload) override
Definition: appinfo.cpp:559
virtual BOOL CanModify() override
Definition: appinfo.cpp:529
virtual VOID GetDownloadInfo(CStringW &Url, CStringW &Sha1, ULONG &SizeInBytes) const override
Definition: appinfo.cpp:553
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
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
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
LCID WINAPI GetUserDefaultLCID(void)
Definition: lang.c:778
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 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
#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
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
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185