[windows] Can't delete a closed file?

Cym13 cpicard at openmailbox.org
Thu May 9 11:28:17 UTC 2019


On Thursday, 9 May 2019 at 11:11:56 UTC, Rumbu wrote:
> Since deploying a dll is a suspect behaviour outside a normal 
> installation process, most probably you have a lock on the file 
> put by windows defender or an antivirus if installed.

Thanks for your input but I'm absolutely certain that it's not 
related to AV since I made sure to test in an AV-free environment 
(and I'd expect AV to kick in before loading the DLL, but I may 
be wrong on that).

> FreeLibrary doesn't guarantee that the dll file is closed, 
> maybe other windows processes are accessing it (like prefetch).
>
> Anyway, you are deploying a dll just to read a file, It's over 
> engineering, use WinAPI UrlDownloadToFile instead or any other 
> winapi functions.

Well, that's just a test script, it's feature or DLL doesn't 
matter.


More information about the Digitalmars-d-learn mailing list