mirror of
https://github.com/winsw/winsw.git
synced 2025-12-10 18:37:28 +08:00
Improve ProcessExtensions
This commit is contained in:
@@ -34,12 +34,20 @@ namespace WinSW.Native
|
||||
int processInformationLength,
|
||||
IntPtr returnLength = default);
|
||||
|
||||
[DllImport(Libraries.Kernel32)]
|
||||
internal static extern Handle OpenProcess(ProcessAccess desiredAccess, bool inheritHandle, int processId);
|
||||
|
||||
[DllImport(Libraries.Advapi32, SetLastError = true)]
|
||||
internal static extern bool OpenProcessToken(
|
||||
IntPtr processHandle,
|
||||
TokenAccessLevels desiredAccess,
|
||||
out Handle tokenHandle);
|
||||
|
||||
internal enum ProcessAccess : uint
|
||||
{
|
||||
QueryInformation = 0x0400,
|
||||
}
|
||||
|
||||
internal enum PROCESSINFOCLASS
|
||||
{
|
||||
ProcessBasicInformation = 0,
|
||||
|
||||
Reference in New Issue
Block a user