How to programmatically connect/disconnect a Windows 10 VPN connection?

S

shaniali35k

I have self-written app in C++ that needs to connect specified VPN connection on my PC (the standard Windows VPN connection). When I had Windows 7 the app did this by getting IShellFolder pointer for the Network connections folder, then requested IContextMenu pointer for the specified connection and then called the InvokeCommand method (using the 2 as command ID which corresponded to the "Connect" item). It worked OK.But now I moved to Windows 10 and this method does not work anymore - even if you open the Network Connections folder manually, right click the VPN connection and select "Connect

Continue reading...
 
Back
Top Bottom