Solved

RAS Win32 APIs launching Dial-up networking account dialoge

Posted on 1998-07-09
4
220 Views
Last Modified: 2012-05-04
Does anyone know of a Win32 API that can be used to call a specific Dial-up networking dialoge.  I need to support an attended dial-up connecting process.  I need an API that is supported on both 95 and NT.  I have looked at the RASAPIs, RasDial() and RasDialDlg().  RasDial() only supports unattended dialing, doesn't it?  I couldn't get it to simply launch the specified dial-up networking account.  And RasDialDlg() is only supported on NT.  Anyone have any suggestions.  An MFC class would be even better?
Thanks
0
Comment
Question by:ext3awf
  • 2
4 Comments
 
LVL 23

Expert Comment

by:chensu
ID: 1167534
On Windows NT, call RasDialDlg. On Windows 95, use the following code.

CString strCmd("rundll32 rnaui.dll,RnaDial ");
strCmd += "TheConnectionName";      // entry name
::WinExec(strCmd, SW_SHOWNORMAL);

0
 

Author Comment

by:ext3awf
ID: 1167535
Is there an API I can user for both NT and 95 or is there a command predecessor like "rundll32 rnaui.dll,RnaDial " for NT?
Additionally, I would prefer to use CreateProcess() instead of WinExec for Win32 programming.  Is there any reason why I can't I want to use CreateProcess() primarily becuase I need to close the process down when communications are complete.  
0
 
LVL 23

Accepted Solution

by:
chensu earned 100 total points
ID: 1167536
I don't think there is an API for both NT and 95.

Yes, CreateProcess is the preferred function rather than WinExec. My example is just a quick-and-dirty one. You should be able to change it easily.

In fact this question has been asked several times in the Windows Programming topic area.
0
 

Expert Comment

by:dstruve
ID: 1167537
There is a shellexecuteex command I saw.  If you want Ill look for it.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

920 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now