check msdn for

URLDownloadToFile();

you'll need to add urlmon.lib to your project for it to work.