win32inet.InternetQueryOption

object = InternetQueryOption(hInternet, Option )

Retrieves an option for an internet handle

Parameters

hInternet : PyHINTERNET

Internet handle, or None for global defaults

Option : int

INTERNET_OPTION_* value

Option Returned type
INTERNET_OPTION_CALLBACKPython callback function
INTERNET_OPTION_CONTEXT_VALUEContext object
INTERNET_OPTION_SEND_TIMEOUTInt - timeout in millseconds
INTERNET_OPTION_CONTROL_SEND_TIMEOUTInt - timeout in millseconds
INTERNET_OPTION_RECEIVE_TIMEOUTInt - timeout in millseconds
INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUTInt - timeout in millseconds
INTERNET_OPTION_CODEPAGEInt - Codepage of host part of URL
INTERNET_OPTION_CODEPAGE_PATHInt - Codepage for URL
INTERNET_OPTION_CODEPAGE_EXTRAInt - Codepage for path part of URL
INTERNET_OPTION_CONNECT_RETRIESInt - Number of time to try to reconnect to host
INTERNET_OPTION_CONNECT_TIMEOUTInt - Connection timeout in milliseconds
INTERNET_OPTION_CONNECTED_STATEInt - Connection state, INTERNET_STATE_*
INTERNET_OPTION_HANDLE_TYPEInt, INTERNET_HANDLE_TYPE_*
INTERNET_OPTION_ERROR_MASKInt, combination of INTERNET_ERROR_MASK_*
INTERNET_OPTION_EXTENDED_ERRORInt, ERROR_INTERNET_*
INTERNET_OPTION_FROM_CACHE_TIMEOUTInt - Timeout in ms before cached copy is used
INTERNET_OPTION_IDNInt, INTERNET_FLAG_IDN_*
INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVERInt
INTERNET_OPTION_MAX_CONNS_PER_SERVERInt
INTERNET_OPTION_READ_BUFFER_SIZEInt
INTERNET_OPTION_WRITE_BUFFER_SIZEInt
INTERNET_OPTION_REQUEST_FLAGSInt, combination of INTERNET_REQFLAG_*
INTERNET_OPTION_REQUEST_PRIORITYInt
INTERNET_OPTION_SECURITY_FLAGSInt, SECURITY_FLAG_*
INTERNET_OPTION_SECURITY_KEY_BITNESSInt
INTERNET_OPTION_BYPASS_EDITED_ENTRYBoolean
INTERNET_OPTION_HTTP_DECODINGBoolean
INTERNET_OPTION_IGNORE_OFFLINEBoolean
INTERNET_OPTION_DATAFILE_NAMEString - Name of internet cache file
INTERNET_OPTION_USERNAMEString - Username passed to InternetConnect
INTERNET_OPTION_PASSWORDString - Password passed to InternetConnect
INTERNET_OPTION_PROXY_PASSWORDString
INTERNET_OPTION_PROXY_USERNAMEString
INTERNET_OPTION_SECONDARY_CACHE_KEYString
INTERNET_OPTION_SECURITY_CERTIFICATEString
INTERNET_OPTION_URLString
INTERNET_OPTION_USER_AGENTString
INTERNET_OPTION_CACHE_TIMESTAMPSdict - Expiration and last modified times
INTERNET_OPTION_HTTP_VERSIONdict - HTTP_VERSION_INFO
INTERNET_OPTION_VERSIONdict - INTERNET_VERSION_INFO
INTERNET_OPTION_PARENT_HANDLEPyHINTERNET
INTERNET_OPTION_PROXYdict - INTERNET_PROXY_INFO
INTERNET_OPTION_DIAGNOSTIC_SOCKET_INFONot yet supported (INTERNET_DIAGNOSTIC_SOCKET_INFO)
INTERNET_OPTION_PER_CONNECTION_OPTIONNot yet supported (INTERNET_PER_CONN_OPTION_LIST)
INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCTNot yet supported (INTERNET_CERTIFICATE_INFO)
INTERNET_OPTION_ALTER_IDENTITYNot supported
INTERNET_OPTION_ASYNCNot supported
INTERNET_OPTION_ASYNC_IDNot supported
INTERNET_OPTION_ASYNC_PRIORITYNot supported
INTERNET_OPTION_CACHE_STREAM_HANDLENot supported
INTERNET_OPTION_CALLBACK_FILTERNot supported
INTERNET_OPTION_CLIENT_CERT_CONTEXTNot supported
INTERNET_OPTION_DATA_RECEIVE_TIMEOUTNot supported
INTERNET_OPTION_DATA_SEND_TIMEOUTNot supported
INTERNET_OPTION_CONNECT_BACKOFFNot supported
INTERNET_OPTION_CONNECT_TIMENot supported
INTERNET_OPTION_DISABLE_AUTODIALNot supported
INTERNET_OPTION_DISCONNECTED_TIMEOUTNot supported
INTERNET_OPTION_IDENTITYNot supported
INTERNET_OPTION_IDLE_STATENot supported
INTERNET_OPTION_KEEP_CONNECTIONNot supported
INTERNET_OPTION_LISTEN_TIMEOUTNot supported
INTERNET_OPTION_OFFLINE_MODENot supported
INTERNET_OPTION_OFFLINE_SEMANTICSNot supported
INTERNET_OPTION_POLICYNot supported
INTERNET_OPTION_RECEIVE_THROUGHPUTNot supported
INTERNET_OPTION_REMOVE_IDENTITYNot supported
INTERNET_OPTION_SEND_THROUGHPUTNot supported
INTERNET_OPTION_DATAFILE_EXTOnly valid for InternetSetOption
INTERNET_OPTION_DIGEST_AUTH_UNLOADOnly valid for InternetSetOption
INTERNET_OPTION_END_BROWSER_SESSIONOnly valid for InternetSetOption
INTERNET_OPTION_REFRESHOnly valid for InternetSetOption
INTERNET_OPTION_RESET_URLCACHE_SESSIONOnly valid for InternetSetOption
INTERNET_OPTION_SETTINGS_CHANGEDOnly valid for InternetSetOption

Win32 API References

Search for InternetQueryOption at msdn, google or google groups.

Return Value

The type of object returned is dependent on the option requested