dragana-r / autoit-winhttp

Automatically exported from code.google.com/p/autoit-winhttp
70 stars 20 forks source link

_WinHttpCrackUrl 122 error #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Code:
#RequireAdmin
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=build\setup_x86.Exe
#AutoIt3Wrapper_Outfile_x64=build\setup_x64.Exe
#AutoIt3Wrapper_Res_Language=1033
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <WinAPISys.au3>
#include <WinHttp.au3>
#include <Array.au3>
Func test()
    Global $aUrl = _WinHttpCrackUrl("http://coolsubdomain.example.com/path/?someparam1=somevalue1&someparam2=somevalue2&someparam3=This%20only%20returns%20the%20public%20IP%20address%20of%20a%20computer%20or%20network%20(i.e.%20the%20public%20IP%20on%20the%20WAN%20link%20of%20your%20NAT%20router).%20The%20address%20is%20determined%20by%20accessing%20an%20external%20IP%20discovery%20web%20site.%20The%20sites%20used%20are%20http%3A%2F%2Fcheckip.dyndns.org%2C%20http%3A%2F%2Fwww.myexternalip.com%2Fraw%20and%20http%3A%2F%2Fwww.bot.whatismyipaddress.com")
    If @error Then
        Local $iError = 'ERROR:' &  _WinAPI_GetLastError() & ": " & _WinAPI_GetLastErrorMessage()
        MsgBox(BitOR($MB_SYSTEMMODAL, $MB_ICONHAND), "",$iError)
        Return False
    EndIf
    _ArrayDisplay($aUrl,'')

EndFunc
test()
Got 122 error.

Original issue reported on code.google.com by sergeosp...@gmail.com on 10 Jun 2014 at 10:25