Solved

RASdial on Win 98

Posted on 1998-11-30
1
318 Views
Last Modified: 2013-12-03
1 .Using Windows 98 I want to use RASDIAL() in VC++5.0 to have my code connect to my ISP using my default Dial-Up Networking connectoid, the one that comes up when I launch my browser or Windows Messaging using Internet Mail.

2.I have implemented the RASdial sample code in the Microsoft platform SDK (RASBerry), but cannot retrieve the default login and password into RASDIALPARAMS. The member values for szUserName and szPassword are null. If I manually set them in the code, RASDIAL() works fine and authenticates with my ISP.

3. The MSDN on line documentation provides no additional info. Without having to prompt the user for this info, how can I use the info already stored in dial-up networking to connect without user intervention?
0
Comment
Question by:solr
1 Comment
 

Accepted Solution

by:
bobline earned 100 total points
ID: 1416499
Here's a piece of code from my program:
________________________________________
RASDIALPARAMS rdp;
BOOL PassExists = FALSE;
CString num;
strcpy(rdp.szEntryName, name);
rdp.szPhoneNumber[0] = 0;
rdp.szUserName[0] = 0;
rdp.szPassword[0] = 0;
rdp.dwSize = sizeof(RASDIALPARAMS);
if(RasGetEntryDialParams(NULL, &rdp, &PassExists)==ERROR_SUCCESS)
{
  num = rdp.szPhoneNumber;
  account = rdp.szUserName;
  if(PassExists)
     password = rdp.szPassword;
}
___________________________________
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

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

947 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

19 Experts available now in Live!

Get 1:1 Help Now