(I translated the error code because the original version was in Spanish)
Error C2664 'HRESULT URLDownloadToFileA(LPUNKNOWN,LPCSTR,LPCSTR,DWORD,LPBINDSTATUSCALLBACK)': argument 3 can't be converted from 'std::string' to 'LPCSTR' Project1
The Windows API is designed with a C interface and doesn't understand C++'s std::string type. You just need to use path.c_str() in your call to URLDownloadToFile.