I am basically trying to connect to a VPN connection using the windows api. It works like a charm on any windows 32bit systems. It always connects. But when I try to connect it on a 64 bit system. It always fails. Please could you suggest, if I am doing anything wrong.
这是我的法典:
LPRASDIALPARAMS rdParams;
DWORD cb = sizeof(RASDIALPARAMS);
rdParams = (LPRASDIALPARAMS)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, cb);
rdParams->dwSize = sizeof(RASDIALPARAMS);
dwError |= StringCbCopyW( rdParams->szEntryName,
sizeof(rdParams->szEntryName), yourProfile.c_str() );
dwError |= StringCbCopyW( rdParams->szPhoneNumber,
sizeof(rdParams->szPhoneNumber), yourUrl.c_str() );
dwError |= StringCbCopyW( rdParams->szUserName,
sizeof(rdParams->szUserName), yourUser.c_str());
dwError |= StringCbCopyW( rdParams->szPassword,
sizeof(rdParams->szPassword), yourPassword.c_str() );
dwError |= StringCbCopyW( rdParams->szDomain,
sizeof(rdParams->szDomain), yourGroupName.c_str());
dwError |= StringCbCopyW( rdParams->szDomain,
sizeof(rdParams->szDomain), L" ");
HRASCONN hRasConn = NULL;
DWORD dwRet = RasDial( NULL, pbkPath.c_str(),
rdParams, 0, 0L, &hRasConn );
我是否需要专门建立64个轨道系统。