(0x800C0005): msxml6.dll
I use with
oHtp = CREATEOBJECT( "Msxml2.XMLHTTP.6.0" )
same function on Windows 10 run perfectly
- Code: Select all Expand view
- Static Function DescargFichDesdeUrl(cPath)
local cZipFile := cPath+"storico_"+DtoS(Date())+".zip"
local cUrl := URL_
IF GETURLTOFILE(cUrl,cZipFile)
Msginfo("File scaricato")
else
Msginfo("File non scaricato","Attenzione")
endif
RETURN NIL
STATIC FUNCTION GETURLTOFILE( cUrl, cFile, cUsr, cPsw )
LOCAL lOk := .F.
LOCAL oHtp, oStr, ex
DEFAULT cFile := CFILENAME( STRTRAN( cUrl, "/", "\" ) )
//TRY
oHtp = CREATEOBJECT( "Msxml2.XMLHTTP.6.0" )
oHtp:Open( "POST", cUrl, .F., cUsr, cPsw )
oHtp:Send()
IF oHtp:Status != 200 THEN BREAK
MemoWrit(cFile,oHtp:ResponseBody)
//oStr = CREATEOBJECT( "ADODB.Stream" )
//oStr:Open()
//oStr:Type = 1
//oStr:Write( oHtp:ResponseBody )
//oStr:SaveToFile( cFile, 2 )
//oStr:Close()
lOk = .T.
//CATCH ex
// ? ex:message
//END
RETURN lOk
any solution ?