开发者

In Windows, can you programmatically (C++) detect which DLLs have been loaded by other running programs?

I hope this is not a no-brainer question, but in Windows, is it possible to programmatically (C++) check which DLLs have been loaded by other concurrently running programs?

I know that the GetModuleHandle functions can be used to detect DLLs开发者_StackOverflow中文版 that have been loaded by the current program, but it does not work across program boundaries.

Any ideas?


Toolhlp32.dll does that. See here: http://msdn.microsoft.com/en-us/library/ms686840(v=VS.85).aspx

The API you ultimately want is Module32First/Next.


The PSAPI ( http://msdn.microsoft.com/en-us/library/ms682621(v=vs.85).aspx ) also provides a few functions to do spelunking through the system process and modules list, it can also pick up some of the modules that toolhlp32 might miss for various reasons (such as being manually hidden). It also works on x64 processes too iirc

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