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
Solved

c++ download file using custom proxy

Posted on 2010-11-22
4
529 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
  • 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

790 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