Wah sepertinya banyak yang ingin tau cara mendeteksi apakah computer tersambung keinternet atau tidak seperti Smadav, Nah kali ini saya akan memberi 1 Tips bagi AV-maker yang ingin mengabungkan source code ini ke Avnya

Sediakan :
1 Form =>Caption "Cek Internet"
1 Module => Name "basModCek"
1 Commad Button "cmdLinCek"
Lalu masukan source code ini pada Form
Private Sub cmdLinCek_Click()
If Cek_Lin = True Then
MsgBox "Computer terkoneksi ke Internet", vbInformation, "Giusppe Smart Security" '<== Bisa diganti dengan alamat website Anda
' ShellExecute Me.hwnd, "Open", "
http://www.giusppesmartsecurity.blogspot.com", "", "", 1
Else
MsgBox "Computer tidak terkoneksi ke Internet", vbExclamation, "Giusppe Smart Security"
End If
End Sub
Trus masukan code berikut ini pada basModCek
Public Declare Function RasEnumConnections Lib "RasApi32.dll" Alias "RasEnumConnectionsA" (lpRasCon As Any, lpcb As Long, lpcConnections As Long) As Long
Public Declare Function RasGetConnectStatus Lib "RasApi32.dll" Alias "RasGetConnectStatusA" (ByVal hRasCon As Long, lpStatus As Any) As Long
'
Public Const RAS95_MaxEntryName = 256
Public Const RAS95_MaxDeviceType = 16
Public Const RAS95_MaxDeviceName = 32
'
Public Type RASCONN95
dwSize As Long
hRasCon As Long
szEntryName(RAS95_MaxEntryName) As Byte
szDeviceType(RAS95_MaxDeviceType) As Byte
szDeviceName(RAS95_MaxDeviceName) As Byte
End Type
'
Public Type RASCONNSTATUS95
dwSize As Long
RasConnState As Long
dwError As Long
szDeviceType(RAS95_MaxDeviceType) As Byte
szDeviceName(RAS95_MaxDeviceName) As Byte
End Type
Public Function Cek_Lin() As Boolean
Dim TRasCon(255) As RASCONN95
Dim lg As Long
Dim lpcon As Long
Dim RetVal As Long
Dim Tstatus As RASCONNSTATUS95
TRasCon(0).dwSize = 412
lg = 256 * TRasCon(0).dwSize
RetVal = RasEnumConnections(TRasCon(0), lg, lpcon)
If RetVal <> 0 Then
MsgBox "ERROR"
Exit Function
End If
Tstatus.dwSize = 160
RetVal = RasGetConnectStatus(TRasCon(0).hRasCon, Tstatus)
If Tstatus.RasConnState = &H2000 Then
Cek_Lin = True
Else
Cek_Lin = False
End If
End Function
Selamat mencoba

News
Blog GiusppeSmartSecurity udah dialihkan ke
www.maximusoft.com
http://www.maximusoft.com/2015/02/klikofficecoid-belanja-online-peralatan.html