?
Solved

c++ download file using custom proxy

Posted on 2010-11-22
4
Medium Priority
?
543 Views
Last Modified: 2012-05-10
Hi Guys,

how can I download a file using URLDownloadToFile or something similar through a custom proxy server without having to set the proxy for Internet Explorer?

I would like to set the proxy only for this download without affecting another internet connection on the computer (ex. IE, ...)

Thank you,
0
Comment
Question by:xNejX
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 

Author Comment

by:xNejX
ID: 34193068
i will settle for any solution that allows me to use a custom proxy independent from IE.
0
 
LVL 31

Accepted Solution

by:
Zoppo earned 2000 total points
ID: 34195201
Hi xNejX,

I assume you want this to be done for Windows, right?

IMO you should be able to open an internet connection using a given proxy server address (thus ignoring IE proxy settings) using 'InternetOpen' with flag 'INTERNET_OPEN_TYPE_PROXY' - take a look here about more info: http://msdn.microsoft.com/en-us/library/aa385096%28VS.85%29.aspx

If this internet connection is established you should be able to download a file from there using 'InternetOpenUrl' (http://msdn.microsoft.com/en-us/library/aa385098%28v=VS.85%29.aspx) and download the file using 'InternetReadFile' (http://msdn.microsoft.com/en-us/library/aa385103%28v=VS.85%29.aspx)

Hope that helps,

ZOPPO
0
 

Author Closing Comment

by:xNejX
ID: 34196695
As always ZOPPO, like a charm :)
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 34197178
:o)

Thanks ...
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is about my first experience with programming Arduino.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Starting up a Project
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question