[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Retreiving the IE's Proxy Settings.

Posted on 2001-07-26
4
Medium Priority
?
1,166 Views
Last Modified: 2012-06-27

Hai Experts,

   How can I retreive the Internet Options (deatails about the proxy settings) found in the Internet Explorer through a Delphi application. Is there any windows API's to track this. Please help...
0
Comment
Question by:mrk_raj
[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
4 Comments
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6321670
Hello

  you can do that easy by reading the proxy setting from IE setting in the registry

procedure TForm1.Button1Click(Sender: TObject);
var
  Reg: TRegistry;
begin
  Reg := TRegistry.Create;
  Reg.RootKey := HKEY_CURRENT_USER;
  Reg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Internet Settings',false);
  Edit1.Text :=Reg.ReadString('ProxyServer');
end;

Best regards
Mohammed Nasman
0
 

Accepted Solution

by:
BryGuy earned 400 total points
ID: 6341672
That will only retrieve the settings for a LAN.  Try this - it will allow you to pass a connection name and retrieve the settings for it:

function GetIeProxyStatus (Connection : string; var FullProxyHost : string;
  var Enabled : boolean; var ProxyOverride : string) : boolean;
var
  List          : TInternetPerConnOptionList;
  Option        : array [0..2] of TInternetPerConnOption;
  Size          : Cardinal;
begin
  Size := SizeOf(TInternetPerConnOptionList);

  Option[0].dwOption := INTERNET_PER_CONN_PROXY_SERVER;
  Option[1].dwOption := INTERNET_PER_CONN_FLAGS;
  Option[2].dwOption := INTERNET_PER_CONN_PROXY_BYPASS;

  List.dwSize := SizeOf(TInternetPerConnOptionList);

  if Connection = '' then
    List.pszConnection := nil
  else
    List.pszConnection := PChar(Connection);

  List.dwOptionCount := 3;
  List.dwOptionError := 0;
  List.pOptions := @Option;

  Result := InternetQueryOption (nil, INTERNET_OPTION_PER_CONNECTION_OPTION,
    @List, Size);

  if Result then
  begin
    if Option[0].Value.pszValue <> nil then
    begin
      FullProxyHost := string(Option[0].Value.pszValue);
      GlobalFree (Cardinal(Option[0].Value.pszValue));
    end;

    Enabled := (Option[1].Value.dwValue and PROXY_TYPE_PROXY = PROXY_TYPE_PROXY);

    if Option[2].Value.pszValue <> nil then
    begin
      ProxyOverride := string(Option[2].Value.pszValue);
      GlobalFree (Cardinal(Option[2].Value.pszValue));
    end;
  end;
end;

Bryan Ashby
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6466948
Greetings, mrk_raj:  

Please return to all your open questions here and update them with comments if more is needed, or award the expert(s) who helped you to close/finalize them.  I will be posting this in all your open questions shortly so that you are advised of the links and can navigate to them more easily:




It's time to clean up this topic area and that means taking care of this question. Your options at this point are:
 
1. Award points to the Expert who provided an answer, or who helped you most. Do this by clicking on the "Accept Comment as Answer" button that lies above and to the right of the appropriate expert's name.
 
2. PAQ the question because the information might be useful to others, but was not useful to you. To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.
 
3.  Ask Community Support to help split points between participating experts.  Just comment here with details.
 
4.  Delete the question because it is of no value to you or to anyone else.  To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.
 
If you elect for option 2, 3 or 4, just post comment with details here and I'll take it from there.  We also request that you review any other open questions you might have and update/close them.  Display all your question history from your Member Profile to view details.
 
PLEASE DO NOT AWARD THE POINTS TO ME.
 
____________________________________________
 
 
 
Hi Experts:
 
In the event that the Asker does not respond, I would very much appreciate your opinions as to which Expert ought to receive points (if any) as a result of this question.  Likewise, you can also suggest that I PAQ or delete the question.
 
Experts, please do not add further "answer" information to this question.  I will be back in about one week to finalize this question.
 
Thank you everyone.
 
Moondancer :)
Community Support Moderator @ Experts Exchange
 
P.S.  Engineering has been advised about the error in the comment date/time sort order for year 2000 questions, they're in userID order instead.  REGARDING POINTS, Guidelines and more:  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp  
0
 

Expert Comment

by:SpideyMod
ID: 8280624
Force Accepted

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

656 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