Determining what process has a lock on a file

梦想的初衷 提交于 2019-12-04 08:46:26

Sysinternals FileMon has some information (scroll down) on how they accomplished this in older windows versions.

Process monitor is their latest version, but it doesn't give many clues as to how they do it. There are some knowledge base articles linked there, though, that should lead you to this information.

-Adam

Sysinternals handle.exe is the first step. Or use Process Explorer's Find Handle or DLL. It's always safer to kill the process than close the handle, though.

Programmatically, it's a matter of writing a kernel driver that reads the Windows handle table.

ProcessMon (for finding) and Unlocker (at least for unlocking) are useful too.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!