Click here to Skip to main content
15,893,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Comments
Jibesh 29-Jan-13 2:16am    
are you trying to find the loaded dll in your assembly or any application?
manuthebos 29-Jan-13 2:29am    
i want to hook the DLL loading.
manuthebos 29-Jan-13 2:16am    
is any way to hook DLL loading ?

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900