I would like to get a list of used DLLs from application itself. My goal is to compare the list with hardcoded one to see if any DLL is injected. I can not find any examples in Google.
相关问题
- How to know full paths to DLL's from .csproj f
- Is there a Delphi 5 component that can handle .png
- Is there a way to install Delphi 2010 on Windows 2
- Is TWebBrowser dependant on IE version?
- iOS objective-c object: When to use release and wh
相关文章
- vs2017wpf项目引用dll的路径不正确的问题
- Best way to implement MVVM bindings (View <-> V
- Determine if an executable (or library) is 32 -or
- Windows EventLog: How fast are operations with it?
- How to force Delphi compiler to display all hints
- Coloring cell background on firemonkey stringgrid
- Are resource files compiled as UNICODE or ANSI cod
- HelpInsight documentation in Delphi 2007
You can use PSAPI for this. The function you need is
EnumProcessModules
. There's some sample code on MSDN.The main alternative is the Tool Help library. It goes like this:
CreateToolhelp32Snapshot
.Module32First
.Module32Next
.CloseHandle
to destroy the snapshot.Personally, I prefer Tool Help for this task. Here's a very simple example:
If you want a non-programmatic solution, just run the app under the Dependency Walker.
It will not only show static dependencies but will also trap and track dynamic loading of modules at runtime and let you know which module called
LoadLibrary
.Install Jedi Code Library (http://jcl.sf.net)
It has an exceptions reporting dialog which includes stack trace, Windows/hardware brief, and - the list of loaded DLLs and their versions. You can copy or call that part, generating this list, out of it.