public interface WinHttp
extends com.sun.jna.win32.StdCallLibrary
| Modifier and Type | Field and Description |
|---|---|
static int |
ERROR_WINHTTP_AUTODETECTION_FAILED
Returned if WinHTTP was unable to discover the URL of the
Proxy Auto-Configuration (PAC) file using the WPAD method.
|
static WinHttp |
INSTANCE |
static int |
WINHTTP_ACCESS_TYPE_DEFAULT_PROXY
Resolves all host names directly without a proxy.
|
static int |
WINHTTP_ACCESS_TYPE_NAMED_PROXY
Passes requests to the proxy unless a proxy bypass list is supplied and
the name to be resolved bypasses the proxy.
|
static int |
WINHTTP_ACCESS_TYPE_NO_PROXY
Retrieves the static proxy or direct configuration from the registry.
|
static int |
WINHTTP_AUTO_DETECT_TYPE_DHCP
Use DHCP to locate the proxy auto-configuration file.
|
static int |
WINHTTP_AUTO_DETECT_TYPE_DNS_A
Use DNS to attempt to locate the proxy auto-configuration file at a
well-known location on the domain of the local computer.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
WinHttpDetectAutoProxyConfigUrl(com.sun.jna.platform.win32.WinDef.DWORD dwAutoDetectFlags,
WTypes2.LPWSTRByReference ppwszAutoConfigUrl)
The WinHttpDetectAutoProxyConfigUrl function finds the URL for the Proxy
Auto-Configuration (PAC) file.
|
boolean |
WinHttpGetDefaultProxyConfiguration(WinHttpProxyInfo pProxyInfo)
The WinHttpGetDefaultProxyConfiguration function retrieves the default
WinHTTP proxy configuration from the registry.
|
boolean |
WinHttpGetIEProxyConfigForCurrentUser(WinHttpCurrentUserIEProxyConfig pProxyConfig)
The WinHttpGetIEProxyConfigForCurrentUser function retrieves the Internet
Explorer proxy configuration for the current user.
|
static final WinHttp INSTANCE
static final int WINHTTP_AUTO_DETECT_TYPE_DHCP
static final int WINHTTP_AUTO_DETECT_TYPE_DNS_A
static final int WINHTTP_ACCESS_TYPE_DEFAULT_PROXY
static final int ERROR_WINHTTP_AUTODETECTION_FAILED
static final int WINHTTP_ACCESS_TYPE_NO_PROXY
The WinHTTP proxy configuration is set by one of these mechanisms.
static final int WINHTTP_ACCESS_TYPE_NAMED_PROXY
boolean WinHttpDetectAutoProxyConfigUrl(com.sun.jna.platform.win32.WinDef.DWORD dwAutoDetectFlags,
WTypes2.LPWSTRByReference ppwszAutoConfigUrl)
throws com.sun.jna.LastErrorException
dwAutoDetectFlags - A data type that specifies what protocols to use to locate the
PAC file. If both the DHCP and DNS auto detect flags are set,
DHCP is used first; if no PAC URL is discovered using DHCP,
then DNS is used. Set WINHTTP_AUTO_DETECT_TYPE_DHCP,
WINHTTP_AUTO_DETECT_TYPE_DNS_A or both.ppwszAutoConfigUrl - A data type that returns a pointer to a null-terminated
Unicode string that contains the configuration URL that
receives the proxy data. You must free the string pointed to
by ppwszAutoConfigUrl using the GlobalFree function.true if successful; otherwise, false.com.sun.jna.LastErrorExceptionWinHttpHelpers.detectAutoProxyConfigUrl(com.sun.jna.platform.win32.WinDef.DWORD)boolean WinHttpGetDefaultProxyConfiguration(WinHttpProxyInfo pProxyInfo)
pProxyInfo - A pointer to a variable of type WINHTTP_PROXY_INFO that
receives the default proxy configuration.true if successful; otherwise, false.boolean WinHttpGetIEProxyConfigForCurrentUser(WinHttpCurrentUserIEProxyConfig pProxyConfig)
pProxyConfig - A pointer, on input, to a WINHTTP_CURRENT_USER_IE_PROXY_CONFIG
structure. On output, the structure contains the Internet
Explorer proxy settings for the current active network
connection (for example, LAN, dial-up, or VPN connection).true if successful; otherwise, false.Copyright © 2020. All rights reserved.