我现在用代码实现了VPN的连接,但是我的服务器不支持加密的数据格式,我想去掉数据加密的选项
相关代码如下:DWORD CRasClient::CreateNewEntry(CString strEntry,
CString strDeviceType,
CString strDeviceName,
DWORD dwfNetProtocols, DWORD dwFrameProtocal,
CString strLocalPhone,
CString strPhoneBook /*=NULL*/)
{
LPTSTR lpszEntry = strEntry.GetBuffer(1);
strEntry.ReleaseBuffer();
LPTSTR lpszPhoneBook = strPhoneBook.GetBuffer(1);
if(strPhoneBook == _T(""))
lpszPhoneBook = NULL;
strPhoneBook.ReleaseBuffer();
if(RasValidateEntryName(lpszPhoneBook, lpszEntry) != ERROR_ALREADY_EXISTS)
{
RASENTRY rasEntry;
::ZeroMemory(&rasEntry, sizeof(rasEntry));
rasEntry.dwSize = sizeof(rasEntry);
strcpy(rasEntry.szLocalPhoneNumber, strLocalPhone);
rasEntry.dwfNetProtocols = dwfNetProtocols;
rasEntry.dwFramingProtocol = dwFrameProtocal;
// DON'T USE "RASDT_Modem", use "modem", otherwise dwRV = 87
strcpy(rasEntry.szDeviceType, strDeviceType);
strcpy(rasEntry.szDeviceName, strDeviceName);
rasEntry.dwfOptions=RASEO_ModemLights|RASEO_SwCompression; DWORD dwRV = RasSetEntryProperties(lpszPhoneBook, (char*)lpszEntry, &rasEntry,
sizeof(rasEntry), NULL, 0);
return dwRV;
}
return ERROR_ALREADY_EXISTS;
}
在这里不是rasEntry.dwfOptions=RASEO_ModemLights|RASEO_SwCompression;这句是设置vpn连接的属性的吗?
Private Const RASEO_RequireDataEncryption As Long = &H1000 '是否选用需要数据加密
我明明没有加这个参数,为什么生成的VPN连接默认的属性就是数据加密的呢,我应该怎么解决这个问题啊
相关代码如下:DWORD CRasClient::CreateNewEntry(CString strEntry,
CString strDeviceType,
CString strDeviceName,
DWORD dwfNetProtocols, DWORD dwFrameProtocal,
CString strLocalPhone,
CString strPhoneBook /*=NULL*/)
{
LPTSTR lpszEntry = strEntry.GetBuffer(1);
strEntry.ReleaseBuffer();
LPTSTR lpszPhoneBook = strPhoneBook.GetBuffer(1);
if(strPhoneBook == _T(""))
lpszPhoneBook = NULL;
strPhoneBook.ReleaseBuffer();
if(RasValidateEntryName(lpszPhoneBook, lpszEntry) != ERROR_ALREADY_EXISTS)
{
RASENTRY rasEntry;
::ZeroMemory(&rasEntry, sizeof(rasEntry));
rasEntry.dwSize = sizeof(rasEntry);
strcpy(rasEntry.szLocalPhoneNumber, strLocalPhone);
rasEntry.dwfNetProtocols = dwfNetProtocols;
rasEntry.dwFramingProtocol = dwFrameProtocal;
// DON'T USE "RASDT_Modem", use "modem", otherwise dwRV = 87
strcpy(rasEntry.szDeviceType, strDeviceType);
strcpy(rasEntry.szDeviceName, strDeviceName);
rasEntry.dwfOptions=RASEO_ModemLights|RASEO_SwCompression; DWORD dwRV = RasSetEntryProperties(lpszPhoneBook, (char*)lpszEntry, &rasEntry,
sizeof(rasEntry), NULL, 0);
return dwRV;
}
return ERROR_ALREADY_EXISTS;
}
在这里不是rasEntry.dwfOptions=RASEO_ModemLights|RASEO_SwCompression;这句是设置vpn连接的属性的吗?
Private Const RASEO_RequireDataEncryption As Long = &H1000 '是否选用需要数据加密
我明明没有加这个参数,为什么生成的VPN连接默认的属性就是数据加密的呢,我应该怎么解决这个问题啊
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货