🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #7080

Re: WinHttpGetDefaultProxyConfiguration() ???

#7080
From: John Smith
Date: Sun, 20 Mar 2005 05:32
89 lines
3380 bytes
If I don't have cppbuilder, don't post to cppbuilder???  Hey, are you a 
teenager?  Is there a responsible adult here?

If you mean, don't post here unless you can use the knowledge you gain, 
don't worry, I can.

I simply used:
implib winhttp.lib winhttp.dll
to create the necessary library.
NEXT, I created the source:
//testcode.cpp begins
#include <stdio.h>
#include <windows.h>

typedef struct
   {
   DWORD dwAccessType;
   LPWSTR lpszProxy;
   LPWSTR lpszProxyBypass;
   } WINHTTP_PROXY_INFO;


extern "C"
   {
   _declspec(dllimport) BOOL WINAPI WinHttpGetDefaultProxyConfiguration(
      WINHTTP_PROXY_INFO*);
   }

void main(void)
   {
   WINHTTP_PROXY_INFO proxyInfo;

   WinHttpGetDefaultProxyConfiguration(&proxyInfo);
   if (proxyInfo.lpszProxy != NULL)
      {
      printf("Proxy server list: %S\n", proxyInfo.lpszProxy);
      GlobalFree( proxyInfo.lpszProxy );
      }
   if (proxyInfo.lpszProxyBypass != NULL)
      {
      printf("Proxy bypass list: %S\n", proxyInfo.lpszProxyBypass);
      GlobalFree( proxyInfo.lpszProxyBypass );
      }
   }
//testcode.cpp ends
I compiled it with:
bcc32 -c textcode.cpp
and linked with:
ilink32 c0x32 testcode,textcode,,implib32 cw32mti winhttp,,

you got a problem with that?

Regards

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:423d0117$1@newsgroups.borland.com...
>
> "John Smith" <assemblywizard@gmail.com> wrote in message
> news:423cf6e4$1@newsgroups.borland.com...
>
>> I do not have cppbuilder
>
> You are posting to a C++Builder newsgroup.  If you do not have C++Builder,
> then do not post to a C++Builder newsgroup.
>
>> it is obivious I do NOT have the documentation at my disposal.
>
> Yes, you do.  It is publically available from MSDN:
>
>    WinHttpGetDefaultProxyConfiguration
>
> http://msdn.microsoft.com/library/en-us/winhttp/http/winhttpgetdefaultproxyconfiguration.asp
>
>    WinHttpSetDefaultProxyConfiguration
>
> http://msdn.microsoft.com/library/en-us/winhttp/http/winhttpsetdefaultproxyconfiguration.asp
>
>    WinHttpGetIEProxyConfigForCurrentUser
>
> http://msdn.microsoft.com/library/en-us/winhttp/http/winhttpgetieproxyconfigforcurrentuser.asp
>
>> I am using borland freecommandline tools
>
> Then please post to the newsgroups that are meant for that compiler.
>
>
> Gambit
>
> 
Technical Details
Message-ID: <423d0af4@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <423cc690@newsgroups.borland.com> <423ccb2e$1@newsgroups.borland.com> <423cf6e4$1@newsgroups.borland.com> <423d0117$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,2bc60ebb4466ce14
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "John Smith" <assemblywizard@gmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <423cc690@newsgroups.borland.com> <423ccb2e$1@newsgroups.borland.com> <423cf6e4$1@newsgroups.borland.com> <423d0117$1@newsgroups.borland.com>
Subject: Re: WinHttpGetDefaultProxyConfiguration() ???
Date: Sat, 19 Mar 2005 21:32:37 -0800
Lines: 91
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 66.81.40.161
Message-ID: <423d0af4@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1111296756 66.81.40.161 (19 Mar 2005 21:32:36 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail