Getting the proxy Auto-config details from VC++ application

  We have a VC++ application which runs on a client machine and we need to know the Proxy Settings to connect to the remote Server.  We require to findout this Info. based ont the default browser of the Client PC. To our knwoledge the IE stores the Proxy Info  in the registry and the Netscape stores in the Pref.js file (for each user profile)  .  
   If the Client Browser Settings are ProxyAutoConfiguration then a URL has to be specified which is a Java Script code.
So in all these above settings our application need to know the
Proxy config . Is their any method to read the pref.js  and as well any way to get the proxy settings from When auto configuration is set.

  the sample  Java script file for Auto config would look like this
    Function proxyinfo(url,host)
        return "PROXY, DIRECT"
Any response in this regard is highly appreciated.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

So what is your question??  You have already answered it yourself.  The IE settings are in the registry and the Navigator settings are in the prefs.js.  

For IE, read it from the registry.

For Navigator, open the right prefs.js and parse the prefs.js for the information you need.  If you are looking for an interface or API supplied by Navigator to get this information, it doesn't exist.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Madhura122398Author Commented:
When auto-config preference is set, the java script file would be in a remote server(specified in the URL), which gets executed when the user tries to access internet. That java script file would be in the format as given above.  
So, the question is how to run that java script file?
Netscape runs it's own choice of prefs.js file and all you can do it edit that file to change the setting.
i am looking for source code of proxy server program. can you give me some source code to demostrate how to build own proxy server?
if you have proxy server sample code, please contact me i really need it.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.