Link to home
Start Free TrialLog in
Avatar of pxiao
pxiao

asked on

how to use HttpQueryInfo in VB?

hi, experts,
I need to use HttpQueryInfo() to get back Http response information from server such as statuscode. I used the following code in VB as:

Dim dwStatus As String * 1024
Dim bRet As Boolean, dwLen As Long
dwLen = 1024
bRet = HttpQueryInfo(hHttpRequest, HTTP_QUERY_STATUS_CODE, dwStatus, dwLen, "")

but, I always got bRet = False. I'm sure the server-side code is correct to send back its response information. I guess the problem is the argument dwLen of DLL: HttpQueryInfo() because it needs a pointer in definition. From VB I can't find how to declare a pointer.

By the way, we use Wininet.dll in client/server codes under WinNT and ISAPI platform.

Does Any expert has answer or clue for the problem?

thanks in advance,
ASKER CERTIFIED SOLUTION
Avatar of Vbmaster
Vbmaster

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pxiao
pxiao

ASKER

thanks very much. Your information is very helpful.
Hi,

I need the same solution but i dont get access to the url. Can you help me asap.

regards,
Prashanth