void CALLBACK CHttpDownloadDlg::_OnStatusCallBack(HINTERNET hInternet, DWORD dwContext, DWORD dwInternetStatus, LPVOID lpvStatusInformation, DWORD dwStatusInformationLength) { CHttpDownloadDlg* pDlg = (CHttpDownloadDlg*) dwContext; ASSERT(pDlg); ASSERT(pDlg->IsKindOf(RUNTIME_CLASS(CHttpDownloadDlg))); pDlg->OnStatusCallBack(hInternet, dwInternetStatus, lpvStatusInformation, dwStatusInformationLength); }
UINT CHttpDownloadDlg::_DownloadThread(LPVOID pParam) { //Convert from the SDK world to the C++ world CHttpDownloadDlg* pDlg = (CHttpDownloadDlg*) pParam; ASSERT(pDlg); ASSERT(pDlg->IsKindOf(RUNTIME_CLASS(CHttpDownloadDlg))); pDlg->DownloadThread(); return 0; }
void CALLBACK CHttpDownloadDlg::_OnStatusCallBack(HINTERNET hInternet, DWORD dwContext, DWORD dwInternetStatus, LPVOID lpvStatusInformation, DWORD dwStatusInformationLength) { //Convert from the SDK C world to the C++ world // Elandal: Assumes sizeof(void*) == sizeof(unsigned long) CHttpDownloadDlg* pDlg = (CHttpDownloadDlg*) dwContext; ASSERT(pDlg); ASSERT(pDlg->IsKindOf(RUNTIME_CLASS(CHttpDownloadDlg))); pDlg->OnStatusCallBack(hInternet, dwInternetStatus, lpvStatusInformation, dwStatusInformationLength); }
UINT AFX_CDECL CHttpDownloadDlg::_DownloadThread(LPVOID pParam) { DbgSetThreadName("HttpDownload"); InitThreadLocale(); //Convert from the SDK world to the C++ world CHttpDownloadDlg* pDlg = (CHttpDownloadDlg*) pParam; ASSERT(pDlg); ASSERT(pDlg->IsKindOf(RUNTIME_CLASS(CHttpDownloadDlg))); pDlg->DownloadThread(); return 0; }
UINT AFX_CDECL CHttpDownloadDlg::_DownloadThread(LPVOID pParam) { DbgSetThreadName("HttpDownload"); InitThreadLocale(); //Convert from the SDK world to the C++ world CHttpDownloadDlg* pDlg = (CHttpDownloadDlg*) pParam; ASSERT(pDlg); ASSERT(pDlg->IsKindOf(RUNTIME_CLASS(CHttpDownloadDlg))); // BEGIN SLUGFILLER: SafeHash CReadWriteLock lock(&theApp.m_threadlock); if (!lock.ReadLock(1000)) { // netfinity: Make sure we doesn't get stuck pDlg->HandleThreadError(GetResString(IDS_HTTPDOWNLOAD_GENERIC_ERROR)); return 0; } // END SLUGFILLER: SafeHash pDlg->DownloadThread(); return 0; }