ozymandius257 Posted November 29, 2019 Share Posted November 29, 2019 I have written a program to get files from a FTP site using _FTPEx.au3. I'm using the _FTP_ListToArray function to get a list of the files, and everything seems OK on 64-bit OS, but it just hangs on a 32-bit OS. Specifically, it is working on Windows 10 64-bit, and Windows 7 64-bit - but hanging on Windows 7 32-bit. A snippet of the code I'm using is... ;read the list of files in the directory Write_To_Log("...getting the list of files on the FTP") Local $returnarray = _FTP_ListToArray($FTPConn, 2) If $returnarray[0] = 0 Then Write_To_Log("...error reading the list of files on the FTP - no files returned") Return False Else ;see if the file was found Local $filefound = False Local $i For $i = 1 To UBound($returnarray) - 1 Write_To_Log("...found the file " & $returnarray[$i]) If $returnarray[$i] = $FTPFileName Then $filefound = True Write_To_Log("...required file found") EndIf Next EndIf Write_To_Log is a function that just writes out to a text file so I can see what's going on - it logs "...getting the list of files on the FTP" and then just hangs. Anyone out there can help? Back up my hard drive? - I can't even find reverse gear. Link to comment Share on other sites More sharing options...
seadoggie01 Posted December 2, 2019 Share Posted December 2, 2019 (edited) The functions are based on WinInet.dll, so you could try seeing what happens when you use this: If DllOpen("wininet.dll") = -1 Then ConsoleWrite("! Error - Unable to open dll.") Else ConsoleWrite("No issues finding Dll.") EndIf Edited December 2, 2019 by seadoggie01 All my code provided is Public Domain... but it may not work. Use it, change it, break it, whatever you want. Spoiler My Humble Contributions:Personal Function Documentation - A personal HelpFile for your functionsAcro.au3 UDF - Automating Acrobat ProToDo Finder - Find #ToDo: lines in your scriptsUI-SimpleWrappers UDF - Use UI Automation more Simply-erKeePass UDF - Automate KeePass, a password managerInputBoxes - Simple Input boxes for various variable types Link to comment Share on other sites More sharing options...
ozymandius257 Posted December 2, 2019 Author Share Posted December 2, 2019 Thanks - tied up today, so I'll have a look tomorrow and get back to you. Back up my hard drive? - I can't even find reverse gear. Link to comment Share on other sites More sharing options...
ozymandius257 Posted December 3, 2019 Author Share Posted December 3, 2019 @seadoggie01 - ran that - there were no issues finding the dll on win 7 32-bit. Back up my hard drive? - I can't even find reverse gear. Link to comment Share on other sites More sharing options...
seadoggie01 Posted December 3, 2019 Share Posted December 3, 2019 Sorry, should've seen that. Sounds like you're getting stuck in the (internal) __FTP_ListToArray function... there's a do - while loop in there that is checking for another file. I read about the Dll calls it's making, but none seem to indicate anything different with 32/64 versions. You can try backing up FTPEx.au3 and editing it to try to find where it's erroring, but I don't see any issues 😐 All my code provided is Public Domain... but it may not work. Use it, change it, break it, whatever you want. Spoiler My Humble Contributions:Personal Function Documentation - A personal HelpFile for your functionsAcro.au3 UDF - Automating Acrobat ProToDo Finder - Find #ToDo: lines in your scriptsUI-SimpleWrappers UDF - Use UI Automation more Simply-erKeePass UDF - Automate KeePass, a password managerInputBoxes - Simple Input boxes for various variable types Link to comment Share on other sites More sharing options...
ozymandius257 Posted December 3, 2019 Author Share Posted December 3, 2019 @seadoggie01 - Durrr - of course - that should have occurred to me... I'll get back to you.... Back up my hard drive? - I can't even find reverse gear. Link to comment Share on other sites More sharing options...
Nine Posted December 3, 2019 Share Posted December 3, 2019 It works fine on win7 32 bits for me. Could you try another site ? I am using : Local $sServer = 'speedtest.tele2.net' “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
ozymandius257 Posted December 4, 2019 Author Share Posted December 4, 2019 @seadoggie01, @Nine - it's still not playing for me, so after lots of fiddling around with FTPEx, I found that it's hanging on the call to the function FtpFindFirstFileW - snippet from FTPEx.au3.... Local $aCallFindFirst = DllCall($__g_hWinInet_FTP, 'handle', 'FtpFindFirstFileW', 'handle', $hFTPSession, 'wstr', "", 'struct*', $tWIN32_FIND_DATA, 'dword', $iFlags, 'dword_ptr', $iContext) It just hangs at that point. Back up my hard drive? - I can't even find reverse gear. Link to comment Share on other sites More sharing options...
ozymandius257 Posted December 5, 2019 Author Share Posted December 5, 2019 @seadoggie01, @Nine - eventually I found out it's the windows firewall - on the 64 bit machines it was just allowing the connection through, but not on the 32-bit machine, even though port 21 was allowed - I had to turn on notifications on the 32-bit machine to get the program added to the firewall. Back up my hard drive? - I can't even find reverse gear. 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