Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Dialup connection

Posted on 1999-07-02
5
Medium Priority
?
192 Views
Last Modified: 2010-05-02
Is it possible from VB code to connect to internet using one of my windows dialup connections? The purpose of my program is to connect to a server and then transfer some files
0
Comment
Question by:cvogt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1521468
0
 

Expert Comment

by:LeeGar
ID: 1521469
I have the answer if you release the current answer...
0
 

Accepted Solution

by:
LeeGar earned 400 total points
ID: 1521470



     Private Declare Function RasEnumEntries Lib "RasApi32.dll" Alias "RasEnumEntriesA" (ByVal
     reserved As String, ByVal lpszPhonebook As String, lprasenumparams As Any, lpcb As Long,
     lpcentries As Long) As Long

     Private Const RAS_MAXENTRYNAME As Integer = 256

     Private Type RasEntryName
         dwSize As Long
         szEntryName(RAS_MAXENTRYNAME) As Byte
     End Type



     Private Sub Command1_Click()

     Dim htemp As Long
     Dim tt As RasEntryName
     Dim lpcb As Long
     Dim lpcentries As Long
     Dim i As Integer
     Dim en As String
     Dim FIND As Boolean
     Dim Ret As Long

     List1.Clear


     tt.dwSize = 26
     lpcb = RAS_MAXENTRYNAME * tt.dwSize
     lpcentries = 0
     Ret = RasEnumEntries(vbNullString, vbNullString, tt, lpcb, lpcentries)

     For i = 0 To RAS_MAXENTRYNAME - 1
         If tt.szEntryName(i) > 31 Then
             FIND = True
             en = en & Chr(tt.szEntryName(i))
         End If
         If tt.szEntryName(i) = 0 And FIND = True Then
             FIND = False
             List1.AddItem Trim(en)
             en = "" 
         End If
     Next

     End Sub

     Private Sub List1_DblClick()

     Dim res
     res = Shell("rundll32.exe rnaui.dll,RnaDial " & List1.List(List1.ListIndex), vbNormalFocus)

     End Sub

leegar@geocities.com
0
 

Expert Comment

by:slashear
ID: 1521471
here is a real shortcut
Shell ("RUNDLL32.EXE RNAUI.DLL,RnaDial " + name_of_your_DUN_connection)

0
 

Author Comment

by:cvogt
ID: 1521472
Excellent! This works very nice. Thanks to both LeeGar and Slashear
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question