Upravit

Sdílet prostřednictvím


Option Flags (Wininet.h)

The following option flags are used with the InternetQueryOption and InternetSetOption functions. All valid option flags have a value greater than or equal to INTERNET_FIRST_OPTION and less than or equal to INTERNET_LAST_OPTION.

INTERNET_OPTION_ALTER_IDENTITY

80

Not implemented

INTERNET_OPTION_ASYNC

30

Not implemented.

INTERNET_OPTION_ASYNC_ID

15

Not implemented.

INTERNET_OPTION_ASYNC_PRIORITY

16

Not implemented.

INTERNET_OPTION_BYPASS_EDITED_ENTRY

64

Sets or retrieves the Boolean value that determines if the system should check the network for newer content and overwrite edited cache entries if a newer version is found. If set to True, the system checks the network for newer content and overwrites the edited cache entry with the newer version. The default is False, which indicates that the edited cache entry should be used without checking the network. This is used by InternetQueryOption and InternetSetOption. It is valid only in Microsoft Internet Explorer 5 and later.

INTERNET_OPTION_CACHE_STREAM_HANDLE

27

No longer supported.

INTERNET_OPTION_CACHE_TIMESTAMPS

69

Retrieves an INTERNET_CACHE_TIMESTAMPS structure that contains the LastModified time and Expires time from the resource stored in the Internet cache. This value is used by InternetQueryOption.

INTERNET_OPTION_CALLBACK

1

Sets or retrieves the address of the callback function defined for this handle. This option can be used on all HINTERNET handles. Used by InternetQueryOption and InternetSetOption.

INTERNET_OPTION_CALLBACK_FILTER

54

Not implemented.

INTERNET_OPTION_CLIENT_CERT_CONTEXT

84

This flag is not supported by InternetQueryOption. The lpBuffer parameter must be a pointer to a CERT_CONTEXT structure and not a pointer to a CERT_CONTEXT pointer. If an application receives ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED, it must call InternetErrorDlg or use InternetSetOption to supply a certificate before retrying the request. CertDuplicateCertificateContext is then called so that the certificate context passed can be independently released by the application.

INTERNET_OPTION_CODEPAGE

68

By default, the host or authority portion of the Unicode URL is encoded according to the IDN specification. Setting this option on the request, or connection handle, when IDN is disabled, specifies a code page encoding scheme for the host portion of the URL. The lpBuffer parameter in the call to InternetSetOption contains the desired DBCS code page. If no code page is specified in lpBuffer, WinINet uses the default system code page (CP_ACP). Note: This option is ignored if IDN is not disabled. For more information about how to disable IDN, see the INTERNET_OPTION_IDN option.

Windows XP with SP2 and Windows Server 2003 with SP1: This flag is not supported.

Version: Requires Internet Explorer 7.0.

INTERNET_OPTION_CODEPAGE_PATH

100

By default, the path portion of the URL is UTF8 encoded. The WinINet API performs escape character (%) encoding on the high-bit characters. Setting this option on the request, or connection handle, disables the UTF8 encoding and sets a specific code page. The lpBuffer parameter in the call to InternetSetOption contains the desired DBCS codepage for the path. If no code page is specified in lpBuffer, WinINet uses the default CP_UTF8.

Windows XP with SP2 and Windows Server 2003 with SP1: This flag is not supported.

Version: Requires Internet Explorer 7.0.

INTERNET_OPTION_CODEPAGE_EXTRA

101

By default, the path portion of the URL is the default system code page (CP_ACP). The escape character (%) conversions are not performed on the extra portion. Setting this option on the request, or connection handle disables the CP_ACP encoding. The lpBuffer parameter in the call to InternetSetOption contains the desired DBCS codepage for the extra portion of the URL. If no code page is specified in lpBuffer, WinINet uses the default system code page (CP_ACP).

Windows XP with SP2 and Windows Server 2003 with SP1: This flag is not supported.

Version: Requires Internet Explorer 7.0.

INTERNET_OPTION_COMPRESSED_CONTENT_LENGTH

147

For a request where WinInet decompressed the server s supplied Content-Encoding, retrieves the server-reported Content-Length of the response body as a ULONGLONG. Supported in Windows 10, version 1507 and later.

