Programmatically Create RAS connection and dial it

I am working on an app that needs to create a predefined VPN/RAS connection and auto dial it.  I'm positive this can be done with API calls, but I have no idea how.

Any Delphi or VB examples would be much appreciated.
LVL 1
digitalwavIT Infrastructure ManagerAsked:
Who is Participating?
 
JDSkinnerCommented:
You could try a delphi RAS component
http://www.torry.net/authorsmore.php?id=6216
0
 
CodedKCommented:
I dont know if this helps:

Establishing a Dial-Up Connection to the Internet
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/establishing_a_dial_up_connection_to_the_internet.asp

Also you could try this.

implementation

{$R *.DFM}

function tapiRequestMakeCall(DestAddress, AppName,
 CalledParty, Comment: PChar): Longint; stdcall; external 'TAPI32.DLL';

procedure TForm1.Button1Click(Sender: TObject);
var
 PhoneNumber, AppName: array[0..255] of Char;
begin
 PhoneNumber := '1234567890';
 StrPCopy(AppName, Application.Title);
 tapiRequestMakeCall(PhoneNumber, AppName, '', '');
end;
0
 
digitalwavIT Infrastructure ManagerAuthor Commented:
My hero! RasX rocks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.