mirror of
https://github.com/snltty/linker.git
synced 2025-11-03 10:01:05 +08:00
test
This commit is contained in:
@@ -93,8 +93,32 @@ public static class Kernel32
|
||||
[DllImport("kernel32.dll")]
|
||||
public static extern bool SetHandleInformation(IntPtr hObject, int dwMask, int dwFlags);
|
||||
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
public static extern bool TerminateProcess(IntPtr hProcess, uint uExitCode);
|
||||
|
||||
|
||||
[DllImport("ntdll.dll", SetLastError = true)]
|
||||
public static extern uint ZwTerminateProcess(IntPtr ProcessHandle, uint ExitStatus);
|
||||
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
public static extern IntPtr OpenProcess(ProcessAccessFlags processAccess, bool bInheritHandle, int processId);
|
||||
[Flags]
|
||||
public enum ProcessAccessFlags : uint
|
||||
{
|
||||
Terminate = 0x0001,
|
||||
CreateThread = 0x0002,
|
||||
VirtualMemoryOperation = 0x0008,
|
||||
VirtualMemoryRead = 0x0010,
|
||||
VirtualMemoryWrite = 0x0020,
|
||||
DuplicateHandle = 0x0040,
|
||||
CreateProcess = 0x0080,
|
||||
SetQuota = 0x0100,
|
||||
SetInformation = 0x0200,
|
||||
QueryInformation = 0x0400,
|
||||
QueryLimitedInformation = 0x1000,
|
||||
Synchronize = 0x100000
|
||||
}
|
||||
[DllImport("ntdll.dll", SetLastError = true)]
|
||||
public static extern uint NtTerminateProcess(IntPtr ProcessHandle, uint ExitStatus);
|
||||
|
||||
public struct SYSTEMTIME
|
||||
{
|
||||
@@ -109,4 +133,7 @@ public static class Kernel32
|
||||
}
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
public static extern bool SetSystemTime(ref SYSTEMTIME time);
|
||||
|
||||
[DllImport("kernel32.dll")]
|
||||
public static extern IntPtr GetCurrentProcess();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user