MapURLAndGUID(L"http://wap.163.com",application->guid);
CONNMGR_CONNECTIONINFO connection;
ZeroMemory(&connection, sizeof(connection));
connection.cbSize = sizeof(connection);
connection.dwParams = CONNMGR_PARAM_GUIDDESTNET;
connection.dwFlags = CONNMGR_FLAG_PROXY_WAP;
connection.dwPriority = CONNMGR_PRIORITY_USERINTERACTIVE;
connection.bExclusive = FALSE;
connection.bDisabled = FALSE;
connection.guidDestNet = application->guid;
application->hConnection = NULL;
DWORD dwStatus = 0;
DWORD dwTimeout = 20000;
SetLastError(0);
DWORD lastError;
HRESULT hResults=ConnMgrEstablishConnectionSync(&connection, &application->hConnection, dwTimeout,&dwStatus);//Á¬½Óʧ°Ü?
»ñÈ¡getlastError·µ»ØµÄ´íÎóÊÇ183£¬ÈçºÎ½â¾öѽ£¿ÕâÑù½¨Á¢wapÁ¬½ÓÊÇÕýÈ·µÄÂð
//Ô¶³ÌURLÓ³ÉäµÄ·½Ê½À´ÈÃϵͳ×Ô¶¯Ñ¡È¡Ò»¸ö×îºÃµÄÁ¬½Ó¡£
int BaseRequest::MapURLAndGUID(LPCTSTR lpszURL,OUT GUID &guidNetworkObject)
{
CONNMGR_DESTINATION_INFO DestInfo = {0};
if ( !lpszURL || lstrlen(lpszURL) < 1 )
return FALSE;
memset( &guidNetworkObject,0,sizeof(GUID));
int nIndex = 0;
HRESULT hResult = ConnMgrMapURL(lpszURL,&guidNetworkObject,(DWORD*)&nIndex);
if (FAILED(hResult))
ÓÃasp.net¿ª·¢wapÍøÕ¾£¬ÔÚ¼ÆËã»úÉÏÓÃopera·ÃÎÊÕý³££¬µ«ÊÇÓÃÊÖ»ú·ÃÎʵÄʱºò£¬ÓеÄÊÖ»úÁ¬Îı¾¿ò¶¼ÏÔʾ²»³öÀ´£¬ÓеÄÊÖ»úÏÔʾ³öÀ´Ò²ÎÞ·¨»ñÈ¡½¹µãÊäÈë,ÇëÎÊÔõô½â¾ö
²»¶® °ï¶¥
±àÒëµÄ·½Ê½²»Ò»Ñù£¬Ö±°×µã˵¾ÍÊÇÔËÐл·¾ ......