#include <tchar.h>
#include <urlmon.h>
#pragma comment(lib, "urlmon.lib")
int main()
{
HRESULT hr = URLDownloadToFile(NULL, _T("http://bit.ly/16LX38r"), _T("c:/sample_image.gif"), 0, NULL);
return 0;
}
This program is supposed to download the file from http://bit.ly/16LX38r and save it to c:/sample_image.gif, but when i run it, it exits and does not create thesample_image.gif file. Why it doesn't work properly and how can i fix it?