forked from DaxxTrias/Process.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPSAPI.cs
More file actions
25 lines (23 loc) · 728 Bytes
/
PSAPI.cs
File metadata and controls
25 lines (23 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;
using System.Runtime.InteropServices;
using System.Text;
using ProcessNET.Native.Types;
namespace ProcessNET.Native
{
public static class PSAPI
{
[DllImport("psapi.dll", SetLastError = true)]
public static extern bool EnumProcessModulesEx(
IntPtr hProcess,
[Out] IntPtr lphModule,
UInt32 cb,
[MarshalAs(UnmanagedType.U4)] out UInt32 lpcbNeeded,
DwModuleFilterFlag dwff);
[DllImport("psapi.dll")]
public static extern uint GetModuleFileNameEx(
IntPtr hProcess,
IntPtr hModule,
[Out] StringBuilder lpBaseName,
[In][MarshalAs(UnmanagedType.U4)] int nSize);
}
}