I allready Kow it
C:\Users\Username\Downloadsbut that's not always the case sometimes "Users" and sometimes "Users" even if the windows is in Italian language
and if at the moment of saving the user changes folder ????
the comand
WinExec( "rundll32.exe url.dll, FileProtocolHandler " + cUrl, 0 )
ELSE
WinExec( "Start " + cUrl, 0 )
it doesn't give me the folder where the file was saved
causing problems for the other function that has to load the file to process it
this is because in window seven I cannot use this function
GETURLTOFILE(cUrl,cZipFile) because the function gives problems
- Code: Select all Expand view RUN
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
on windows 10 run perfectly, on windows Seven No
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com