CHowell
CHowell

Reputation: 85

Getting C# dlls Process Modules

I have a managed .NET application. I am attempting to get all the process modules that are loaded by a current process so I can figure out what the Base address of these modules are. However when I use the System.Diagnostics.Process.Modules function, I am not getting any of my C# modules back. However, I am getting C++/CLI modules back which is weird because it's all the .NET framework.

The project that I am calling the System.Diagnostics.Process.Modules from references all of my dll's and uses them, however they're just not showing up in the module collection.

Any advice ?

Upvotes: 2

Views: 4195

Answers (1)

Micah Armantrout
Micah Armantrout

Reputation: 6971

Looks like this is a bug in .Net 4.0 that didn't get fixed

http://social.msdn.microsoft.com/Forums/en/netfxappcompatprerelease/thread/5bc8a424-8770-4a34-80e4-6108ea95c28d

Here is some what some used for a work around

https://connect.microsoft.com/VisualStudio/feedback/details/546430/system-diagnostics-process-modules-doesnt-include-managed-dlls

After more research ... I want to improve on my answer. This is a fact a bug in .Net 4.0. I knew I had done it before but it was in Dot Net 3.5 and it works with Managed and UnManaged

Upvotes: 3

Related Questions