Find out which process is locking a DLL without extra tools

January 26, 2009   11:28


unlock dll in useToday I got the “The process cannot access the file … because it is being used by another process” error again, during a development build. And as long as the DLL is locked, it’s not possible to do a successful build.

Most sites and tips on the internet suggest to download some tool to detect which process is using the DLL. It seems that not many people are aware that, since Windows XP, we don’t need to download (or even pay for) a tool to detect this.

Just launch the windows console and navigate to the directory of the DLL. Now type “tasklist.exe /m locked.dll” and it will show you exactly which processes have loaded and locked this DLL.

Happy unlocking ;)

Tags: , , , , , .









The content expressed in this blog are those of Edwin Vriethoff and do not represent his employer's view in anyway. The contents of this blog has been carefully put together, but Edwin Vriethoff is not responsible in any way for any direct or indirect harm caused by individuals or organizations using the content of this blog in any way.