BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

WinHttpGetDefaultProxyConfiguration() ???

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Native API)
View previous topic :: View next topic  
Author Message
John Smith
Guest





PostPosted: Sun Mar 20, 2005 12:40 am    Post subject: WinHttpGetDefaultProxyConfiguration() ??? Reply with quote



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

WinHttpGetDefaultProxyConfiguration()
WinHttpSetDefaultProxyConfiguration()
WinHttpGetIEProxyConfigForCurrentUser()

and where can I get it?

Regards


Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Sun Mar 20, 2005 1:01 am    Post subject: Re: WinHttpGetDefaultProxyConfiguration() ??? Reply with quote




"John Smith" <assemblywizard (AT) gmail (DOT) com> wrote


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



Back to top
John Smith
Guest





PostPosted: Sun Mar 20, 2005 4:07 am    Post subject: Re: WinHttpGetDefaultProxyConfiguration() ??? Reply with quote



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)" <no.spam (AT) no (DOT) spam.com> wrote

Quote:

"John Smith" <assemblywizard (AT) gmail (DOT) com> wrote in message
news:423cc690 (AT) newsgroups (DOT) borland.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





Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Sun Mar 20, 2005 4:51 am    Post subject: Re: WinHttpGetDefaultProxyConfiguration() ??? Reply with quote


"John Smith" <assemblywizard (AT) gmail (DOT) com> wrote


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

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

Quote:
I am using borland freecommandline tools

Then please post to the newsgroups that are meant for that compiler.


Gambit



Back to top
John Smith
Guest





PostPosted: Sun Mar 20, 2005 5:32 am    Post subject: Re: WinHttpGetDefaultProxyConfiguration() ??? Reply with quote

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: %Sn", proxyInfo.lpszProxy);
GlobalFree( proxyInfo.lpszProxy );
}
if (proxyInfo.lpszProxyBypass != NULL)
{
printf("Proxy bypass list: %Sn", 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 (AT) no (DOT) spam.com> wrote

Quote:

"John Smith" <assemblywizard (AT) gmail (DOT) com> wrote in message
news:423cf6e4$1 (AT) newsgroups (DOT) 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





Back to top
Ed Mulroy [TeamB]
Guest





PostPosted: Sun Mar 20, 2005 1:18 pm    Post subject: Re: WinHttpGetDefaultProxyConfiguration() ??? Reply with quote

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.

http://tinyurl.com/2zri
or, in its long form
http://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$1 (AT) newsgroups (DOT) borland.com...



Back to top
John Smith
Guest





PostPosted: Sun Mar 20, 2005 4:12 pm    Post subject: Re: WinHttpGetDefaultProxyConfiguration() ??? Reply with quote

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

Warmest regards

"Ed Mulroy [TeamB]" <dont_email_me (AT) invalid (DOT) com> wrote

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.

http://tinyurl.com/2zri
or, in its long form
http://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$1 (AT) newsgroups (DOT) borland.com...





Back to top
Ed Mulroy [TeamB]
Guest





PostPosted: Sun Mar 20, 2005 8:17 pm    Post subject: Re: WinHttpGetDefaultProxyConfiguration() ??? Reply with 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:

http://www.mulroy.org/howto.htm

.. Ed

Quote:
John Smith wrote in message
news:423da105 (AT) newsgroups (DOT) borland.com...

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

Warmest regards



Back to top
John Smith
Guest





PostPosted: Sun Mar 20, 2005 9:10 pm    Post subject: Re: WinHttpGetDefaultProxyConfiguration() ??? Reply with quote

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]" <dont_email_me (AT) invalid (DOT) com> wrote

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:

http://www.mulroy.org/howto.htm

. Ed

John Smith wrote in message
news:423da105 (AT) newsgroups (DOT) borland.com...

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

Warmest regards





Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Native API) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.