| 14 | #pragma comment(lib, "shell32.lib") |
| 15 | |
| 16 | std::string wstr_to_utf8(const std::wstring& wstr) { |
| 17 | if (wstr.empty()) return {}; |
| 18 | int size = WideCharToMultiByte(CP_UTF8, 0, wstr.c_str(), -1, nullptr, 0, nullptr, nullptr); |
| 19 | std::string str(size - 1, 0); |
| 20 | WideCharToMultiByte(CP_UTF8, 0, wstr.c_str(), -1, &str[0], size, nullptr, nullptr); |
| 21 | return str; |
| 22 | } |
| 23 | |
| 24 | bool download_file(const std::wstring& url, const std::wstring& filename) { |
| 25 | std::wcout << L"Started downloading -> " << filename << L'\n'; |
no outgoing calls
no test coverage detected