Discussion:
How to ignore IEs "offline mode" when not using IE ?
(too old to reply)
R.Wieser
2018-03-26 07:17:31 UTC
Permalink
Hello all,

Yesterday, on my XPsp3 machine, I ran into IEs "offline mode" setting having
a far-reaching effect, blocking me from using an ActiveX component like
"Microsoft.XMLHTTP", and also (functions within) wininet.dll.

A suggested work-around for the latter using InternetSetOption with the
INTERNET_OPTION_IGNORE_OFLINE argument does not seem to work (and I found
some article mentioning its broken), and using it with
INTERNET_OPTION_CONNECTED_STATE equals INTERNET_STATE_CONNECTED does not
seem to have any effect either.

tl;dr:
How do I use activex components and/or wininet.dll functions without being
bothered with the *IE programs* offline setting (which I want to keep that
way).
R.Wieser
2018-03-26 12:24:01 UTC
Permalink
and using it with INTERNET_OPTION_CONNECTED_STATE equals
INTERNET_STATE_CONNECTED does not seem to have any effect either.
Ofcource, I should use the correct argument ... :-\ As it turns out it
needed to be (a pointer to) *two* 4 byte values, with the first the above,
and the second zero. When I did that I could switch from off- to online
mode.

**** I stil would like to use the first method though (ignoring - for the
current program/script only! - the offline status). If anyone knows how to
get that to work (for XPsp3 & IE6) I would still like to know.

Regards,
Rudy Wieser
JJ
2018-03-26 17:22:01 UTC
Permalink
Post by R.Wieser
A suggested work-around for the latter using InternetSetOption with the
INTERNET_OPTION_IGNORE_OFLINE argument does not seem to work (and I found
some article mentioning its broken),
**** I stil would like to use the first method though (ignoring - for the
current program/script only! - the offline status). If anyone knows how to
get that to work (for XPsp3 & IE6) I would still like to know.
Have you tried using IServerXMLHTTPRequest ("Msxml2.ServerXMLHTTP") instead
of IXMLHTTPRequest? IServerXMLHTTPRequest has better HTTPS handling, so
maybe it has better code on respecting the INTERNET_OPTION_IGNORE_OFFLINE
option.

Also, in Windows XP SP3, the "Msxml2.ServerXMLHTTP" class name defaults to
version 3.0, which is equivalent to "Msxml2.ServerXMLHTTP.3.0". You might
also want to check high versions - assuming that they're installed in your
system.
R.Wieser
2018-03-26 19:36:00 UTC
Permalink
JJ,
Post by JJ
Have you tried using IServerXMLHTTPRequest ("Msxml2.ServerXMLHTTP")
Thanks for that suggestion.
Post by JJ
so maybe it has better code on respecting the
INTERNET_OPTION_IGNORE_OFFLINE option.
It turns out its worse than that: It seems that it doesn't even need that
option to be able to go online and retrieve the requested webpage. :-)

In other words, while an old(er) Microsoft.XMLHTTP doesn't, the new(er)
Msxml2.ServerXMLHTTP.3.0 has not problems with it (ignores the "work
offline" setting by default).

... now I only need to figure out how it does that, so I too can use
mswinsock functions (InternetReadFile) without bumping into that "working
offline" mode.

Regards,
Rudy Wieser

Loading...