Function Reference

InetClose

Closes a handle returned from InetGet().

InetClose ( handle )

 

Parameters

handle A handle return from InetGet().

 

Return Value

True if the handle was found and closed, False if not.

 

Remarks

InetGet() handles must be closed or resources will leak.

Closing the handle to a download still in progress will cancel the download.

 

Related

InetGet

 

Example


Local $hDownload = InetGet("http://www.autoitscript.com/autoit3/files/beta/update.dat", @TempDir & "\update.dat", 1, 1)
Do
    Sleep(250)
Until InetGetInfo($hDownload, 2)    ; Check if the download is complete.
Local $nBytes = InetGetInfo($hDownload, 0)
InetClose($hDownload)   ; Close the handle to release resourcs.
MsgBox(0, "", "Bytes read: " & $nBytes)