Attempts to correct a URL whose protocol identifier is incorrect
#include <WinAPIShPath.au3>
_WinAPI_UrlFixup ( $sUrl )
$sUrl | The URL to be corrected. |
Success: | The corrected URL, or the original URL if no correction was needed. |
Failure: | Sets the @error flag to non-zero, @extended flag may contain the HRESULT error code. |
Search UrlFixupW in MSDN Library.
#include <WinAPIShPath.au3>
Local $asUrl[3] = ['http://www.microsoft.com', 'htps:\\www.microsoft.com', 'http:www.microsoft.com']
For $i = 0 To 2
ConsoleWrite(StringFormat('%-27s' & _WinAPI_UrlFixup($asUrl[$i]), $asUrl[$i]) & @CRLF)
Next