473,508 Members | 4,751 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Network Discovery

Basically I got a LAN with several computer.
From Computer A I'll got my appliation which should do the following:
Check if any other computer lost connection to the network. (Computer B may
has been shutdown, While computer C cable has been unplug, etc.).

I used to check if a file exist on each computer by running a loop. This way
is to slow and too much CPU demanding for nothing.

Is there anty other way like a listener of some sort to catch connection
lost from other computer into the network. (Eventually I may know the IP or
computer name that I want to check).

Thank you.
Sep 26 '08 #1
6 4524
use a timer

ub pingg(ByVal adress As String, ByVal timeout As Int32)
If My.Computer.Network.IsAvailable Then
Try
If My.Computer.Network.Ping(adress, timeout) Then
MsgBox(adress & vbCrLf & "ok", MsgBoxStyle.Information,
Me.Text)
Else
MsgBox(adress & vbCrLf & "failled",
MsgBoxStyle.Exclamation, Me.Text)
End If
Catch ex As Exception
MessageBox.Show(ex.Message, Me.Text, MessageBoxButtons.OK,
MessageBoxIcon.Error)
End Try
End If
End Sub

"Nicolas" <Ni*****@discussions.microsoft.comwrote in message
news:07**********************************@microsof t.com...
Basically I got a LAN with several computer.
From Computer A I'll got my appliation which should do the following:
Check if any other computer lost connection to the network. (Computer B
may
has been shutdown, While computer C cable has been unplug, etc.).

I used to check if a file exist on each computer by running a loop. This
way
is to slow and too much CPU demanding for nothing.

Is there anty other way like a listener of some sort to catch connection
lost from other computer into the network. (Eventually I may know the IP
or
computer name that I want to check).

Thank you.

Sep 26 '08 #2
Is there any other way then a Timer since it's doing a loop which could run
for days.

"Gillard" wrote:
use a timer

ub pingg(ByVal adress As String, ByVal timeout As Int32)
If My.Computer.Network.IsAvailable Then
Try
If My.Computer.Network.Ping(adress, timeout) Then
MsgBox(adress & vbCrLf & "ok", MsgBoxStyle.Information,
Me.Text)
Else
MsgBox(adress & vbCrLf & "failled",
MsgBoxStyle.Exclamation, Me.Text)
End If
Catch ex As Exception
MessageBox.Show(ex.Message, Me.Text, MessageBoxButtons.OK,
MessageBoxIcon.Error)
End Try
End If
End Sub

"Nicolas" <Ni*****@discussions.microsoft.comwrote in message
news:07**********************************@microsof t.com...
Basically I got a LAN with several computer.
From Computer A I'll got my appliation which should do the following:
Check if any other computer lost connection to the network. (Computer B
may
has been shutdown, While computer C cable has been unplug, etc.).

I used to check if a file exist on each computer by running a loop. This
way
is to slow and too much CPU demanding for nothing.

Is there anty other way like a listener of some sort to catch connection
lost from other computer into the network. (Eventually I may know the IP
or
computer name that I want to check).

Thank you.
Sep 26 '08 #3
This has already been done in several places, and you may be able to get
some ideas. See, for instance:
http://www.a1vbcode.com/app-4403.asp

You should also consider whether you can use the facilities of .Net, such as
the FileSystemWatcher class.

"Nicolas" <Ni*****@discussions.microsoft.comwrote in message
news:07**********************************@microsof t.com...
Basically I got a LAN with several computer.
From Computer A I'll got my appliation which should do the following:
Check if any other computer lost connection to the network. (Computer B
may
has been shutdown, While computer C cable has been unplug, etc.).

I used to check if a file exist on each computer by running a loop. This
way
is to slow and too much CPU demanding for nothing.

Is there anty other way like a listener of some sort to catch connection
lost from other computer into the network. (Eventually I may know the IP
or
computer name that I want to check).

Thank you.

Sep 27 '08 #4
use a loop with a process.sleep

"Nicolas" <Ni*****@discussions.microsoft.comwrote in message
news:9A**********************************@microsof t.com...
Is there any other way then a Timer since it's doing a loop which could
run
for days.

"Gillard" wrote:
>use a timer

ub pingg(ByVal adress As String, ByVal timeout As Int32)
If My.Computer.Network.IsAvailable Then
Try
If My.Computer.Network.Ping(adress, timeout) Then
MsgBox(adress & vbCrLf & "ok",
MsgBoxStyle.Information,
Me.Text)
Else
MsgBox(adress & vbCrLf & "failled",
MsgBoxStyle.Exclamation, Me.Text)
End If
Catch ex As Exception
MessageBox.Show(ex.Message, Me.Text,
MessageBoxButtons.OK,
MessageBoxIcon.Error)
End Try
End If
End Sub

"Nicolas" <Ni*****@discussions.microsoft.comwrote in message
news:07**********************************@microso ft.com...
Basically I got a LAN with several computer.
From Computer A I'll got my appliation which should do the following:
Check if any other computer lost connection to the network. (Computer B
may
has been shutdown, While computer C cable has been unplug, etc.).

