ReactOS 0.4.17-dev-1190-g4c812f4
CDownloadManager Class Reference
Inheritance diagram for CDownloadManager:
Collaboration diagram for CDownloadManager:

Public Types

enum  { WM_ISCANCELLED = WM_APP , WM_SETSTATUS , WM_GETINSTANCE , WM_GETNEXT }
 
- Public Types inherited from IUnknown
typedef IUnknown * LPUNKNOWN
 

Public Member Functions

 CDownloadManager ()
 
BOOL IsCancelled ()
 
BOOL IsSilentDialog ()
 
void StartWorkerThread ()
 
void Add (const DownloadInfo &Info)
 
void Show ()
 
INT_PTR RealDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
void UpdateProgress (ULONG ulProgress, ULONG ulProgressMax)
 
void PerformDownloadAndInstall (const DownloadInfo &Info)
 
- Public Member Functions inherited from ATL::CComObjectRootEx< CComMultiThreadModelNoCS >
 ~CComObjectRootEx ()
 
ULONG InternalAddRef ()
 
ULONG InternalRelease ()
 
void Lock ()
 
void Unlock ()
 
HRESULT _AtlInitialConstruct ()
 
- Public Member Functions inherited from ATL::CComObjectRootBase
 CComObjectRootBase ()
 
 ~CComObjectRootBase ()
 
void SetVoid (void *)
 
HRESULT _AtlFinalConstruct ()
 
HRESULT FinalConstruct ()
 
void InternalFinalConstructAddRef ()
 
void InternalFinalConstructRelease ()
 
void FinalRelease ()
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Static Public Member Functions

static CDownloadManager * CreateInstanceHelper (UINT Flags)
 
static BOOL CreateInstance (BOOL Modal, CComPtr< CDownloadManager > &Obj)
 
static CDownloadManager * FindInstance ()
 
static INT_PTR CALLBACK DlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static unsigned int CALLBACK ThreadFunc (void *ThreadParam)
 
- Static Public Member Functions inherited from ATL::CComCoClass< CDownloadManager, &CLSID_NULL >
static LPCTSTR WINAPI GetObjectDescription ()
 
- Static Public Member Functions inherited from ATL::CComObjectRootBase
static void WINAPI ObjectMain (bool)
 
static const struct _ATL_CATMAP_ENTRY * GetCategoryMap ()
 
