Programmatically Create Dialup Connection Objects

Environment: This code has been successfully tested under Windows 9x and Windows NT

CRasAbsLay

CRasAbsLay is a simple class that encapsulates the functionality that you need from RAS to be able to create dialup connections in your Dialup connection folder. You cannot assume that all the machines have the RAS services available and you cannot link the RAS API library statically to your application, that's the reason why use the object CRas instead of calling the API directly.

I wrote this class when I wrote a installation program from an ISP that setup your Dialup Network with their connection settings.

Integrating the Code in Your Application

  1. Add  RasAbsLay.cpp and RasAbsLay.h to your project
  2. If you are not already including afxtempl.h, add it to your stdafx.h file
  3. Call CreatePhoneBookEntry member to create your connection

The Demo Project

The example code is a dialog-based application that prompts the user for information regarding its connection and creates the proper dial-up settings.

Downloads

Download demo project - 15 Kb