?
Solved

View Dial Up Networking : Connect to Default account dialog.

Posted on 2000-01-21
9
Medium Priority
?
181 Views
Last Modified: 2010-05-02
I've looked for this around the new, but all of them has some limits that I don't like (eg. needs IE4+).

Does anyone of you have a little snippet of code to display the dialog for connecting to the default DUN account? Is it really so hard?
0
Comment
Question by:cosmo3d
  • 5
  • 3
9 Comments
 
LVL 14

Expert Comment

by:mcrider
ID: 2375962
Have you tried this:

     Shell "rundll rnaui.dll,RnaDial NAME", vbNormalFocus

where: NAME is the dial-up network name... For example, If my Dialup network name is: Erols Internet

Then I would do:

     Shell "rundll rnaui.dll,RnaDial Erols Internet", vbNormalFocus



Hope this helps!


Cheers!
0
 

Author Comment

by:cosmo3d
ID: 2376011
mcrider, I'm sorry - but I'm looking for a way to dial the DEFAULT connection. I don't know the name of the account to dial, so... That won't work :(
0
 
LVL 14

Accepted Solution

by:
mcrider earned 140 total points
ID: 2376082
You can find the dialup name by going into the registry and getting the key:

HKEY_CURRENT_USER\RemoteAccess\InternetProfile

The following microsoft KB article shows you how to get information from the registry:

HOWTO: Use the Registry API to Save and Retrieve Setting
http://support.microsoft.com/support/kb/articles/q145/6/79.asp?LNG=ENG&SA=MSDN 
 


Cheers!
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
LVL 14

Expert Comment

by:mcrider
ID: 2376354
You could also look in the registry under the key:

HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts\00000001\Connectoid


Cheers!

0
 

Expert Comment

by:srinimrs
ID: 2377119
hai
please refer following web site:
i think it will give the answer for the
question.

www.vbcode.com

0
 

Author Comment

by:cosmo3d
ID: 2377318
I've not tried ityet, but I assume it works, so I'll accept your answer (if not, your'e in trouble =)

BTW, is it me, or did the site just get a new design... Looks far more better, expecially here in 1600x1200!
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2377866
Thanks for the points! Glad I could help!


Cheers!
0
 

Author Comment

by:cosmo3d
ID: 2379002
Worked fine to grab the information from regedit, but when trying your Shell-code, I got a File Not Found-error. I searched my harddrives for "rnaui.dll", and there was no results...

I'm running Windows 2000, so that might be the reason. However, I want my app to fully work with Win2k, so I need another option!
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2379048
You could try this... Add the following to a module:

   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


And then call this in your program:

   Dim lResult As Long
   lResult = InternetAutodial(Internet_Autodial_Force_Unattended, 0&)


If that doesn't help, you're going to have to post a specific question about starting dial-up on WIN 2000...


Cheers!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

599 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