Within my program, can i find the handle to a thread that's using a certain dll?
Posted on 2003-10-14 03:51:54 by Ghirai
You can certainly find if a *process* is using a specific dll, just enumerate the processes by using the function EnumProcesses(). Once you have a handle to each process, you can either use EnumProcessModules() to see if a particular dll is loaded, or you can "walk" the process space looking for the PE header of that dll (there is sample source around showing how to do this).


As to whether a specific *thread* is using that dll, it may be possible, but it would involve a lot of hacking around in the process space containing that thread, because the thread will not tell you if it is using a particular dll or not.
Posted on 2003-10-17 07:47:35 by sluggy
Ok, thanks.
Posted on 2003-10-17 07:51:25 by Ghirai