static UINT ThreadToWS(LPVOID lParam)
{
ASSERT(lParam)
if(NULL == lParam)
{
return 0
}
char m_EndPoint[MAX_PATH] = {0}
struct soap s
soap_set_mode(&s, SOAP_C_UTFSTRING)
CWnd* pDlg = (CWnd*)lParam
CWifiConfig cfg
TCHAR szAddr[100]
memset(szAddr, 0, sizeof(szAddr))
cfg.Read(_T("Wifi"), _T("IECheck"), szAddr, 99)
CString strUrl = szAddr
WideCharToMultiByte(CP_ACP,WC_COMPOSITECHECK,strUrl,strUrl.GetLength(),m_EndPoint,sizeof(m_EndPoint),NULL,NULL)
if(pDlg->IsKindOf(RUNTIME_CLASS(CDlgCheck)))
{
CDlgCheck* pTemp = (CDlgCheck*)lParam
ns6__hhtLogin query
ns6__hhtLoginResponse queryResponse
query.arg0 = pTemp->m_szUser.GetBuffer(0)
query.arg1 = pTemp->m_szPwd.GetBuffer(0)//日期
int iResult = soap_call___ns6__hhtLogin(&s, m_EndPoint,NULL, &query,&queryResponse)
if(iResult == 0)
{
SendMessage(pDlg->m_hWnd,WM_QUERY_OVER,0,(LPARAM)&queryResponse)
}
else
{
SendMessage(pDlg->m_hWnd,WM_QUERY_OVER,1,iResult)
}
}
}
这个看库。标准库也许是阻塞的你可以自己封装一些指令 发送后 对socket设置异步 然后在对异步响应中做出事件
我想官方的 肯定是阻塞的 因为要等待HTTP返回。也许你只能自己干了
欢迎分享,转载请注明来源:夏雨云
评论列表(0条)