Sign in to follow this  
Followers 0
ken82m

Error allocating memory _FTP_ProgressDownload

6 posts in this topic

#1 ·  Posted (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 by ken82m

My Contributions _StringMultiReplace PC Builders Console - Secure PDF Creator - Cisco VPN Installer MS DNS Server Backup Script - MS DHCP Backup Script IT Admin Console - Toggle Admin Mode - MyMovies-Add Discs Script - IT Help Desk and System Information Tool - Set On Lid Close Power Option - Streaming Media Server & Website "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."

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by ken82m

My Contributions _StringMultiReplace PC Builders Console - Secure PDF Creator - Cisco VPN Installer MS DNS Server Backup Script - MS DHCP Backup Script IT Admin Console - Toggle Admin Mode - MyMovies-Add Discs Script - IT Help Desk and System Information Tool - Set On Lid Close Power Option - Streaming Media Server & Website "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."

Share this post


Link to post
Share on other sites

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 :D


*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

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 :D

Hi,

it's about 6 MB.

I think he must have another problems.........

;-))

Stefan

Edited by 99ojo

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Oh, you found a bug wich was added in the standard-include in the beta :D My original funtion worked...

Found it: Change the order if the params in line 947 :D

$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 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

Share this post


Link to post
Share on other sites

Works perfect now.

Thanks alot this is a great function :D

-Kenny


My Contributions _StringMultiReplace PC Builders Console - Secure PDF Creator - Cisco VPN Installer MS DNS Server Backup Script - MS DHCP Backup Script IT Admin Console - Toggle Admin Mode - MyMovies-Add Discs Script - IT Help Desk and System Information Tool - Set On Lid Close Power Option - Streaming Media Server & Website "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."

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0