共用方式為


InternetSetOption

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function sets an Internet option on the specified handle.

Syntax

BOOL WINAPI InternetSetOption(
  HINTERNET hInternet, 
  DWORD dwOption, 
  LPVOID lpBuffer, 
  DWORD dwBufferLength
);

Parameters

  • hInternet
    [in] Internet handle on which to set information.
  • dwOption
    [in] Specifies the Internet option to set. The following Option Flags values are supported:

    • INTERNET_OPTION_CONTEXT_VALUE
    • INTERNET_OPTION_CONNECT_TIMEOUT
    • INTERNET_OPTION_CONNECT_RETRIES
    • INTERNET_OPTION_CONNECT_BACKOFF
    • INTERNET_OPTION_CONTROL_SEND_TIMEOUT
    • INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT
    • INTERNET_OPTION_DATA_SEND_TIMEOUT
    • INTERNET_OPTION_DATA_RECEIVE_TIMEOUT
    • INTERNET_OPTION_READ_BUFFER_SIZE
    • INTERNET_OPTION_WRITE_BUFFER_SIZE
    • INTERNET_OPTION_USERNAME
    • INTERNET_OPTION_PASSWORD
    • INTERNET_OPTION_PROXY
    • INTERNET_OPTION_USER_AGENT
    • INTERNET_OPTION_RECEIVE_TIMEOUT
    • INTERNET_OPTION_SERVER_CERT_CONTEXT
  • lpBuffer
    [in] Long pointer to a buffer that contains the option setting.
  • dwBufferLength
    [in] Specifies the length of the lpBuffer buffer.

Return Value

TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError.

Remarks

Requirements

Header wininet.h
Library wininet.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

FtpGetFile
FtpPutFile
InternetConnect
InternetOpen
InternetQueryOption
WinInet Functions