Solved

Is connected

Posted on 2000-03-14
2
161 Views
Last Modified: 2013-11-20
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
0
Comment
Question by:eakkung
2 Comments
 
LVL 31

Accepted Solution

by:
Zoppo earned 75 total points
ID: 2615173
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
 
LVL 5

Expert Comment

by:Wyn
ID: 2615194
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

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
difference between String.subString() and String.subSequence() 6 193
mapBully challenge 6 127
Way to decrease size of apk file 9 65
Increment column based of a FK 8 19
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now