HttpSetOption

Sets either a global or a connection option.

Syntax

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

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 set. Currently, only one option is available: HTTPCLNT_OPTION_CONNECT_TIMEOUT (3).
pBuffer
(IN) Points to the buffer to containing the set data for the option.
pBufferLen
(IN) Points to the length of pBuffer.

Return Values

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

Decimal

Name

Description

0xFF

ERR_BAD_PARAMETER

An invalid parameter was passed to the function.

Remarks

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

See Also