mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
25 lines
699 B
C#
25 lines
699 B
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace Remotely_Library.Win32_Classes
|
|
{
|
|
public static class Kernel32
|
|
{
|
|
#region DLL Imports
|
|
|
|
[DllImport("kernel32.dll", SetLastError = true)]
|
|
public static extern bool CloseHandle(IntPtr hSnapshot);
|
|
|
|
[DllImport("kernel32.dll")]
|
|
public static extern uint WTSGetActiveConsoleSessionId();
|
|
|
|
[DllImport("kernel32.dll")]
|
|
public static extern bool ProcessIdToSessionId(uint dwProcessId, ref uint pSessionId);
|
|
|
|
[DllImport("kernel32.dll")]
|
|
public static extern IntPtr OpenProcess(uint dwDesiredAccess, bool bInheritHandle, uint dwProcessId);
|
|
|
|
#endregion
|
|
}
|
|
}
|