Is connected

hi  
   I have some question about connection.
Can my  program  known or detect   when  machine  that running  my program was connected  to internet ?

How I do that  ?

pls  suggest me

thank you
eakkungAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
ZoppoConnect With a Mentor Commented:
Hi eakkung,

since NT4 and Win95 there's an API command InternetGetConnectedState().
To use this you'll have to include 'wininet.h' and link with 'wininet.lib'.

See MSDN article ID: Q242558 for further infos on this...

hope that helps,

ZOPPO
0
 
WynCommented:
Use WINSOCK connect functions to give a try and from the return value you will know if computer connected to internet.

consult:
InternetGetConnectedState
Regards
W.Yinan
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.