J
J
Joomboosick2019-07-15 10:06:14
C++ / C#
Joomboosick, 2019-07-15 10:06:14

How to get all dlls of a c# process?

The bottom line is that Process.modules returns an error, access denied
I need to get a list of all dlls related to the process

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Peter, 2019-07-15
@Joomboosick

Then you need to switch to native methods.

[DllImport("psapi.dll", CallingConvention = CallingConvention.StdCall, SetLastError = true)]
public static extern int EnumProcessModulesEx(SafeProcessHandle handle, IntPtr modules, uint size, ref int needed, int dwFilterFlags);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question