Search the Community
Showing results for tags 'winhttp.winhttprequest'.
-
Hi friends, A script of mine stopped working suddenly. I am posting here the part of code that causes the issue. $sPD = "" $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ; Initialize a COM error handler Local $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("POST", "https://cryptlex.com/services/api/pkey/generate", False) $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.Send($sPD) Local $oReceived = $oHTTP.ResponseText Msgbox(0,"", $oReceived) Local $oStatusCode = $oHTTP.Status Msgbox(0,"", $oReceived) ;error handler Func MyErrFunc() Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.number is: " & @TAB & hex($oMyError.number,8) & @CRLF & _ "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _ "err.source is: " & @TAB & $oMyError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oMyError.helpcontext _ ) Endfunc When I execute from the editor is shown an error on the statement : $oHTTP.Send($sPD), Request with object failed. The script got stopped on a Windows -7 machine. I have tested the part of code on a Windows 10 machine and is working good. Here is the details of the error: We intercepted a COM Error ! err.description is: An error occurred in the secure channel support err.windescription: Exception occurred. err.number is: 80020009 err.lastdllerror is: 0 err.scriptline is: 6 err.source is: WinHttp.WinHttpRequest err.helpfile is: err.helpcontext is: 0 Please help. I have searched through out the forum but no help :-(
- 4 replies
-
- winhttp.winhttprequest
- 80020009
-
(and 1 more)
Tagged with: