|
-
Dec 7th, 2000, 09:31 AM
#1
Thread Starter
New Member
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
-
Dec 7th, 2000, 01:03 PM
#2
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|