Click here to Skip to main content
15,920,217 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Preserving clipboard content Pin
Gary R. Wheeler23-Nov-02 2:11
Gary R. Wheeler23-Nov-02 2:11 
GeneralRe: Preserving clipboard content Pin
mariuszpopiolek23-Nov-02 2:22
mariuszpopiolek23-Nov-02 2:22 
GeneralRe: Preserving clipboard content Pin
Paul M Watt23-Nov-02 6:57
mentorPaul M Watt23-Nov-02 6:57 
GeneralRe: Preserving clipboard content Pin
mariuszpopiolek23-Nov-02 13:22
mariuszpopiolek23-Nov-02 13:22 
GeneralConstants in cmath Pin
Anonymous22-Nov-02 23:22
Anonymous22-Nov-02 23:22 
GeneralConstants in <cmath> Pin
Anonymous22-Nov-02 23:21
Anonymous22-Nov-02 23:21 
QuestionHow to detect network connection? Pin
Wenrich22-Nov-02 23:06
Wenrich22-Nov-02 23:06 
AnswerRe: How to detect network connection? Pin
Gary R. Wheeler23-Nov-02 2:25
Gary R. Wheeler23-Nov-02 2:25 
This depends on what you are using the network connection for.

If you want to use WinSock to talk to a remote machine, you can use a ping function. For example, this article[^] provides a C++ class for doing pings.

If you need to see if a given network share is available, just try to do a CreateFile or OpenFile on it. You could also use the functions in the Windows shell[^] to enumerate the contents of the 'Network Neighborhood' to find out what shares are available to your machine.

In other words, the simple approach is to assume that the network connection is there, and attempt the operation you are interested in. If the operation fails when it otherwise should succeed, in all likelihood the network connection isn't available.


Software Zen: delete this;
AnswerRe: How to detect network connection? Pin
Michael Dunn23-Nov-02 5:11
sitebuilderMichael Dunn23-Nov-02 5:11 
GeneralMaximizing Pin
S O S22-Nov-02 23:00
S O S22-Nov-02 23:00 
GeneralRe: Maximizing Pin
Gary R. Wheeler23-Nov-02 2:35
Gary R. Wheeler23-Nov-02 2:35 
GeneralRe: Maximizing Pin
S O S23-Nov-02 5:44
S O S23-Nov-02 5:44 
GeneralRe: Maximizing Pin
Paul M Watt23-Nov-02 6:51
mentorPaul M Watt23-Nov-02 6:51 
GeneralRe: Maximizing Pin
S O S23-Nov-02 7:31
S O S23-Nov-02 7:31 
GeneralRe: Maximizing Pin
Paul M Watt23-Nov-02 7:41
mentorPaul M Watt23-Nov-02 7:41 
GeneralRe: Maximizing Pin
S O S23-Nov-02 21:31
S O S23-Nov-02 21:31 
GeneralGetting the active view Pin
S O S22-Nov-02 22:53
S O S22-Nov-02 22:53 
GeneralRe: Getting the active view Pin
Gero Gerber22-Nov-02 23:12
Gero Gerber22-Nov-02 23:12 
GeneralRe: Getting the active view Pin
S O S22-Nov-02 23:45
S O S22-Nov-02 23:45 
GeneralWriting an nice OSDesktop! Pin
Behzad Ebrahimi22-Nov-02 22:47
Behzad Ebrahimi22-Nov-02 22:47 
GeneralRe: Writing an nice OSDesktop! Pin
Gary R. Wheeler23-Nov-02 2:39
Gary R. Wheeler23-Nov-02 2:39 
GeneralDll entry point error Pin
suresh_sathya22-Nov-02 22:06
suresh_sathya22-Nov-02 22:06 
QuestionHow upgrade my program automatically? Pin
Behzad Ebrahimi22-Nov-02 21:49
Behzad Ebrahimi22-Nov-02 21:49 
AnswerRe: How upgrade my program automatically? Pin
Anders Molin23-Nov-02 5:39
professionalAnders Molin23-Nov-02 5:39 
GeneralRe: How upgrade my program automatically? Pin
25-Nov-02 19:33
suss25-Nov-02 19:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.