Platforms to show: All Mac Windows Linux Cross-Platform

Back to WinHTTPClientMBS class.

WinHTTPClientMBS.CrackUrl(URL as string, Flags as Integer = 0) as WinHTTPClientURLComponentsMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Network MBS Win Plugin 14.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Separates a URL into its component parts such as host name and path.

URL: the canonical URL to separate. WinHttpCrackUrl does not check this URL for validity or correct format before attempting to crack it.

see also
http://msdn.microsoft.com/en-us/library/windows/desktop/aa384092(v=vs.85).aspx

Some examples using this method:

WinHTTPClientMBS.DetectAutoProxyConfigUrl(AutoDetectFlags as Integer, byref AutoConfigUrl as string) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Network MBS Win Plugin 14.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Finds the URL for the Proxy Auto-Configuration (PAC) file.

This function reports the URL of the PAC file, but it does not download the file.

AutoDetectFlags: 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.

ValueMeaning
kAutoDetectTypeDHCPUse DHCP to locate the proxy auto-configuration file.
kAutoDetectTypeDNSAUse DNS to attempt to locate the proxy auto-configuration file at a well-known location on the domain of the local computer.

AutoConfigUrl: String that contains the configuration URL that receives the proxy data.

Returns true if successful, or false otherwise. For extended error information, call LastError. Among the error codes returned are the following.

WinHTTP implements the Web Proxy Auto-Discovery (WPAD) protocol, often referred to as autoproxy. For more information about well-known locations, see the Discovery Process section of the WPAD protocol document.
Note that because the DetectAutoProxyConfigUrl function takes time to complete its operation, it should not be called from a UI thread.

WinHTTPClientMBS.GetDefaultProxyConfiguration as WinHTTPClientProxyInfoMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Network MBS Win Plugin 14.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Retrieves the default WinHTTP proxy configuration from the registry.

Returns the default proxy configuration.

Some examples using this method:

WinHTTPClientMBS.GetIEProxyConfigForCurrentUser as WinHTTPClientCurrentUserIEProxyConfigMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Network MBS Win Plugin 14.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Retrieves the Internet Explorer proxy configuration for the current user.

Queries the Internet Explorer proxy settings for the current active network connection (for example, LAN, dial-up, or VPN connection).

see also
http://msdn.microsoft.com/en-us/library/windows/desktop/aa384096(v=vs.85).aspx

Some examples using this method:

WinHTTPClientMBS.GetProxyForHost(URL as string, Host as string, byref proxy as string, byref proxyPort as string, AutoConfigURL as string = "") as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Network MBS Win Plugin 14.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Queries the proxy for a host.

This is an universal functions using InternetGetProxyInfo, DetectAutoProxyUrl and InternetQueryOption.

URL: The target URL.
Host: The hostname of the target server.

Returns true on success and sets proxy and port. Returns false on failure.
AutoConfigURL is only used on first call instead of a configured auto config URL in Internet Explorer.

WinHTTPClientMBS.InternetGetProxyInfo(URL as string, Host as string) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Network MBS Win Plugin 14.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Retrieves proxy data for accessing specified resources.

This function can only be called by dynamically linking to "JSProxy.dll" (plugin loads this for you). For better autoproxy support, use HTTP Services (WinHTTP) version 5.1 instead.

Url: Secifies the URL of the target HTTP resource.
HostName: Specifies the host name of the target URL.

Returns the URL of the proxy to use in an HTTP request for the specified resource.
Returns empty string on any error.

WinHTTPClientMBS.SetDefaultProxyConfiguration(info as WinHTTPClientProxyInfoMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Network MBS Win Plugin 14.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Sets the default WinHTTP proxy configuration in the registry.

see also
http://msdn.microsoft.com/en-us/library/windows/desktop/aa384113(v=vs.85).aspx

SetDefaultProxyConfiguration changes the proxy configuration set by ProxyCfg.exe.
The default proxy configuration set by this function can be overridden for an existing WinHTTP session by calling SetOption and specifying the OptionProxy flag. The default proxy configuration can be overridden for a new session by specifying the configuration with the WinHttpOpen function.
The dwAccessType member of the WinHTTPClientProxyInfoMBS structure pointed to by pProxyInfo should be set to kAccessTypeNamedProxy if a proxy is specified. Otherwise, it should be set to kAccessTypeDefaultProxy.
Any new sessions created after calling this function use the new default proxy configuration.
Even when WinHTTP is used in asynchronous mode (that is, when WINHTTP_FLAG_ASYNC has been set in WinHttpOpen), this function operates synchronously. The return value indicates success or failure. To get extended error information, call GetLastError.
Note For Windows XP and Windows 2000, see the Run-Time Requirements section of the WinHTTP start page.

The items on this page are in the following plugins: MBS Win Plugin.


The biggest plugin in space...