Jump to content

Internet cod


Recommended Posts

The computer is connected to the Internet to understand whether the code.,help please,vb kodu this but autoit cod?*

Option Explicit

Private Const HKEY_LOCAL_MACHINE = &H80000002

Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long

Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal alt As String, hKey As Long) As Long

Private Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal sKeyValue As String, ByVal lpReserved As Long, lpType As Long, lpData As Any, nSizeData As Long) As Long

Private Sub Form_Load()

Dim hKey As Long, lpData As Long, nSizeData As Long

Dim alt, anahtar

alt = "SystemCurrentControlSetServicesRemoteAccess"

anahtar = "Remote Connection"

If RegOpenKey(HKEY_LOCAL_MACHINE, alt, hKey) = 0 Then

lpData = 0&

nSizeData = Len(lpData)

If RegQueryValueEx(hKey, anahtar, 0&, 0&, lpData, nSizeData) = 0 Then

If lpData <> 0 Then

MsgBox ("Internet connection is active")

Else

MsgBox ("Internet connection is not active")

End If

End If

RegCloseKey (hKey)

End If

End Sub

thank you for help me

Link to comment
Share on other sites

The computer is connected to the Internet to understand whether the code.,help please,vb kodu this but autoit cod?*

:) Huh?

Link to comment
Share on other sites

#1 .I don't Understand you 100%

#2 .Convert VisualBasic 2 AutoIt? If yes ,Search Inside the help file for "registry"

#3 .About "SystemCurrentControlSetServicesRemoteAccess" key

HKLM\SYSTEM\CurrentControlSet\Services\RemoteAccess

The Parameters subkey stores configuration data for Routing and Remote Access.

The data in this subkey specifies the value of variables that apply to the entire service.

NB: To make changes to the values of the entries in this subkey effective, you must stop and restart the remote access service.

EDIT: Or simply use

Do
    $ONLINE = Ping('Google.com')
Until Not @error
MsgBox(0,"","Internet connection is active")
Edited by DCCD
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...