InternetQueryOption

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This function queries an Internet option on the specified handle.


BOOL WINAPI InternetQueryOption(
  HINTERNET hInternet, 
  DWORD dwOption, 
  LPVOID lpBuffer OPTIONAL, 
  LPDWORD lpdwBufferLength
);

hInternet

[in] Internet handle on which to query information.

dwOption

[in] Specifies the Internet option to query. Can be one of the Option Flags values.

lpBuffer

[out] Long pointer to a buffer that receives the option setting.

lpdwBufferLength

[in, out] Long pointer to a variable that contains the length of lpBuffer. When the function returns, the variable receives the length of the data placed into lpBuffer. If GetLastError returns ERROR_INSUFFICIENT_BUFFER, this parameter receives the number of bytes required to hold the created URL.

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

The following list shows the options that may be queried through dwOption:

  • INTERNET_OPTION_CALLBACK
  • 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_HANDLE_TYPE
  • INTERNET_OPTION_PARENT_HANDLE
  • INTERNET_OPTION_RECEIVE_TIMEOUT

GetLastError will return the ERROR_INVALID_PARAMETER if an option flag that is invalid for the specified handle type is passed to the dwOption parameter.

Headerwininet.h
Librarywininet.lib
Windows Embedded CEWindows CE 2.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show: