zoukankan      html  css  js  c++  java
  • 360进程管理器原理

    看了360进程管理器,可以查看正在运行程序所依赖的动态库文件。但是我想把依赖的文件都提取出来,就写了下面的小程序。

            private void button1_Click(object sender, EventArgs e)
            {
                string fileName = "";
                string filePath = "";
                int num = 0;
                foreach (System.Diagnostics.Process p in System.Diagnostics.Process.GetProcessesByName(textBox1.Text))
                {
                    foreach(System.Diagnostics.ProcessModule m in p.Modules)
                    {
                        
                        fileName = fileName + m.FileName + "\n";
                        //添加过滤条件,提出所需的动态库
                    if (m.FileName.ToLower().StartsWith("D:\\DLL\\program"))
                        {
                            filePath = "E:\\dll\\" + Path.GetFileName(m.FileName);
                            File.Copy(m.FileName, filePath, true);
    
                        }
                    }
                }
            }
    
  • 相关阅读:
    POJ1811 Prime Test
    HDU3864 D_num
    HDU2138 How many prime numbers
    SPOJ1812 LCS2
    SPOJ1811 LCS
    SPOJ8222 NSUBSTR
    BZOJ4237 稻草人
    洛谷P3601 签到题
    ThreadLocal 线程的私有内存
    netty in action 笔记 二
  • 原文地址:https://www.cnblogs.com/cjingzm/p/2114916.html
Copyright © 2011-2022 走看看