Link to home
Start Free TrialLog in
Avatar of RPPreacher
RPPreacherFlag for United States of America

asked on

C++ to connect to PPTP VPN?

I have a working PPTP VPN server.  How can I use C++ to initiate the connection from the client? (I want to write code to "dial up" the VPN server.  The code will run from the client.)
Avatar of Gurudenis
Gurudenis
Flag of Ukraine image

I guess you'll need to use sockets and communicate according to the PPTP protocol.
For a tutorial on sockets, see: http://www.codeproject.com/KB/IP/winsockintro02.aspx

Here's an open-source implementation of PPTP:
http://pptpclient.sourceforge.net/
Avatar of RPPreacher

ASKER

The client is Microsoft Windows XP.  I already have a PPTP connection set up in the OS.  Is there a way to call that?
I think you can do that with TAPI, because Windows sees a PPTP connection as a regular dial-up connection. See:
http://www.codeproject.com/KB/IP/TAPISample.aspx
ASKER CERTIFIED SOLUTION
Avatar of Gurudenis
Gurudenis
Flag of Ukraine image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial