Check DialUp connection & connection mode
Check DialUp connection & connection mode
API Declarations
Private Declare Function InternetDial Lib "wininet.dll" (ByVal hWnd As Long, ByVal sConnectoid As String, ByVal dwFlags As Long, lpdwConnection As Long, ByVal dwReserved As Long) As Long
Private Declare Function InternetGetConnectedStateEx Lib "wininet.dll" (ByRef lpdwFlags As Long, ByVal lpszConnectionName As String, ByVal dwNameLen As Integer, ByVal dwReserved As Long) As Long
Rate Check DialUp connection & connection mode
(1(1 Vote))
Private Sub cmdDisconnect_Click()
lngresult = InternetHangUp(ConnectionNumber, 0)
End Sub
Private Sub Command1_Click()
lngresult = InternetDial(0, "test", 0, ConnectionNumber, 0&)
End Sub
Private Sub Command2_Click()
Dim sConnType As String * 255
Dim Ret As Long
Ret = InternetGetConnectedStateEx(Ret, sConnType, 254, 0)
If Ret = 1 Then
MsgBox "You are connected to Internet via a " & sConnType, vbInformation
Else
MsgBox "You are not connected to internet", vbInformation
'Command1_Click
End If
End Sub
Check DialUp connection & connection mode Comments
No comments yet — be the first to post one!
Post a Comment