HttpQueryOption

Returns the status of the global or connection HTTP options.

Syntax

    #include <httpexp.h>
    #include <httpclnt.h> 
     
    int HttpQueryOption (
       HINTERNET   hndl,
       UINT32      option,
       void       *pBuffer,
       UINT32     *pBufferLen);
    

Parameters

hndl
(IN) Specifies one of the following handles:
  • For global settings, the handle returned by the HttpClientOpen function.
  • For connection settings, the handle returned by the HttpConnect function.
option
(IN) Specifies the option to view. Currently, only one option is available: HTTPCLNT_OPTION_CONNECT_TIMEOUT (3).
pBuffer
(OUT) Points to the buffer to receive the option information.
pBufferLen
(IN/OUT) Points to the length of pBuffer. Before calling this function, set this parameter to the maximum length of pBuffer. On a successful return, this parameter is set to the actual length of pBuffer. If pBuffer is too small for the response, returns the length of buffer needed.

Return Values

If successful, returns 0. Otherwise, returns a nonzero error code.

Decimal

Name

Description

119

ERR_BUFFER_TOO_SMALL

The pBuffer parameter is too small for the response data.

255

ERR_BAD_PARAMETER

An invalid parameter was passed to the function.

Remarks

You can view the option globally for all your HTTP connections or individually for one connection.

See Also