Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

c++ download file using custom proxy

Posted on 2010-11-22
4
Medium Priority
?
545 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Six Sigma Control Plans
Progress

604 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