This project is read-only.

Get VPN Connection Status

Aug 7, 2009 at 9:44 PM

Good time. First I would like to thank the creators of this project, which greatly simplifies the task to me! Many thanks. If my project will come, be sure to express my gratitude in tangible form. I have a question: How can I get status my VPN connection, which I get from the PhoneBook? For example, I have a VPN connection with the name "MyVpnConnect" in the code I write: 

if(phoneBook.Entry [ "MyVpnConnect"].(What Method return connect status - connected or disconnected?) == true)


               phoneBook.Entry [ "MyVpnConnect"].(What MethodDissconnect VPN connection?);


Aug 8, 2009 at 1:57 AM

I realized how to do it! Once cleaned up in your code and write it correctly, with comments, I am ready to publish his version!

Aug 8, 2009 at 5:40 PM

The only way to tell if a connection is active, is to call the GetActiveConnections() method on the RasDialer class. Enumerate through the loop of available connections, and check it there.