Tankbuster Posted February 6, 2010 Share Posted February 6, 2010 Hello, I found in the 3.3.4.0 the new function InetGetSize. Nice but if I query a file about 6.1 GB it looks like the value returnd is an integer. 6.1 GB = -2038644736. Is this realetd to Autoit or to the webserver ? How do I avoid this issue? Is there a way to get the real value. (btw: I searched the manual and the forum ....) Thank you. Link to comment Share on other sites More sharing options...
Richard Robertson Posted February 6, 2010 Share Posted February 6, 2010 6.1 GB is a value that is larger than a 32 bit integer can hold. AutoIt works with 32 bit signed integers for the most part but has support for 64 bit integers on certain functions. This problem is due to AutoIt not having enough space to work with the number using the current implementation. You might consider filing a bug report. Link to comment Share on other sites More sharing options...
Tankbuster Posted February 6, 2010 Author Share Posted February 6, 2010 This problem is due to AutoIt not having enough space to work with the number using the current implementation. You might consider filing a bug report.Ok, that was actually what was the result after studying the docu, but I wanted to be sure.I will try the bug report / RFC.Thank you very much. Link to comment Share on other sites More sharing options...
modoran Posted February 7, 2010 Share Posted February 7, 2010 The issue could also be related to the webserver. I've seen files bigger than 2gb on some webservers that shows as 2gb in size even I use 64 bit windows. Link to comment Share on other sites More sharing options...
jchd Posted February 7, 2010 Share Posted February 7, 2010 Seems like a local (AutoIt) 32-bit weakness. Try with this 2.6 Gb Linux ISO:http://mirrors.kernel.org/gentoo/releases/amd64/10.1/livedvd-amd64-multilib-10.1.isoThe site announces the right size, just as FireFox if you try to download it this way, but InetGetInfo reports a file size of -1496317952 bytes.Can you try on various platforms and confirm, please. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Administrators Jon Posted February 7, 2010 Administrators Share Posted February 7, 2010 I added a bug report. Deployment Blog:Â https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming:Â https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
trancexx Posted February 7, 2010 Share Posted February 7, 2010 I added a bug report.There is a simple solution.Don't use HTTP_QUERY_FLAG_NUMBER for that at all. Go directly with wchar buffer. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Yashied Posted February 7, 2010 Share Posted February 7, 2010 Until then, you can use the MrCreatoR's _InetGetSizeEx() function.ConsoleWrite(_InetGetSizeEx('http://mirrors.kernel.org/gentoo/releases/amd64/10.1/livedvd-amd64-multilib-10.1.iso') & @CR) Func _InetGetSizeEx($sURL) TCPStartup() Local $sHost = StringRegExpReplace($sURL, ".*://(.*?)/.*", "\1") Local $sPage = StringRegExpReplace($sURL, ".*://.*?(/.*)", "\1") Local $sName_To_IP = TCPNameToIP($sHost) Local $iSocket = TCPConnect($sName_To_IP, 80) If $iSocket = -1 Then TCPShutdown() Return SetError(1, 0, "") EndIf Local $sCommand = "HEAD " & $sPage & " HTTP/1.1" & @CRLF $sCommand &= "Host: " & $sHost & @CRLF $sCommand &= "User-Agent: AutoIt/" & @AutoItVersion & " (Windows; U; Windows NT 5.1; en-US; rv:1.8.1)" & @CRLF $sCommand &= "Referer: " & $sHost & @CRLF $sCommand &= "Connection: close" & @CRLF & @CRLF Local $BytesSent = TCPSend($iSocket, $sCommand) If $BytesSent = 0 Then TCPShutdown() Return SetError(2, @error, 0) EndIf Local $sRecv = "", $sCurrentRecv While 1 $sCurrentRecv = TCPRecv($iSocket, 16) If @error <> 0 Then ExitLoop If $sCurrentRecv <> "" Then $sRecv &= $sCurrentRecv WEnd TCPCloseSocket($iSocket) TCPShutdown() $sRecv = StringRegExpReplace($sRecv, "(?s).*Content-Length: (.*?)[\r\n].*", "\1") If @extended = 0 Then Return SetError(2, 0, "") Return $sRecv EndFunc ;==>_InetGetSizeEx My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... 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