ken82m Posted September 6, 2009 Share Posted September 6, 2009 (edited) I've never used _FTP_ProgressDownload before (From the beta build. I got this sort of working but when the download starts I get an error. As soon as "_FTP_ProgressDownload" executes I get "Error allocating memory." Any help would be appreciated. Thanks, Kenny #include <FTPEx.au3> ;Connect to FTP server $FTPIdentifier = _FTP_Open("ftpupdate") $FTPSession = _FTP_Connect($FTPIdentifier, "ftp.antivirus.com", "", "") FileDelete("ssapiptn.zip") _FTP_DirSetCurrent($FTPSession, "products/pattern/spyware/ssapi/") $1 = _FTP_ProgressDownload($FTPSession, "ssapiptn.zip", "ssapiptn.zip") MsgBox(0,$1, @error) ;Disconnect FTP session _FTP_Close($FTPIdentifier) Edited September 7, 2009 by ken82m "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains." Link to comment Share on other sites More sharing options...
ken82m Posted September 7, 2009 Author Share Posted September 7, 2009 (edited) For what it's worth I tracked the error down to line 961 in the UDF. $buffer = DllStructCreate("byte[" & $x & "]") But how to fix it I have no idea Edited September 7, 2009 by ken82m "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains." Link to comment Share on other sites More sharing options...
ProgAndy Posted September 7, 2009 Share Posted September 7, 2009 Hmm, i can't find an error. Maybe you try to donwload a big file and the UDF can't allocate enough memory to donwload one part. Could you tell me the size of the file, please *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
99ojo Posted September 7, 2009 Share Posted September 7, 2009 (edited) Hmm, i can't find an error. Maybe you try to donwload a big file and the UDF can't allocate enough memory to donwload one part. Could you tell me the size of the file, please Hi,it's about 6 MB. I think he must have another problems.........;-))Stefan Edited September 7, 2009 by 99ojo Link to comment Share on other sites More sharing options...
ProgAndy Posted September 7, 2009 Share Posted September 7, 2009 (edited) Oh, you found a bug wich was added in the standard-include in the beta My original funtion worked... Found it: Change the order if the params in line 947 $glen = _WinAPI_MakeQWord($ai_FTPGetFileSize[2], $ai_FTPGetFileSize[0]) ;FileGetSize($s_RemoteFile) ; to $glen = _WinAPI_MakeQWord($ai_FTPGetFileSize[0], $ai_FTPGetFileSize[2]) //Edit: added bugreport: #1167 Edited September 7, 2009 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
ken82m Posted September 7, 2009 Author Share Posted September 7, 2009 Works perfect now. Thanks alot this is a great function -Kenny "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains." Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now