[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 332
  • Last Modified:

RASdial on Win 98

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
solr
Asked:
solr
1 Solution
 
boblineCommented:
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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now