zoukankan      html  css  js  c++  java
  • 获取进程加载的dll

    获取进程加载的dll

    1 编译为64位程序

    2 字符集(使用多字节字符集)

    3 管理员运行

     1 #include <WINDOWS.H>
     2 #include <TLHELP32.H>
     3 #include <ctype.h>
     4 
     5 #include <iostream>
     6 #include <algorithm>
     7 #include <string>
     8 #include <list>
     9 using namespace std;
    10 
    11 
    12 int main(int argc, char* argv[])
    13 {
    14     list<std::string> moudleList;
    15 
    16     int processId = 14112;
    17     MODULEENTRY32 moudle;
    18 
    19     HANDLE handle = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, processId);
    20     if (handle != INVALID_HANDLE_VALUE)
    21     {
    22         moudle.dwSize = sizeof(MODULEENTRY32);
    23         if (Module32First(handle, &moudle))
    24         {
    25             do
    26             {
    27                 std::string str(moudle.szExePath);
    28                 std::transform(str.begin(), str.end(), str.begin(), tolower);
    29                 moudleList.push_back(str);
    30             } while (Module32Next(handle, &moudle));
    31         }
    32 
    33         CloseHandle(handle);
    34     }
    35 
    36     moudleList.sort();
    37     for (auto item : moudleList) {
    38         std::cout << item << std::endl;
    39     }
    40 
    41     return 0;
    42 }
  • 相关阅读:
    ActiveReports打印的问题
    HTML高级应用
    一些常用的asp.net技巧焦点篇
    数据库操作
    [ASP.NET]在后台引用JavaScript
    点击TextBox复制其中内容
    VB.Net基本语句(推荐)
    ADO 对象
    控件不获得焦点
    32款网站优化工具
  • 原文地址:https://www.cnblogs.com/baigoogledu/p/9407012.html
Copyright © 2011-2022 走看看