public static extern bool SetConsoleHistoryInfo(ConsoleHistoryInfo lpConsoleHistoryInfo);
/// <summary> /// Retrieves the history settings for the calling process's console. /// </summary> /// <returns> /// A <see cref="ConsoleHistoryInfo"/> structure with the history settings for the calling process's console. /// </returns> public static ConsoleHistoryInfo GetConsoleHistoryInfo() { var lpConsoleHistoryInfo = new ConsoleHistoryInfo(); WinError.ThrowLastWin32ErrorIfFailed(GetConsoleHistoryInfo(lpConsoleHistoryInfo)); return lpConsoleHistoryInfo; }
public void GetConsoleHistoryInfo() { WinConsole.AllocConsole(); var historyInfo = new ConsoleHistoryInfo(); bool result = WinConsole.GetConsoleHistoryInfo(historyInfo); Trace.WriteLine(TestHelpers.ObjectToString(historyInfo)); Assert.That(result, Is.True); }