Programmatically Create RAS connection and dial it

Posted on 2006-05-24
Last Modified: 2010-04-16
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.
Question by:digitalwav
    LVL 4

    Accepted Solution

    You could try a delphi RAS component
    LVL 16

    Expert Comment

    I dont know if this helps:

    Establishing a Dial-Up Connection to the Internet

    Also you could try this.


    {$R *.DFM}

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

    procedure TForm1.Button1Click(Sender: TObject);
     PhoneNumber, AppName: array[0..255] of Char;
     PhoneNumber := '1234567890';
     StrPCopy(AppName, Application.Title);
     tapiRequestMakeCall(PhoneNumber, AppName, '', '');
    LVL 1

    Author Comment

    My hero! RasX rocks!

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
    Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    This video discusses moving either the default database or any database to a new volume.

    746 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

    16 Experts available now in Live!

    Get 1:1 Help Now