INTERNET_OPTION_CONNECT_BACKOFF

4

Not implemented.

INTERNET_OPTION_CONNECT_RETRIES

3

Sets or retrieves an unsigned long integer value that contains the number of times WinINet attempts to resolve and connect to a host. It only attempts once per IP address. For example, if you attempt to connect to a multihome host that has ten IP addresses and INTERNET_OPTION_CONNECT_RETRIES is set to seven, WinINet only attempts to resolve and connect to the first seven IP addresses. Conversely, given the same set of ten IP addresses, if INTERNET_OPTION_CONNECT_RETRIES is set to 20, WinINet attempts each of the ten only once. If a host has only one IP address and the first connection attempt fails, there are no further attempts. If a connection attempt still fails after the specified number of attempts, the request is canceled. The default value for INTERNET_OPTION_CONNECT_RETRIES is five attempts. This option can be used on any HINTERNET handle, including a NULL handle. It is used by InternetQueryOption and InternetSetOption.

INTERNET_OPTION_CONNECT_TIME

55

Not implemented.

INTERNET_OPTION_CONNECT_TIMEOUT

2

Sets or retrieves an unsigned long integer value that contains the time-out value, in milliseconds, to use for Internet connection requests. Setting this option to infinite (0xFFFFFFFF) will disable this timer.

If a connection request takes longer than this time-out value, the request is canceled. When attempting to connect to multiple IP addresses for a single host (a multihome host), the timeout limit is cumulative for all of the IP addresses. This option can be used on any HINTERNET handle, including a NULL handle. It is used by InternetQueryOption and InternetSetOption.

INTERNET_OPTION_CONNECTED_STATE

50

Sets or retrieves an unsigned long integer value that contains the connected state. This is used by InternetQueryOption and InternetSetOption.

INTERNET_OPTION_CONTEXT_VALUE

45

Sets or retrieves a DWORD_PTR that contains the address of the context value associated with this HINTERNET handle. This option can be used on any HINTERNET handle. This is used by InternetQueryOption and InternetSetOption. Previously, this set the context value to the address stored in the lpBuffer pointer. This has been corrected so that the value stored in the buffer is used and the INTERNET_OPTION_CONTEXT_VALUE flag is assigned a new value. The old value, 10, has been preserved so that applications written for the old behavior are still supported.

INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT

6

Identical to INTERNET_OPTION_RECEIVE_TIMEOUT. This is used by InternetQueryOption and InternetSetOption.

INTERNET_OPTION_CONTROL_SEND_TIMEOUT

5

Identical to INTERNET_OPTION_SEND_TIMEOUT. This is used by InternetQueryOption and InternetSetOption.

INTERNET_OPTION_DATA_RECEIVE_TIMEOUT

8

Sets or retrieves an unsigned long integer value that contains the time-out value, in milliseconds, to receive a response to a request for the data channel of an FTP transaction. If the response takes longer than this time-out value, the request is canceled. This option can be used on any HINTERNET handle, including a NULL handle. It is used by InternetQueryOption and InternetSetOption.

This flag has no impact on HTTP functionality.

INTERNET_OPTION_DATA_SEND_TIMEOUT

7

Sets or retrieves an unsigned long integer value, in milliseconds, that contains the time-out value to send a request for the data channel of an FTP transaction. If the send takes longer than this time-out value, the send is canceled. This option can be used on any HINTERNET handle, including a NULL handle. It is used by InternetQueryOption and InternetSetOption.

This flag has no impact on HTTP functionality.

INTERNET_OPTION_DATAFILE_NAME

33

Retrieves a string value that contains the name of the file backing a downloaded entity. This flag is valid after InternetOpenUrl, FtpOpenFile, GopherOpenFile, or HttpOpenRequest has completed. This option can only be queried by InternetQueryOption.

INTERNET_OPTION_DATAFILE_EXT

96

Sets a string value that contains the extension of the file backing a downloaded entity. This flag should be set before calling InternetOpenUrl, FtpOpenFile, GopherOpenFile, or HttpOpenRequest. This option can only be set by InternetSetOption.

