Results 1 to 2 of 2

Thread: How to get available connections and connecting to Internet

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2000
    Location
    Olavarría, Buenos Aires, Argentina
    Posts
    26

    Question

    I am making a phone tracker and need to get the information about all the available connections to internet in my computer. (I suppose there´s a database or sthg, but I couldn´t find it).
    I also need to know how to connect without making the connection screen appear. I need just to connect directly.
    Thanks!!
    PandaNet!

  2. #2
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833



    ---------------------
    FORCE CONNECTION
    ------------------------



    Const Internet_Autodial_Force_Unattended As Long = 2

    Public Declare Function InternetAutodial Lib "wininet.dll" (ByVal dwFlags As
    Long, ByVal dwReserved As Long) As Long
    Public Declare Function InternetAutodialHangup Lib "wininet.dll" (ByVal
    dwReserved As Long) As Long


    'Code:
    Dim lResult As Long
    lResult = InternetAutodial(Internet_Autodial_Force_Unattended, 0&)
    --------------------------------------------------------------------------------

    Or this way:


    code:--------------------------------------------------------------------------------
    Private Sub CmdConnect_Click()
    Dim X
    '"MyConnectionsName" is the name under the icon in Dial-up Networking
    X = Shell("rundll32.exe rnaui.dll,RnaDial " & "MyConnectionsName", 1)
    DoEvents
    'You can type in your password before the { below.
    SendKeys "{enter}", True
    DoEvents
    End Sub---------------------

    ---------------------------------------------
    TO GET AVAILABLE RAS ENTRIES!
    ---------------------------------------------



    Public Declare Function RasEnumEntries Lib "RasApi32.dll" Alias "RasEnumEntriesA" (ByVal reserved As String, ByVal lpszPhonebook As String, lprasentryname As Any, lpcb As Long, lpcEntries As Long) As Long

    Public Const RAS95_MaxEntryName = 256

    Public Type RASENTRYNAME95
    dwsize As Long
    szentryname(RAS95_MaxEntryName) As Byte
    End Type


    --Form Code--

    Dim s As Long, l As Long, ln As Long, a$
    ReDim R(255) As RASENTRYNAME95

    R(0).dwsize = 264
    s = 256 * R(0).dwsize
    l = RasEnumEntries(vbNullString, vbNullString, R(0), s, ln)
    For l = 0 To ln - 1
    a$ = StrConv(R(l).szentryname(), vbUnicode)
    Combo1.AddItem Left$(a$, InStr(a$, Chr$(0)) - 1)
    Next


    Kurt Simons
    [I know I'm a hack but my clients don't!]

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