PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Getting ID of thread witch uses specific dll file

Hello all.
What is the problem:
There is a process. Process has a number of threads. Several of these threads uses a dll. I need to get IDs of theads which uses this dll.
How it possible to do?

I need to do it for Toshiba G900 communicator - it has terrible button delay. But if to increase thread prior, which uses driver DLL, this delay just disappears.

(process name is gwes.exe, dll name is mainstoneii_keypad_us.dll)

I tried to do this using toolhelp function Module32First and Module32Next functions, but it looks like they don't associate modules and threads.
Though MSDN says that it does: This function retrieves information about the next module associated with a process or thread.

I can't understand - am I wrong somewhere or problem is somewhere else?
There is no association between threads and DLLs in windows. Only processes and DLLs.
This is bad...
But is it possible somehow to refer to the same thread of the process? Maybe threads getting some special order when getting their IDs or something like this?
Does any constant parameter of a thread(except its prior) exists?
No this isn't possible. You can find threads in a process, but not "threads that use a DLL" because such a thing doesn't exist. Processes use DLLs, not threads.

Have you tried playing with the process' priority instead of the threads?
I tried to search about it, but it looks like windows mobile processes does not have prioritets...?
I found nothing about process prioritets in windows mobile in MSDN: http://msdn.microsoft.com/en-us/library/aa908727.aspx
Sounds like you are right. I didn't know that.