VB 有关VPN的问题,400分相送

来源:百度知道 编辑:UC知道 时间:2024/06/08 14:20:46
我想用VB来实现自动登录VPN的程序。
我在网上找了很长时间。有些只能创建VPN,却没IP。或者启动的时候显示窗体。另外,也需要关闭软件的时候把刚创建的VPN删除。请把程序测试成功了,再留言。回答的好的,另加400分。
求助............
创建以后,怎么删除呢?
求助............
创建以后,怎么删除呢?

建立 VPN 拨号全部代码如下:
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)

Private Type GUID
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(7) As Byte
End Type

Private Type RASIPADDR
a As Byte
b As Byte
c As Byte
d As Byte
End Type

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
szDevice