Solved

c++ download file using custom proxy

Posted on 2010-11-22
4
531 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 500 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

726 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