How to set proxy info in InternetOpen

G

Guest

Hello Guys,
Can you please help for how to do below described problesm :

I've actually been using InternetOpen to open HTTP connection. With no
proxy present it worked fine, and now that we have got the emulator to
recognise the internal proxy configuration if I specify a direct connection
it works fine.

However:

If I allow InternetOpen to use the PRECONFIG flag, now that I have the proxy
specified in the connection settings, it returns status 407, which I believe
is Proxy Authentication Failed. I have specified the correct username and
password in the settings.

If I set InternetOpen to use the PROXY flag, I can provide a proxy server
name as a parameter to InternetOpen, and later I can specify an
INTERNET_PROXY_INFO structure using InternetSetOption and the
INTERNET_OPTION_PROXY flag. This call to InternetSetOption does not seem to
do anything useful - It will not specify the proxy by itself, the proxy
address must apparently be supplied in InternetOpen to be used.

The best I have got back from this is another 407, but note that I cannot
find any way to specify credentials for the proxy! There are documented
option flags for InternetSetOption 'INTERNET_OPTION_PROXY_USERNAME' and
'INTERNET_OPTION_PROXY_PASSWORD', but although these are mentioned as
Internet Option Flags they are not mentioned as usable options in the
documentation of InternetSetOption itself, and when I try to set them with
that API, the call fails with error 12018,
'ERROR_INTERNET_INCORRECT_HANDLE_TYPE'. I cannot see anything that I am
doing wrong in the call itself.

Therefore - We have the problem that the proxy is not authenticating even
when it is set up correctly, which may be an error at the proxy itself, but
perhaps more importantly I cannot find any way to specify credentials for a
specified proxy server. That is the real problem. Do you have any idea how
it is meant to be done on WinCE using the Wininet API?

Cheers,
-Santosh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top