http Abort method
Return to Introduction  Previous page  Next page
Applies to
auHTTP and auAutoUpgrader components.  

Declaration
procedure Abort(DeleteOutputFile: Boolean = False; HardTerminate: Boolean = False);  

Description
The Abort method terminates execution of thread which reads the data from the Web by HTTP(s) protocol. After calling the Abort method, the OnAborted event occurs.  
 
The Abort method contains 2 optional parameters:  
DeleteOutputFile — deletes the file, with downloaded information, specified in OutputFileName property, if True;  
HardTerminate — terminate the thread which run the download process imediately, without releasing Internet handles. iiwarning Do not set this parameter to True, unless it really necessary, since hard termination can lead to memory leaks!  
 
iiinfo The download process can be resumed, in case if you downloading data to file specified in OutputFileName property. You just need specify the incompletely downloaded file to OutputFileName property again and call Resume method.  
 
tip However, even if you're downloading the data just to memory instead of file, the component can easily resume the downloading (on call of Read method), because of smart behaviours of Internet Explorer's cache. In case if you have specified to use cache in the CacheOptions property — everything can be retreived from cache, even broken, interrupted downloads.  

See also
OutputFileName and CacheOptions properties;  
Read, Pause and Resume methods;  
OnAborted event.  
File not found.