Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Is connected

Posted on 2000-03-14
2
Medium Priority
?
196 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 225 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Integration Management Part 2

963 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