下载源代码
关键代码很简单,在这里
ProcessModuleCollection modules;
if (instance.ProcessName.CompareTo("System") != 0 || instance.ProcessName.CompareTo("Idle") != 0)
{
try
{
////当进程不充允枚举模块时会产生异常
modules = instance.Modules;
foreach (ProcessModule aModule in modules)
{
strToolTip += aModule.ModuleName;
strToolTip += "; ";
}
}
catch (System.ComponentModel.Win32Exception)
{
}
}
具体实现请点击源代码下载
2010-4-7 at 13:19