locked
Creating VPN connection RRS feed

  • Question

  • I try to create a VPN connection with RAS API

        RASENTRY    rasEntry = {};
    
        rasEntry.dwSize = sizeof(rasEntry);
    
        rasEntry.dwfOptions = RASEO_RequireMsCHAP2;
    
        rasEntry.dwFramingProtocol = RASFP_Ppp;
        rasEntry.dwType = RASET_Vpn;
        rasEntry.dwfNetProtocols = RASNP_Ip|RASNP_Ipv6;
        rasEntry.dwVpnStrategy = VS_PptpOnly;
        rasEntry.dwEncryptionType = ET_RequireMax;
    
        StringCchCopyNW(rasEntry.szDeviceName, RAS_MaxDeviceName, deviceName, sizeof(deviceName) - 1 );
        StringCchCopyNW(rasEntry.szDeviceType, RAS_MaxDeviceType, RASDT_Vpn, sizeof(RASDT_Vpn) - 1 );
        StringCchCopyNW(rasEntry.szLocalPhoneNumber, RAS_MaxPhoneNumber, vpnAddr, sizeof(vpnAddr) - 1 );
    
        DWORD  result;
    
        result = RasValidateEntryName(NULL, vpnEntryName);
    
        result = RasSetEntryProperties(NULL, vpnEntryName, &rasEntry, rasEntry.dwSize, NULL, 0);
    It works fine. Now I want to setup VPN for using EAP with certificate ( EAP-TLS ). How can I do it without UI dialog for EAP configuration?
    Wednesday, September 12, 2012 1:29 PM