Page 1 of 1

GETURLTOFILE error on windows 7 (WINOLE/1007)

Posted: Fri Apr 10, 2020 10:30 pm
by Silvio.Falconi
On Windows 10

oHtp = CREATEOBJECT( "Msxml2.XMLHTTP.6.0" )

run ok on windows seven I have this error

Code: Select all

   Error description: (DOS Error -2147352567) WINOLE/1007  Download della risorsa specificata non riuscito.
 (0x800C0008): msxml6.dll
is there anothe command on Windows seven ?
this is the function

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

Re: GETURLTOFILE error on windows 7 (WINOLE/1007)

Posted: Sat Apr 11, 2020 10:01 am
by Antonio Linares
Silvio,

You may try FWH function WebImage( cURL )

Re: GETURLTOFILE error on windows 7 (WINOLE/1007)

Posted: Sat Apr 11, 2020 10:04 am
by Silvio.Falconi
I must download a file from a extern server