To be compatibel to all TCHAR Versions use you can use a String based to this:
typedef std::basic_string<TCHAR, std::char_traits<TCHAR>, std::allocator<TCHAR> > tstring;
tstring s(_T("file.txt"));
HRESULT hr = URLDownloadToFile(NULL, _T("www.exaple.com"), s.c_str(), 0, NULL);