public void WriteConsoleInput(InputRecord buffer) { if (!NativeMethods.WriteConsoleInput(_inputHandle, new[] { buffer }, 1, out _)) { HandleError(); } }
public static extern bool ReadConsoleInput( IntPtr hConsoleInput, out InputRecord lpBuffer, int nLength, out int lpNumberOfEventsRead);