How to scan network... - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to scan network...

PsightoplazmPsightoplazm Posts: 332Member ✭✭
Could someone please help me with a "How To" on seeing other computer connected to a local network. Weather it be on the same windows network or domain or be able to search the entire local network. I know that manually I can find computers on a network using Network Neighborhood, but since that is not a logical directory I would like to know how to find it with code.
Does anyone know how to do this?
><//~Psightoplasm`~

Comments

  • rizwan1217rizwan1217 Posts: 88Member
    : Could someone please help me with a "How To" on seeing other computer connected to a local network. Weather it be on the same windows network or domain or be able to search the entire local network. I know that manually I can find computers on a network using Network Neighborhood, but since that is not a logical directory I would like to know how to find it with code.
    : Does anyone know how to do this?
    : ><//~Psightoplasm`~
    :
    [b]
    [code]
    Private Declare Function GetComputerName Lib "kernel32" Alias _
    "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long

    Function ComputerName() As String

    ' Returns the name of the local computer.
    Dim BUFFER As String * 512, Length As Long
    Length = Len(BUFFER)
    If GetComputerName(BUFFER, Length) Then
    ' this API returns non-zero if successful,
    ' and modifies the length argument
    ComputerName = Left(BUFFER, Length)
    End If

    End Function
    [/code]
    [/b]

Sign In or Register to comment.