How can I discover the DLL used by a Window of a running .NET WinForms app?
I'd like to find a tool that I can use to point at a specific Window in a large application with many DLLs and discover the path (or at least the name) of the DLL used to r开发者_开发技巧ender this window.
This is simply not possible. Windows are rendered by window procedures, WndProcs.
These WndProcs can, and invariably are, implemented in many different DLLs. Typically the code which registers the DLL also implements the window procedure. A window procedure is called whenever a message needs to be processed. The window procedure will process some windows messages, in a switch statement, say. Then for those messages for which the default system processing suffices, will call DefWindowProc
.
But DefWindowProc
is in a different DLL (user32) to the rest of the window procedure. Indeed it will no doubt call lots of routines in all sorts of different DLLs.
Not sure if this is exactly what you're looking for, but it is a great tool, and it does show you, for any process, what DLLs are being used as well as a ton of other information about any given process.
Process Monitor
EDIT: I'm sorry, I actually meant to refer you to Process Explorer, but I will leave the above link as it's a great tool as well, but this is what I was trying to point you towards:
Process Explorer
精彩评论