INTERNET_OPTION_DIAGNOSTIC_SOCKET_INFO

67

Retrieves an INTERNET_DIAGNOSTIC_SOCKET_INFO structure that contains data about a specified HTTP Request. This flag is used by InternetQueryOption.

Windows 7: This option is no longer supported.

INTERNET_OPTION_DIGEST_AUTH_UNLOAD

76

Causes the system to log off the Digest authentication SSPI package, purging all of the credentials created for the process. No buffer is required for this option. It is used by InternetSetOption.

INTERNET_OPTION_DISABLE_AUTODIAL

70

Not implemented.

INTERNET_OPTION_DISCONNECTED_TIMEOUT

49

Not implemented.

INTERNET_OPTION_ENABLE_HTTP_PROTOCOL

148

Sets a DWORD bitmask of acceptable advanced HTTP versions. May be set on any handle type. Possible values are:

  • HTTP_PROTOCOL_FLAG_HTTP2 (0x2). Supported on Windows 10, version 1507 and later.

Legacy versions of HTTP (1.1 and prior) cannot be disabled using this option. The default is 0x0. Supported in Windows 10, version 1507 and later.

INTERNET_OPTION_ENABLE_REDIRECT_CACHE_READ

122

On a request handle, sets a Boolean controlling whether redirects will be returned from the WinInet cache for a given request. The default is FALSE. Supported in Windows 8 and later.

INTERNET_OPTION_ENCODE_EXTRA

155

Gets/sets a BOOL indicating whether non-ASCII characters in the query string should be percent-encoded. The default is FALSE. Supported in Windows 8.1 and later.

INTERNET_OPTION_END_BROWSER_SESSION

42

Flushes entries not in use from the password cache on the hard disk drive. Also resets the cache time used when the synchronization mode is once-per-session. No buffer is required for this option. This is used by InternetSetOption.

INTERNET_OPTION_ERROR_MASK

62

Sets an unsigned long integer value that contains the error masks that can be handled by the client application. This can be a combination of the following values:

INTERNET_ERROR_MASK_COMBINED_SEC_CERT

0x2

Indicates that all certificate errors are to be reported using the same error return, namely ERROR_INTERNET_SEC_CERT_ERRORS. If this flag is set, call InternetErrorDlg upon receiving the ERROR_INTERNET_SEC_CERT_ERRORS error, so that the user can respond to a familiar dialog describing the problem.

Caution

Failing to inform the user of this error exposes the user to potential spoofing attacks.

INTERNET_ERROR_MASK_INSERT_CDROM

0x1

Indicates that the client application can handle the ERROR_INTERNET_INSERT_CDROM error code.

INTERNET_ERROR_MASK_LOGIN_FAILURE_DISPLAY_ENTITY_BODY

0x8

Indicates that the client application can handle the ERROR_INTERNET_LOGIN_FAILURE_DISPLAY_ENTITY_BODY error code.

INTERNET_ERROR_MASK_NEED_MSN_SSPI_PKG

0x4

Not implemented.

INTERNET_OPTION_ENTERPRISE_CONTEXT

159

