| > urlComponents.lpszUrlPath = strObject.GetBuffer(INTERNET_MAX_PATH_LENGTH+1); urlComponents.dwUserNameLength = INTERNET_MAX_USER_NAME_LENGTH; urlComponents.lpszUserName = strUsername.GetBuffer(INTERNET_MAX_USER_NAME_LENGTH+1); urlComponents.dwPasswordLength = INTERNET_MAX_PASSWORD_LENGTH; urlComponents.lpszPassword = strPassword.GetBuffer(INTERNET_MAX_PASSWORD_LENGTH+1);
BOOL bRetVal = _AfxParseURLWorker(pstrURL, &urlComponents, dwServiceType, nPort, dwFlags);
strServer.ReleaseBuffer(); strObject.ReleaseBuffer(); strUsername.ReleaseBuffer(); strPassword.ReleaseBuffer(); return bRetVal; }
BOOL AFXAPI AfxParseURL(LPCTSTR pstrURL, DWORD& dwServiceType, CString& strServer, CString& strObject, INTERNET_PORT& nPort) { dwServiceType = AFX_INET_SERVICE_UNK;
ASSERT(pstrURL != NULL); if (pstrURL == NULL) return FALSE;
URL_COMPONENTS urlComponents; memset(&urlComponents, 0, sizeof(URL_COMPONENTS)); urlComponents.dwStructSize = sizeof(URL_COMPONENTS);
urlComponents.dwHostNameLength = INTERNET_MAX_URL_LENGTH; urlComponents.lpszHostName = strServer.GetBuffer(INTERNET_MAX_URL_LENGTH+1); urlComponents.dwUrlPathLength = INTERNET_MAX_URL_LENGTH; urlComponents.lpszUrlPath = strObject.GetBuffer(INTERNET_MAX_URL_LENGTH+1); 上一页 [1] [2] [3] [4] [5] [6] 下一页 |