Solved

How to Determine if Connected To Network/Enumerate through Network Connections.

Posted on 2004-10-28
893 Views
Last Modified: 2008-02-01
Hello Experts,

I am using a VB6 app and I want to determine if the user is connected to our company network.  I had hoped to use api calls such as RasEnumConnections or RasGetConnectionStatistics to accomplish this by determining a connection to a known server, but I cannot find sufficient documentation (code samples) to get them to work.  I've already tried Googling, AllAPI.com, and other sites, but as I said, I can't find well documented code that works.

Thanks in advance for your assistance.  Specific code samples would be greatly appreciated.

-Andrew
0
Question by:Androminos
    7 Comments
     
    LVL 48

    Expert Comment

    by:Mikal613
    if you are connected or a certain user is connected?
    0
     
    LVL 1

    Author Comment

    by:Androminos
    I'd like a program running on user's machine to determine if that user's machine is connected.
    0
     
    LVL 48

    Expert Comment

    by:Mikal613
    0
     
    LVL 48

    Accepted Solution

    by:
    0
     
    LVL 14

    Expert Comment

    by:Shiju Sasidharan
    Hi
    try this to
    Enumerate User List and Obtaining User Info

        http://vbnet.mvps.org/index.html?code/network/netuserenum.htm

    From this collected list u can easily findout a specified user

    ;-)
    Shiju
    0
     
    LVL 32

    Expert Comment

    by:Erick37
    How To List Servers in 32-bit Visual Basic Using NetServerEnum
    http://support.microsoft.com/kb/q198896/
    0
     
    LVL 1

    Author Comment

    by:Androminos
    Thank you to all who have answered and to Mikal613, whose answer I will accept.  As we all know, there is more than one way to skin a cat and in this case I have picked the first way that works and that would be the answer suggested by Mikal613 (using "IsDestinationReachable" api).  It's exactly what I need.  So thank you to shijusn, Erick37--I very much appreciate your input--but I will not have time to research your answers to check for applicability to see if a split-points is in order.  Points go to the early-bird, Mikal613.  Have a great day, all!!

    -Androminos
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    Shellfire Box VPN + Lifetime Subscription

    The Shellfire Box easily connects all of your devices, even those that don't offer the possibility to establish a safe vpn connection. Access blocked content and surf safely, no matter where in the world you are located.

    Introduction This article makes the case for using two modules in your VBA/VB6 applications to provide both case-sensitive and case-insensitive text comparison operations.  Recently, I solved an EE question using the LIKE function.  In order for th…
    This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    877 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now