当前位置: 代码迷 >> PB >> HttpOpenRequest总是不成功,请
  详细解决方案

HttpOpenRequest总是不成功,请

热度:52   发布时间:2016-04-29 08:49:39.0
HttpOpenRequest总是不成功,请高手指点
InternetOpen和InternetConnect都能正确提供句柄
HttpOpenRequest总是返回0

Function ulong HttpOpenRequest (ulong hConnect,ref string lpszVerb,ref string lpszObjectName,ref string lpszVersion,ref string lpszReferrer,ref string lplpszAcceptTypes[], ulong dwFlags,ref ulong dwContext) Library "WININET.DLL" Alias for "HttpOpenRequestA"


string lpszVerb
 string lpszObjectName
 string lpszVersion
 string lpszReferrer
 string lplpszAcceptTypes[]
 ulong dwContext
 lpszVerb="GET"
 lpszObjectName="upfile/200621714544982086.jpg"
 lpszVersion="HTTP/1.1"
 SetNull(lpszReferrer)
lplpszAcceptTypes[]={""}
dwContext=2

iis5=HttpOpenRequest(iis3,lpszVerb,lpszObjectName,lpszVersion,lpszReferrer,lplpszAcceptTypes[],INTERNET_FLAG_RELOAD,dwContext)
敬请高手指点

------解决方案--------------------
pb版本?
如果高于9,声明的后面需要改成

"HttpOpenRequestA;ansi"
  相关解决方案