我知道如果我们提供 Handle.exe 的绝对路径,它将列出锁定文件的所有进程。
F:\Softwares\Handle>Handle.exe D:\Source\sample.dll
Handle v4.0
Copyright (C) 1997-2014 Mark Russinovich
Sysinternals - www.sysinternals.com
test1.exe pid: 9928 type: File 408: D:\Source\sample.dll
test2.exe pid: 10840 type: File 6A8: D:\Source\sample.dll
test3.exe pid: 15788 type: File 374: D:\Source\sample.dll
test4.exe pid: 10940 type: File 308: D:\Source\sample.dll
test5.exe pid: 15424 type: File 3FC: D:\Source\sample.dll
test6.exe pid: 10076 type: File 8AC: D:\Source\sample.dll
视窗 7 64 位
正如 Handle.exe 所述,我的 sample.dll 被 6 个不同的进程锁定。我想知道哪一行代码实际上保存了每个进程的 sample.dll。我的任务是修复我庞大的应用程序中的句柄泄漏。所以我的问题并没有固定到程序的特定部分。任务是我必须生成包含句柄泄漏诊断谁创建它的报告。泄漏并非特定于文件,它扩展到所有系统资源,如文件、注册表项、事件、信号量、线程...等。
我已经使用 windbg 进行了转储,但我找不到如何诊断转储文件,尤其是处理泄漏。在我大约半天的搜索中,找不到适合我的问题的好的教程或解决方案。
是否有任何命令行工具或任何其他工具可以回答我的问题。