6 个解决方案
#1
没人回,我自己顶一下.
#2
LPRASENTRY lpRasEntry这个结构,lpRasEntry->dwEncryptionType这个项就是设置是否加密.0就代表不加密。
#3
我的是XP,我查了一下ras.h里面定义的头文件,找不到dwEncryptionType这个字段啊.
#define RASENTRYA struct tagRASENTRYA
RASENTRYA
{
DWORD dwSize;
DWORD dwfOptions;
//
// Location/phone number.
//
DWORD dwCountryID;
DWORD dwCountryCode;
CHAR szAreaCode[ RAS_MaxAreaCode + 1 ];
CHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
DWORD dwAlternateOffset;
//
// PPP/Ip
//
RASIPADDR ipaddr;
RASIPADDR ipaddrDns;
RASIPADDR ipaddrDnsAlt;
RASIPADDR ipaddrWins;
RASIPADDR ipaddrWinsAlt;
//
// Framing
//
DWORD dwFrameSize;
DWORD dwfNetProtocols;
DWORD dwFramingProtocol;
//
// Scripting
//
CHAR szScript[ MAX_PATH ];
//
// AutoDial
//
CHAR szAutodialDll[ MAX_PATH ];
CHAR szAutodialFunc[ MAX_PATH ];
//
// Device
//
CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
//
// X.25
//
CHAR szX25PadType[ RAS_MaxPadType + 1 ];
CHAR szX25Address[ RAS_MaxX25Address + 1 ];
CHAR szX25Facilities[ RAS_MaxFacilities + 1 ];
CHAR szX25UserData[ RAS_MaxUserData + 1 ];
DWORD dwChannels;
//
// Reserved
//
DWORD dwReserved1;
DWORD dwReserved2;
#if (WINVER >= 0x401)
//
// Multilink
//
DWORD dwSubEntries;
DWORD dwDialMode;
DWORD dwDialExtraPercent;
DWORD dwDialExtraSampleSeconds;
DWORD dwHangUpExtraPercent;
DWORD dwHangUpExtraSampleSeconds;
//
// Idle timeout
//
DWORD dwIdleDisconnectSeconds;
#endif
#if (WINVER >= 0x500)
//
// Port Name
//
CHAR szPortName[ RAS_MaxDeviceName + 1 ];
#endif
};
#define RASENTRYA struct tagRASENTRYA
RASENTRYA
{
DWORD dwSize;
DWORD dwfOptions;
//
// Location/phone number.
//
DWORD dwCountryID;
DWORD dwCountryCode;
CHAR szAreaCode[ RAS_MaxAreaCode + 1 ];
CHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
DWORD dwAlternateOffset;
//
// PPP/Ip
//
RASIPADDR ipaddr;
RASIPADDR ipaddrDns;
RASIPADDR ipaddrDnsAlt;
RASIPADDR ipaddrWins;
RASIPADDR ipaddrWinsAlt;
//
// Framing
//
DWORD dwFrameSize;
DWORD dwfNetProtocols;
DWORD dwFramingProtocol;
//
// Scripting
//
CHAR szScript[ MAX_PATH ];
//
// AutoDial
//
CHAR szAutodialDll[ MAX_PATH ];
CHAR szAutodialFunc[ MAX_PATH ];
//
// Device
//
CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
//
// X.25
//
CHAR szX25PadType[ RAS_MaxPadType + 1 ];
CHAR szX25Address[ RAS_MaxX25Address + 1 ];
CHAR szX25Facilities[ RAS_MaxFacilities + 1 ];
CHAR szX25UserData[ RAS_MaxUserData + 1 ];
DWORD dwChannels;
//
// Reserved
//
DWORD dwReserved1;
DWORD dwReserved2;
#if (WINVER >= 0x401)
//
// Multilink
//
DWORD dwSubEntries;
DWORD dwDialMode;
DWORD dwDialExtraPercent;
DWORD dwDialExtraSampleSeconds;
DWORD dwHangUpExtraPercent;
DWORD dwHangUpExtraSampleSeconds;
//
// Idle timeout
//
DWORD dwIdleDisconnectSeconds;
#endif
#if (WINVER >= 0x500)
//
// Port Name
//
CHAR szPortName[ RAS_MaxDeviceName + 1 ];
#endif
};
#4
typedef struct _RASENTRY {
DWORD dwSize;
DWORD dwfOptions;
DWORD dwCountryID;
DWORD dwCountryCode;
TCHAR szAreaCode[RAS_MaxAreaCode + 1];
TCHAR szLocalPhoneNumber[RAS_MaxPhoneNumber + 1];
DWORD dwAlternateOffset;
RASIPADDR ipaddr;
RASIPADDR ipaddrDns;
RASIPADDR ipaddrDnsAlt;
RASIPADDR ipaddrWins;
RASIPADDR ipaddrWinsAlt;
DWORD dwFrameSize;
DWORD dwfNetProtocols;
DWORD dwFramingProtocol;
TCHAR szScript[MAX_PATH];
TCHAR szAutodialDll[MAX_PATH];
TCHAR szAutodialFunc[MAX_PATH];
TCHAR szDeviceType[RAS_MaxDeviceType + 1];
TCHAR szDeviceName[RAS_MaxDeviceName + 1];
TCHAR szX25PadType[RAS_MaxPadType + 1];
TCHAR szX25Address[RAS_MaxX25Address + 1];
TCHAR szX25Facilities[RAS_MaxFacilities + 1];
TCHAR szX25UserData[RAS_MaxUserData + 1];
DWORD dwChannels;
DWORD dwReserved1;
DWORD dwReserved2;
DWORD dwSubEntries;
DWORD dwDialMode;
DWORD dwDialExtraPercent;
DWORD dwDialExtraSampleSeconds;
DWORD dwHangUpExtraPercent;
DWORD dwHangUpExtraSampleSeconds;
DWORD dwIdleDisconnectSeconds;
DWORD dwType;
DWORD dwEncryptionType;
DWORD dwCustomAuthKey;
GUID guidId;
TCHAR szCustomDialDll[MAX_PATH];
DWORD dwVpnStrategy;
DWORD dwfOptions2;
DWORD dwfOptions3;
TCHAR szDnsSuffix[RAS_MaxDnsSuffix];
DWORD dwTcpWindowSize;
TCHAR szPrerequisitePbk[MAX_PATH];
TCHAR szPrerequisiteEntry[RAS_MaxEntryName + 1];
DWORD dwRedialCount;
DWORD dwRedialPause;
RASIPV6ADDR ipv6addrDns;
RASIPV6ADDR ipv6addrDnsAlt;
DWORD dwIPv4InterfaceMetric;
DWORD dwIPv6InterfaceMetric;
RASIPV6ADDR ipv6addr;
DWORD dwIPv6PrefixLength;
DWORD dwNetworkOutageTime;
}RASENTRY, *PRASENTRY;
自己到msdn网站上面查。
DWORD dwSize;
DWORD dwfOptions;
DWORD dwCountryID;
DWORD dwCountryCode;
TCHAR szAreaCode[RAS_MaxAreaCode + 1];
TCHAR szLocalPhoneNumber[RAS_MaxPhoneNumber + 1];
DWORD dwAlternateOffset;
RASIPADDR ipaddr;
RASIPADDR ipaddrDns;
RASIPADDR ipaddrDnsAlt;
RASIPADDR ipaddrWins;
RASIPADDR ipaddrWinsAlt;
DWORD dwFrameSize;
DWORD dwfNetProtocols;
DWORD dwFramingProtocol;
TCHAR szScript[MAX_PATH];
TCHAR szAutodialDll[MAX_PATH];
TCHAR szAutodialFunc[MAX_PATH];
TCHAR szDeviceType[RAS_MaxDeviceType + 1];
TCHAR szDeviceName[RAS_MaxDeviceName + 1];
TCHAR szX25PadType[RAS_MaxPadType + 1];
TCHAR szX25Address[RAS_MaxX25Address + 1];
TCHAR szX25Facilities[RAS_MaxFacilities + 1];
TCHAR szX25UserData[RAS_MaxUserData + 1];
DWORD dwChannels;
DWORD dwReserved1;
DWORD dwReserved2;
DWORD dwSubEntries;
DWORD dwDialMode;
DWORD dwDialExtraPercent;
DWORD dwDialExtraSampleSeconds;
DWORD dwHangUpExtraPercent;
DWORD dwHangUpExtraSampleSeconds;
DWORD dwIdleDisconnectSeconds;
DWORD dwType;
DWORD dwEncryptionType;
DWORD dwCustomAuthKey;
GUID guidId;
TCHAR szCustomDialDll[MAX_PATH];
DWORD dwVpnStrategy;
DWORD dwfOptions2;
DWORD dwfOptions3;
TCHAR szDnsSuffix[RAS_MaxDnsSuffix];
DWORD dwTcpWindowSize;
TCHAR szPrerequisitePbk[MAX_PATH];
TCHAR szPrerequisiteEntry[RAS_MaxEntryName + 1];
DWORD dwRedialCount;
DWORD dwRedialPause;
RASIPV6ADDR ipv6addrDns;
RASIPV6ADDR ipv6addrDnsAlt;
DWORD dwIPv4InterfaceMetric;
DWORD dwIPv6InterfaceMetric;
RASIPV6ADDR ipv6addr;
DWORD dwIPv6PrefixLength;
DWORD dwNetworkOutageTime;
}RASENTRY, *PRASENTRY;
自己到msdn网站上面查。
#5
http://msdn.microsoft.com/en-us/library/aa377274(VS.85).aspx
上面里有dwEncryptionType的详细说明.
而且,我装了两个环境,我在VS2008下的C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\ras.h
里找到了你所说的结构体定义了.
上面里有dwEncryptionType的详细说明.
而且,我装了两个环境,我在VS2008下的C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\ras.h
里找到了你所说的结构体定义了.
#6
我也困扰了很久
#1
没人回,我自己顶一下.
#2
LPRASENTRY lpRasEntry这个结构,lpRasEntry->dwEncryptionType这个项就是设置是否加密.0就代表不加密。
#3
我的是XP,我查了一下ras.h里面定义的头文件,找不到dwEncryptionType这个字段啊.
#define RASENTRYA struct tagRASENTRYA
RASENTRYA
{
DWORD dwSize;
DWORD dwfOptions;
//
// Location/phone number.
//
DWORD dwCountryID;
DWORD dwCountryCode;
CHAR szAreaCode[ RAS_MaxAreaCode + 1 ];
CHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
DWORD dwAlternateOffset;
//
// PPP/Ip
//
RASIPADDR ipaddr;
RASIPADDR ipaddrDns;
RASIPADDR ipaddrDnsAlt;
RASIPADDR ipaddrWins;
RASIPADDR ipaddrWinsAlt;
//
// Framing
//
DWORD dwFrameSize;
DWORD dwfNetProtocols;
DWORD dwFramingProtocol;
//
// Scripting
//
CHAR szScript[ MAX_PATH ];
//
// AutoDial
//
CHAR szAutodialDll[ MAX_PATH ];
CHAR szAutodialFunc[ MAX_PATH ];
//
// Device
//
CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
//
// X.25
//
CHAR szX25PadType[ RAS_MaxPadType + 1 ];
CHAR szX25Address[ RAS_MaxX25Address + 1 ];
CHAR szX25Facilities[ RAS_MaxFacilities + 1 ];
CHAR szX25UserData[ RAS_MaxUserData + 1 ];
DWORD dwChannels;
//
// Reserved
//
DWORD dwReserved1;
DWORD dwReserved2;
#if (WINVER >= 0x401)
//
// Multilink
//
DWORD dwSubEntries;
DWORD dwDialMode;
DWORD dwDialExtraPercent;
DWORD dwDialExtraSampleSeconds;
DWORD dwHangUpExtraPercent;
DWORD dwHangUpExtraSampleSeconds;
//
// Idle timeout
//
DWORD dwIdleDisconnectSeconds;
#endif
#if (WINVER >= 0x500)
//
// Port Name
//
CHAR szPortName[ RAS_MaxDeviceName + 1 ];
#endif
};
#define RASENTRYA struct tagRASENTRYA
RASENTRYA
{
DWORD dwSize;
DWORD dwfOptions;
//
// Location/phone number.
//
DWORD dwCountryID;
DWORD dwCountryCode;
CHAR szAreaCode[ RAS_MaxAreaCode + 1 ];
CHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
DWORD dwAlternateOffset;
//
// PPP/Ip
//
RASIPADDR ipaddr;
RASIPADDR ipaddrDns;
RASIPADDR ipaddrDnsAlt;
RASIPADDR ipaddrWins;
RASIPADDR ipaddrWinsAlt;
//
// Framing
//
DWORD dwFrameSize;
DWORD dwfNetProtocols;
DWORD dwFramingProtocol;
//
// Scripting
//
CHAR szScript[ MAX_PATH ];
//
// AutoDial
//
CHAR szAutodialDll[ MAX_PATH ];
CHAR szAutodialFunc[ MAX_PATH ];
//
// Device
//
CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
//
// X.25
//
CHAR szX25PadType[ RAS_MaxPadType + 1 ];
CHAR szX25Address[ RAS_MaxX25Address + 1 ];
CHAR szX25Facilities[ RAS_MaxFacilities + 1 ];
CHAR szX25UserData[ RAS_MaxUserData + 1 ];
DWORD dwChannels;
//
// Reserved
//
DWORD dwReserved1;
DWORD dwReserved2;
#if (WINVER >= 0x401)
//
// Multilink
//
DWORD dwSubEntries;
DWORD dwDialMode;
DWORD dwDialExtraPercent;
DWORD dwDialExtraSampleSeconds;
DWORD dwHangUpExtraPercent;
DWORD dwHangUpExtraSampleSeconds;
//
// Idle timeout
//
DWORD dwIdleDisconnectSeconds;
#endif
#if (WINVER >= 0x500)
//
// Port Name
//
CHAR szPortName[ RAS_MaxDeviceName + 1 ];
#endif
};
#4
typedef struct _RASENTRY {
DWORD dwSize;
DWORD dwfOptions;
DWORD dwCountryID;
DWORD dwCountryCode;
TCHAR szAreaCode[RAS_MaxAreaCode + 1];
TCHAR szLocalPhoneNumber[RAS_MaxPhoneNumber + 1];
DWORD dwAlternateOffset;
RASIPADDR ipaddr;
RASIPADDR ipaddrDns;
RASIPADDR ipaddrDnsAlt;
RASIPADDR ipaddrWins;
RASIPADDR ipaddrWinsAlt;
DWORD dwFrameSize;
DWORD dwfNetProtocols;
DWORD dwFramingProtocol;
TCHAR szScript[MAX_PATH];
TCHAR szAutodialDll[MAX_PATH];
TCHAR szAutodialFunc[MAX_PATH];
TCHAR szDeviceType[RAS_MaxDeviceType + 1];
TCHAR szDeviceName[RAS_MaxDeviceName + 1];
TCHAR szX25PadType[RAS_MaxPadType + 1];
TCHAR szX25Address[RAS_MaxX25Address + 1];
TCHAR szX25Facilities[RAS_MaxFacilities + 1];
TCHAR szX25UserData[RAS_MaxUserData + 1];
DWORD dwChannels;
DWORD dwReserved1;
DWORD dwReserved2;
DWORD dwSubEntries;
DWORD dwDialMode;
DWORD dwDialExtraPercent;
DWORD dwDialExtraSampleSeconds;
DWORD dwHangUpExtraPercent;
DWORD dwHangUpExtraSampleSeconds;
DWORD dwIdleDisconnectSeconds;
DWORD dwType;
DWORD dwEncryptionType;
DWORD dwCustomAuthKey;
GUID guidId;
TCHAR szCustomDialDll[MAX_PATH];
DWORD dwVpnStrategy;
DWORD dwfOptions2;
DWORD dwfOptions3;
TCHAR szDnsSuffix[RAS_MaxDnsSuffix];
DWORD dwTcpWindowSize;
TCHAR szPrerequisitePbk[MAX_PATH];
TCHAR szPrerequisiteEntry[RAS_MaxEntryName + 1];
DWORD dwRedialCount;
DWORD dwRedialPause;
RASIPV6ADDR ipv6addrDns;
RASIPV6ADDR ipv6addrDnsAlt;
DWORD dwIPv4InterfaceMetric;
DWORD dwIPv6InterfaceMetric;
RASIPV6ADDR ipv6addr;
DWORD dwIPv6PrefixLength;
DWORD dwNetworkOutageTime;
}RASENTRY, *PRASENTRY;
自己到msdn网站上面查。
DWORD dwSize;
DWORD dwfOptions;
DWORD dwCountryID;
DWORD dwCountryCode;
TCHAR szAreaCode[RAS_MaxAreaCode + 1];
TCHAR szLocalPhoneNumber[RAS_MaxPhoneNumber + 1];
DWORD dwAlternateOffset;
RASIPADDR ipaddr;
RASIPADDR ipaddrDns;
RASIPADDR ipaddrDnsAlt;
RASIPADDR ipaddrWins;
RASIPADDR ipaddrWinsAlt;
DWORD dwFrameSize;
DWORD dwfNetProtocols;
DWORD dwFramingProtocol;
TCHAR szScript[MAX_PATH];
TCHAR szAutodialDll[MAX_PATH];
TCHAR szAutodialFunc[MAX_PATH];
TCHAR szDeviceType[RAS_MaxDeviceType + 1];
TCHAR szDeviceName[RAS_MaxDeviceName + 1];
TCHAR szX25PadType[RAS_MaxPadType + 1];
TCHAR szX25Address[RAS_MaxX25Address + 1];
TCHAR szX25Facilities[RAS_MaxFacilities + 1];
TCHAR szX25UserData[RAS_MaxUserData + 1];
DWORD dwChannels;
DWORD dwReserved1;
DWORD dwReserved2;
DWORD dwSubEntries;
DWORD dwDialMode;
DWORD dwDialExtraPercent;
DWORD dwDialExtraSampleSeconds;
DWORD dwHangUpExtraPercent;
DWORD dwHangUpExtraSampleSeconds;
DWORD dwIdleDisconnectSeconds;
DWORD dwType;
DWORD dwEncryptionType;
DWORD dwCustomAuthKey;
GUID guidId;
TCHAR szCustomDialDll[MAX_PATH];
DWORD dwVpnStrategy;
DWORD dwfOptions2;
DWORD dwfOptions3;
TCHAR szDnsSuffix[RAS_MaxDnsSuffix];
DWORD dwTcpWindowSize;
TCHAR szPrerequisitePbk[MAX_PATH];
TCHAR szPrerequisiteEntry[RAS_MaxEntryName + 1];
DWORD dwRedialCount;
DWORD dwRedialPause;
RASIPV6ADDR ipv6addrDns;
RASIPV6ADDR ipv6addrDnsAlt;
DWORD dwIPv4InterfaceMetric;
DWORD dwIPv6InterfaceMetric;
RASIPV6ADDR ipv6addr;
DWORD dwIPv6PrefixLength;
DWORD dwNetworkOutageTime;
}RASENTRY, *PRASENTRY;
自己到msdn网站上面查。
#5
http://msdn.microsoft.com/en-us/library/aa377274(VS.85).aspx
上面里有dwEncryptionType的详细说明.
而且,我装了两个环境,我在VS2008下的C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\ras.h
里找到了你所说的结构体定义了.
上面里有dwEncryptionType的详细说明.
而且,我装了两个环境,我在VS2008下的C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\ras.h
里找到了你所说的结构体定义了.
#6
我也困扰了很久