急,急 URLDownloadToFile 失败
问题描述:
1. 用DMProcessConfigXML写配置文件,新建一个wap的连接账号,同时得到连接的GUID。(是wap的)
2. 使用ConnMgrEstablishConnectionSync连接这个wap.(经测试wap网络是可用的)
3. 使用DeleteUrlCacheEntry(filename)和URLDownloadToFile(NULL, szURL, filename, 0, 0)去下载文件。
URL:http://update-stage.extranet.sonyericsson.com/restr2r/settings?mcc=460&mnc=00&spname=CMCC
也有使过代理方式:http:// 10.0.0.172:80/http://update-stage.extranet.sonyericsson.com/restr2r/settings?mcc=460&mnc=00&spname=CMCC
结果:函数返回成功,但得到的是文件如下。socket 得到的也是这样。
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head>
<meta http-equiv="Cache-Control" content="max-age=0" forua="true"/>
<meta http-equiv="Cache-Control" content="no-cache" forua="true"/>
<meta http-equiv="Cache-Control" content="must-revalidate" forua="true"/>
</head>
<card id="card" title="" >
<onevent type="onenterforward">
<go href="http://update-stage.extranet.sonyericsson.com/restr2r/settings?mcc=460&mnc=00&spname=CMCC&imei=004401078503014&cmcc=460&cmnc=00&model=B200&t=11243"></go>
</onevent>
</card>
</wml>
4.释放连接(我做的释放连接是必要的)。