HttpQueryInfo
Extracts information from the message header.
Syntax
#include <httpexp.h>
#include <httpclnt.h>
int HttpQueryInfo (
HINTERNET hndl,
UINT32 dwInfoLevel,
void *pBuffer,
UINT32 *pBufferLength);
Parameters
- hndl
- (IN) Specifies the client connection handle or the
HTTP stack handle.
- dwInfoLevel
- (IN) Specifies a combination of an attribute to
retrieve and the flags that modify the request. See Section 6.2, Query Request Information.
- pBuffer
- (IN/OUT) Points to the buffer that receives
the information.
- pBufferLength
- (IN/OUT) Points to the length of the buffer.
When the function returns, points to the length of the information
written to the buffer. When the function returns a string, the following
rules apply:
- If the function succeeds, the length
returned is the length of the string, in characters, minus 1 for
the NULL-terminating character.
- If the function fails and the error returned is
ERR_BUFFER_TOO_SMALL, the length returned
indicates the number of bytes you must allocate to receive the string.
Return Values
If successful, returns 0. Otherwise, returns a nonzero error
code.
Remarks
The HttpQueryInfo function is used to extract different named
attributes from the message header into a caller supplied buffer.