由网友(学会忘记)分享简介:我不断收到这个异常在我的计划。我怎么知道哪个进程锁定它,或者通过程序code或做一些与Windows?I keep getting that exception in my program. How do I know which process locked it, either by program code o...
我不断收到这个异常在我的计划。我怎么知道哪个进程锁定它,或者通过程序code或做一些与Windows?
I keep getting that exception in my program. How do I know which process locked it, either by program code or by doing something with windows?
System.IO.IOException:因为它正由另一个进程使用的进程无法访问该文件'file.ext
推荐答案
您可以使用ProcessExplorer来搜索文件:
You can use ProcessExplorer to search for the file:
http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx刚刚运行,按按Ctrl-F
,并在其中锁定文件的名称类型 - 它会发现所有打开的句柄相匹配的给定的名称,并告诉你哪个进程,它属于。
Just run that, hit Ctrl-F
and type in the name of the file which is locked - it will find all open handles which match the given name, and tell you which process it belongs to.
相关推荐
最新文章