| 31 | DownloadManager *TheDownloadManager = nullptr; |
| 32 | |
| 33 | DownloadManager::DownloadManager() |
| 34 | { |
| 35 | m_download = new CDownload(this); |
| 36 | m_wasError = m_sawEnd = false; |
| 37 | m_statusString = Fetch_String(FTP_StatusIdle); |
| 38 | |
| 39 | // ----- Initialize Winsock ----- |
| 40 | m_winsockInit = true; |
| 41 | WORD verReq = MAKEWORD(2, 2); |
| 42 | WSADATA wsadata; |
| 43 | |
| 44 | int err = WSAStartup(verReq, &wsadata); |
| 45 | if (err != 0) |
| 46 | { |
| 47 | m_winsockInit = false; |
| 48 | } |
| 49 | else |
| 50 | { |
| 51 | if ((LOBYTE(wsadata.wVersion) != 2) || (HIBYTE(wsadata.wVersion) !=2)) |
| 52 | { |
| 53 | WSACleanup(); |
| 54 | m_winsockInit = false; |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | } |
| 59 | |
| 60 | DownloadManager::~DownloadManager() |
| 61 | { |
nothing calls this directly
no test coverage detected