|
-
Jul 21st, 2006, 03:22 PM
#1
Thread Starter
Member
[RESOLVED] Check if Network computer is on
I need a way of checking if a computer on the network is on
Is there a ping command or something in vb that can do this?
-
Jul 24th, 2006, 02:09 PM
#2
Re: Check if Network computer is on
There's a ping command, but it's a Windows exe file, not a VB command.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Jul 27th, 2006, 08:06 AM
#3
Fanatic Member
Re: Check if Network computer is on
-
Jul 27th, 2006, 12:28 PM
#4
Thread Starter
Member
Re: Check if Network computer is on
VB 6
The problem I'm having is that my program uses some api functions to get information from all the machines on a network. It works ok but when it hits a computer that's turned off, the program seizes up.
So I need a way of checking if the computer is on beforehand in vb. It doesn't necessarily have to be a ping. Any function that accesses a remote computer and fails immediately if the remote computer is switched off will do.
-
Jul 28th, 2006, 09:16 PM
#5
Re: Check if Network computer is on
Since networks have delays, functions that access computers on networks are written with timeout delays. If they weren't, half the calls (or more) would fail on computers that were on.
See if your program really freezes, or if it just waits for 60 or 120 seconds for a response.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Jul 29th, 2006, 06:25 AM
#6
Thread Starter
Member
Re: Check if Network computer is on
Yes your right, it does have a timeout but it takes absolutely ages.
I've been searching through some other functions to find something with a quicker timeout.
Best so far is:
NetWkstaGetInfo - 5 secs
-
Sep 8th, 2006, 01:37 PM
#7
Thread Starter
Member
Re: Check if Network computer is on
The problem is when you've got like 250 computers to go through and a lot are off, it is one heck of a delay.
I found another function called IsDestinationReachable which I though I could use to determine if the remote comp was on before using my other net functions. But the problem is there is still a network connection to the computer even when it is switched off (led's on ethernet still on) so the function always returns true.
This is really starting to annoy me and i desperately need a way around my situation, big plea for help to anyone with answers.
-
Sep 9th, 2006, 11:46 AM
#8
Fanatic Member
Re: Check if Network computer is on
hmm...
VB6 Ping (you can adjust the timeout interval labeld 'PING_TIMEOUT')
http://vbnet.mvps.org/index.html?cod...net/index.html
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|