Solved

RAS Win32 APIs launching Dial-up networking account dialoge

Posted on 1998-07-09
4
227 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

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

Suggested Solutions

Title # Comments Views Activity
Create string splitting user defined function in C++ 23 322
How to gracefully close the c++ 11 thread? 3 108
What is sub-make ? 2 71
Indy 10 not Receiving UDP broadcast 3 22
When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

831 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