added EnumProcessModulesEx with support for 32bit/64bit module querying

git-svn-id: svn://svn.code.sf.net/p/processhacker/code@2325 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
dmex04
2009-11-01 00:45:54 +00:00
parent 59d36a0bc7
commit e8facaf03b
2 changed files with 20 additions and 1 deletions
@@ -212,6 +212,15 @@ namespace ProcessHacker.Native.Api
Moveable = 0x00000004
}
[Flags]
public enum ModulesFilterFlag : int
{
Default = 0x0,
x32Bit = 0x01,
x64Bit = 0x02,
All = 0x03
}
public enum LogonFlags : uint
{
LogonWithProfile = 1,
@@ -1079,7 +1079,7 @@ namespace ProcessHacker.Native.Api
[In] int ProcessId
);
[DllImport("psapi.dll")]
[DllImport("psapi.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool EnumProcessModules(
[In] IntPtr ProcessHandle,
@@ -1087,6 +1087,16 @@ namespace ProcessHacker.Native.Api
[In] int Size,
[Out] out int RequiredSize
);
[DllImport("psapi.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool EnumProcessModulesEx(
[In] IntPtr ProcessHandle,
[Out] IntPtr[] ModuleHandles,
[In] int Size,
[Out] out int RequiredSize,
[In] ModulesFilterFlag dwFilterFlag
);
[DllImport("psapi.dll", CharSet = CharSet.Unicode)]
public static extern int GetModuleBaseName(