I used to check if a file exist on each computer by running a loop.
This
way
is to slow and too much CPU demanding for nothing.

Is there anty other way like a listener of some sort to catch
connection
lost from other computer into the network. (Eventually I may know the
IP
or
computer name that I want to check).

Thank you.

Sep 27 '08 #5
sorry
Threading.Thread.Sleep(1000)
"Gillard" <gillard_georges@@@@@@@@@hotmail.comwrote in message
news:eS**************@TK2MSFTNGP06.phx.gbl...
use a loop with a process.sleep

"Nicolas" <Ni*****@discussions.microsoft.comwrote in message
news:9A**********************************@microsof t.com...
>Is there any other way then a Timer since it's doing a loop which could
run
for days.

"Gillard" wrote:
>>use a timer

ub pingg(ByVal adress As String, ByVal timeout As Int32)
If My.Computer.Network.IsAvailable Then
Try
If My.Computer.Network.Ping(adress, timeout) Then
MsgBox(adress & vbCrLf & "ok",
MsgBoxStyle.Information,
Me.Text)
Else
MsgBox(adress & vbCrLf & "failled",
MsgBoxStyle.Exclamation, Me.Text)
End If
Catch ex As Exception
MessageBox.Show(ex.Message, Me.Text,
MessageBoxButtons.OK,
MessageBoxIcon.Error)
End Try
End If
End Sub

"Nicolas" <Ni*****@discussions.microsoft.comwrote in message
news:07**********************************@micros oft.com...
Basically I got a LAN with several computer.
From Computer A I'll got my appliation which should do the following:
Check if any other computer lost connection to the network. (Computer
B
may
has been shutdown, While computer C cable has been unplug, etc.).

I used to check if a file exist on each computer by running a loop.
This
way
is to slow and too much CPU demanding for nothing.

Is there anty other way like a listener of some sort to catch
connection
lost from other computer into the network. (Eventually I may know the
IP
or
computer name that I want to check).

Thank you.
Sep 27 '08 #6
Nicolas,

In my idea is for this Directory Services.

Be aware the the documentation around it is still fair.

http://msdn.microsoft.com/en-us/libr...58(VS.85).aspx

(As you use HDLC then you have no fixex IP addresses that you can ping)

Cor

"Nicolas" <Ni*****@discussions.microsoft.comschreef in bericht
news:07**********************************@microsof t.com...
Basically I got a LAN with several computer.
From Computer A I'll got my appliation which should do the following:
Check if any other computer lost connection to the network. (Computer B
may
has been shutdown, While computer C cable has been unplug, etc.).

I used to check if a file exist on each computer by running a loop. This
way
is to slow and too much CPU demanding for nothing.

Is there anty other way like a listener of some sort to catch connection
lost from other computer into the network. (Eventually I may know the IP
or
computer name that I want to check).

Thank you.

Sep 28 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1450
by: Anurag | last post by:
Hi, I understand that the dbm cfg parameter "DISCOVER" controls whether Search or Known discovery is applicable. Additionally, Search discovery provides a superset of Known discovery. I completely...
0
1126
by: Kevin L | last post by:
I am looking to incorporate network device discovery into a Help Desk application that I am building. As I have never done this before, I am looking for some help. Can anyone share any web site...
0
1291
by: serge calderara | last post by:
Dear all, Let say that I have developped a web service which is host on Server1. Then one of my customer will like to used that service in its own web site which is not based on .NET platform. ...
0
4375
by: Kyle Freeman | last post by:
Ive been experimenting with ways to discover computers on the network. Most of what I have tried is centered around looping through our network address ranges to discover the names of the...
22
52349
Red˝
by: Red˝ | last post by:
hello, i still cannot network my new vista cpu with my other xp computer in my house. on Network Connection on vista the "View Map" it sees both computers but its not hooking them up, can anyone...
0
4275
by: BLUE | last post by:
Enable and Disable in the Network and DialUp Connections manager is actually setting a bit in the registry for the target adapter and then calling NDIS to unbind or bind (depending on whether your...
2
5781
by: mascomkt | last post by:
I had a three station XP network with a NAS attached that worked fine. Then I replaced one of the PCs with a Vista computer. The Vista PC which has a USB Linksys WiFi and can connect to the...
1
2167
by: martin lanny | last post by:
My application should periodically connect to multiple network drives to see if the certain files were created. I would do this to retrieve the list of files in UNC path //server1/backup/: ...
1
2436
by: 2boysnus | last post by:
I set up a network at my work last week and we have been having some problems that I have not ben able to fix. We have: 2 New computers running Windows XP 2 New Computers running Windows Vista...
0
1215
by: news.microsoft.com | last post by:
Hey All, Sorry to post to several groups but wasn't sure which development group would be best for the question. I was wondering if there are any developers out there that have significant...
0
7228
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7128
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7393
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5635
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3191
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
426
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.