Discussion:
InternetOpenUrl error 12029
(too old to reply)
Jay McLain [MSFT]
2003-06-30 21:55:04 UTC
Permalink
INTERNET_OPEN_TYPE_PRECONFIG means to use the registry proxy entries for the
connection. If you've never run Pocket IE and connected to an Internet
website, there may not be any settings in the registry. (A back-compat.
workaround to support ActiveX controls that don't use CM was added to Pocket
IE that will write them -- you may be seeing this on your PPC 2002 device.)


Technically, you should establish a connection with Connection Manager and
get the proxy settings from the connection manager info struct after
establishing the connection, then pass in these values through
InternetOpen(), rather than using Connection Manager. This will allow
configuration via CM by your application users and be more consistent with
any URL mappings they specify in the CM user interface.


I believe there is a sample of Connection Manager usage in the PPC 2003 SDK.
--
___________________________________
Jay McLain
Software Development Lead - Pocket IE
Mobile Devices Division
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
I am getting an InternetOpenUrl error 12029 ("A connection with the server
could not be established") with code that works fine in Pocket PC 2002 and
HINTERNET hInet = ::InternetOpen(L"testapp",
INTERNET_OPEN_TYPE_PRECONFIG,
NULL, NULL, INTERNET_INVALID_PORT_NUMBER);
if (hInet) {
HINTERNET hURL = ::InternetOpenUrl(hInet,
L"http://10.4.10.81/test.txt", NULL, 0, INTERNET_FLAG_RELOAD, 0);
if (!hURL) {
DWORD dwErr = ::GetLastError();
}
Is there some trick to this now in 2003? It works fine on the other
platforms, and it also downloads the file fine if I type the URL into IE,
so
it really doesn't make sense to me that it fails. If I use
INTERNET_OPEN_TYPE_DIRECT it works on 2003, but then it won't work with
proxies. Right now I am working around this - if the original call fails,
I
try again with type "direct". Is this a bug in Pocket PC 2003?
Thanks,
-Derek
Derek Piasecki
2003-06-30 22:54:24 UTC
Permalink
But if you have never configured a proxy, shouldn't it default to a direct
connection instead of failing? It did this in 2002, but now fails in 2003
if you have never configured the connection.

Thanks,
-Derek
Post by Jay McLain [MSFT]
INTERNET_OPEN_TYPE_PRECONFIG means to use the registry proxy entries for the
connection. If you've never run Pocket IE and connected to an Internet
website, there may not be any settings in the registry. (A back-compat.
workaround to support ActiveX controls that don't use CM was added to Pocket
IE that will write them -- you may be seeing this on your PPC 2002 device.)
Technically, you should establish a connection with Connection Manager and
get the proxy settings from the connection manager info struct after
establishing the connection, then pass in these values through
InternetOpen(), rather than using Connection Manager. This will allow
configuration via CM by your application users and be more consistent with
any URL mappings they specify in the CM user interface.
I believe there is a sample of Connection Manager usage in the PPC 2003 SDK.
--
___________________________________
Jay McLain
Software Development Lead - Pocket IE
Mobile Devices Division
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
I am getting an InternetOpenUrl error 12029 ("A connection with the server
could not be established") with code that works fine in Pocket PC 2002 and
HINTERNET hInet = ::InternetOpen(L"testapp",
INTERNET_OPEN_TYPE_PRECONFIG,
NULL, NULL, INTERNET_INVALID_PORT_NUMBER);
if (hInet) {
HINTERNET hURL = ::InternetOpenUrl(hInet,
L"http://10.4.10.81/test.txt", NULL, 0, INTERNET_FLAG_RELOAD, 0);
if (!hURL) {
DWORD dwErr = ::GetLastError();
}
Is there some trick to this now in 2003? It works fine on the other
platforms, and it also downloads the file fine if I type the URL into IE,
so
it really doesn't make sense to me that it fails. If I use
INTERNET_OPEN_TYPE_DIRECT it works on 2003, but then it won't work with
proxies. Right now I am working around this - if the original call fails,
I
try again with type "direct". Is this a bug in Pocket PC 2003?
Thanks,
-Derek
Derek Piasecki
2003-06-30 23:01:46 UTC
Permalink
BTW, the Internet connection has been configured previously (no proxy) and
IE has been run and used extensively prior to attempting the
InternetOpenUrl().
-Derek
Post by Derek Piasecki
But if you have never configured a proxy, shouldn't it default to a direct
connection instead of failing? It did this in 2002, but now fails in 2003
if you have never configured the connection.
Thanks,
-Derek
Post by Jay McLain [MSFT]
INTERNET_OPEN_TYPE_PRECONFIG means to use the registry proxy entries for
the
Post by Jay McLain [MSFT]
connection. If you've never run Pocket IE and connected to an Internet
website, there may not be any settings in the registry. (A back-compat.
workaround to support ActiveX controls that don't use CM was added to
Pocket
Post by Jay McLain [MSFT]
IE that will write them -- you may be seeing this on your PPC 2002
device.)
Post by Jay McLain [MSFT]
Technically, you should establish a connection with Connection Manager and
get the proxy settings from the connection manager info struct after
establishing the connection, then pass in these values through
InternetOpen(), rather than using Connection Manager. This will allow
configuration via CM by your application users and be more consistent with
any URL mappings they specify in the CM user interface.
I believe there is a sample of Connection Manager usage in the PPC 2003
SDK.
Post by Jay McLain [MSFT]
--
___________________________________
Jay McLain
Software Development Lead - Pocket IE
Mobile Devices Division
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by Jay McLain [MSFT]
I am getting an InternetOpenUrl error 12029 ("A connection with the
server
Post by Jay McLain [MSFT]
could not be established") with code that works fine in Pocket PC 2002
and
Post by Jay McLain [MSFT]
HINTERNET hInet = ::InternetOpen(L"testapp",
INTERNET_OPEN_TYPE_PRECONFIG,
NULL, NULL, INTERNET_INVALID_PORT_NUMBER);
if (hInet) {
HINTERNET hURL = ::InternetOpenUrl(hInet,
L"http://10.4.10.81/test.txt", NULL, 0, INTERNET_FLAG_RELOAD, 0);
if (!hURL) {
DWORD dwErr = ::GetLastError();
}
Is there some trick to this now in 2003? It works fine on the other
platforms, and it also downloads the file fine if I type the URL into
IE,
Post by Jay McLain [MSFT]
so
it really doesn't make sense to me that it fails. If I use
INTERNET_OPEN_TYPE_DIRECT it works on 2003, but then it won't work with
proxies. Right now I am working around this - if the original call
fails,
Post by Jay McLain [MSFT]
I
try again with type "direct". Is this a bug in Pocket PC 2003?
Thanks,
-Derek
Loading...