: 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?
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)