473,396 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to get the names of the availalbe computers on your LAN/Workgr

Hi, I need to get a list of the computers in my WorkGroup LAN, with its names
in a similar way you get the available Drives from a PC with
DriveInfo.GetDrives(). Is there a managed class that provide this, if not,
coudl you provide me some guiadance with unmanaged APIs or wrappers.
--
Fernik
http://www.fernik.com.ar
Jan 3 '08 #1
2 1841
Hello Fernik,

use NetServerEnum WinAPI method
The sample and description how to do in from managed code is there http://www.codeproject.com/KB/IP/Lis...Computers.aspx

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
FHi, I need to get a list of the computers in my WorkGroup LAN, with
Fits names in a similar way you get the available Drives from a PC
Fwith DriveInfo.GetDrives(). Is there a managed class that provide
Fthis, if not, coudl you provide me some guiadance with unmanaged APIs
For wrappers.
F>
Jan 3 '08 #2
Hi Fernik,

As for looping network resources in local network, there are several means
such as RAW network API, wmi or ADSI:

here are some web threads discussing on this, you can have look to see
whether they help some:

API approach:

#list of computers on local network
http://www.csharpfriends.com/Forums/...x?PostID=29925

#Using Network Functions in Visual C#.NET (Part II - Group Functions)
http://www.csharphelp.com/archives2/archive440.html
ADSI approach:

#Inventory of Domain Users and Computers Using ADSI
http://www.serverwatch.com/tutorials...le.php/1476791

#List of computers on local network
http://www.csharpfriends.com/Forums/...x?PostID=29925
WMI:

http://www.siccolo.com/Articles/Code...k_Browser/Buil
d_Local_Network_Browser.html

http://www.activexperts.com/activmon...t/wmi/samples/

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
>From: =?Utf-8?B?RmVybmlr?= <fe****@community.nospam>
Subject: How to get the names of the availalbe computers on your LAN/Workgr
Date: Wed, 2 Jan 2008 18:12:01 -0800

Hi, I need to get a list of the computers in my WorkGroup LAN, with its
names
>in a similar way you get the available Drives from a PC with
DriveInfo.GetDrives(). Is there a managed class that provide this, if not,
coudl you provide me some guiadance with unmanaged APIs or wrappers.
--
Fernik
http://www.fernik.com.ar
Jan 3 '08 #3

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

Similar topics

1
by: Keith Smith | last post by:
My software will be installed on peer-to-peer networks and sometimes 2000/2003 domain networks. How can I get a list of the computers on the network? My goal is to search each of these computers...
8
by: Vanga Sasidhar | last post by:
I have four computers. One computer - Win XP Two computers - Win 98 One computer - Win ME I designed some pages in my computer having Win XP operating system. I installed dot net...
2
by: Thomas Müller | last post by:
Hi, I need a way to find the names of the computers that are reachable over a network. Ideally when it is executed it should report back wich computernames are present. I have seen one...
0
by: Steve D | last post by:
Hi. I am using the following code to try and populate two list boxes. The first, lstWorkgroups, is to show a list of the workgroups on my network. The second, lstComputers, is to show a list of the...
4
by: lgbjr | last post by:
Hi All, I need to retrieve a list of computer names that are available on a network and a list of databases that are available in MSDE2K. Can someone point me in the right direction for...
3
by: shuisheng | last post by:
Dear All, Assume each objects in my code has its own name. And they cannot be the same. Is there any good way to avoid the repeated names? Bests, Shuisheng
3
by: Don | last post by:
I am writing a program and need to identify the friendly names of ports. I have queried the registry key HKEY_LOCAL_MACHIN\\EHARDWARE\\DEVICEMAP\\SERIALCOMM, but all that tells me is which ones...
4
by: CoachBarker | last post by:
I hope I can explain this. VB.net Visual Studio 2005 What I need to do is take the names in a text file and read them into my application. That I have done and put them in an array but I don't...
17
by: John Salerno | last post by:
Let me see if this question even makes sense...I'm reading Core Python Programming and I jumped ahead to the more specific topics like network programming. I plan to follow along with the example...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.