Much like the subject says, what are some functions that could be used to find DLLs that are used by a process? I need something to return a list of processes, and something to give me information on those processes (especially DLL use, but company name and version in EXE might be useful too). For some reason, I was under the impression that there was a function called "EnumerateWindows", but I can't find it listed under MSDN anywhere.

---

The whole point of this is to find a way of identifying games that are running. In the past I used a timer and FindWindow to kill certain things, but that doesn't always seem to work, and it means I have to figure out every game that somebody would want to run.

I've thought of trying to peek some memory of a process and indentifying them that way, via a list of fingerprints. Somewhat how weak virus scanners work. This would work fairly well, but if someone was smart enough to pack/unpack the file then it would be defeated.

Then I could identify via EXE resource information... company name, version, etc.. again too much work to keep up with all the games being played.

So the final solution was to do something more generic. What I want to do now is look at the DLLs being used. Games generally use either DirectX, OpenGL, or SDL... hopefully I can distinguish from valid applications. D3d is somewhat more specific I guess. And I could always handle exceptions because some there are far less valid applications being used than potential games.

The point is that too many people waste their 80 minutes in Info Tech class and I want a little program exercise to get me going again.
Posted on 2003-05-08 13:47:27 by matthew
The function is called EnumWindows
Posted on 2003-05-08 13:51:03 by donkey
Another way to do it is to use EnumProcesses and EnumProcessModules, because some games will use DirectX and therefore have no standard window to enumerate. This API functionality is a little bit messed up because it was implemented in two different ways in 9x and NT (it is implemented as ToolHelp32 in 9x, eventually the 9x team won the battle and their method is the way it is done in XP).

Check out these links for more info: here, here, and here.
Posted on 2003-05-09 06:41:04 by sluggy