Results 1 to 2 of 2

Thread: Checking Ethernet Connection

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Location
    Indianapolis
    Posts
    1
    I am writing an app that will be used by the sales force from around the country to dial into the ethernet and check their email and stuff. What is the easiest way to check for an ethernet connection?

    Thanks!
    leemy298

  2. #2
    New Member
    Join Date
    Dec 2000
    Posts
    4

    ethernet checking

    in the module:

    Option Explicit
    Public Declare Function InternetGetConnectedState _
    Lib "wininet.dll" (ByRef lpSFlags As Long, _
    ByVal dwReserved As Long) As Long

    Public Const INTERNET_CONNECTION_LAN As Long = &H2


    Public Function ViaLAN() As Boolean

    Dim SFlags As Long
    'return the flags associated with the connection
    Call InternetGetConnectedState( SFlags, 0& )

    'True if the Sflags has a LAN connection
    ViaLAN = SFlags And INTERNET_CONNECTION_LAN

    End Function

    in the code:

    'this will return a true/false to text1.text
    text1.text = ViaLan()

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width