Modify

Opened 3 years ago

Last modified 9 months ago

#3659 assigned Bug

InetClose() always return "False".

Reported by: the.tersion@… Owned by: Jpm
Milestone: Component: AutoIt
Version: 3.3.14.5 Severity: None
Keywords: inetclose Cc:

Description

The reference of InetClose() says:
Return Value
True: if the handle was found and closed.
False: if not.

But in this simple example, InetClose() alway return "False":

#include <InetConstants.au3>

Local $hDownload

$hDownload = InetGet("http://www.autoitscript.com/autoit3/files/beta/update.dat", @ScriptDir & "\test.txt", $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND)
ConsoleWrite(@error)
Sleep(5000)
$bReturn = InetClose($hDownload)
MsgBox(0, "", $bReturn)

Even here while download is effectively interrupted, InetClose() return "False":

Local $hDownload = InetGet("https://www.autoitscript.com/autoit3/files/archive/autoit/autoit-v3.3.14.5-setup.exe", @ScriptDir & "\test.exe", 1, 1)
ConsoleWrite($hDownload & @crlf)
ConsoleWrite(@error & @crlf)
$bReturn = InetClose($hDownload)
ConsoleWrite($bReturn & @crlf)
ConsoleWrite($hDownload & @crlf)

Output in console:
1
0
False
1

Attachments (0)

Change History (1)

comment:1 Changed 9 months ago by Jpm

  • Owner set to Jpm
  • Status changed from new to assigned

Hi,
FIx sent to Jon

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as assigned The owner will remain Jpm.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.