Function Reference


_WinAPI_UrlApplyScheme

Determines a scheme for a specified URL string, and returns a string with an appropriate prefix

#include <WinAPIShPath.au3>
_WinAPI_UrlApplyScheme ( $sUrl [, $iFlags = 1] )

Parameters

$sUrl The URL.
$iFlags [optional] The flags that specify how to determine the scheme. It can be a combination of the following values.
$URL_APPLY_DEFAULT (Default)
$URL_APPLY_GUESSSCHEME
$URL_APPLY_GUESSFILE
$URL_APPLY_FORCEAPPLY

Return Value

Success: The URL converted to the "//URL_string format" scheme.
Failure: Sets the @error flag to non-zero, @extended flag may contain the HRESULT error code.

See Also

Search UrlApplyScheme in MSDN Library.

Example

#include <WinAPIShPath.au3>

Local $sUrl = 'www.microsoft.com'

ConsoleWrite(_WinAPI_UrlApplyScheme($sUrl) & @CRLF)

ConsoleWrite(_WinAPI_UrlApplyScheme('') & @CRLF)