I am trying to setup a VPN connection programmatically. Everything works fine in XP/Vista/7 but in one particular situation, it fails under Windows 8.
In my code, I check if a given Ras entry exists. If not I create it. I then check if there is already an active connection. If not, I call RadDialDlg to initiate the connection. At this point, it works well on all systems.
In windows 8, if the vpn connection is already connected and has been connected through RasDialDlg, RasGetProjectionInfo(hConn, RasPppIp...) works well. However, if I manually connect to the vpn by clicking the network icon on the task bar (through the blue band that opens at the right of the screen), I can connect to the vpn but RasGetProjectionInfo(hConn, RasPppIp...) returns error ERROR_PROTOCOL_NOT_CONFIGURED (error code 731).
Anyone knows why or has a workaround? I see no other way to obtain the IP address of the server.
Thanks !