Dennis,
This worked a treat.
I see what you are doing. the first call returns the size of the buffer, the second call actually returns the status code.
I am now struggling with InternetSetOption... again it keeps hanging...
Any ideas?
Mace
>Here's the function I use to get the status. It's worked pretty good for me. hFile is a handle returned from HttpSendRequest().
>
>Function HTTPStatus(hFile as long) as long
>Dim sBuf As String, nStatus As Long, nSize as long
>HttpQueryInfo hFile, HTTP_QUERY_STATUS_CODE, ByVal (sBuf), nSize, 0
>If nSize > 0 Then
> sBuf = Space(nSize)
> HttpQueryInfo hFile, HTTP_QUERY_STATUS_CODE, ByVal (sBuf), nSize, 0
> If sBuf <> "" Then
> nStatus = Val(sBuf)
> End If
>End If
>End Function
>
>Dennis
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only