HighTechTalks DotNet Forums  

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

Dotnet General Discussions microsoft.public.dotnet.general


Discuss How to get the names of the availalbe computers on your LAN/Workgr in the Dotnet General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Fernik
 
Posts: n/a

Default How to get the names of the availalbe computers on your LAN/Workgr - 01-02-2008 , 09:12 PM






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

Reply With Quote
  #2  
Old   
Michael Nemtsev [MVP]
 
Posts: n/a

Default Re: How to get the names of the availalbe computers on your LAN/Workgr - 01-03-2008 , 04:14 AM






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


F> Hi, I need to get a list of the computers in my WorkGroup LAN, with
F> its names in a similar way you get the available Drives from a PC
F> with DriveInfo.GetDrives(). Is there a managed class that provide
F> this, if not, coudl you provide me some guiadance with unmanaged APIs
F> or wrappers.
F>



Reply With Quote
  #3  
Old   
Steven Cheng[MSFT]
 
Posts: n/a

Default RE: How to get the names of the availalbe computers on your LAN/Workgr - 01-03-2008 , 04:24 AM



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.




--------------------
Quote:
From: =?Utf-8?B?RmVybmlr?= <fernik (AT) community (DOT) 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



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.