'RASCREDENTIALS

Private Type RASCREDENTIALS
  dwSize As Long
  dwMask As Long
  szUserName As String * 257 'UNLEN+1
  szPassword As String * 257 'PWLEN+1
  szDomain As String * 16 'DNLEN+1
End Type

'RASCredMask

Public Enum RASCredMask
   RASCM_UserName = &H1&
   RASCM_password = &H2&
   RASCM_Domain = &H4&
   RASCM_DefaultCreds = &H8&
   RASCM_PreSharedKey = &H10&
   RASCM_ServerPreSharedKey = &H20&
   RASCM_DDMPreSharedKey = &H40&
End Enum

'RasEntryOptions

Public Enum RasEntryOptions
RASEO_UseCountryAndAreaCodes = &H1
RASEO_SpecificIpAddr = &H2
RASEO_SpecificNameServers = &H4
RASEO_IpHeaderCompression = &H8
RASEO_RemoteDefaultGateway = &H10
RASEO_DisableLcpExtensions = &H20
RASEO_TerminalBeforeDial = &H40
RASEO_TerminalAfterDial = &H80
RASEO_ModemLights = &H100
RASEO_SwCompression = &H200
RASEO_RequireEncryptedPw = &H400
RASEO_RequireMsEncryptedPw = &H800
RASEO_RequireDataEncryption = &H1000
RASEO_NetworkLogon = &H2000
RASEO_UseLogonCredentials = &H4000
RASEO_PromoteAlternates = &H8000
RASEO_SecureLocalFiles = &H10000
RASEO_RequireEAP = &H20000
RASEO_RequirePAP = &H40000
RASEO_RequireSPAP = &H80000
RASEO_Custom = &H100000
RASEO_PreviewPhoneNumber = &H200000
RASEO_SharedPhoneNumbers = &H800000
RASEO_PreviewUserPw = &H1000000
RASEO_PreviewDomain = &H2000000
RASEO_ShowDialingProgress = &H4000000
RASEO_RequireCHAP = &H8000000
RASEO_RequireMsCHAP = &H10000000
RASEO_RequireMsCHAP2 = &H20000000
RASEO_RequireW95MSCHAP = &H40000000
RASEO_CustomScript = &H80000000
End Enum

'RasEntryOptions2

Public Enum RasEntryOptions2
RASEO2_SecureFileAndPrint = &H1
RASEO2_SecureClientForMSNet = &H2
RASEO2_DontNegotiateMultilink = &H4
RASEO2_DontUseRasCredentials = &H8
RASEO2_UsePreSharedKey = &H10
RASEO2_Internet = &H20
RASEO2_DisableNbtOverIP = &H40
RASEO2_UseGlobalDeviceSettings = &H80
RASEO2_ReconnectIfDropped = &H100
RASEO2_SharePhoneNumbers = &H200
RASEO2_SecureRoutingCompartment = &H400
RASEO2_IPv6SpecificNameServer = &H800
RASEO2_IPv6RemoteDefaultGateway = &H1000
RASEO2_RegisterIpWithDNS = &H2000
RASEO2_UseDNSSuffixForRegistration = &H4000
RASEO2_IPv4ExplicitMetric = &H8000
RASEO2_IPv6ExplicitMetric = &H10000
RASEO2_DisableIKENameEkuCheck = &H20000
End Enum

'dwEncryptionType 数据加密类型
Private Const ET_None                     As Long = 0               '   No   encryption
Private Const ET_Require               As Long = 1               '   Require   Encryption
Private Const ET_RequireMax         As Long = 2               '   Require   max   encryption
Private Const ET_Optional             As Long = 3               '   Do   encryption   if   possible.   None   Ok.

'dwVpnStrategy vpn类型
Private Const VS_Default               As Long = 0               '   default   (PPTP   for   now)
Private Const VS_PptpOnly             As Long = 1               '   Only   PPTP   is   attempted.
Private Const VS_PptpFirst           As Long = 2               '   PPTP   is   tried   first.
Private Const VS_L2tpOnly             As Long = 3               '   Only   L2TP   is   attempted.
Private Const VS_L2tpFirst           As Long = 4               '   L2TP   is   tried   first.

'dwType 拨号类型
Private Const RASET_Phone             As Long = 1             '   Phone   lines:   modem,   ISDN,   X.25,   etc
Private Const RASET_Vpn                 As Long = 2             '   Virtual   private   network
Private Const RASET_Direct           As Long = 3             '   Direct   connect:   serial,   parallel
Private Const RASET_Internet       As Long = 4               '   BaseCamp   internet
Private Const RASET_Broadband       As Long = 5           '   Broadband

'拨号/断网

Private Const INTERNET_DIALSTATE_DISCONNECTED = 1
Private Const INTERNET_AUTODIAL_FORCE_ONLINE = 1
Private Const INTERNET_AUTODIAL_FORCE_UNATTENDED = 2
Private Const INTERNET_DIAL_UNATTENDED = &H8000

posted on 2011-04-02 10:49  sunjun0427  阅读(1235)  评论(0编辑  收藏  举报