|
Location: Desktop development - C/C++ License: The Intelliproject Open License (IPOL) How to change proxy settings under Internet Explorer using C++Posted by Silviu CarageaThis article describe how can you change the Internet Explorer proxy settings on-the-fly using C++ and Win32 API. |
Skill: BeginnerPosted: 14/12/2008Views: 3704Rating: 0.00 /5Popularity: 0.00 |
| Sign Up to vote for this article |
On the www you can find a lot of tools which helps you to quickly switch between different proxy servers while surfing the internet. Most of them allow you to change the Internet Explorer proxy settings on-the-fly, without having to go into the Properties dialog.
Manually you can change your IE proxy settings using the following steps:
Internet ExplorerTools menu, choose Internet Options.Connections TabLan Settings buttonNow you should have in front of your screen the following dialog box (this if you use IE7)
Use a proxy server for your LAN ..."Address field type your proxy address and in the Port field type your proxy portBypass proxy server for local addresses"OK" buttonIn the following sections I will explain how to do all this things programmatically using C++.
The idea is very simple. First of all we are building a connection options list and we set this options using InternetSetOption.
The following function takes two parameters. char *proxyAdressStr which represent the proxy server address and char * connNameStr which represent your connection name(in case you want to set the proxy for your LAN this should be set NULL).
The following function will remove your proxy settings for a specified connection name. In case you want to remove your LAN proxy settings set char *connectionNameStr as NULL.
To use the functions described in this article you should include windows.h and wininet.h. Also you must link wininet.lib to your project.All these things can be done by adding the following three lines to your project:
This article, along with any associated source code and files, is licensed under The Intelliproject Open License (IPOL)
| Silviu Caragea
| Silviu Caragea is the Founder, Administrator and Chief Editor who wrote and runs The IntelliProject. He's been programming since 2000 and now he's student at The Faculty of Economic Cybernetics, Statistics and Informatics from Bucharest. In the same time he's working as software developer at Cratima Software, a Romanian software and web design company that activates both on the local and foreign market, providing its customers with software development services, internet and intranet solutions, web design, graphic design and IT consultancy. His programming experience includes: - C,C++, Visual C++(Win32 API, MFC, ADO, STL, DAO, ODBC, ATL, COM, DirectShow, DirectDraw, WTL) - Open Source libraries :CURL & Boost - HTML, CSS - Java (SE,ME) - JavaScript, Ajax, Google Web Toolkit (GWT) - Php, MySQL -Oracle, PL SQL - C# .NET -Objective C, IPhone SDK, Cocoa Location: |
Sign up to post message on the article message board!