如何找到打开的DLL [英] how to find opened DLL

查看:88
本文介绍了如何找到打开的DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能找到打开/加载的dll以及加载了哪个进程。我希望在C#.NET中加载DLL时触发事件

how can i found opened/loaded dll and which process is loaded .And i want trigger an event at time of DLL Loading in C#.NET

推荐答案

那里是一个名为ListDll.exe的Sysinternals工具,它列出了加载到内存中的所有dll以及加载它们的进程。



http://technet.microsoft.com/en-us/sysinternals/bb795533 [ ^ ]



可以使用参数执行只提供特定进程名称,pid或dll名称的输出。一个快速简便的解决方案是定期从程序中调用ListDlls.exe并解析其输出。问题是ListDlls.exe必须以管理员身份运行。



以编程方式(直接从您的代码中恢复信息),我不确定该怎么做。也许使用挂钩和未记录的Windows API函数。但这不适合胆小的人。
There is a Sysinternals tools called ListDll.exe that lists all the dlls loaded into memory and which process that has loaded them.

http://technet.microsoft.com/en-us/sysinternals/bb795533[^]

It can be executed with arguments to just give output on a specific process name, pid, or dll name. A quick and easy solution is to periodically call ListDlls.exe from your program and parse its output. The catch is that ListDlls.exe must run as administrator.

Programatically (retreieve the info directly from your code), I am not really sure how to do it. Perhaps using hooking and undocumented windows API functions. But that is not for the faint of heart.


这篇关于如何找到打开的DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