Jump to content
  • Advertisement
Sign in to follow this  
Lutz

Downloading stuff from within my app

This topic is 4958 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey! I'd like to download a file from within my C++ app and store it on disk and/or RAM. At the moment, I use SDL_Net for that purpose, but I have to establish the tcp/ip connection and do all error handling on my own. So I wonder if there is an alternative solution for this. It should run on Windows as well as Linux and should do some error handling (could not get connection or whatever) and be as easy as #include <fancylib.h> ... buffer = fancylib_download("http://..."); Well, something like this. Any ideas?

Share this post


Link to post
Share on other sites
Advertisement
I dunno about linux, but for windows look up the following functions:

InternetOpen
InternetOpenUrl / FtpOpenFile
InternetQueryDataAvailable
InternetReadFile
InternetCloseHandle

It's very easy to download files from http/ftp etc using these functions.

Share this post


Link to post
Share on other sites
eq: Your solution looks rather Windows-specific, but thanks anyway.

Feral: cURL seems to be what I'm looking for. Thanks!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!