Пример #1
0
 /// <summary>
 /// Release / invalidate handle.
 /// </summary>
 public static void CloseProcess()
 {
     Win32API.CloseHandle(handle);
 }
Пример #2
0
        /// <summary>
        /// Get handle to process with read and write permissions.
        /// </summary>
        /// <param name="pId">process ID</param>
        /// <returns>handle</returns>
        public static IntPtr OpenProcess(int pId)
        {
            handle = Win32API.OpenProcess(Win32API.PROCESS_VM_READ | Win32API.PROCESS_VM_WRITE | Win32API.PROCESS_VM_OPERATION, false, pId);

            return(handle);
        }