UrlDownloadToFileA Error

Hi everyone!

I've been trying to use the AuthGG native C++ example,
and when i try to call the UrlDownloadToFileA function,
i keep getting unresolved external symbols. The example uses cryptopp library, etc.

#include <urlmon.h>
#pragma comment(lib , "urlmon.lib")
UrlDownloadToFileA(0,"localhost/file.txt", "C:\file.txt",0,0)
Also posted here -> https://stackoverflow.com/questions/67551618/authgg-c-unresolved-extern-symbols

1. You should be calling URLDownloadToFile
Internally, the compiler chooses URLDownloadToFileA or URLDownloadToFileW depending on whether you're compiling for ANSI or UNICODE (the default for the last decade or two has been UNICODE).

Maybe you used URLDownloadToFile and got grief from the parameters not being wide strings, and fixed the wrong problem.

Anyway, try this.
UrlDownloadToFile(0,_T("localhost/file.txt"), _T("C:\\file.txt"),0,0);
Also note the use of \\ on the back slashed local filename.

Last edited on
Topic archived. No new replies allowed.