ImageEn, unit iexWindowsFunctions |
|
IEIsFileLocked
Declaration
function IEIsFileLocked(const FileName: string): Boolean
Description
Returns true if the file is being used.
| Demos\PDF\PDFPrinter\PdfPrinter.dpr |
// Wait for file to be unlocked, then delete it
for i := 1 to 60 do // Give up waiting after 60 seconds
if FileInUse( Filename ) then
begin
Sleep( 1000 );
Application.ProcessMessages();
end;
DeleteFile( Filename );