static HRESULT WINAPI InternalQueryInterface (void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
 

Protected Attributes

HWND m_hDlg
 
UINT m_Threads
 
UINT m_Index
 
BOOL m_bCancelled
 
BOOL m_bModal
 
UINT m_fDaf = 0
 
WCHAR m_szCaptionFmt [100]
 
ATL::CSimpleArray< DownloadInfo > m_List
 
CDowloadingAppsListView m_ListView
 
CDownloaderProgress m_ProgressBar
 

Additional Inherited Members

- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 

Detailed Description

Definition at line 586 of file loaddlg.cpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
WM_ISCANCELLED 
WM_SETSTATUS 
WM_GETINSTANCE 
WM_GETNEXT 

Definition at line 592 of file loaddlg.cpp.

592 {
593 WM_ISCANCELLED = WM_APP, // Return BOOL
594 WM_SETSTATUS, // wParam DownloadStatus
595 WM_GETINSTANCE, // Return CDownloadManager*
596 WM_GETNEXT, // Return DownloadInfo* or NULL
597 };
#define WM_APP
Definition: eventvwr.h:73

Constructor & Destructor Documentation

◆ CDownloadManager()

CDownloadManager::CDownloadManager ( )
inline

Definition at line 599 of file loaddlg.cpp.

#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117

Member Function Documentation

◆ Add()

void CDownloadManager::Add ( const DownloadInfo &  Info)

Definition at line 691 of file loaddlg.cpp.

692{
693 const UINT count = m_List.GetSize(), start = count;
694 for (UINT i = 0; i < count; ++i)
695 {
696 if (Info.Equal(m_List[i]))
697 return; // Already in the list
698 }
699
700 if (!Info.szDependencies.IsEmpty())
701 {
702 CStringW deps = Info.szDependencies;
703 for (int pos = 1; pos > 0; deps = deps.Mid(pos + 1))
704 {
705 pos = deps.Find(L'|');
706 CStringW pkg = (pos > 0 ? deps.Left(pos) : deps).Trim();
707
708 // In the future a package might need to specify dependency version or WoW64
709 // information ("vcredist*x64" etc), for now, just remove possible modifiers.
710 int suffix = pkg.FindOneOf(L"*<=>:/\\?");
711 if (suffix > 0)
712 pkg = pkg.Left(suffix);
713
715 Deleter <CAvailableApplicationInfo*>del(pApp);
716 if (!pApp || pApp->IsInstalled())
717 continue;
718 // Add the dependency before the application in the list
719 Add(DownloadInfo(*pApp, DAF_SILENT));
720 }
721 }
722
723 m_List.Add(Info);
724 if (m_hDlg)
726}
static VOID del(LPHIST_ENTRY item)
Definition: history.c:199
int GetSize() const
Definition: atlsimpcoll.h:104
BOOL Add(const T &t)
Definition: atlsimpcoll.h:58
CStringT Left(int nCount) const
Definition: cstringt.h:776
int Find(_In_ PCXSTR pszSub, _In_opt_ int iStart=0) const noexcept
Definition: cstringt.h:696
CStringT Mid(int iFirst, int nCount) const
Definition: cstringt.h:748
int FindOneOf(_In_ PCXSTR pszCharSet) const noexcept
Definition: cstringt.h:722
static CAvailableApplicationInfo * CreateAvailableAppInstance(const CStringW &PkgName, PCWSTR DBPath=NULL)
Definition: appdb.cpp:110
bool IsInstalled(CStringW *pOutKeyName=NULL) const
Definition: appinfo.cpp:124
VOID LoadList(ATL::CSimpleArray< DownloadInfo > arrInfo, UINT Start=0)
Definition: loaddlg.cpp:395
ATL::CSimpleArray< DownloadInfo > m_List
Definition: loaddlg.cpp:673
CDowloadingAppsListView m_ListView
Definition: loaddlg.cpp:674
void Add(const DownloadInfo &Info)
Definition: loaddlg.cpp:691
#define L(x)
Definition: resources.c:13
GLuint start
Definition: gl.h:1545
GLuint GLuint GLsizei count
Definition: gl.h:1545
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
unsigned int UINT
Definition: sysinfo.c:13
@ DAF_SILENT
Definition: dialogs.h:13
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690

Referenced by Add().

◆ CreateInstance()

static BOOL CDownloadManager::CreateInstance ( BOOL  Modal,
CComPtr< CDownloadManager > &  Obj 
)
inlinestatic

Definition at line 622 of file loaddlg.cpp.

623 {
625 if (!p)
626 return FALSE;
627 Obj.Attach(p);
628 return TRUE;
629 }
static CDownloadManager * CreateInstanceHelper(UINT Flags)
Definition: loaddlg.cpp:602
#define TRUE
Definition: types.h:120
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by DownloadApplicationsDB(), and DownloadListOfApplications().

◆ CreateInstanceHelper()

static CDownloadManager * CDownloadManager::CreateInstanceHelper ( UINT  Flags)
inlinestatic

Definition at line 602 of file loaddlg.cpp.

603 {
604 if (!(Flags & DAF_MODAL))
605 {
607 if (pExisting)
608 {
609 pExisting->AddRef();
610 return pExisting;
611 }
612 }
614 if (FAILED(ShellObjectCreator(obj)))
615 return NULL;
616 obj->m_fDaf = Flags;
617 obj->m_bModal = !!(Flags & DAF_MODAL);
618 return obj.Detach();
619 }
static CDownloadManager * FindInstance()
Definition: loaddlg.cpp:632
_In_ D3DDDI_VIDEO_PRESENT_TARGET_ID _In_ ULONG _In_ ULONG Flags
Definition: dispmprt.h:245
ULONG AddRef()
#define FAILED(hr)
Definition: intsafe.h:51
@ DAF_MODAL
Definition: dialogs.h:14

Referenced by CreateInstance().

◆ DlgProc()

INT_PTR CALLBACK CDownloadManager::DlgProc ( HWND  hDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 745 of file loaddlg.cpp.

746{
748 if (!pThis)
749 {
750 if (uMsg != WM_INITDIALOG)
751 return FALSE;
753 pThis = (CDownloadManager*)lParam;
754 }
755 return pThis->RealDlgProc(hDlg, uMsg, wParam, lParam);
756}
INT_PTR RealDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: loaddlg.cpp:759
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define DWLP_USER
Definition: winuser.h:883
#define GetWindowLongPtrW
Definition: winuser.h:4983
#define WM_INITDIALOG
Definition: winuser.h:1767
#define SetWindowLongPtrW
Definition: winuser.h:5512

◆ FindInstance()

static CDownloadManager * CDownloadManager::FindInstance ( )
inlinestatic

Definition at line 632 of file loaddlg.cpp.

633 {
636 return NULL;
637 }
HWND g_hDownloadWnd
Definition: loaddlg.cpp:584
BOOL WINAPI IsWindowVisible(_In_ HWND)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by CreateInstanceHelper().

◆ IsCancelled()

BOOL CDownloadManager::IsCancelled ( )
inline

Definition at line 640 of file loaddlg.cpp.

641 {
643 }
BOOL WINAPI IsWindow(_In_opt_ HWND)

Referenced by PerformDownloadAndInstall().

◆ IsSilentDialog()

BOOL CDownloadManager::IsSilentDialog ( )
inline

Definition at line 646 of file loaddlg.cpp.

647 {
648 return m_fDaf & DAF_SILENT;
649 }

Referenced by RealDlgProc(), and Show().

◆ PerformDownloadAndInstall()

void CDownloadManager::PerformDownloadAndInstall ( const DownloadInfo &  Info)

Definition at line 880 of file loaddlg.cpp.

881{
882 const HWND hDlg = m_hDlg;
885
887 m_ProgressBar.SendMessageW(PBM_SETPOS, 0, 0);
888 m_ProgressBar.SetProgress(0, Info.SizeInBytes);
889
891 CPathW Path;
892 PCWSTR p;
893
894 ULONG dwContentLen, dwBytesWritten, dwBytesRead, dwStatus, dwStatusLen;
895 ULONG dwCurrentBytesRead = 0;
896 BOOL bTempfile = FALSE, bCancelled = FALSE;
897
898 HINTERNET hOpen = NULL;
901
902
903 LPCWSTR lpszAgent = L"RApps/1.1";
904 const DWORD dwUrlConnectFlags =
906 URL_COMPONENTSW urlComponents;
907 size_t urlLength;
908 unsigned char lpBuffer[4096];
909
910 // Change caption to show the currently downloaded app
911 switch (Info.DLType)
912 {
914 str.Format(m_szCaptionFmt, Info.szName.GetString());
915 break;
916 case DLTYPE_DBUPDATE:
918 break;
921 break;
922 }
923 SetWindowTextW(hDlg, str);
924
925 // is this URL an update package for RAPPS? if so store it in a different place
926 if (Info.DLType != DLTYPE_APPLICATION)
927 {
929 {
931 goto end;
932 }
933 }
934 else
935 {
937 }
938
939 // build the path for the download
940 p = wcsrchr(Info.szUrl.GetString(), L'/');
941
942 // do we have a final slash separator?
943 if (!p)
944 {
946 goto end;
947 }
948
949 // is the path valid? can we access it?
951 {
953 {
955 goto end;
956 }
957 }
958
959 switch (Info.DLType)
960 {
961 case DLTYPE_DBUPDATE:
964 break;
966 {
967 CStringW name = Info.szFileName;
968 if (name.IsEmpty())
969 name = p + 1; // use the filename retrieved from URL
971 Path += name;
972 break;
973 }
974 }
975
976 if ((Info.DLType == DLTYPE_APPLICATION) && Info.szSHA1[0] &&
978 {
979 // only open it in case of total correctness
980 if (VerifyInteg(Info.szSHA1.GetString(), Path))
981 goto run;
982 }
983
984 // Download it
986 /* FIXME: this should just be using the system-wide proxy settings */
987 switch (SettingsInfo.Proxy)
988 {
989 case 0: // preconfig
990 default:
991 hOpen = InternetOpenW(lpszAgent, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
992 break;
993 case 1: // direct (no proxy)
994 hOpen = InternetOpenW(lpszAgent, INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);
995 break;
996 case 2: // use proxy
997 hOpen = InternetOpenW(
999 break;
1000 }
1001
1002 if (!hOpen)
1003 {
1005 goto end;
1006 }
1007
1008 bTempfile = TRUE;
1009 dwContentLen = 0;
1010 dwStatusLen = sizeof(dwStatus);
1011 ZeroMemory(&urlComponents, sizeof(urlComponents));
1012 urlComponents.dwStructSize = sizeof(urlComponents);
1013
1014 urlLength = Info.szUrl.GetLength();
1015 urlComponents.dwSchemeLength = urlLength + 1;
1016 urlComponents.lpszScheme = (LPWSTR)malloc(urlComponents.dwSchemeLength * sizeof(WCHAR));
1017
1018 if (!InternetCrackUrlW(Info.szUrl, urlLength + 1, ICU_DECODE | ICU_ESCAPE, &urlComponents))
1019 {
1021 goto end;
1022 }
1023
1024 if (urlComponents.nScheme == INTERNET_SCHEME_HTTP || urlComponents.nScheme == INTERNET_SCHEME_HTTPS)
1025 {
1026 hFile = InternetOpenUrlW(hOpen, Info.szUrl, NULL, 0, dwUrlConnectFlags, 0);
1027 if (!hFile)
1028 {
1030 {
1031 /* Workaround for CORE-17377 */
1033 }
1034 goto end;
1035 }
1036
1037 // query connection
1039 {
1041 goto end;
1042 }
1043
1044 if (dwStatus != HTTP_STATUS_OK)
1045 {
1047 goto end;
1048 }
1049
1050 // query content length
1052 }
1053 else if (urlComponents.nScheme == INTERNET_SCHEME_FTP)
1054 {
1055 // force passive mode on FTP
1056 hFile =
1057 InternetOpenUrlW(hOpen, Info.szUrl, NULL, 0, dwUrlConnectFlags | INTERNET_FLAG_PASSIVE, 0);
1058 if (!hFile)
1059 {
1061 {
1062 /* Workaround for CORE-17377 */
1064 }
1065 goto end;
1066 }
1067
1068 dwContentLen = FtpGetFileSize(hFile, &dwStatus);
1069 }
1070 else if (urlComponents.nScheme == INTERNET_SCHEME_FILE)
1071 {
1072 // Add support for the file scheme so testing locally is simpler
1073 WCHAR LocalFilePath[MAX_PATH];
1074 DWORD cchPath = _countof(LocalFilePath);
1075 // Ideally we would use PathCreateFromUrlAlloc here, but that is not exported (yet)
1076 HRESULT hr = PathCreateFromUrlW(Info.szUrl, LocalFilePath, &cchPath, 0);
1077 if (SUCCEEDED(hr))
1078 {
1079 if (CopyFileW(LocalFilePath, Path, FALSE))
1080 {
1081 // Remove the readonly flag in case we are copying from a read-only medium
1085
1086 goto run;
1087 }
1088 else
1089 {
1091 goto end;
1092 }
1093 }
1094 else
1095 {
1097 goto end;
1098 }
1099 }
1100
1101 if (!dwContentLen)
1102 {
1103 // Someone was nice enough to add this, let's use it
1104 if (Info.SizeInBytes)
1105 {
1106 dwContentLen = Info.SizeInBytes;
1107 }
1108 else
1109 {
1110 // content-length is not known, enable marquee mode
1112 }
1113 }
1114
1115 free(urlComponents.lpszScheme);
1116
1117#ifdef USE_CERT_PINNING
1118 // are we using HTTPS to download the RAPPS update package? check if the certificate is original
1119 if ((urlComponents.nScheme == INTERNET_SCHEME_HTTPS) && (Info.DLType == DLTYPE_DBUPDATE))
1120 {
1121 CStringA szMsgText;
1122 RappsCertInfo certInfo;
1123 bool bAskQuestion = false;
1124 const CERT_SIMPLE_CHAIN *pSimpleChain = NULL;
1125 if (!CertGetSubjectAndIssuer(hFile, certInfo))
1126 {
1127 szMsgText.LoadStringW(IDS_UNABLE_TO_QUERY_CERT);
1128 bAskQuestion = true;
1129 }
1130 else if (!IsTrustedPinnedCert(certInfo))
1131 {
1132 szMsgText.Format(IDS_MISMATCH_CERT_INFO, (LPCSTR)certInfo.subjectInfo, (LPCSTR)certInfo.issuerInfo);
1133 pSimpleChain = certInfo.pChainContext->rgpChain[0];
1134 bAskQuestion = true;
1135 }
1136
1137 if (bAskQuestion)
1138 {
1139 if (!AskContinueWithCert(hDlg, szMsgText, pSimpleChain))
1140 {
1141 goto end;
1142 }
1143 }
1144 }
1145#endif
1146
1148 if (hOut == INVALID_HANDLE_VALUE)
1149 {
1151 goto end;
1152 }
1153
1154 dwCurrentBytesRead = 0;
1155 do
1156 {
1157 bCancelled = IsCancelled();
1158 if (bCancelled)
1159 break;
1160
1161 if (!InternetReadFile(hFile, lpBuffer, _countof(lpBuffer), &dwBytesRead))
1162 {
1164 goto end;
1165 }
1166
1167 if (!WriteFile(hOut, &lpBuffer[0], dwBytesRead, &dwBytesWritten, NULL))
1168 {
1170 goto end;
1171 }
1172
1173 dwCurrentBytesRead += dwBytesRead;
1174 UpdateProgress(dwCurrentBytesRead, dwContentLen);
1175
1176 } while (dwBytesRead);
1177
1178 CloseHandle(hOut);
1179 hOut = INVALID_HANDLE_VALUE;
1180
1181 if (bCancelled)
1182 {
1183 DPRINT1("Operation cancelled\n");
1184 goto end;
1185 }
1186
1187 if (!dwContentLen)
1188 {
1189 // set progress bar to 100%
1191
1192 dwContentLen = dwCurrentBytesRead;
1193 UpdateProgress(dwCurrentBytesRead, dwContentLen);
1194 }
1195
1196 /* if this thing isn't a RAPPS update and it has a SHA-1 checksum
1197 verify its integrity by using the native advapi32.A_SHA1 functions */
1198 if ((Info.DLType == DLTYPE_APPLICATION) && Info.szSHA1[0] != 0)
1199 {
1200 CStringW szMsgText;
1201
1202 // change a few strings in the download dialog to reflect the verification process
1203 if (!szMsgText.LoadStringW(IDS_INTEG_CHECK_TITLE))
1204 {
1205 DPRINT1("Unable to load string\n");
1206 goto end;
1207 }
1208
1209 SetWindowTextW(hDlg, szMsgText);
1211
1212 // this may take a while, depending on the file size
1213 if (!VerifyInteg(Info.szSHA1, Path))
1214 {
1215 if (!szMsgText.LoadStringW(IDS_INTEG_CHECK_FAIL))
1216 {
1217 DPRINT1("Unable to load string\n");
1218 goto end;
1219 }
1220
1221 MessageBoxW(hDlg, szMsgText, NULL, MB_OK | MB_ICONERROR);
1222 goto end;
1223 }
1224 }
1225
1226run:
1228
1229 // run it
1230 if (Info.DLType == DLTYPE_APPLICATION)
1231 {
1232 BOOL bSilentInstall = Info.Flags & DAF_SILENT;
1233 CStringW app, params, tempdir;
1234 SHELLEXECUTEINFOW shExInfo = { sizeof(shExInfo), SEE_MASK_NOCLOSEPROCESS, hDlg };
1235 shExInfo.lpVerb = L"open";
1236 shExInfo.lpFile = Path;
1237 shExInfo.lpParameters = L"";
1238 shExInfo.nShow = SW_SHOW;
1239
1240 if (Info.IType == INSTALLER_GENERATE)
1241 {
1242 params = L"/" CMD_KEY_GENINST + CStringW(bSilentInstall ? L" /S" : L"") +
1243 L" \"" + Info.szPackageName + L"\" \"" + shExInfo.lpFile + L"\"";
1244 shExInfo.lpParameters = params;
1245 shExInfo.lpFile = app.GetBuffer(MAX_PATH);
1246 GetModuleFileNameW(NULL, const_cast<LPWSTR>(shExInfo.lpFile), MAX_PATH);
1247 app.ReleaseBuffer();
1248 }
1249 else if (Info.IType == INSTALLER_EXEINZIP)
1250 {
1251 HRESULT hr = ExtractArchiveForExecution(Path, Info.szPackageName, tempdir, app);
1252 if (FAILED(hr))
1253 {
1254 ShowLastError(hDlg, FALSE, hr);
1255 goto end;
1256 }
1257 shExInfo.lpFile = app;
1258 }
1259
1260 if (bSilentInstall)
1261 {
1262 if (!Info.szSilentInstallArgs.IsEmpty())
1263 {
1264 // The package wants to force specific parameters
1265 shExInfo.lpParameters = Info.szSilentInstallArgs.GetString();
1266 }
1267 else
1268 {
1269 UINT extrainfo = 0;
1270 InstallerType it = Info.IExecType;
1271
1272 if (it == INSTALLER_UNKNOWN || it == INSTALLER_EXEINZIP)
1273 it = GuessInstallerType(shExInfo.lpFile, extrainfo);
1274
1275 if (GetSilentInstallParameters(it, extrainfo, shExInfo.lpFile, params))
1276 {
1277 shExInfo.lpParameters = params;
1278 if (it == INSTALLER_MSI)
1279 shExInfo.lpFile = L"msiexec.exe"; // params contains the .msi path
1280 }
1281 }
1282 }
1283
1284 /* FIXME: Do we want to log installer status? */
1285 WriteLogMessage(EVENTLOG_SUCCESS, MSG_SUCCESS_INSTALL, Info.szName);
1286
1287 if (ShellExecuteExW(&shExInfo))
1288 {
1289 // reflect installation progress in the titlebar
1290 // TODO: make a separate string with a placeholder to include app name?
1292 SetWindowTextW(hDlg, szMsgText);
1293
1295
1296 // TODO: issue an install operation separately so that the apps could be downloaded in the background
1297 if (shExInfo.hProcess)
1298 {
1300 CloseHandle(shExInfo.hProcess);
1302 }
1303 }
1304 else
1305 {
1307 }
1308
1309 if (!tempdir.IsEmpty())
1310 {
1311 DeleteDirectoryTree(tempdir, hDlg);
1312 }
1313 }
1314
1315end:
1316 if (hOut != INVALID_HANDLE_VALUE)
1317 CloseHandle(hOut);
1318
1319 if (hFile)
1321 InternetCloseHandle(hOpen);
1322
1323 if (bTempfile)
1324 {
1325 if (bCancelled || (SettingsInfo.bDelInstaller && Info.DLType == DLTYPE_APPLICATION))
1326 {
1327 // Don't delete .zip/.cab files so the user can extract from them
1328 if (bCancelled || Info.IType == INSTALLER_GENERATE || Info.IType == INSTALLER_EXEINZIP ||
1330 {
1332 }
1333 }
1334 }
1335
1337}
PRTL_UNICODE_STRING_BUFFER Path
InstallerType
Definition: appinfo.h:82
@ INSTALLER_UNKNOWN
Definition: appinfo.h:83
@ INSTALLER_EXEINZIP
Definition: appinfo.h:84
@ INSTALLER_GENERATE
Definition: appinfo.h:85
@ INSTALLER_MSI
Definition: appinfo.h:86
#define APPLICATION_DATABASE_NAME
Definition: defines.h:41
BOOL WriteLogMessage(WORD wType, DWORD dwEventID, LPCWSTR lpMsg)
Definition: misc.cpp:323
BOOL GetStorageDirectory(CStringW &lpDirectory)
Definition: misc.cpp:241
BOOL OpensWithExplorer(PCWSTR Path)
Definition: misc.cpp:164
BOOL GetSilentInstallParameters(InstallerType InstallerType, UINT ExtraInfo, LPCWSTR Installer, CStringW &Parameters)
Definition: misc.cpp:714
BOOL DeleteDirectoryTree(LPCWSTR Dir, HWND hwnd=NULL)
Definition: misc.cpp:553
UINT ClassifyFile(PCWSTR Path)
Definition: misc.cpp:127
InstallerType GuessInstallerType(LPCWSTR Installer, UINT &ExtraInfo)
Definition: misc.cpp:637
#define IDS_UNABLE_TO_DOWNLOAD
Definition: resource.h:115
#define IDS_MISMATCH_CERT_INFO
Definition: resource.h:125
#define IDS_UNABLE_TO_DOWNLOAD2
Definition: resource.h:116
#define IDS_UNABLE_PATH
Definition: resource.h:126
#define IDS_UNABLE_TO_QUERY_CERT
Definition: resource.h:117
#define IDC_DOWNLOAD_STATUS
Definition: resource.h:43
#define IDS_INTEG_CHECK_TITLE
Definition: resource.h:118
#define IDS_DL_DIALOG_DB_DOWNLOAD_DISP
Definition: resource.h:228
#define IDS_INTEG_CHECK_FAIL
Definition: resource.h:119
#define IDS_DL_DIALOG_DB_UNOFFICIAL_DOWNLOAD_DISP
Definition: resource.h:229
SETTINGS_INFO SettingsInfo
Definition: winmain.cpp:21
#define DPRINT1
Definition: precomp.h:8
bool IsEmpty() const noexcept
Definition: atlsimpstr.h:394
void ReleaseBuffer(_In_ int nNewLength=-1)
Definition: atlsimpstr.h:387
void __cdecl Format(UINT nFormatID,...)
Definition: cstringt.h:818
void UpdateProgress(ULONG ulProgress, ULONG ulProgressMax)
Definition: loaddlg.cpp:858
WCHAR m_szCaptionFmt[100]
Definition: loaddlg.cpp:672
CDownloaderProgress m_ProgressBar
Definition: loaddlg.cpp:675
BOOL IsCancelled()
Definition: loaddlg.cpp:640
VOID SetMarquee(BOOL Enable)
Definition: loaddlg.cpp:236
VOID SetProgress(ULONG ulProgress, ULONG ulProgressMax)
Definition: loaddlg.cpp:247
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
HRESULT hr
Definition: delayimp.cpp:582
#define CloseHandle
Definition: compat.h:739
#define wcsrchr
Definition: compat.h:16
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define MAX_PATH
Definition: compat.h:34
#define CreateFileW
Definition: compat.h:741
#define FILE_SHARE_READ
Definition: compat.h:136
BOOL WINAPI CopyFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, IN BOOL bFailIfExists)
Definition: copy.c:367
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
Definition: dir.c:58
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:636
BOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes)
Definition: fileinfo.c:779
BOOL WINAPI WriteFile(_In_ HANDLE hFile, _In_reads_bytes_opt_(nNumberOfBytesToWrite) LPCVOID lpBuffer, _In_ DWORD nNumberOfBytesToWrite, _Out_opt_ LPDWORD lpNumberOfBytesWritten, _Inout_opt_ LPOVERLAPPED lpOverlapped)
Definition: rw.c:25
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
HRESULT WINAPI PathCreateFromUrlW(const WCHAR *url, WCHAR *path, DWORD *pcchPath, DWORD dwReserved)
Definition: path.c:3049
DWORD WINAPI FtpGetFileSize(HINTERNET hFile, LPDWORD lpdwFileSizeHigh)
Definition: ftp.c:1758
BOOL WINAPI HttpQueryInfoW(HINTERNET hHttpRequest, DWORD dwInfoLevel, LPVOID lpBuffer, LPDWORD lpdwBufferLength, LPDWORD lpdwIndex)
Definition: http.c:3967
BOOL WINAPI InternetCrackUrlW(const WCHAR *lpszUrl, DWORD dwUrlLength, DWORD dwFlags, URL_COMPONENTSW *lpUC)
Definition: internet.c:2052
BOOL WINAPI InternetReadFile(HINTERNET hFile, LPVOID lpBuffer, DWORD dwNumOfBytesToRead, LPDWORD pdwNumOfBytesRead)
Definition: internet.c:2609
HINTERNET WINAPI InternetOpenUrlW(HINTERNET hInternet, LPCWSTR lpszUrl, LPCWSTR lpszHeaders, DWORD dwHeadersLength, DWORD dwFlags, DWORD_PTR dwContext)
Definition: internet.c:4341
BOOL WINAPI InternetCloseHandle(HINTERNET hInternet)
Definition: internet.c:1841
HINTERNET WINAPI InternetOpenW(LPCWSTR lpszAgent, DWORD dwAccessType, LPCWSTR lpszProxy, LPCWSTR lpszProxyBypass, DWORD dwFlags)
Definition: internet.c:1334
#define INFINITE
Definition: serial.h:102
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
HRESULT ExtractArchiveForExecution(PCWSTR pszArchive, const CStringW &PackageName, CStringW &TempDir, CStringW &App)
Definition: geninst.cpp:845
GLuint GLuint end
Definition: gl.h:1545
GLenum const GLfloat * params
Definition: glext.h:5645
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define HIBYTE(W)
Definition: jmemdos.c:486
static void SetFriendlyUrl(HWND hWnd, LPCWSTR pszUrl)
Definition: loaddlg.cpp:172
VOID UrlUnescapeAndMakeFileNameValid(CStringW &str)
Definition: loaddlg.cpp:156
static VOID MessageBox_LoadString(HWND hOwnerWnd, INT StringID)
Definition: loaddlg.cpp:553
@ DLSTATUS_DOWNLOADING
Definition: loaddlg.cpp:132
@ DLSTATUS_FINISHED
Definition: loaddlg.cpp:136
@ DLSTATUS_WAITING_INSTALL
Definition: loaddlg.cpp:133
@ DLSTATUS_INSTALLING
Definition: loaddlg.cpp:134
static BOOL ShowLastError(HWND hWndOwner, BOOL bInetError, DWORD dwLastError)
Definition: loaddlg.cpp:563
CStringW LoadStatusString(DownloadStatus StatusParam)
Definition: loaddlg.cpp:140
@ DLTYPE_DBUPDATE_UNOFFICIAL
Definition: loaddlg.cpp:126
@ DLTYPE_DBUPDATE
Definition: loaddlg.cpp:125
@ DLTYPE_APPLICATION
Definition: loaddlg.cpp:124
HWND hMainWnd
Definition: magnifier.c:32
#define ZeroMemory
Definition: minwinbase.h:31
LONG_PTR LPARAM
Definition: minwindef.h:175
#define CREATE_ALWAYS
Definition: disk.h:72
_In_ HANDLE hFile
Definition: mswsock.h:90
CAtlStringW CStringW
Definition: atlstr.h:130
_Out_ LPWSTR lpBuffer
Definition: netsh.h:68
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
#define FILE_ATTRIBUTE_READONLY
Definition: nt_native.h:702
#define GENERIC_WRITE
Definition: nt_native.h:90
short WCHAR
Definition: pedump.c:58
#define PBM_SETPOS
Definition: commctrl.h:2189
DWORD dwStatus
Definition: mediaobj.idl:95
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define MB_ICONERROR
Definition: winuser.h:798
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
#define MB_OK
Definition: winuser.h:801
#define SW_SHOW
Definition: winuser.h:786
#define WM_NOTIFY_INSTALLERFINISHED
Definition: rapps.h:20
const WCHAR * str
#define SEE_MASK_NOCLOSEPROCESS
Definition: shellapi.h:33
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
Definition: shlexec.cpp:2738
@ PERCEIVED_TYPE_COMPRESSED
Definition: shtypes.idl:177
#define _countof(array)
Definition: sndvol32.h:70
WCHAR szDownloadDir[MAX_PATH]
Definition: settings.h:10
BOOL bDelInstaller
Definition: settings.h:11
WCHAR szNoProxyFor[MAX_PATH]
Definition: settings.h:22
WCHAR szProxyServer[MAX_PATH]
Definition: settings.h:21
DWORD dwStructSize
Definition: wininet.h:211
INTERNET_SCHEME nScheme
Definition: wininet.h:214
LPWSTR lpszScheme
Definition: wininet.h:212
DWORD dwSchemeLength
Definition: wininet.h:213
LPCWSTR lpParameters
Definition: shellapi.h:340
Definition: cookie.c:202
Definition: name.c:39
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
const char * LPCSTR
Definition: typedefs.h:52
const uint16_t * PCWSTR
Definition: typedefs.h:57
const uint16_t * LPCWSTR
Definition: typedefs.h:57
uint16_t * LPWSTR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
#define CMD_KEY_GENINST
Definition: unattended.h:4
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
SERVICE_STATUS_HANDLE hStatus
Definition: w32time.c:14
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define HTTP_STATUS_OK
Definition: winhttp.h:301
#define INTERNET_SCHEME_FTP
Definition: winhttp.h:49
#define ICU_DECODE
Definition: winhttp.h:353
#define INTERNET_SCHEME_HTTP
Definition: winhttp.h:47
#define INTERNET_SCHEME_HTTPS
Definition: winhttp.h:48
#define ICU_ESCAPE
Definition: winhttp.h:53
#define INTERNET_FLAG_PRAGMA_NOCACHE
Definition: wininet.h:85
#define INTERNET_FLAG_DONT_CACHE
Definition: wininet.h:67
#define INTERNET_FLAG_KEEP_CONNECTION
Definition: wininet.h:72
#define INTERNET_FLAG_PASSIVE
Definition: wininet.h:65
#define HTTP_QUERY_FLAG_NUMBER
Definition: wininet.h:1606
#define INTERNET_OPEN_TYPE_DIRECT
Definition: wininet.h:522
@ INTERNET_SCHEME_FILE
Definition: wininet.h:143
#define INTERNET_OPEN_TYPE_PROXY
Definition: wininet.h:523
#define HTTP_QUERY_STATUS_CODE
Definition: wininet.h:1542
#define INTERNET_OPEN_TYPE_PRECONFIG
Definition: wininet.h:521
#define HTTP_QUERY_CONTENT_LENGTH
Definition: wininet.h:1528
BOOL VerifyInteg(LPCWSTR lpSHA1Hash, LPCWSTR lpFileName)
Definition: integrity.cpp:14
#define EVENTLOG_SUCCESS
Definition: winnt_old.h:3078

Referenced by ThreadFunc().

◆ RealDlgProc()

INT_PTR CDownloadManager::RealDlgProc ( HWND  hDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 759 of file loaddlg.cpp.

760{
761 switch (uMsg)
762 {
763 case WM_INITDIALOG:
764 {
765 g_Busy++;
766 AddRef();
767 m_hDlg = hDlg;
768 if (!m_bModal)
769 g_hDownloadWnd = hDlg;
770
771 HICON hIconSm, hIconBg;
772 if (hMainWnd)
773 {
776 }
777 if (!hMainWnd || (!hIconBg || !hIconSm))
778 {
780 }
781 SendMessageW(hDlg, WM_SETICON, ICON_BIG, (LPARAM)hIconBg);
782 SendMessageW(hDlg, WM_SETICON, ICON_SMALL, (LPARAM)hIconSm);
783
787 buf.Replace(L"%ls", L"");
788 SetWindowTextW(hDlg, buf); // "Downloading..."
789
791 if (hItem)
792 {
793 // initialize the default values for our nifty progress bar
794 // and subclass it so that it learns to print a status text
796 m_ProgressBar.SendMessageW(PBM_SETRANGE, 0, MAKELPARAM(0, 100));
797 m_ProgressBar.SendMessageW(PBM_SETPOS, 0, 0);
798 if (m_List.GetSize() > 0)
799 m_ProgressBar.SetProgress(0, m_List[0].SizeInBytes);
800 }
801
802 if (!m_ListView.Create(hDlg))
803 return FALSE;
805
808 return TRUE;
809 }
810
811 case WM_COMMAND:
812 if (LOWORD(wParam) == IDCANCEL)
813 {
815 PostMessageW(hDlg, WM_CLOSE, 0, 0);
816 }
817 return FALSE;
818
819 case WM_CLOSE:
821 if (m_ProgressBar)
823 return m_bModal && !IsSilentDialog() ? ::EndDialog(hDlg, 0) : ::DestroyWindow(hDlg);
824
825 case WM_DESTROY:
826 if (g_hDownloadWnd == hDlg)
828 g_Busy--;
829 if (hMainWnd)
831 if (m_bModal && IsSilentDialog())
833 Release();
834 break;
835
836 case WM_ISCANCELLED:
837 return SetDlgMsgResult(hDlg, uMsg, m_bCancelled);
838
839 case WM_SETSTATUS:
841 break;
842
843 case WM_GETINSTANCE:
844 return SetDlgMsgResult(hDlg, uMsg, (INT_PTR)this);
845
846 case WM_GETNEXT:
847 {
848 DownloadInfo *pItem = NULL;
850 pItem = &m_List[m_Index++];
851 return SetDlgMsgResult(hDlg, uMsg, (INT_PTR)pItem);
852 }
853 }
854 return FALSE;
855}
#define IDI_MAIN
Definition: resource.h:4
#define IDC_DOWNLOAD_PROGRESS
Definition: resource.h:42
BOOL SubclassWindow(HWND hWnd)
Definition: atlwin.h:1552
HWND UnsubclassWindow(BOOL bForce=FALSE)
Definition: atlwin.h:1575
HWND Create(HWND hwndParent)
Definition: loaddlg.cpp:375
VOID SetDownloadStatus(INT ItemIndex, DownloadStatus Status)
Definition: loaddlg.cpp:405
BOOL IsSilentDialog()
Definition: loaddlg.cpp:646
void StartWorkerThread()
Definition: loaddlg.cpp:679
HINSTANCE hInst
Definition: dxdiag.c:13
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
ULONG Release()
DownloadStatus
Definition: loaddlg.cpp:130
static HICON
Definition: imagelist.c:80
HICON hIconSm
Definition: msconfig.c:44
#define LOWORD(l)
Definition: pedump.c:82
#define PBM_SETRANGE
Definition: commctrl.h:2188
#define SW_HIDE
Definition: winuser.h:779
#define WM_CLOSE
Definition: winuser.h:1649
#define GCLP_HICONSM
Definition: winuser.h:683
#define MAKELPARAM(l, h)
Definition: winuser.h:4116
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define IDCANCEL
Definition: winuser.h:842
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define GCLP_HICON
Definition: winuser.h:682
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define WM_COMMAND
Definition: winuser.h:1768
#define PostMessage
Definition: winuser.h:5998
#define GetClassLongPtrW
Definition: winuser.h:4718
#define WM_DESTROY
Definition: winuser.h:1637
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
BOOL WINAPI DestroyWindow(_In_ HWND)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
Definition: cursoricon.c:2444
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
#define WM_NOTIFY_OPERATIONCOMPLETED
Definition: rapps.h:19
LONG g_Busy
Definition: winmain.cpp:17
#define ICON_BIG
Definition: tnclass.cpp:51
#define ICON_SMALL
Definition: tnclass.cpp:48
int32_t INT_PTR
Definition: typedefs.h:64
ULONG_PTR SIZE_T
Definition: typedefs.h:80
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1382
#define SetDlgMsgResult(hwnd, msg, result)
Definition: windowsx.h:518

Referenced by DlgProc().

◆ Show()

void CDownloadManager::Show ( )

Definition at line 729 of file loaddlg.cpp.

730{
731 HWND hDlg = NULL;
732 const BOOL bSilent = IsSilentDialog(), bModal = m_bModal;
733 if (bModal && !bSilent)
735 else if (!m_hDlg || !IsWindow(m_hDlg))
737
738 // A DialogBox dialog cannot be invisible, it is forced visible after WM_INITDIALOG returns.
739 // We therefore use a modeless dialog when we are both modal and silent.
740 for (MSG msg; bModal && bSilent && hDlg && GetMessageW(&msg, NULL, 0, 0);)
742}
#define msg(x)
Definition: auth_time.c:54
#define IDD_DOWNLOAD_DIALOG
Definition: resource.h:66
DLGPROC DlgProc
Definition: desk.c:122
HWND WINAPI CreateDialogParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
#define DispatchMessage
Definition: winuser.h:5931
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829

◆ StartWorkerThread()

void CDownloadManager::StartWorkerThread ( )

Definition at line 679 of file loaddlg.cpp.

680{
681 AddRef(); // To keep m_List alive in thread
682 unsigned int ThreadId;
683 HANDLE Thread = (HANDLE)_beginthreadex(NULL, 0, ThreadFunc, this, 0, &ThreadId);
684 if (Thread)
686 else
687 Release();
688}
static unsigned int CALLBACK ThreadFunc(void *ThreadParam)
Definition: loaddlg.cpp:864
_ACRTIMP uintptr_t __cdecl _beginthreadex(void *, unsigned int, _beginthreadex_start_routine_t, void *, unsigned int, unsigned int *)
Definition: thread.c:207
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
PVOID HANDLE
Definition: typedefs.h:73

Referenced by RealDlgProc().

◆ ThreadFunc()

unsigned int CALLBACK CDownloadManager::ThreadFunc ( void *  ThreadParam)
static

Definition at line 864 of file loaddlg.cpp.

865{
866 CDownloadManager *pThis = (CDownloadManager*)ThreadParam;
867 HWND hDlg = pThis->m_hDlg;
868 for (;;)
869 {
870 DownloadInfo *pItem = (DownloadInfo*)SendMessageW(hDlg, WM_GETNEXT, 0, 0);
871 if (!pItem)
872 break;
873 pThis->PerformDownloadAndInstall(*pItem);
874 }
875 SendMessageW(hDlg, WM_CLOSE, 0, 0);
876 return pThis->Release();
877}
void PerformDownloadAndInstall(const DownloadInfo &Info)
Definition: loaddlg.cpp:880

Referenced by StartWorkerThread().

◆ UpdateProgress()

void CDownloadManager::UpdateProgress ( ULONG  ulProgress,
ULONG  ulProgressMax 
)

Definition at line 858 of file loaddlg.cpp.

859{
860 m_ProgressBar.SetProgress(ulProgress, ulProgressMax);
861}

Referenced by PerformDownloadAndInstall().

Member Data Documentation

◆ m_bCancelled

BOOL CDownloadManager::m_bCancelled
protected

Definition at line 669 of file loaddlg.cpp.

Referenced by RealDlgProc().

◆ m_bModal

BOOL CDownloadManager::m_bModal
protected

Definition at line 670 of file loaddlg.cpp.

Referenced by RealDlgProc(), and Show().

◆ m_fDaf

UINT CDownloadManager::m_fDaf = 0
protected

Definition at line 671 of file loaddlg.cpp.

Referenced by IsSilentDialog().

◆ m_hDlg

HWND CDownloadManager::m_hDlg
protected

Definition at line 666 of file loaddlg.cpp.

Referenced by Add(), IsCancelled(), PerformDownloadAndInstall(), RealDlgProc(), Show(), and ThreadFunc().

◆ m_Index

UINT CDownloadManager::m_Index
protected

Definition at line 668 of file loaddlg.cpp.

Referenced by RealDlgProc().

◆ m_List

ATL::CSimpleArray<DownloadInfo> CDownloadManager::m_List
protected

Definition at line 673 of file loaddlg.cpp.

Referenced by Add(), and RealDlgProc().

◆ m_ListView

CDowloadingAppsListView CDownloadManager::m_ListView
protected

Definition at line 674 of file loaddlg.cpp.

Referenced by Add(), and RealDlgProc().

◆ m_ProgressBar

CDownloaderProgress CDownloadManager::m_ProgressBar
protected

Definition at line 675 of file loaddlg.cpp.

Referenced by PerformDownloadAndInstall(), RealDlgProc(), and UpdateProgress().

◆ m_szCaptionFmt

WCHAR CDownloadManager::m_szCaptionFmt[100]
protected

Definition at line 672 of file loaddlg.cpp.

Referenced by PerformDownloadAndInstall(), and RealDlgProc().

◆ m_Threads

UINT CDownloadManager::m_Threads
protected

Definition at line 667 of file loaddlg.cpp.


The documentation for this class was generated from the following file: