Discussion:
wininet and internet connection
(too old to reply)
s***@gmail.com
2006-10-27 11:05:23 UTC
Permalink
Dear Experts,

Can anyone of you tell me how to use OnStatusCallback() function to
check my internet connection status?
or
how to use InternetSetStatusCallback function to check my internet
connection status?

regards
Suresh
Vladimir Scherbina
2006-10-27 11:26:53 UTC
Permalink
Suresh,

You can check the connected state of the system using
InternetGetConnectedState function. Checking the 'connection' in case of
WinInet means checking the return values of wininet functions.
--
Vladimir
Post by s***@gmail.com
Dear Experts,
Can anyone of you tell me how to use OnStatusCallback() function to
check my internet connection status?
or
how to use InternetSetStatusCallback function to check my internet
connection status?
regards
Suresh
s***@gmail.com
2006-10-27 12:00:41 UTC
Permalink
Thanks for your immediate reply Vladimir Scherbina,

But I would like to do it in a callback fashion. so that if there is a
status change I get the notification immediately. So need to check the
connection every time.
since my application will be using the data obtained from the network
divice and when disconnection happens I need to wait for reconnection.

regards
suresh
Post by Vladimir Scherbina
Suresh,
You can check the connected state of the system using
InternetGetConnectedState function. Checking the 'connection' in case of
WinInet means checking the return values of wininet functions.
--
Vladimir
Post by s***@gmail.com
Dear Experts,
Can anyone of you tell me how to use OnStatusCallback() function to
check my internet connection status?
or
how to use InternetSetStatusCallback function to check my internet
connection status?
regards
Suresh
k***@hotmail.com
2006-11-09 08:03:08 UTC
Permalink
So, any solution to this problem? I am in a similar situation where I
need to get a notification from the system when the internet connection
state changes. Obviously applications like MSN Messanger and Skype are
able to detect it (for example when I pull out the network cable).

How do they do it? I hope it is not by using a thread that is
constantly polling a website or some such solution.
Post by s***@gmail.com
Thanks for your immediate reply Vladimir Scherbina,
But I would like to do it in a callback fashion. so that if there is a
status change I get the notification immediately. So need to check the
connection every time.
since my application will be using the data obtained from the network
divice and when disconnection happens I need to wait for reconnection.
regards
suresh
Post by Vladimir Scherbina
Suresh,
You can check the connected state of the system using
InternetGetConnectedState function. Checking the 'connection' in case of
WinInet means checking the return values of wininet functions.
--
Vladimir
Post by s***@gmail.com
Dear Experts,
Can anyone of you tell me how to use OnStatusCallback() function to
check my internet connection status?
or
how to use InternetSetStatusCallback function to check my internet
connection status?
regards
Suresh
Vladimir Scherbina
2006-11-09 13:15:40 UTC
Permalink
krishnamoorthy_ramesh,

Read the answer at above post (in this NG): Detecting internet connection
status wininet.
--
Vladimir (Windows SDK MVP)
Post by k***@hotmail.com
So, any solution to this problem? I am in a similar situation where I
need to get a notification from the system when the internet connection
state changes. Obviously applications like MSN Messanger and Skype are
able to detect it (for example when I pull out the network cable).
How do they do it? I hope it is not by using a thread that is
constantly polling a website or some such solution.
Post by s***@gmail.com
Thanks for your immediate reply Vladimir Scherbina,
But I would like to do it in a callback fashion. so that if there is a
status change I get the notification immediately. So need to check the
connection every time.
since my application will be using the data obtained from the network
divice and when disconnection happens I need to wait for reconnection.
regards
suresh
Post by Vladimir Scherbina
Suresh,
You can check the connected state of the system using
InternetGetConnectedState function. Checking the 'connection' in case of
WinInet means checking the return values of wininet functions.
--
Vladimir
Post by s***@gmail.com
Dear Experts,
Can anyone of you tell me how to use OnStatusCallback() function to
check my internet connection status?
or
how to use InternetSetStatusCallback function to check my internet
connection status?
regards
Suresh
Loading...