cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hugoZZZ
Level 3

How to check web connection stauts!?

Hi guys

Do you know any function call or method to check web conncetion staus?
I just simply wanna know is internet avaiable at end user's machine.
Thanks.~
Labels (1)
0 Kudos
(4) Replies
Holger_G
Level 10

I am using an InstallScript CA and call InternetGetConnectedState function (Wininet.dll).
0 Kudos
hugoZZZ
Level 3

Hi Holger~
It sounds like a good idea.
Could you please explain more or attach some codes.
Thanks a lot
0 Kudos
Holger_G
Level 10

Something like this:


prototype Wininet.InternetGetConnectedState(POINTER, NUMBER);

nResult = UseDLL (WINSYSDIR ^ "Wininet.dll");
bInternet = (InternetGetConnectedState(&dwState, 0) != 0);
UnUseDLL ("Wininet.dll");


But note, that InternetGetConnectedState returns the state only so you may want to evaluate that a little more deeper.
0 Kudos
hugoZZZ
Level 3

:eek:
Hi there~
It does work fine~ Thanks.

One more quick question for ya, if u can reply in ease.
Do you have tipis or code example about using InternetGetConnectedStateEx?

I try to use InternetGetConnectedStateEx(0, url, dwNameLen, dwReserved), but I cannot retrive any value from the function call.

Many many thanks to Germany!!
0 Kudos