ReactOS  0.4.14-dev-608-gd495a4f
loaddlg.cpp
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Applications Manager
3  * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * FILE: base/applications/rapps/loaddlg.cpp
5  * PURPOSE: Displaying a download dialog
6  * COPYRIGHT: Copyright 2001 John R. Sheets (for CodeWeavers)
7  * Copyright 2004 Mike McCormack (for CodeWeavers)
8  * Copyright 2005 Ge van Geldorp (gvg@reactos.org)
9  * Copyright 2009 Dmitry Chapyshev (dmitry@reactos.org)
10  * Copyright 2015 Ismael Ferreras Morezuelas (swyterzone+ros@gmail.com)
11  * Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org)
12  */
13 
14  /*
15  * Based on Wine dlls/shdocvw/shdocvw_main.c
16  *
17  * This library is free software; you can redistribute it and/or
18  * modify it under the terms of the GNU Lesser General Public
19  * License as published by the Free Software Foundation; either
20  * version 2.1 of the License, or (at your option) any later version.
21  *
22  * This library is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25  * Lesser General Public License for more details.
26  *
27  * You should have received a copy of the GNU Lesser General Public
28  * License along with this library; if not, write to the Free Software
29  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
30  */
31 #include "rapps.h"
32 
33 #include <shlobj_undoc.h>
34 #include <shlguid_undoc.h>
35 
36 #include <atlbase.h>
37 #include <atlcom.h>
38 #include <atlwin.h>
39 #include <wininet.h>
40 #include <shellutils.h>
41 
42 #include <rosctrls.h>
43 #include <windowsx.h>
44 #undef SubclassWindow
45 
46 #include "rosui.h"
47 #include "dialogs.h"
48 #include "misc.h"
49 
50 #ifdef USE_CERT_PINNING
51 #define CERT_ISSUER_INFO "US\r\nLet's Encrypt\r\nLet's Encrypt Authority X3"
52 #define CERT_SUBJECT_INFO "rapps.reactos.org"
53 #endif
54 
56 {
63 };
64 
66 {
67  ATL::CStringW szString;
68  szString.LoadStringW(StatusParam);
69  return szString;
70 }
71 
73 {
76  :szUrl(AppInfo.m_szUrlDownload), szName(AppInfo.m_szName), szSHA1(AppInfo.m_szSHA1)
77  {
78  }
79 
83 };
84 
86 {
89  : Dialog(dlg), AppInfo(info), szCaption(caption)
90  {
91  }
92 
96 };
97 
98 
100  : public CWindowImpl<CDownloaderProgress, CWindow, CControlWinTraits>
101 {
103 
104 public:
106  {
107  }
108 
110  {
111  if (Enable)
112  ModifyStyle(0, PBS_MARQUEE, 0);
113  else
114  ModifyStyle(PBS_MARQUEE, 0, 0);
115 
117  }
118 
119  VOID SetProgress(ULONG ulProgress, ULONG ulProgressMax)
120  {
121  WCHAR szProgress[100];
122 
123  /* format the bits and bytes into pretty and accessible units... */
125 
126  /* use our subclassed progress bar text subroutine */
127  ATL::CStringW ProgressText;
128 
129  if (ulProgressMax)
130  {
131  /* total size is known */
132  WCHAR szProgressMax[100];
133  UINT uiPercentage = ((ULONGLONG) ulProgress * 100) / ulProgressMax;
134 
135  /* send the current progress to the progress bar */
136  SendMessage(PBM_SETPOS, uiPercentage, 0);
137 
138  /* format total download size */
139  StrFormatByteSizeW(ulProgressMax, szProgressMax, _countof(szProgressMax));
140 
141  /* generate the text on progress bar */
142  ProgressText.Format(L"%u%% \x2014 %ls / %ls",
143  uiPercentage,
144  szProgress,
145  szProgressMax);
146  }
147  else
148  {
149  /* send the current progress to the progress bar */
150  SendMessage(PBM_SETPOS, 0, 0);
151 
152  /* total size is not known, display only current size */
153  ProgressText.Format(L"%ls...", szProgress);
154  }
155 
156  /* and finally display it */
157  SendMessage(WM_SETTEXT, 0, (LPARAM) ProgressText.GetString());
158  }
159 
161  {
162  PAINTSTRUCT ps;
163  HDC hDC = BeginPaint(&ps), hdcMem;
164  HBITMAP hbmMem;
165  HANDLE hOld;
166  RECT myRect;
167  UINT win_width, win_height;
168 
169  GetClientRect(&myRect);
170 
171  /* grab the progress bar rect size */
172  win_width = myRect.right - myRect.left;
173  win_height = myRect.bottom - myRect.top;
174 
175  /* create an off-screen DC for double-buffering */
177  hbmMem = CreateCompatibleBitmap(hDC, win_width, win_height);
178 
179  hOld = SelectObject(hdcMem, hbmMem);
180 
181  /* call the original draw code and redirect it to our memory buffer */
182  DefWindowProc(uMsg, (WPARAM) hdcMem, lParam);
183 
184  /* draw our nifty progress text over it */
187  &myRect,
191  1, 1);
192 
193  /* transfer the off-screen DC to the screen */
194  BitBlt(hDC, 0, 0, win_width, win_height, hdcMem, 0, 0, SRCCOPY);
195 
196  /* free the off-screen DC */
197  SelectObject(hdcMem, hOld);
198  DeleteObject(hbmMem);
199  DeleteDC(hdcMem);
200 
201  EndPaint(&ps);
202  return 0;
203  }
204 
206  {
207  if (lParam)
208  {
210  }
211  return 0;
212  }
213 
218  END_MSG_MAP()
219 };
220 
222  : public CListView
223 {
224 public:
226  {
227  RECT r = {10, 150, 320, 350};
230 
232 
233  AddColumn(0, 150, LVCFMT_LEFT);
234  AddColumn(1, 120, LVCFMT_LEFT);
235 
236  return hwnd;
237  }
238 
240  {
241  for (INT i = 0; i < arrInfo.GetSize(); ++i)
242  {
243  AddRow(i, arrInfo[i].szName.GetString(), DLSTATUS_WAITING);
244  }
245  }
246 
248  {
250  SetItemText(ItemIndex, 1, szBuffer.GetString());
251  }
252 
253  BOOL AddItem(INT ItemIndex, LPWSTR lpText)
254  {
255  LVITEMW Item;
256 
257  ZeroMemory(&Item, sizeof(Item));
258 
259  Item.mask = LVIF_TEXT | LVIF_STATE;
260  Item.pszText = lpText;
261  Item.iItem = ItemIndex;
262 
263  return InsertItem(&Item);
264  }
265 
267  {
269  AddItem(RowIndex,
270  const_cast<LPWSTR>(szAppName));
271  SetDownloadStatus(RowIndex, Status);
272  }
273 
275  {
276  LVCOLUMNW Column;
277  ZeroMemory(&Column, sizeof(Column));
278 
279  Column.mask = LVCF_FMT | LVCF_WIDTH | LVCF_SUBITEM;
280  Column.iSubItem = Index;
281  Column.cx = Width;
282  Column.fmt = Format;
283 
284  return (InsertColumn(Index, &Column) == -1) ? FALSE : TRUE;
285  }
286 };
287 
288 #ifdef USE_CERT_PINNING
289 typedef CHeapPtr<char, CLocalAllocator> CLocalPtr;
290 
291 static BOOL CertGetSubjectAndIssuer(HINTERNET hFile, CLocalPtr& subjectInfo, CLocalPtr& issuerInfo)
292 {
293  DWORD certInfoLength;
295  DWORD size, flags;
296 
297  size = sizeof(flags);
299  {
300  return FALSE;
301  }
302 
304  {
305  return FALSE;
306  }
307 
308  /* Despite what the header indicates, the implementation of INTERNET_CERTIFICATE_INFO is not Unicode-aware. */
309  certInfoLength = sizeof(certInfo);
312  &certInfo,
313  &certInfoLength))
314  {
315  return FALSE;
316  }
317 
318  subjectInfo.Attach(certInfo.lpszSubjectInfo);
319  issuerInfo.Attach(certInfo.lpszIssuerInfo);
320 
321  if (certInfo.lpszProtocolName)
322  LocalFree(certInfo.lpszProtocolName);
323  if (certInfo.lpszSignatureAlgName)
325  if (certInfo.lpszEncryptionAlgName)
327 
328  return certInfo.lpszSubjectInfo && certInfo.lpszIssuerInfo;
329 }
330 #endif
331 
333 {
334  ATL::CStringW szMsgText;
335  if (szMsgText.LoadStringW(StringID))
336  {
338  }
339 }
340 
341 // Download dialog (loaddlg.cpp)
343 {
347  static BOOL bCancelled;
348  static VOID UpdateProgress(HWND hDlg, ULONG ulProgress, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText);
349 public:
350  static VOID Add(DownloadInfo info);
351  static VOID Download(const DownloadInfo& DLInfo, BOOL bIsModal = FALSE);
355 };
356 
357 
358 // CDownloadManager
363 
365 {
367 }
368 
370 {
372  AppsToInstallList.Add(DLInfo);
373  LaunchDownloadDialog(bIsModal);
374 }
375 
377 {
378  static WCHAR szCaption[MAX_PATH];
379 
380  switch (uMsg)
381  {
382  case WM_INITDIALOG:
383  {
384  HICON hIconSm, hIconBg;
385  ATL::CStringW szTempCaption;
386 
387  bCancelled = FALSE;
388 
391 
392  if (hIconBg && hIconSm)
393  {
394  SendMessageW(Dlg, WM_SETICON, ICON_BIG, (LPARAM) hIconBg);
395  SendMessageW(Dlg, WM_SETICON, ICON_SMALL, (LPARAM) hIconSm);
396  }
397 
398  SetWindowLongW(Dlg, GWLP_USERDATA, 0);
400  if (Item)
401  {
402  // initialize the default values for our nifty progress bar
403  // and subclass it so that it learns to print a status text
407  }
408 
409  // Add a ListView
410  HWND hListView = DownloadsListView.Create(Dlg);
411  if (!hListView)
412  {
413  return FALSE;
414  }
416 
417  // Get a dlg string for later use
418  GetWindowTextW(Dlg, szCaption, _countof(szCaption));
419 
420  // Hide a placeholder from displaying
421  szTempCaption = szCaption;
422  szTempCaption.Replace(L"%ls", L"");
423  SetWindowText(Dlg, szTempCaption.GetString());
424 
425  ShowWindow(Dlg, SW_SHOW);
426 
427  // Start download process
428  DownloadParam *param = new DownloadParam(Dlg, AppsToInstallList, szCaption);
429  DWORD ThreadId;
430  HANDLE Thread = CreateThread(NULL, 0, ThreadFunc, (LPVOID) param, 0, &ThreadId);
431 
432  if (!Thread)
433  {
434  return FALSE;
435  }
436 
439  return TRUE;
440  }
441 
442  case WM_COMMAND:
443  if (wParam == IDCANCEL)
444  {
445  bCancelled = TRUE;
446  PostMessageW(Dlg, WM_CLOSE, 0, 0);
447  }
448  return FALSE;
449 
450  case WM_CLOSE:
451  EndDialog(Dlg, 0);
452  //DestroyWindow(Dlg);
453  return TRUE;
454 
455  default:
456  return FALSE;
457  }
458 }
459 
461 
463  HWND hDlg,
464  ULONG ulProgress,
465  ULONG ulProgressMax,
466  ULONG ulStatusCode,
467  LPCWSTR szStatusText)
468 {
469  HWND Item;
470 
471  ProgressBar.SetProgress(ulProgress, ulProgressMax);
472 
473  Item = GetDlgItem(hDlg, IDC_DOWNLOAD_STATUS);
474  if (Item && szStatusText && wcslen(szStatusText) > 0 && UrlHasBeenCopied == FALSE)
475  {
476  SIZE_T len = wcslen(szStatusText) + 1;
478  DWORD dummyLen;
479 
480  /* beautify our url for display purposes */
481  if (!InternetCanonicalizeUrlW(szStatusText, buf.GetBuffer(len), &dummyLen, ICU_DECODE | ICU_NO_ENCODE))
482  {
483  /* just use the original */
484  buf.ReleaseBuffer();
485  buf = szStatusText;
486  }
487  else
488  {
489  buf.ReleaseBuffer();
490  }
491 
492  /* paste it into our dialog and don't do it again in this instance */
493  SendMessageW(Item, WM_SETTEXT, 0, (LPARAM) buf.GetString());
495  }
496 }
497 
499 {
501  PWSTR p, q;
502 
503  HWND hDlg = static_cast<DownloadParam*>(param)->Dialog;
504  HWND Item;
505  INT iAppId;
506 
507  ULONG dwContentLen, dwBytesWritten, dwBytesRead, dwStatus;
508  ULONG dwCurrentBytesRead = 0;
509  ULONG dwStatusLen = sizeof(dwStatus);
510 
511  BOOL bTempfile = FALSE;
512  BOOL bCab = FALSE;
513 
514  HINTERNET hOpen = NULL;
515  HINTERNET hFile = NULL;
517 
518  unsigned char lpBuffer[4096];
519  LPCWSTR lpszAgent = L"RApps/1.0";
520  URL_COMPONENTS urlComponents;
521  size_t urlLength, filenameLength;
522 
523  const ATL::CSimpleArray<DownloadInfo> &InfoArray = static_cast<DownloadParam*>(param)->AppInfo;
524  LPCWSTR szCaption = static_cast<DownloadParam*>(param)->szCaption;
525  ATL::CStringW szNewCaption;
526 
528 
529  if (InfoArray.GetSize() <= 0)
530  {
532  goto end;
533  }
534 
535  for (iAppId = 0; iAppId < InfoArray.GetSize(); ++iAppId)
536  {
537  // Reset progress bar
538  Item = GetDlgItem(hDlg, IDC_DOWNLOAD_PROGRESS);
539  if (Item)
540  {
544  }
545 
546  // is this URL an update package for RAPPS? if so store it in a different place
547  if (InfoArray[iAppId].szUrl == APPLICATION_DATABASE_URL)
548  {
549  bCab = TRUE;
551  goto end;
552  }
553  else
554  {
555  bCab = FALSE;
557  }
558 
559  // Change caption to show the currently downloaded app
560  if (!bCab)
561  {
562  szNewCaption.Format(szCaption, InfoArray[iAppId].szName.GetString());
563  }
564  else
565  {
566  szNewCaption.LoadStringW(IDS_DL_DIALOG_DB_DOWNLOAD_DISP);
567  }
568 
569  SetWindowTextW(hDlg, szNewCaption.GetString());
570 
571  // build the path for the download
572  p = wcsrchr(InfoArray[iAppId].szUrl.GetString(), L'/');
573  q = wcsrchr(InfoArray[iAppId].szUrl.GetString(), L'?');
574 
575  // do we have a final slash separator?
576  if (!p)
577  goto end;
578 
579  // prepare the tentative length of the filename, maybe we've to remove part of it later on
580  filenameLength = wcslen(p) * sizeof(WCHAR);
581 
582  /* do we have query arguments in the target URL after the filename? account for them
583  (e.g. https://example.org/myfile.exe?no_adware_plz) */
584  if (q && q > p && (q - p) > 0)
585  filenameLength -= wcslen(q - 1) * sizeof(WCHAR);
586 
587  // is the path valid? can we access it?
588  if (GetFileAttributesW(Path.GetString()) == INVALID_FILE_ATTRIBUTES)
589  {
590  if (!CreateDirectoryW(Path.GetString(), NULL))
591  goto end;
592  }
593 
594  // append a \ to the provided file system path, and the filename portion from the URL after that
595  Path += L"\\";
596  Path += (LPWSTR) (p + 1);
597 
598  if (!bCab && InfoArray[iAppId].szSHA1[0] && GetFileAttributesW(Path.GetString()) != INVALID_FILE_ATTRIBUTES)
599  {
600  // only open it in case of total correctness
601  if (VerifyInteg(InfoArray[iAppId].szSHA1.GetString(), Path))
602  goto run;
603  }
604 
605  // Add the download URL
606  SetDlgItemTextW(hDlg, IDC_DOWNLOAD_STATUS, InfoArray[iAppId].szUrl.GetString());
607 
609 
610  // download it
612  bTempfile = TRUE;
613 
614  /* FIXME: this should just be using the system-wide proxy settings */
615  switch (SettingsInfo.Proxy)
616  {
617  case 0: // preconfig
618  default:
619  hOpen = InternetOpenW(lpszAgent, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
620  break;
621  case 1: // direct (no proxy)
622  hOpen = InternetOpenW(lpszAgent, INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);
623  break;
624  case 2: // use proxy
626  break;
627  }
628 
629  if (!hOpen)
630  goto end;
631 
632  dwStatusLen = sizeof(dwStatus);
633 
634  memset(&urlComponents, 0, sizeof(urlComponents));
635  urlComponents.dwStructSize = sizeof(urlComponents);
636 
637  urlLength = InfoArray[iAppId].szUrl.GetLength();
638  urlComponents.dwSchemeLength = urlLength + 1;
639  urlComponents.lpszScheme = (LPWSTR) malloc(urlComponents.dwSchemeLength * sizeof(WCHAR));
640  urlComponents.dwHostNameLength = urlLength + 1;
641  urlComponents.lpszHostName = (LPWSTR) malloc(urlComponents.dwHostNameLength * sizeof(WCHAR));
642 
643  if (!InternetCrackUrlW(InfoArray[iAppId].szUrl, urlLength + 1, ICU_DECODE | ICU_ESCAPE, &urlComponents))
644  goto end;
645 
646  dwContentLen = 0;
647 
648  if (urlComponents.nScheme == INTERNET_SCHEME_HTTP || urlComponents.nScheme == INTERNET_SCHEME_HTTPS)
649  {
650  hFile = InternetOpenUrlW(hOpen, InfoArray[iAppId].szUrl.GetString(), NULL, 0,
651  dwUrlConnectFlags,
652  0);
653  if (!hFile)
654  {
656  goto end;
657  }
658 
659  // query connection
661  goto end;
662 
663  if (dwStatus != HTTP_STATUS_OK)
664  {
666  goto end;
667  }
668 
669  // query content length
671  }
672 
673  if (urlComponents.nScheme == INTERNET_SCHEME_FTP)
674  {
675  // force passive mode on FTP
676  hFile = InternetOpenUrlW(hOpen, InfoArray[iAppId].szUrl.GetString(), NULL, 0,
677  dwUrlConnectFlags | INTERNET_FLAG_PASSIVE,
678  0);
679  if (!hFile)
680  {
682  goto end;
683  }
684 
685  dwContentLen = FtpGetFileSize(hFile, &dwStatus);
686  }
687 
688  if (!dwContentLen)
689  {
690  // content-length is not known, enable marquee mode
692  }
693 
694  free(urlComponents.lpszScheme);
695  free(urlComponents.lpszHostName);
696 
697 #ifdef USE_CERT_PINNING
698  // are we using HTTPS to download the RAPPS update package? check if the certificate is original
699  if ((urlComponents.nScheme == INTERNET_SCHEME_HTTPS) &&
700  (wcscmp(InfoArray[iAppId].szUrl, APPLICATION_DATABASE_URL) == 0))
701  {
702  CLocalPtr subjectName, issuerName;
703  CStringW szMsgText;
704  bool bAskQuestion = false;
705  if (!CertGetSubjectAndIssuer(hFile, subjectName, issuerName))
706  {
707  szMsgText.LoadStringW(IDS_UNABLE_TO_QUERY_CERT);
708  bAskQuestion = true;
709  }
710  else
711  {
712  if (strcmp(subjectName, CERT_SUBJECT_INFO) ||
713  strcmp(issuerName, CERT_ISSUER_INFO))
714  {
715  szMsgText.Format(IDS_MISMATCH_CERT_INFO, (char*)subjectName, (const char*)issuerName);
716  bAskQuestion = true;
717  }
718  }
719 
720  if (bAskQuestion)
721  {
722  if (MessageBoxW(hMainWnd, szMsgText.GetString(), NULL, MB_YESNO | MB_ICONERROR) != IDYES)
723  {
724  goto end;
725  }
726  }
727  }
728 #endif
729 
731 
732  if (hOut == INVALID_HANDLE_VALUE)
733  goto end;
734 
735  dwCurrentBytesRead = 0;
736  do
737  {
738  if (!InternetReadFile(hFile, lpBuffer, _countof(lpBuffer), &dwBytesRead))
739  {
741  goto end;
742  }
743 
744  if (!WriteFile(hOut, &lpBuffer[0], dwBytesRead, &dwBytesWritten, NULL))
745  {
747  goto end;
748  }
749 
750  dwCurrentBytesRead += dwBytesRead;
751  UpdateProgress(hDlg, dwCurrentBytesRead, dwContentLen, 0, InfoArray[iAppId].szUrl.GetString());
752  } while (dwBytesRead && !bCancelled);
753 
754  CloseHandle(hOut);
755  hOut = INVALID_HANDLE_VALUE;
756 
757  if (bCancelled)
758  goto end;
759 
760  if (!dwContentLen)
761  {
762  // set progress bar to 100%
764 
765  dwContentLen = dwCurrentBytesRead;
766  UpdateProgress(hDlg, dwCurrentBytesRead, dwContentLen, 0, InfoArray[iAppId].szUrl.GetString());
767  }
768 
769  /* if this thing isn't a RAPPS update and it has a SHA-1 checksum
770  verify its integrity by using the native advapi32.A_SHA1 functions */
771  if (!bCab && InfoArray[iAppId].szSHA1[0] != 0)
772  {
773  ATL::CStringW szMsgText;
774 
775  // change a few strings in the download dialog to reflect the verification process
776  if (!szMsgText.LoadStringW(IDS_INTEG_CHECK_TITLE))
777  goto end;
778 
779  SetWindowTextW(hDlg, szMsgText.GetString());
781 
782  // this may take a while, depending on the file size
783  if (!VerifyInteg(InfoArray[iAppId].szSHA1.GetString(), Path.GetString()))
784  {
785  if (!szMsgText.LoadStringW(IDS_INTEG_CHECK_FAIL))
786  goto end;
787 
788  MessageBoxW(hDlg, szMsgText.GetString(), NULL, MB_OK | MB_ICONERROR);
789  goto end;
790  }
791  }
792 
793 run:
795 
796  // run it
797  if (!bCab)
798  {
799  SHELLEXECUTEINFOW shExInfo = {0};
800  shExInfo.cbSize = sizeof(shExInfo);
801  shExInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
802  shExInfo.lpVerb = L"open";
803  shExInfo.lpFile = Path.GetString();
804  shExInfo.lpParameters = L"";
805  shExInfo.nShow = SW_SHOW;
806 
807  if (ShellExecuteExW(&shExInfo))
808  {
809  //reflect installation progress in the titlebar
810  //TODO: make a separate string with a placeholder to include app name?
812  SetWindowTextW(hDlg, szMsgText.GetString());
813 
815 
816  //TODO: issue an install operation separately so that the apps could be downloaded in the background
818  CloseHandle(shExInfo.hProcess);
819  }
820  else
821  {
823  }
824  }
825 
826 end:
827  if (hOut != INVALID_HANDLE_VALUE)
828  CloseHandle(hOut);
829 
831  InternetCloseHandle(hOpen);
832 
833  if (bTempfile)
834  {
835  if (bCancelled || (SettingsInfo.bDelInstaller && !bCab))
836  DeleteFileW(Path.GetString());
837  }
838 
840  }
841 
842  delete static_cast<DownloadParam*>(param);
843  SendMessageW(hDlg, WM_CLOSE, 0, 0);
844  return 0;
845 }
846 
847 //TODO: Reuse the dialog
849 {
850  if (bIsModal)
851  {
854  hMainWnd,
856  }
857  else
858  {
861  hMainWnd,
863  }
864 }
865 // CDownloadManager
866 
867 
869 {
870  if (AppsList.GetSize() == 0)
871  return FALSE;
872 
873  // Initialize shared variables
874  for (INT i = 0; i < AppsList.GetSize(); ++i)
875  {
876  CDownloadManager::Add(AppsList[i]); // implicit conversion to DownloadInfo
877  }
878 
879  // Create a dialog and issue a download process
881 
882  return TRUE;
883 }
884 
886 {
887  if (!pAppInfo)
888  return FALSE;
889 
890  CDownloadManager::Download(*pAppInfo, bIsModal);
891  return TRUE;
892 }
893 
895 {
896  static DownloadInfo DatabaseDLInfo;
897  DatabaseDLInfo.szUrl = lpUrl;
898  DatabaseDLInfo.szName.LoadStringW(IDS_DL_DIALOG_DB_DISP);
899  CDownloadManager::Download(DatabaseDLInfo, TRUE);
900 }
901 
#define HTTP_QUERY_CONTENT_LENGTH
Definition: wininet.h:1528
int GetLength() const
Definition: atlsimpstr.h:356
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
Definition: dir.c:90
LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
Definition: string.c:2376
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
const uint16_t * PCWSTR
Definition: typedefs.h:55
DWORD dwHostNameLength
Definition: winhttp.h:470
#define IDS_DL_DIALOG_DB_DOWNLOAD_DISP
Definition: resource.h:207
static HICON
Definition: imagelist.c:84
#define TRUE
Definition: types.h:120
VOID DownloadApplicationsDB(LPCWSTR lpUrl)
Definition: loaddlg.cpp:894
#define CloseHandle
Definition: compat.h:406
BOOL DownloadApplication(CAvailableApplicationInfo *pAppInfo, BOOL bIsModal)
Definition: loaddlg.cpp:885
#define APPLICATION_DATABASE_URL
Definition: defines.h:32
#define IDS_STATUS_INSTALLED
Definition: resource.h:183
#define PBS_MARQUEE
Definition: commctrl.h:2194
#define LVCF_WIDTH
Definition: commctrl.h:2583
BOOL VerifyInteg(LPCWSTR lpSHA1Hash, LPCWSTR lpFileName)
Definition: integrity.cpp:14
BOOL Add(const T &t)
Definition: atlsimpcoll.h:58
#define IDS_DL_DIALOG_DB_DISP
Definition: resource.h:206
#define IDYES
Definition: winuser.h:829
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
static VOID Download(const DownloadInfo &DLInfo, BOOL bIsModal=FALSE)
Definition: loaddlg.cpp:369
#define LVS_NOCOLUMNHEADER
Definition: commctrl.h:2280
#define IDD_DOWNLOAD_DIALOG
Definition: resource.h:61
#define GetStockFont(i)
Definition: windowsx.h:283
#define LVS_SHOWSELALWAYS
Definition: commctrl.h:2263
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
#define PBM_SETMARQUEE
Definition: commctrl.h:2195
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define SEE_MASK_NOCLOSEPROCESS
Definition: shellapi.h:31
static BYTE subjectName[]
Definition: cert.c:63
uint16_t * PWSTR
Definition: typedefs.h:54
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define LVS_REPORT
Definition: commctrl.h:2258
static BOOL bCancelled
Definition: loaddlg.cpp:347
#define _countof(array)
Definition: fontsub.cpp:30
#define free
Definition: debug_ros.c:5
#define MAKELPARAM(l, h)
Definition: winuser.h:3983
#define IDS_MISMATCH_CERT_INFO
Definition: resource.h:115
#define INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT
Definition: wininet.h:726
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:140
static HDC
Definition: imagelist.c:92
#define CALLBACK
Definition: compat.h:27
LONG top
Definition: windef.h:307
LPCWSTR szCaption
Definition: loaddlg.cpp:95
#define INTERNET_OPEN_TYPE_PROXY
Definition: wininet.h:523
#define LVCFMT_LEFT
Definition: commctrl.h:2594
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
static VOID LaunchDownloadDialog(BOOL)
Definition: loaddlg.cpp:848
#define INVALID_HANDLE_VALUE
Definition: compat.h:399
#define IDS_UNABLE_TO_WRITE
Definition: resource.h:110
#define COLOR_CAPTIONTEXT
Definition: winuser.h:912
#define ZeroMemory
Definition: winbase.h:1642
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
VOID SetProgress(ULONG ulProgress, ULONG ulProgressMax)
Definition: loaddlg.cpp:119
void __cdecl Format(UINT nFormatID,...)
Definition: cstringt.h:668
#define PBM_SETPOS
Definition: commctrl.h:2180
BOOL WINAPI InternetCloseHandle(HINTERNET hInternet)
Definition: internet.c:1436
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI InternetCanonicalizeUrlW(LPCWSTR lpszUrl, LPWSTR lpszBuffer, LPDWORD lpdwBufferLength, DWORD dwFlags)
Definition: internet.c:2026
#define IDS_STATUS_DOWNLOADING
Definition: resource.h:187
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
UINT_PTR WPARAM
Definition: windef.h:207
GLuint GLuint end
Definition: gl.h:1545
void EndPaint(LPPAINTSTRUCT lpPaint)
Definition: atlwin.h:495
#define WS_CHILD
Definition: pedump.c:617
#define IDS_STATUS_INSTALLING
Definition: resource.h:188
LONG left
Definition: windef.h:306
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
#define IDS_UNABLE_TO_DOWNLOAD
Definition: resource.h:104
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
int32_t INT_PTR
Definition: typedefs.h:62
LONG right
Definition: windef.h:308
#define DT_NOPREFIX
Definition: winuser.h:537
int GetSize() const
Definition: atlsimpcoll.h:104
HWND Create(HWND hWndParent, _U_RECT rect, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
Definition: rosctrls.h:8
#define INTERNET_FLAG_DONT_CACHE
Definition: wininet.h:67
static VOID NTAPI BitBlt(IN ULONG Left, IN ULONG Top, IN ULONG Width, IN ULONG Height, IN PUCHAR Buffer, IN ULONG BitsPerPixel, IN ULONG Delta)
Definition: vga.c:410
DownloadInfo(const CAvailableApplicationInfo &AppInfo)
Definition: loaddlg.cpp:75
int32_t INT
Definition: typedefs.h:56
DWORD WINAPI GetSysColor(_In_ int)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
WPARAM wParam
Definition: combotst.c:138
LRESULT DefWindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: atlwin.h:1521
#define FILE_SHARE_READ
Definition: compat.h:125
#define COLOR_3DSHADOW
Definition: winuser.h:921
#define ICON_SMALL
Definition: tnclass.cpp:48
#define IDC_DOWNLOAD_STATUS
Definition: resource.h:41
WCHAR szDownloadDir[MAX_PATH]
Definition: winmain.h:10
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
#define LVIF_TEXT
Definition: commctrl.h:2305
#define LVCF_SUBITEM
Definition: commctrl.h:2585
ATL::CStringW szSHA1
Definition: loaddlg.cpp:82
HINTERNET WINAPI InternetOpenUrlW(HINTERNET hInternet, LPCWSTR lpszUrl, LPCWSTR lpszHeaders, DWORD dwHeadersLength, DWORD dwFlags, DWORD_PTR dwContext)
Definition: internet.c:3605
#define PBM_SETRANGE
Definition: commctrl.h:2179
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
DownloadParam(HWND dlg, const ATL::CSimpleArray< DownloadInfo > &info, LPCWSTR caption)
Definition: loaddlg.cpp:88
DWORD dwSchemeLength
Definition: winhttp.h:467
VOID MessageBox_LoadString(HWND hMainWnd, INT StringID)
Definition: loaddlg.cpp:332
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
BOOL SubclassWindow(HWND hWnd)
Definition: atlwin.h:1482
BOOL SetItemText(int i, int subItem, LPCWSTR text)
Definition: rosctrls.h:186
#define MB_YESNO
Definition: winuser.h:811
DWORD WINAPI FtpGetFileSize(HINTERNET hFile, LPDWORD lpdwFileSizeHigh)
Definition: ftp.c:1754
unsigned int BOOL
Definition: ntddk_ex.h:94
ATL::CStringW szUrl
Definition: loaddlg.cpp:80
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:802
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
#define GENERIC_WRITE
Definition: nt_native.h:90
BOOL GetClientRect(LPRECT lpRect) const
Definition: atlwin.h:507
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:173
#define IDS_INTEG_CHECK_FAIL
Definition: resource.h:108
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
#define GWLP_USERDATA
Definition: treelist.c:63
int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, RECT *prc, DWORD dwFlags, COLORREF crText, COLORREF crShadow, int ixOffset, int iyOffset)
Definition: commctrl.c:1845
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:136
smooth NULL
Definition: ftsmooth.c:416
static HWND hwndParent
Definition: cryptui.c:300
SETTINGS_INFO SettingsInfo
Definition: winmain.cpp:18
LONG_PTR LPARAM
Definition: windef.h:208
static const WCHAR szProgress[]
Definition: dialog.c:138
BOOL WINAPI InternetQueryOptionA(HINTERNET hInternet, DWORD dwOption, LPVOID lpBuffer, LPDWORD lpdwBufferLength)
Definition: internet.c:2607
_Check_return_ _CRTIMP _CONST_RETURN wchar_t *__cdecl wcsrchr(_In_z_ const wchar_t *_Str, _In_ wchar_t _Ch)
INTERNET_SCHEME nScheme
Definition: winhttp.h:468
static CDowloadingAppsListView DownloadsListView
Definition: loaddlg.cpp:345
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
Definition: shlexec.cpp:2235
BOOL UrlHasBeenCopied
Definition: loaddlg.cpp:460
#define IDS_UNABLE_TO_INSTALL
Definition: resource.h:113
#define DT_VCENTER
Definition: winuser.h:543
#define SW_SHOW
Definition: winuser.h:769
#define WM_SETTEXT
Definition: winuser.h:1599
VOID LoadList(ATL::CSimpleArray< DownloadInfo > arrInfo)
Definition: loaddlg.cpp:239
#define IDS_STATUS_FINISHED
Definition: resource.h:190
#define DialogBoxW(i, t, p, f)
Definition: winuser.h:4374
#define IDS_INTERRUPTED_DOWNLOAD
Definition: resource.h:109
#define ICU_ESCAPE
Definition: winhttp.h:48
VOID SetDownloadStatus(INT ItemIndex, DownloadStatus Status)
Definition: loaddlg.cpp:247
#define GCLP_HICONSM
Definition: winuser.h:670
GLsizeiptr size
Definition: glext.h:5919
int WINAPI MessageBoxW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ UINT)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
HDC BeginPaint(LPPAINTSTRUCT lpPaint)
Definition: atlwin.h:297
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define END_MSG_MAP()
Definition: atlwin.h:1789
uint64_t ULONGLONG
Definition: typedefs.h:65
static const WCHAR szStatus[]
Definition: http.c:74
#define IDS_UNABLE_TO_QUERY_CERT
Definition: resource.h:106
LPWSTR pszText
Definition: commctrl.h:2361
#define WM_CLOSE
Definition: winuser.h:1603
GLfloat param
Definition: glext.h:5796
#define MAX_PATH
Definition: compat.h:26
#define WINAPI
Definition: msvc.h:6
PCXSTR GetString() const
Definition: atlsimpstr.h:361
static const UCHAR Index[8]
Definition: usbohci.c:18
#define IDS_STATUS_DOWNLOADED
Definition: resource.h:185
VOID SetMarquee(BOOL Enable)
Definition: loaddlg.cpp:109
#define LVS_SINGLESEL
Definition: commctrl.h:2262
LRESULT OnSetText(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: loaddlg.cpp:205
unsigned long DWORD
Definition: ntddk_ex.h:95
#define ICU_NO_ENCODE
Definition: winhttp.h:290
#define HTTP_STATUS_OK
Definition: winhttp.h:240
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
BOOL GetStorageDirectory(ATL::CStringW &lpDirectory)
Definition: misc.cpp:172
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
static INT_PTR CALLBACK DownloadDlgProc(HWND Dlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: loaddlg.cpp:376
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
#define IDS_UNABLE_TO_DOWNLOAD2
Definition: resource.h:105
ATL::CStringW szName
Definition: loaddlg.cpp:81
GLbitfield flags
Definition: glext.h:7161
#define DEFAULT_GUI_FONT
Definition: wingdi.h:908
#define WM_PAINT
Definition: winuser.h:1602
UINT mask
Definition: commctrl.h:2356
#define IDC_DOWNLOAD_PROGRESS
Definition: resource.h:40
static VOID UpdateProgress(HWND hDlg, ULONG ulProgress, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText)
Definition: loaddlg.cpp:462
#define INTERNET_OPEN_TYPE_DIRECT
Definition: wininet.h:522
HWND hMainWnd
Definition: magnifier.c:32
DWORD dwStructSize
Definition: winhttp.h:465
BOOL WINAPI HttpQueryInfoW(HINTERNET hHttpRequest, DWORD dwInfoLevel, LPVOID lpBuffer, LPDWORD lpdwBufferLength, LPDWORD lpdwIndex)
Definition: http.c:3883
#define IDS_INTEG_CHECK_TITLE
Definition: resource.h:107
int InsertItem(const LV_ITEM *pitem)
Definition: rosctrls.h:96
static const WCHAR L[]
Definition: oid.c:1250
BOOL DownloadListOfApplications(const ATL::CSimpleArray< CAvailableApplicationInfo > &AppsList, BOOL bIsModal)
Definition: loaddlg.cpp:868
#define GCLP_HICON
Definition: winuser.h:669
#define MB_ICONERROR
Definition: winuser.h:781
#define CreateDialogW(h, n, w, f)
Definition: winuser.h:4256
GLenum GLsizei len
Definition: glext.h:6722
#define WM_COMMAND
Definition: winuser.h:1722
_In_ HANDLE hFile
Definition: mswsock.h:90
LPWSTR lpszHostName
Definition: winhttp.h:469
static ATL::CSimpleArray< DownloadInfo > AppsToInstallList
Definition: loaddlg.cpp:344
#define SelectFont(hdc, hfont)
Definition: windowsx.h:491
#define HTTP_QUERY_STATUS_CODE
Definition: wininet.h:1542
Status
Definition: gdiplustypes.h:24
TCHAR szAppName[128]
Definition: solitaire.cpp:16
LRESULT OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: loaddlg.cpp:160
#define IDS_STATUS_WAITING
Definition: resource.h:189
static HDC hDC
Definition: 3dtext.c:33
ULONG_PTR SIZE_T
Definition: typedefs.h:78
int Replace(PCXSTR pszOld, PCXSTR pszNew)
Definition: cstringt.h:696
#define INTERNET_FLAG_PASSIVE
Definition: wininet.h:65
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define DT_SINGLELINE
Definition: winuser.h:540
#define INTERNET_FLAG_PRAGMA_NOCACHE
Definition: wininet.h:85
#define LVCF_FMT
Definition: commctrl.h:2582
#define CREATE_ALWAYS
Definition: disk.h:72
WCHAR szProxyServer[MAX_PATH]
Definition: winmain.h:20
HINSTANCE hInst
Definition: dxdiag.c:13
DWORD dwStatus
Definition: mediaobj.idl:95
PRTL_UNICODE_STRING_BUFFER Path
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
#define INTERNET_OPEN_TYPE_PRECONFIG
Definition: wininet.h:521
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1408
BOOL WINAPI DeleteDC(_In_ HDC)
#define INTERNET_OPTION_SECURITY_FLAGS
Definition: wininet.h:725
HWND Create(HWND hwndParent)
Definition: loaddlg.cpp:225
BOOL ModifyStyle(DWORD dwRemove, DWORD dwAdd, UINT nFlags=0)
Definition: atlwin.h:940
BOOL AddItem(INT ItemIndex, LPWSTR lpText)
Definition: loaddlg.cpp:253
LPCWSTR lpParameters
Definition: shellapi.h:331
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
BOOL WINAPI InternetReadFile(HINTERNET hFile, LPVOID lpBuffer, DWORD dwNumOfBytesToRead, LPDWORD pdwNumOfBytesRead)
Definition: internet.c:2174
ATL::CStringW m_szProgressText
Definition: loaddlg.cpp:102
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
Definition: window.h:371
static DWORD WINAPI ThreadFunc(LPVOID Context)
Definition: loaddlg.cpp:498
#define SetWindowText
Definition: winuser.h:5832
unsigned int UINT
Definition: ndis.h:50
#define MB_OK
Definition: winuser.h:784
#define HTTP_QUERY_FLAG_NUMBER
Definition: wininet.h:1606
BOOL bDelInstaller
Definition: winmain.h:11
#define BEGIN_MSG_MAP(theClass)
Definition: atlwin.h:1770
#define CreateFileW
Definition: compat.h:408
#define MESSAGE_HANDLER(msg, func)
Definition: atlwin.h:1798
static VOID Add(DownloadInfo info)
Definition: loaddlg.cpp:364
BOOL WINAPI InternetCrackUrlW(const WCHAR *lpszUrl, DWORD dwUrlLength, DWORD dwFlags, URL_COMPONENTSW *lpUC)
Definition: internet.c:1644
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static const WCHAR szName[]
Definition: msipriv.h:1194
ATL::CStringW LoadStatusString(DownloadStatus StatusParam)
Definition: loaddlg.cpp:65
HICON hIconSm
Definition: msconfig.c:44
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1048
unsigned int ULONG
Definition: retypes.h:1
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
LONG bottom
Definition: windef.h:309
#define DT_CENTER
Definition: winuser.h:527
int InsertColumn(int iCol, LV_COLUMN *pcol)
Definition: rosctrls.h:52
WCHAR szNoProxyFor[MAX_PATH]
Definition: winmain.h:21
#define malloc
Definition: debug_ros.c:4
#define SECURITY_FLAG_SECURE
Definition: winhttp.h:285
#define LVS_NOSORTHEADER
Definition: commctrl.h:2281
static HBITMAP
Definition: button.c:44
#define ICU_DECODE
Definition: winhttp.h:291
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define WM_ERASEBKGND
Definition: winuser.h:1607
VOID AddRow(INT RowIndex, LPCWSTR szAppName, const DownloadStatus Status)
Definition: loaddlg.cpp:266
ATL::CSimpleArray< DownloadInfo > AppInfo
Definition: loaddlg.cpp:94
GLfloat GLfloat p
Definition: glext.h:8902
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define IDCANCEL
Definition: winuser.h:825
#define LVIF_STATE
Definition: commctrl.h:2308
LONG_PTR LRESULT
Definition: windef.h:209
#define INFINITE
Definition: serial.h:102
HINTERNET WINAPI InternetOpenW(LPCWSTR lpszAgent, DWORD dwAccessType, LPCWSTR lpszProxy, LPCWSTR lpszProxyBypass, DWORD dwFlags)
Definition: internet.c:1001
Arabic default style
Definition: afstyles.h:93
#define WS_VISIBLE
Definition: pedump.c:620
#define memset(x, y, z)
Definition: compat.h:39
BOOL AddColumn(INT Index, INT Width, INT Format)
Definition: loaddlg.cpp:274
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define GetClassLongPtrW
Definition: winuser.h:4539
#define SRCCOPY
Definition: wingdi.h:332
HDC hdcMem
Definition: welcome.c:104
LPWSTR lpszScheme
Definition: winhttp.h:466
#define ICON_BIG
Definition: tnclass.cpp:51
static CDownloaderProgress ProgressBar
Definition: loaddlg.cpp:346
#define INTERNET_FLAG_KEEP_CONNECTION
Definition: wininet.h:72
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char * Format
Definition: acpixf.h:1212
DownloadStatus
Definition: loaddlg.cpp:55