VBA

Moderators: PavlinII
Number of threads: 1673
Number of posts: 3078

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
How to scan network... Posted by Psightoplazm on 13 Sept 2003 at 2:36 PM
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`~
Report
Re: How to scan network... Posted by rizwan1217 on 11 Oct 2003 at 4:29 AM
: 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`~
:

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 






 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.