My managed .net application uses third party .net libraries, which use (via PInvoke) unmanaged dlls. I would like to find out, which dlls are loaded. I tried to use "Process Explorer" and "Dependency Walker", but I can only see the managed DLLs.
Any debugger could do this (windbg
for example) - but since it's a good chance you're packing Visual Studio I'll talk about how to do it in that
Attach the Visual Studio debugger to the application, remembering to select only the Native debugger as follows:
Once you're attach, hit Debug -> Break and then press [CTRL] + [ALT] + [U]
to bring up the Modules window (it's on the menu somewhere but I can't find it!) - here's an example shot from the Samsung Kies application my desktop (which uses WPF):
In my case I enabled the Managed debugger too, and moved the process name to the start of the columns list for the purposes of that screenshot.
If the process name has : Native
after it, then it's an unmanaged DLL (well, it could also be mixed-mode I suppose).
Note that all processes in Windows will always have a good long list of unmanaged DLLs loaded; because Windows is unmanaged at it's heart and is the ultimate host of the application.
But certainly you can use this list as a starting point and filter down from there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With