Private Type RASENTRY dwSize As Long dwfOptions As Long dwCountryID As Long dwCountryCode As Long szAreaCode(10) As Byte szLocalPhoneNumber(128) As Byte dwAlternateOffset As Long ipaddr As RASIPADDR ipaddrDns As RASIPADDR ipaddrDnsAlt As RASIPADDR ipaddrWins As RASIPADDR ipaddrWinsAlt As RASIPADDR dwFrameSize As Long dwfNetProtocols As Long dwFramingProtocol As Long szScript(259) As Byte szAutodialDll(259) As Byte szAutodialFunc(259) As Byte szDeviceType(16) As Byte szDeviceName(128) As Byte szX25PadType(32) As Byte szX25Address(200) As Byte szX25Facilities(200) As Byte szX25UserData(200) As Byte dwChannels As Long dwReserved1 As Long dwReserved2 As Long dwSubEntries As Long dwDialMode As Long dwDialExtraPercent As Long dwDialExtraSampleSeconds As Long dwHangUpExtraPercent As Long dwHangUpExtraSampleSeconds As Long dwIdleDisconnectSeconds As Long dwType As Long dwEncryptionType As Long dwCustomAuthKey As Long guidId As GUID szCustomDialDll(259) As Byte dwVpnStrategy As Long dwfOptions2 As Long dwfOptions3 As Long szDnsSuffix(255) As Byte dwTcpWindowSize As Long szPrerequisitePbk(259) As Byte szPrerequisiteEntry(256) As Byte dwRedialCount As Long dwRedialPause As Long End TypeCreate_VPN_Connection = False Dim re As RASENTRY Dim sDeviceName As String, sDeviceType As String sDeviceName = "WAN 微型端口 (L2TP)" sDeviceType = "vpn" With re .dwSize = LenB(re) ' .dwCountryCode = 86 ' .dwCountryID = 86 ' .dwDialExtraPercent = 75 ' .dwDialExtraSampleSeconds = 120 ' .dwDialMode = 1 ' .dwfNetProtocols = 4 ' .dwfOptions = 1024262928 ' .dwfOptions2 = 367 ' .dwFramingProtocol = 1 ' .dwHangUpExtraPercent = 10 ' .dwHangUpExtraSampleSeconds = 120 ' .dwRedialCount = 3 ' .dwRedialPause = 60 ' .dwType = 5 ' RASET_Vpn .dwVpnStrategy = VS_Default 'vpn类型 .dwEncryptionType = ET_Optional ' '数据加密类型 不知道哪个是 求数据加密(没有就断开)属性 的 是否有相关的资料可以查
dwSize As Long
dwfOptions As Long
dwCountryID As Long
dwCountryCode As Long
szAreaCode(10) As Byte
szLocalPhoneNumber(128) As Byte
dwAlternateOffset As Long
ipaddr As RASIPADDR
ipaddrDns As RASIPADDR
ipaddrDnsAlt As RASIPADDR
ipaddrWins As RASIPADDR
ipaddrWinsAlt As RASIPADDR
dwFrameSize As Long
dwfNetProtocols As Long
dwFramingProtocol As Long
szScript(259) As Byte
szAutodialDll(259) As Byte
szAutodialFunc(259) As Byte
szDeviceType(16) As Byte
szDeviceName(128) As Byte
szX25PadType(32) As Byte
szX25Address(200) As Byte
szX25Facilities(200) As Byte
szX25UserData(200) As Byte
dwChannels As Long
dwReserved1 As Long
dwReserved2 As Long
dwSubEntries As Long
dwDialMode As Long
dwDialExtraPercent As Long
dwDialExtraSampleSeconds As Long
dwHangUpExtraPercent As Long
dwHangUpExtraSampleSeconds As Long
dwIdleDisconnectSeconds As Long
dwType As Long
dwEncryptionType As Long
dwCustomAuthKey As Long
guidId As GUID
szCustomDialDll(259) As Byte
dwVpnStrategy As Long
dwfOptions2 As Long
dwfOptions3 As Long
szDnsSuffix(255) As Byte
dwTcpWindowSize As Long
szPrerequisitePbk(259) As Byte
szPrerequisiteEntry(256) As Byte
dwRedialCount As Long
dwRedialPause As Long
End TypeCreate_VPN_Connection = False Dim re As RASENTRY
Dim sDeviceName As String, sDeviceType As String
sDeviceName = "WAN 微型端口 (L2TP)"
sDeviceType = "vpn"
With re
.dwSize = LenB(re) '
.dwCountryCode = 86 '
.dwCountryID = 86 '
.dwDialExtraPercent = 75 '
.dwDialExtraSampleSeconds = 120 '
.dwDialMode = 1 '
.dwfNetProtocols = 4 '
.dwfOptions = 1024262928 '
.dwfOptions2 = 367 '
.dwFramingProtocol = 1 '
.dwHangUpExtraPercent = 10 '
.dwHangUpExtraSampleSeconds = 120 '
.dwRedialCount = 3 '
.dwRedialPause = 60 '
.dwType = 5 ' RASET_Vpn
.dwVpnStrategy = VS_Default 'vpn类型
.dwEncryptionType = ET_Optional ' '数据加密类型
不知道哪个是 求数据加密(没有就断开)属性 的
是否有相关的资料可以查