Board index » cppbuilder » WinHttpGetDefaultProxyConfiguration() ???

WinHttpGetDefaultProxyConfiguration() ???


2005-03-20 08:40:49 AM
cppbuilder41
What library/dll and header files are necessary to use the following?
WinHttpGetDefaultProxyConfiguration()
WinHttpSetDefaultProxyConfiguration()
WinHttpGetIEProxyConfigForCurrentUser()
and where can I get it?
Regards
 
 

Re:WinHttpGetDefaultProxyConfiguration() ???

"John Smith" < XXXX@XXXXX.COM >wrote in message
Quote
What library/dll and header files are necessary to use the following?
For future reference, please look at the documentation when asking such
questions. Those answers are provided.
Quote
WinHttpGetDefaultProxyConfiguration()
WinHttpSetDefaultProxyConfiguration()
WinHttpGetIEProxyConfigForCurrentUser()
All of those functions are declared in Winhttp.h, and reside in Winhttp.dll.
BCB does not ship with either.
The current WinHTTP API version (5.1) is built into Windows 2000 SP3+, XP
SP1+, and 2003 Server SP1+, and is not available on other versions. An
older version of WinHTTP (5.0) had a winhttp5.dll redistributable DLL that
would run on other systems, but is no longer available from Microsoft and
has been discontinued.
Gambit
 

Re:WinHttpGetDefaultProxyConfiguration() ???

I do not have cppbuilder, it is obivious I do NOT have the documentation at
my disposal. However, since an important function of news groups is to help
place knowledge and information in to inquiring minds, I posted my question
here.
I am using borland freecommandline tools, however, I seen mention of the
functions here so, inquired of them here.
Thanks in advance,
warmest regards
"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote

"John Smith" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...

>What library/dll and header files are necessary to use the following?

For future reference, please look at the documentation when asking such
questions. Those answers are provided.

>WinHttpGetDefaultProxyConfiguration()
>WinHttpSetDefaultProxyConfiguration()
>WinHttpGetIEProxyConfigForCurrentUser()

All of those functions are declared in Winhttp.h, and reside in
Winhttp.dll.
BCB does not ship with either.

The current WinHTTP API version (5.1) is built into Windows 2000 SP3+, XP
SP1+, and 2003 Server SP1+, and is not available on other versions. An
older version of WinHTTP (5.0) had a winhttp5.dll redistributable DLL that
would run on other systems, but is no longer available from Microsoft and
has been discontinued.


Gambit


 

{smallsort}

Re:WinHttpGetDefaultProxyConfiguration() ???

"John Smith" < XXXX@XXXXX.COM >wrote in message
Quote
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.
Quote
it is obivious I do NOT have the documentation at my disposal.
Yes, you do. It is publically available from MSDN:
WinHttpGetDefaultProxyConfiguration
msdn.microsoft.com/library/en-us/winhttp/http/winhttpgetdefaultproxyconfiguration.asp
WinHttpSetDefaultProxyConfiguration
msdn.microsoft.com/library/en-us/winhttp/http/winhttpsetdefaultproxyconfiguration.asp
WinHttpGetIEProxyConfigForCurrentUser
msdn.microsoft.com/library/en-us/winhttp/http/winhttpgetieproxyconfigforcurrentuser.asp
Quote
I am using borland freecommandline tools
Then please post to the newsgroups that are meant for that compiler.
Gambit
 

Re:WinHttpGetDefaultProxyConfiguration() ???

If I don't have cppbuilder, don't post to cppbuilder??? Hey, are you a
{*word*249}ager? Is there a responsible {*word*62} 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)" < XXXX@XXXXX.COM >wrote in message
Quote

"John Smith" < XXXX@XXXXX.COM >wrote in message
news:423cf6e4$ XXXX@XXXXX.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

msdn.microsoft.com/library/en-us/winhttp/http/winhttpgetdefaultproxyconfiguration.asp

WinHttpSetDefaultProxyConfiguration

msdn.microsoft.com/library/en-us/winhttp/http/winhttpsetdefaultproxyconfiguration.asp

WinHttpGetIEProxyConfigForCurrentUser

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


 

Re:WinHttpGetDefaultProxyConfiguration() ???

Quote
I do not have cppbuilder, it is obivious I do NOT have the
documentation at my disposal. ...
I am using borland freecommandline tools, ...
What you have are the command line tools from C++ Builder version 5.
If you do not have the documentation then download it.
tinyurl.com/2zri
or, in its long form
info.borland.com/techpubs/bcppbuilder/v5/updates/pro.html
Before downloading an item read its description to determine if the
documentation is useful to you. For example, you have no IDE so can
skip downloading the file on how to use the IDE.
. Ed
Quote
John Smith wrote in message
news:423cf6e4$ XXXX@XXXXX.COM ...
 

Re:WinHttpGetDefaultProxyConfiguration() ???

Thanks Ed!!! Now I HAVE some documentation :)
Warmest regards
"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
>I do not have cppbuilder, it is obivious I do NOT have the documentation
>at my disposal. ...
>I am using borland freecommandline tools, ...

What you have are the command line tools from C++ Builder version 5.

If you do not have the documentation then download it.

tinyurl.com/2zri
or, in its long form
info.borland.com/techpubs/bcppbuilder/v5/updates/pro.html

Before downloading an item read its description to determine if the
documentation is useful to you. For example, you have no IDE so can skip
downloading the file on how to use the IDE.

. Ed

>John Smith wrote in message
>news:423cf6e4$ XXXX@XXXXX.COM ...


 

Re:WinHttpGetDefaultProxyConfiguration() ???

I'm glad it helped.
Since you did not know about the documentation, I wonder about what
other information you benefit from. Give this place a look:
www.mulroy.org/howto.htm
. Ed
Quote
John Smith wrote in message
news: XXXX@XXXXX.COM ...

Thanks Ed!!! Now I HAVE some documentation :)

Warmest regards
 

Re:WinHttpGetDefaultProxyConfiguration() ???

Ed, that is a VERY worthwhile page, I highly recommend it to any other
"Rogue Scholars", such as myself... <grin>
It is a pleasure to run into helpful individual(s), you carry on in the true
spirt of the original designers of the web...
Warmest regards
"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
I'm glad it helped.

Since you did not know about the documentation, I wonder about what other
information you benefit from. Give this place a look:

www.mulroy.org/howto.htm

. Ed

>John Smith wrote in message
>news: XXXX@XXXXX.COM ...
>
>Thanks Ed!!! Now I HAVE some documentation :)
>
>Warmest regards