http协议//mfc种连接方式有什么不同之处
http协议//mfc类连接方式有什么不同之处?
------解决方案--------------------
CHttpFile *pFile = (CHttpFile *)netSession.OpenURL(http://192.168.1.85/-wvhttp-01-/info.cgi);
打开info.cgi表之后;
//这是短连接?
CInternetSession netSession = CInternetSession(_T("CanonVideoFrm"));
CHttpFile *pFile = (CHttpFile *)netSession.OpenURL(http://192.168.1.85/-wvhttp-01-/info.cgi);
//这是长连接?
CInternetSession inet;
CHttpConnection* pHttpCon;
CHttpFile *pFile
CString command;
command.Format("%s%d","/-wvhttp-01-/video.cgi?v=h264&0");
pHttpCon = inet.GetHttpConnection(hostIp,CHttpConnection::HTTP_VERB_GET
,80,NULL,NULL);
pFile = pHttpCon->OpenRequest(CHttpConnection::HTTP_VERB_GET,
command,NULL,1,NULL,_T("HTTP/1.1"),NULL);
pFile->SendRequest();
------解决方案--------------------
CHttpFile *pFile = (CHttpFile *)netSession.OpenURL(http://192.168.1.85/-wvhttp-01-/info.cgi);
打开info.cgi表之后;
表中数据是下面的 ; 然后,我while(1)循环使用readstring函数找到p.2.shade:=off字段;怎么遍历2遍
CString str;
BOOL r = pFile->ReadString(str);//chttpfile* pfile;
if(str.Find("p.2.shade:=off",0) != -1)
{
//str 一直等于"" 就循环前俩次有值的。。。。。//用错函数了???
}
p.2.pan:=-8075
p.2.tilt:=4162
p.2.zoom:=1660
p.2.focus:=auto
p.2.ae.brightness:=0
p.2.shade:=off
p.2.shade.param:=0
p.2.wb:=auto