Sets a PWSTR containing the Enterprise ID (see https://msdn.microsoft.com/library/windows/desktop/mt759320(v=vs.85).aspx) which applies to the request. Supported in Windows 10, version 1507 and later.

INTERNET_OPTION_EXTENDED_ERROR

24

Retrieves an unsigned long integer value that contains a Winsock error code mapped to the ERROR_INTERNET_ error messages last returned in this thread context. This option is used on a NULLHINTERNET handle by InternetQueryOption.

INTERNET_OPTION_FROM_CACHE_TIMEOUT

63

Sets or retrieves a1n unsigned long integer value that contains the amount of time the system should wait for a response to a network request before checking the cache for a copy of the resource. If a network request takes longer than the time specified and the requested resource is available in the cache, the resource is retrieved from the cache. This is used by InternetQueryOption and InternetSetOption.

INTERNET_OPTION_HANDLE_TYPE

9

Retrieves an unsigned long integer value that contains the type of the HINTERNET handles passed in. This is used by InternetQueryOption on any HINTERNET handle. Possible return values include the following.

INTERNET_HANDLE_TYPE_CONNECT_FTP

2

INTERNET_HANDLE_TYPE_CONNECT_GOPHER

3

INTERNET_HANDLE_TYPE_CONNECT_HTTP

4

INTERNET_HANDLE_TYPE_FILE_REQUEST

14

INTERNET_HANDLE_TYPE_FTP_FILE

7

INTERNET_HANDLE_TYPE_FTP_FILE_HTML

8

INTERNET_HANDLE_TYPE_FTP_FIND

5

INTERNET_HANDLE_TYPE_FTP_FIND_HTML

6

INTERNET_HANDLE_TYPE_GOPHER_FILE

11

INTERNET_HANDLE_TYPE_GOPHER_FILE_HTML

12

INTERNET_HANDLE_TYPE_GOPHER_FIND

9

INTERNET_HANDLE_TYPE_GOPHER_FIND_HTML

10

INTERNET_HANDLE_TYPE_HTTP_REQUEST

13

INTERNET_HANDLE_TYPE_INTERNET

1

INTERNET_OPTION_HSTS

157

Gets/sets a BOOL indicating whether WinInet should follow HTTP Strict Transport Security (HSTS) directives from servers. If enabled, https:// schemed requests to domains which have an HSTS policy cached by WinInet will be redirected to matching https:// URLs. The default is FALSE. Supported in Windows 8.1 and later.

INTERNET_OPTION_HTTP_DECODING

65

Enables WinINet to perform decoding for the gzip and deflate encoding schemes. For more information, see Content Encoding.

INTERNET_OPTION_HTTP_PROTOCOL_USED

149

Gets a DWORD indicating which advanced HTTP version was used on a given request. Possible values are:

  • HTTP_PROTOCOL_FLAG_HTTP2 (0x2). Supported on Windows 10, version 1507 and later.

0x0 indicates HTTP/1.1 or earlier; see INTERNET_OPTION_HTTP_VERSION if more precision is needed about which legacy version was used. Supported on Windows 10, version 1507 and later.

INTERNET_OPTION_HTTP_VERSION

59

Sets or retrieves an HTTP_VERSION_INFO structure that contains the supported HTTP version. This must be used on a NULL handle. This is used by InternetQueryOption and InternetSetOption.

On Windows 7, Windows Server 2008 R2, and later, the value of the dwMinorVersion member in the HTTP_VERSION_INFO structure is overridden by Internet Explorer settings. EnableHttp1_1 is a registry value under HKLM\Software\Microsoft\InternetExplorer\AdvacnedOptions\HTTP\GENABLE controlled by Internet Options set in Internet Explorer for the system. The EnableHttp1_1 value defaults to 1. The HTTP_VERSION_INFO structure is ignored for any HTTP version less than 1.1 if EnableHttp1_1 is set to 1.

INTERNET_OPTION_IDENTITY

78

Not implemented.

INTERNET_OPTION_IDLE_STATE

51

Not implemented.

INTERNET_OPTION_IDN

102

By default, the host or authority portion of the URL is encoded according to the IDN specification for both direct and proxy connections. This option can be used on the request, or connection handle to enable or disable IDN. When IDN is disabled, WinINet uses the system codepage to encode the host or authority portion of the URL. To disable IDN host conversion, set the lpBuffer parameter in the call to InternetSetOption to zero. To enable IDN conversion on only the direct connection, specify INTERNET_FLAG_IDN_DIRECT in the lpBuffer parameter in the call to InternetSetOption. To enable IDN conversion on only the proxy connection, specify INTERNET_FLAG_IDN_PROXY in the lpBuffer parameter in the call to InternetSetOption.

Windows XP with SP2 and Windows Server 2003 with SP1: This flag is not supported.

Version: Requires Internet Explorer 7.0.

INTERNET_OPTION_IGNORE_OFFLINE

77

Sets or retrieves whether the global offline flag should be ignored for the specified request handle. No buffer is required for this option. This is used by InternetQueryOption and InternetSetOption with a request handle. This option is only valid in Internet Explorer 5 and later.

INTERNET_OPTION_KEEP_CONNECTION

22

Not implemented.

INTERNET_OPTION_LISTEN_TIMEOUT

11

Not implemented.

INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER

74

Sets or retrieves an unsigned long integer value that contains the maximum number of connections allowed per HTTP/1.0 server. This is used by InternetQueryOption and InternetSetOption. This option is only valid in Internet Explorer 5 and later.

INTERNET_OPTION_MAX_CONNS_PER_PROXY

103

Sets or retrieves an unsigned long integer value that contains the maximum number of connections allowed per CERN proxy. When this option is set or retrieved, the hInternet parameter must set to a null handle value. A null handle value indicates that the option should be set or queried for the current process. When calling InternetSetOption with this option, all existing proxy objects will receive the new value. This value is limited to a range of 2 to 128, inclusive.

Version: Requires Internet Explorer 8.0.

INTERNET_OPTION_MAX_CONNS_PER_SERVER

73

Sets or retrieves an unsigned long integer value that contains the maximum number of connections allowed per server. This is used by InternetQueryOption and InternetSetOption. This option is only valid in Internet Explorer 5 and later.

INTERNET_OPTION_OFFLINE_MODE

26

Not implemented.

INTERNET_OPTION_OFFLINE_SEMANTICS

52

Not implemented.

INTERNET_OPTION_OPT_IN_WEAK_SIGNATURE

176

Opt-in for weak signatures (e.g. SHA-1) to be treated as insecure. This will instruct WinInet to call CertGetCertificateChain using the CERT_CHAIN_OPT_IN_WEAK_SIGNATURE parameter.

INTERNET_OPTION_PARENT_HANDLE

21

Retrieves the parent handle to this handle. This option can be used on any HINTERNET handle by InternetQueryOption.

INTERNET_OPTION_PASSWORD

29

Sets or retrieves a string value that contains the password associated with a handle returned by InternetConnect. This is used by InternetQueryOption and InternetSetOption.

INTERNET_OPTION_PER_CONNECTION_OPTION

75

Sets or retrieves an INTERNET_PER_CONN_OPTION_LIST structure that specifies a list of options for a particular connection. This is used by InternetQueryOption and InternetSetOption. This option is only valid in Internet Explorer 5 and later.

Note

INTERNET_OPTION_PER_CONNECTION_OPTION causes the settings to be changed on a system-wide basis when a NULL handle is used in the call to InternetSetOption. To refresh the global proxy settings, you must call InternetSetOption with the INTERNET_OPTION_REFRESH option flag.

Note

To change proxy information for the entire process without affecting the global settings in Internet Explorer 5 and later, use this option on the handle that is returned from InternetOpen. The following code example changes the proxy for the whole process even though the HINTERNET handle is closed and is not used by any requests.

INTERNET_OPTION_POLICY

48

Not implemented.

INTERNET_OPTION_PROXY

38

Sets or retrieves an INTERNET_PROXY_INFO structure that contains the proxy data for an existing InternetOpen handle when the HINTERNET handle is not NULL. If the HINTERNET handle is NULL, the function sets or queries the global proxy data. This option can be used on the handle returned by InternetOpen. It is used by InternetQueryOption and InternetSetOption.

Note

It is recommended that INTERNET_OPTION_PER_CONNECTION_OPTION be used instead of INTERNET_OPTION_PROXY.

INTERNET_OPTION_PROXY_PASSWORD

44

Sets or retrieves a string value that contains the password used to access the proxy. This is used by InternetQueryOption and InternetSetOption. This option can be set on the handle returned by InternetConnect or HttpOpenRequest.

INTERNET_OPTION_PROXY_SETTINGS_CHANGED

95

Alerts the current WinInet instance that proxy settings have changed and that they must update with the new settings. To alert all available WinInet instances, set the Buffer parameter of InternetSetOption to NULL and BufferLength to 0 when passing this option. This option can be set on the handle returned by InternetConnect or HttpOpenRequest.

INTERNET_OPTION_PROXY_USERNAME

43

Sets or retrieves a string value that contains the user name used to access the proxy. This is used by InternetQueryOption and InternetSetOption. This option can be set on the handle returned by InternetConnect or HttpOpenRequest.

INTERNET_OPTION_READ_BUFFER_SIZE

12

Sets or retrieves an unsigned long integer value that contains the size of the read buffer. This option can be used on HINTERNET handles returned by FtpOpenFile, FtpFindFirstFile, and InternetConnect (FTP session only). This option is used by InternetQueryOption and InternetSetOption.

INTERNET_OPTION_RECEIVE_THROUGHPUT

57

Not implemented.

INTERNET_OPTION_RECEIVE_TIMEOUT

6

Sets or retrieves an unsigned long integer value that contains the time-out value, in milliseconds, to receive a response to a request. If the response takes longer than this time-out value, the request is canceled. This option can be used on any HINTERNET handle, including a NULL handle. It is used by InternetQueryOption and InternetSetOption.

This option is not intended to represent a fine-grained, immediate timeout. You can expect the timeout to occur up to six seconds after the set timeout value.

When used in reference to an FTP transaction, this option refers to the control channel.

INTERNET_OPTION_REFRESH

37

Causes the proxy data to be reread from the registry for a handle. No buffer is required. This option can be used on the HINTERNET handle returned by InternetOpen. It is used by InternetSetOption.

INTERNET_OPTION_REMOVE_IDENTITY

79

Not implemented.

INTERNET_OPTION_REQUEST_FLAGS

23

Retrieves an unsigned long integer value that contains the special status flags that indicate the status of the download in progress. This is used by InternetQueryOption. The INTERNET_OPTION_REQUEST_FLAGS option can be one of the following values:

INTERNET_REQFLAG_ASYNC

0x00000002

Not implemented.

INTERNET_REQFLAG_CACHE_WRITE_DISABLED

0x00000040

Internet request cannot be cached (an HTTPS request, for example).

INTERNET_REQFLAG_FROM_CACHE

0x00000001

Response came from the cache.

INTERNET_REQFLAG_NET_TIMEOUT

0x00000080

Internet request timed out.

INTERNET_REQFLAG_NO_HEADERS

0x00000008

Original response contained no headers.

INTERNET_REQFLAG_PASSIVE

0x00000010

Not implemented.

INTERNET_REQFLAG_VIA_PROXY

0x00000004

Request was made through a proxy.

INTERNET_OPTION_REQUEST_PRIORITY

58

Sets or retrieves an unsigned long integer value that contains the priority of requests that compete for a connection on an HTTP handle. This is used by InternetQueryOption and InternetSetOption.

INTERNET_OPTION_RESET_URLCACHE_SESSION

60

Starts a new cache session for the process. No buffer is required. This is used by InternetSetOption. This option is reserved for internal use only.

INTERNET_OPTION_SECONDARY_CACHE_KEY

53

Sets or retrieves a string value that contains the secondary cache key. This is used by InternetQueryOption and InternetSetOption. This option is reserved for internal use only.

INTERNET_OPTION_SECURITY_CERTIFICATE

35

Retrieves the certificate for an SSL/PCT (Secure Sockets Layer/Private Communications Technology) server into a formatted string. This is used by InternetQueryOption.

INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT

32

Retrieves the certificate for an SSL/PCT server into the INTERNET_CERTIFICATE_INFO structure. This is used by InternetQueryOption.

INTERNET_OPTION_SECURITY_FLAGS

31

Retrieves an unsigned long integer value that contains the security flags for a handle. This option is used by InternetQueryOption. It can be a combination of the following values.

SECURITY_FLAG_128BIT

0x20000000

Identical to the preferred value SECURITY_FLAG_STRENGTH_STRONG. This is only returned in a call to InternetQueryOption.

SECURITY_FLAG_40BIT

0x10000000

Identical to the preferred value SECURITY_FLAG_STRENGTH_WEAK. This is only returned in a call to InternetQueryOption.

SECURITY_FLAG_56BIT

0x40000000

Identical to the preferred value SECURITY_FLAG_STRENGTH_MEDIUM. This is only returned in a call to InternetQueryOption.

SECURITY_FLAG_FORTEZZA

0x08000000

Indicates Fortezza has been used to provide secrecy, authentication, and/or integrity for the specified connection.

SECURITY_FLAG_IETFSSL4

0x00000020

Not implemented.

SECURITY_FLAG_IGNORE_CERT_CN_INVALID

0x00001000

Ignores the ERROR_INTERNET_SEC_CERT_CN_INVALID error message.

SECURITY_FLAG_IGNORE_CERT_DATE_INVALID

0x00002000

Ignores the ERROR_INTERNET_SEC_CERT_DATE_INVALID error message.

SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTP

0x00008000

Ignores the ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR error message.

SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTPS

0x00004000

Ignores the ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR error message.

SECURITY_FLAG_IGNORE_REVOCATION

0x00000080

Ignores certificate revocation problems.

SECURITY_FLAG_IGNORE_UNKNOWN_CA

0x00000100

Ignores unknown certificate authority problems.

SECURITY_FLAG_IGNORE_WEAK_SIGNATURE

0x00010000

Ignores weak certificate signature problems.

SECURITY_FLAG_IGNORE_WRONG_USAGE

0x00000200

Ignores incorrect usage problems.

SECURITY_FLAG_NORMALBITNESS

0x10000000

Identical to the value SECURITY_FLAG_STRENGTH_WEAK. This is only returned in a call to InternetQueryOption.

SECURITY_FLAG_PCT

0x00000008

Not implemented.

SECURITY_FLAG_PCT4

0x00000010

Not implemented.

SECURITY_FLAG_SECURE

0x00000001

Uses secure transfers. This is only returned in a call to InternetQueryOption.

SECURITY_FLAG_SSL

0x00000002

Not implemented.

SECURITY_FLAG_SSL3

0x00000004

Not implemented.

SECURITY_FLAG_STRENGTH_MEDIUM

0x40000000

Uses medium (56-bit) encryption. This is only returned in a call to InternetQueryOption.

SECURITY_FLAG_STRENGTH_STRONG

0x20000000

Uses strong (128-bit) encryption. This is only returned in a call to InternetQueryOption.

SECURITY_FLAG_STRENGTH_WEAK

0x10000000

Uses weak (40-bit) encryption. This is only returned in a call to InternetQueryOption.

SECURITY_FLAG_UNKNOWNBIT

0x80000000

The bit size used in the encryption is unknown. This is only returned in a call to InternetQueryOption.

Be aware that the data retrieved this way relates to a transaction that has occurred, whose security level can no longer be changed.

INTERNET_OPTION_SECURITY_KEY_BITNESS

36

Retrieves an unsigned long integer value that contains the bit size of the encryption key. The larger the number, the greater the encryption strength used. This is used by InternetQueryOption. Be aware that the data retrieved this way relates to a transaction that has already occurred, whose security level can no longer be changed.

INTERNET_OPTION_SEND_THROUGHPUT

56

Not implemented.

INTERNET_OPTION_SEND_TIMEOUT

5

Sets or retrieves an unsigned long integer value, in milliseconds, that contains the time-out value to send a request. If the send takes longer than this time-out value, the send is canceled. This option can be used on any HINTERNET handle, including a NULL handle. It is used by InternetQueryOption and InternetSetOption.

When used in reference to an FTP transaction, this option refers to the control channel.

INTERNET_OPTION_SERVER_CERT_CHAIN_CONTEXT

105

Retrieves the server s certificate-chain context as a duplicated PCCERT_CHAIN_CONTEXT. You may pass this duplicated context to any Crypto API function which takes a PCCERT_CHAIN_CONTEXT. You must call CertFreeCertificateChain on the returned PCCERT_CHAIN_CONTEXT when you are done with the certificate-chain context.

Version: Requires Internet Explorer 8.0.

INTERNET_OPTION_SETTINGS_CHANGED

39

Notifies the system that the registry settings have been changed so that it verifies the settings on the next call to InternetConnect. This is used by InternetSetOption.

INTERNET_OPTION_SUPPRESS_SERVER_AUTH

104

Sets an HTTP request object such that it will not logon to origin servers, but will perform automatic logon to HTTP proxy servers. This option differs from the Request flag INTERNET_FLAG_NO_AUTH, which prevents authentication to both proxy servers and origin servers.

Setting this mode will suppress the use of any credential material (either previously provided username/password or client SSL certificate) when communicating with an origin server. However, if the request must transit via an authenticating proxy, WinINet will still perform automatic authentication to the HTTP proxy per the Intranet Zone settings for the user. The default Intranet Zone setting is to permit automatic logon using the user s default credentials.

To ensure suppression of all identifying information, the caller should combine INTERNET_OPTION_SUPPRESS_SERVER_AUTH with the INTERNET_FLAG_NO_COOKIES request flag.

This option may only be set on request objects before they have been sent. Attempts to set this option after the request has been sent will return ERROR_INTERNET_INCORRECT_HANDLE_STATE.

No buffer is required for this option. This is used by InternetSetOption on handles returned by HttpOpenRequest only.

Version: Requires Internet Explorer 8.0 or later.

INTERNET_OPTION_SUPPRESS_BEHAVIOR

81

A general purpose option that is used to suppress behaviors on a process-wide basis. The lpBuffer parameter of the function must be a pointer to a DWORD containing the specific behavior to suppress. This option cannot be queried with InternetQueryOption. The permitted values are:

INTERNET_SUPPRESS_RESET_ALL

0

Disables all suppressions, re-enabling default and configured behavior. This option is the equivalent of setting INTERNET_SUPPRESS_COOKIE_POLICY_RESET and INTERNET_SUPPRESS_COOKIE_PERSIST_RESET individually.

Version: Requires Internet Explorer 6.0 or later.

INTERNET_SUPPRESS_COOKIE_POLICY

1

Ignores any configured cookie policies and allows cookies to be set.

Version: Requires Internet Explorer 6.0 or later.

INTERNET_SUPPRESS_COOKIE_POLICY_RESET

2

Disables the INTERNET_SUPPRESS_COOKIE_POLICY suppression, permitting the evaluation of cookies according to the configured cookie policy.

Version: Requires Internet Explorer 6.0 or later.

INTERNET_SUPPRESS_COOKIE_PERSIST

3

Suppresses the persistence of cookies, even if the server has specified them as persistent.

Version: Requires Internet Explorer 8.0 or later.

INTERNET_SUPPRESS_COOKIE_PERSIST_RESET

4

Disables the INTERNET_SUPPRESS_COOKIE_PERSIST suppression, re-enabling the persistence of cookies. Any previously suppressed cookies will not become persistent.

Version: Requires Internet Explorer 8.0 or later.

INTERNET_OPTION_URL

34

Retrieves a string value that contains the full URL of a downloaded resource. If the original URL contained any extra data, such as search strings or anchors, or if the call was redirected, the URL returned differs from the original. This option is valid on HINTERNET handles returned by InternetOpenUrl, FtpOpenFile, GopherOpenFile, or HttpOpenRequest. It is used by InternetQueryOption.

INTERNET_OPTION_USER_AGENT

41

Sets or retrieves the user agent string on handles supplied by InternetOpen and used in subsequent HttpSendRequest functions, as long as it is not overridden by a header added by HttpAddRequestHeaders or HttpSendRequest. This is used by InternetQueryOption and InternetSetOption.

INTERNET_OPTION_USERNAME

28

Sets or retrieves a string that contains the user name associated with a handle returned by InternetConnect. This is used by InternetQueryOption and InternetSetOption.

INTERNET_OPTION_VERSION

40

Retrieves an INTERNET_VERSION_INFO structure that contains the version number of Wininet.dll. This option can be used on a NULLHINTERNET handle by InternetQueryOption.

INTERNET_OPTION_WRITE_BUFFER_SIZE

13

Sets or retrieves an unsigned long integer value that contains the size, in bytes, of the write buffer. This option can be used on HINTERNET handles returned by FtpOpenFile and InternetConnect (FTP session only). It is used by InternetQueryOption and InternetSetOption.

Remarks

Note

WinINet does not support server implementations. In addition, it should not be used from a service. For server implementations or services use Microsoft Windows HTTP Services (WinHTTP).

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Wininet.h;
Winineti.h