CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 1999
    Posts
    7

    MFC Internet Functions & PROXY!

    Hi, I've been using the CInternet functions that come with MFC very successfully to download html files from the web. Once I have an internetSession for example I can use CGetHtml (or whatever it's called) to download html files, and it works fine. However, people who are behind firewalls and go through proxy's are having a lot of trouble with my programs. They don't work there anymore. How can I consider proxy's in my code?

    You can email me here: [email protected]

    ---
    Jawed Karim

  2. #2
    Guest

    Re: MFC Internet Functions & PROXY!

    Here is a code fragment from my code that does what you want. cProxy is a CString that specifies the proxy server.

    if(!cUseProxy)
    {
    session = new CInternetSession("****Client", 1,
    INTERNET_OPEN_TYPE_DIRECT);
    }
    else
    {
    session = new CInternetSession("****Client", 1,
    INTERNET_OPEN_TYPE_PROXY,cProxy);
    }



  3. #3
    Join Date
    Apr 1999
    Posts
    52

    Re: MFC Internet Functions & PROXY!

    Check out the constructor documentation of CInternetSession. The solution will be pretty obvious then.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured