/trunk/xPlatform.x86.kernel32/kernel32.cs
# · C# · 4523 lines · 3276 code · 1245 blank · 2 comment · 0 complexity · aa90e90fe4541ff77d5ee0114ff89b7d MD5 · raw file
Large files are truncated click here to view the full file
- using System;
- using System.Text;
- using xPlatform.Flags;
- using System.Runtime.InteropServices;
-
- namespace xPlatform.x86.kernel32
- {
- [Serializable]
- public partial class kernel32 : ModuleBase
- {
- [NonSerialized]
- public const string ModuleName = "kernel32.dll";
- }
-
- #region Atom functions
-
- partial class kernel32
- {
- [DllImport(ModuleName), CLSCompliant(false)]
- public static extern ATOM AddAtomA(IntPtr lpString);
-
- [DllImport(ModuleName, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern ATOM AddAtomA(string lpString);
-
- [DllImport(ModuleName), CLSCompliant(false)]
- public static extern ATOM AddAtomW(IntPtr lpString);
-
- [DllImport(ModuleName, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern ATOM AddAtomW(string lpString);
-
- [DllImport(ModuleName), CLSCompliant(false)]
- public static extern ATOM DeleteAtom(ATOM nAtom);
-
- [DllImport(ModuleName), CLSCompliant(false)]
- public static extern ATOM FindAtomA(IntPtr lpString);
-
- [DllImport(ModuleName, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern ATOM FindAtomA(string lpString);
-
- [DllImport(ModuleName), CLSCompliant(false)]
- public static extern ATOM FindAtomW(IntPtr lpString);
-
- [DllImport(ModuleName, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern ATOM FindAtomW(string lpString);
-
- [DllImport(ModuleName), CLSCompliant(false)]
- public static extern uint GetAtomNameA(ATOM nAtom, IntPtr lpBuffer, int nSize);
-
- [DllImport(ModuleName, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern uint GetAtomNameA(ATOM nAtom, StringBuilder lpBuffer, int nSize);
-
- [DllImport(ModuleName), CLSCompliant(false)]
- public static extern uint GetAtomNameW(ATOM nAtom, IntPtr lpBuffer, int nSize);
-
- [DllImport(ModuleName, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern uint GetAtomNameW(ATOM nAtom, StringBuilder lpBuffer, int nSize);
-
- [DllImport(ModuleName), CLSCompliant(false)]
- public static extern ATOM GlobalAddAtomA(IntPtr lpString);
-
- [DllImport(ModuleName, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern ATOM GlobalAddAtomA(string lpString);
-
- [DllImport(ModuleName), CLSCompliant(false)]
- public static extern ATOM GlobalAddAtomW(IntPtr lpString);
-
- [DllImport(ModuleName, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern ATOM GlobalAddAtomW(string lpString);
-
- [DllImport(ModuleName), CLSCompliant(false)]
- public static extern ATOM GlobalDeleteAtom(ATOM nAtom);
-
- [DllImport(ModuleName), CLSCompliant(false)]
- public static extern ATOM GlobalFindAtomA(IntPtr lpString);
-
- [DllImport(ModuleName, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern ATOM GlobalFindAtomA(string lpString);
-
- [DllImport(ModuleName), CLSCompliant(false)]
- public static extern ATOM GlobalFindAtomW(IntPtr lpString);
-
- [DllImport(ModuleName, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern ATOM GlobalFindAtomW(string lpString);
-
- [DllImport(ModuleName), CLSCompliant(false)]
- public static extern uint GlobalGetAtomNameA(ATOM nAtom, IntPtr lpBuffer, int nSize);
-
- [DllImport(ModuleName, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern uint GlobalGetAtomNameA(ATOM nAtom, StringBuilder lpBuffer, int nSize);
-
- [DllImport(ModuleName), CLSCompliant(false)]
- public static extern uint GlobalGetAtomNameW(ATOM nAtom, IntPtr lpBuffer, int nSize);
-
- [DllImport(ModuleName, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern uint GlobalGetAtomNameW(ATOM nAtom, StringBuilder lpBuffer, int nSize);
-
- [DllImport(ModuleName), CLSCompliant(false)]
- public static extern int InitAtomTable(uint nSize);
-
- public static IntPtr MAKEINTATOM(int i)
- {
- return new IntPtr((uint)((ushort)i));
- }
- }
-
- #endregion // Atom functions
-
- #region Debugging functions
-
- partial class kernel32
- {
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int ContinueDebugEvent(uint dwProcessId, uint dwThreadId, uint dwContinueStatus);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int DebugActiveProcess(uint dwProcessId);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int DebugActiveProcessStop(uint dwProcessId);
-
- [DllImport(ModuleName)]
- public static extern void DebugBreak();
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int DebugBreakProcess(IntPtr Process);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int DebugSetProcessKillOnExit(int KillOnExit);
-
- [DllImport(ModuleName)]
- public static extern void FatalExit(int ExitCode);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int FlushInstructionCache(IntPtr hProcess, IntPtr lpBaseAddress, uint dwSize);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int GetThreadContext(IntPtr hThread, IntPtr lpContext);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int GetThreadContext(IntPtr hThread, ref CONTEXT lpContext);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int GetThreadSelectorEntry(IntPtr hThread, uint dwSelector, IntPtr lpSelectorEntry);
-
- [Todo("Test Required")]
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int GetThreadSelectorEntry(IntPtr hThread, uint dwSelector, ref LDT_ENTRY lpSelectorEntry);
-
- [DllImport(ModuleName)]
- public static extern int IsDebuggerPresent();
-
- [DllImport(ModuleName)]
- public static extern void OutputDebugStringA(IntPtr lpOutputString);
-
- [DllImport(ModuleName, CharSet = CharSet.Ansi)]
- public static extern void OutputDebugStringA(string lpOutputString);
-
- [DllImport(ModuleName)]
- public static extern void OutputDebugStringW(IntPtr lpOutputString);
-
- [DllImport(ModuleName, CharSet = CharSet.Unicode)]
- public static extern void OutputDebugStringW(string lpOutputString);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, IntPtr lpBuffer, uint nSize, IntPtr lpNumberOfBytesRead);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, IntPtr lpBuffer, uint nSize, ref uint lpNumberOfBytesRead);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern void SetDebugErrorLevel(uint dwLevel);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int SetThreadContext(IntPtr hThread, IntPtr lpContext);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int SetThreadContext(IntPtr hThread, ref CONTEXT lpContext);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int WaitForDebugEvent(IntPtr lpDebugEvent, uint dwMilliseconds);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int WaitForDebugEvent(ref DEBUG_EVENT lpDebugEvent, uint dwMilliseconds);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, IntPtr lpBuffer, uint nSize, IntPtr lpNumberOfBytesWritten);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, IntPtr lpBuffer, uint nSize, ref uint lpNumberOfBytesWritten);
- }
-
- #endregion // Debugging functions
-
- #region Error functions
-
- partial class kernel32
- {
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int Beep(uint dwFreq, uint dwDuration);
-
- [DllImport(ModuleName), CLSCompliant(false)]
- public static extern void FatalAppExitA(uint uAction, IntPtr lpMessageText);
-
- [DllImport(ModuleName, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern void FatalAppExitA(uint uAction, string lpMessageText);
-
- [DllImport(ModuleName), CLSCompliant(false)]
- public static extern void FatalAppExitW(uint uAction, IntPtr lpMessageText);
-
- [DllImport(ModuleName, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern void FatalAppExitW(uint uAction, string lpMessageText);
-
- [DllImport(ModuleName, CharSet = CharSet.Ansi, SetLastError = true), CLSCompliant(false)]
- public static extern uint FormatMessageA(uint dwFlags, IntPtr lpSource, uint dwMessageId, uint dwLanguageId, IntPtr lpBuffer, uint nSize, IntPtr Arguments);
-
- [DllImport(ModuleName, CharSet = CharSet.Ansi, SetLastError = true), CLSCompliant(false)]
- public static extern uint FormatMessageA(uint dwFlags, IntPtr lpSource, uint dwMessageId, uint dwLanguageId, StringBuilder lpBuffer, uint nSize, IntPtr Arguments);
-
- [DllImport(ModuleName, CharSet = CharSet.Unicode, SetLastError = true), CLSCompliant(false)]
- public static extern uint FormatMessageW(uint dwFlags, IntPtr lpSource, uint dwMessageId, uint dwLanguageId, IntPtr lpBuffer, uint nSize, IntPtr Arguments);
-
- [DllImport(ModuleName, CharSet = CharSet.Unicode, SetLastError = true), CLSCompliant(false)]
- public static extern uint FormatMessageW(uint dwFlags, IntPtr lpSource, uint dwMessageId, uint dwLanguageId, StringBuilder lpBuffer, uint nSize, IntPtr Arguments);
-
- public static int GetLastError()
- {
- return Marshal.GetLastWin32Error();
- }
-
- [DllImport(ModuleName), CLSCompliant(false)]
- public static extern uint SetErrorMode(uint uMode);
-
- [DllImport(ModuleName), CLSCompliant(false)]
- public static extern void SetLastError(uint dwErrCode);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern void SetLastErrorEx(uint dwErrCode, uint dwType);
- }
-
- #endregion // Error functions
-
- #region Console functions
-
- partial class kernel32
- {
- [DllImport(ModuleName, CallingConvention = CallingConvention.Winapi)]
- public static extern int AddConsoleAliasA(
- [In] IntPtr Source,
- [In] IntPtr Target,
- [In] IntPtr ExeName);
-
- [DllImport(ModuleName, CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Ansi)]
- public static extern int AddConsoleAliasA(
- [In] string Source,
- [In] string Target,
- [In] string ExeName);
-
- [DllImport(ModuleName, CallingConvention = CallingConvention.Winapi)]
- public static extern int AddConsoleAliasW(
- [In] IntPtr Source,
- [In] IntPtr Target,
- [In] IntPtr ExeName);
-
- [DllImport(ModuleName, CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Unicode)]
- public static extern int AddConsoleAliasW(
- [In] string Source,
- [In] string Target,
- [In] string ExeName);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int AllocConsole();
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int AttachConsole(
- [In] uint dwProcessId);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern IntPtr CreateConsoleScreenBuffer(
- [In] uint dwDesiredAccess,
- [In] uint dwShareMode,
- [In] IntPtr lpSecurityAttributes,
- [In] uint dwFlags,
- [In] IntPtr lpScreenBufferData);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern IntPtr CreateConsoleScreenBuffer(
- [In] uint dwDesiredAccess,
- [In] uint dwShareMode,
- [In] ref SECURITY_ATTRIBUTES lpSecurityAttributes,
- [In] uint dwFlags,
- [In] IntPtr lpScreenBufferData);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int FillConsoleOutputAttribute(
- [In] IntPtr hConsoleOutput,
- [In] ushort wAttribute,
- [In] uint nLength,
- [In] COORD dwWriteCoord,
- [Out] IntPtr lpNumberOfAttrsWritten);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int FillConsoleOutputAttribute(
- [In] IntPtr hConsoleOutput,
- [In] ushort wAttribute,
- [In] uint nLength,
- [In] COORD dwWriteCoord,
- [Out] out uint lpNumberOfAttrsWritten);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int FillConsoleOutputCharacterA(
- [In] IntPtr hConsoleOutput,
- [In] sbyte cCharacter,
- [In] uint nLength,
- [In] COORD dwWriteCoord,
- [Out] IntPtr lpNumberOfCharsWritten);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int FillConsoleOutputCharacterA(
- [In] IntPtr hConsoleOutput,
- [In] sbyte cCharacter,
- [In] uint nLength,
- [In] COORD dwWriteCoord,
- [Out] out uint lpNumberOfCharsWritten);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int FillConsoleOutputCharacterW(
- [In] IntPtr hConsoleOutput,
- [In] ushort cCharacter,
- [In] uint nLength,
- [In] COORD dwWriteCoord,
- [Out] IntPtr lpNumberOfCharsWritten);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int FillConsoleOutputCharacterW(
- [In] IntPtr hConsoleOutput,
- [In] ushort cCharacter,
- [In] uint nLength,
- [In] COORD dwWriteCoord,
- [Out] out uint lpNumberOfCharsWritten);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int FlushConsoleInputBuffer(
- [In] IntPtr hConsoleInput);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int FreeConsole();
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int GenerateConsoleCtrlEvent(
- [In] uint dwCtrlEvent,
- [In] uint dwProcessGroupId);
-
- [DllImport(ModuleName, SetLastError = true, CallingConvention = CallingConvention.Winapi), CLSCompliant(false)]
- public static extern uint GetConsoleAliasA(
- [In] IntPtr lpSource,
- [Out] IntPtr lpTargetBuffer,
- [In] uint TargetBufferLength,
- [In] IntPtr lpExeName);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Winapi), CLSCompliant(false)]
- public static extern uint GetConsoleAliasA(
- [In] string lpSource,
- [Out] StringBuilder lpTargetBuffer,
- [In] uint TargetBufferLength,
- [In] string lpExeName);
-
- [DllImport(ModuleName, SetLastError = true, CallingConvention = CallingConvention.Winapi), CLSCompliant(false)]
- public static extern uint GetConsoleAliasW(
- [In] IntPtr lpSource,
- [Out] IntPtr lpTargetBuffer,
- [In] uint TargetBufferLength,
- [In] IntPtr lpExeName);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi), CLSCompliant(false)]
- public static extern uint GetConsoleAliasW(
- [In] string lpSource,
- [Out] StringBuilder lpTargetBuffer,
- [In] uint TargetBufferLength,
- [In] string lpExeName);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern uint GetConsoleAliasesA(
- [Out] IntPtr lpAliasBuffer,
- [In] uint AliasBufferLength,
- [In] IntPtr lpExeName);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern uint GetConsoleAliasesA(
- [Out] IntPtr lpAliasBuffer,
- [In] uint AliasBufferLength,
- [In] string lpExeName);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern uint GetConsoleAliasesW(
- [Out] IntPtr lpAliasBuffer,
- [In] uint AliasBufferLength,
- [In] IntPtr lpExeName);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern uint GetConsoleAliasesW(
- [Out] IntPtr lpAliasBuffer,
- [In] uint AliasBufferLength,
- [In] string lpExeName);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern uint GetConsoleAliasesLengthA(
- [In] IntPtr lpExeName);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern uint GetConsoleAliasesLengthA(
- [In] string lpExeName);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern uint GetConsoleAliasesLengthW(
- [In] IntPtr lpExeName);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern uint GetConsoleAliasesLengthW(
- [In] string lpExeName);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern uint GetConsoleAliasExesA(
- [Out] IntPtr lpExeNameBuffer,
- [In] uint ExeNameBufferLength);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern uint GetConsoleAliasExesA(
- [Out] StringBuilder lpExeNameBuffer,
- [In] uint ExeNameBufferLength);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern uint GetConsoleAliasExesW(
- [Out] IntPtr lpExeNameBuffer,
- [In] uint ExeNameBufferLength);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern uint GetConsoleAliasExesW(
- [Out] StringBuilder lpExeNameBuffer,
- [In] uint ExeNameBufferLength);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern uint GetConsoleAliasExesLength();
-
- [DllImport(ModuleName), CLSCompliant(false)]
- public static extern uint GetConsoleCP();
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int GetConsoleCursorInfo(
- [In] IntPtr hConsoleOutput,
- [Out] IntPtr lpConsoleCursorInfo);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int GetConsoleCursorInfo(
- [In] IntPtr hConsoleOutput,
- [Out] out CONSOLE_CURSOR_INFO lpConsoleCursorInfo);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int GetConsoleDisplayMode(
- [Out] IntPtr lpModeFlags);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int GetConsoleDisplayMode(
- [Out] out uint lpModeFlags);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern COORD GetConsoleFontSize(
- [In] IntPtr hConsoleOutput,
- [In] uint nFont);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int GetConsoleHistoryInfo(
- IntPtr lpConsoleHistoryInfo);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int GetConsoleHistoryInfo(
- [Out] out CONSOLE_HISTORY_INFO lpConsoleHistoryInfo);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int GetConsoleMode(
- [In] IntPtr hConsoleOutput,
- [Out] IntPtr lpMode);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int GetConsoleMode(
- [In] IntPtr hConsoleOutput,
- [Out] out uint lpMode);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern uint GetConsoleOriginalTitleA(
- [Out] IntPtr lpConsoleTitle,
- [In] uint nSize);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern uint GetConsoleOriginalTitleA(
- [Out] StringBuilder lpConsoleTitle,
- [In] uint nSize);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern uint GetConsoleOriginalTitleW(
- [Out] IntPtr lpConsoleTitle,
- [In] uint nSize);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern uint GetConsoleOriginalTitleW(
- [Out] StringBuilder lpConsoleTitle,
- [In] uint nSize);
-
- [DllImport(ModuleName), CLSCompliant(false)]
- public static extern uint GetConsoleOutputCP();
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern uint GetConsoleProcessList(
- [Out] IntPtr lpdwProcessList,
- [In] uint dwProcessCount);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern uint GetConsoleProcessList(
- [Out] uint[] lpdwProcessList,
- [In] uint dwProcessCount);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int GetConsoleScreenBufferInfo(
- [In] IntPtr hConsoleOutput,
- [Out] IntPtr lpConsoleScreenBufferInfo);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int GetConsoleScreenBufferInfo(
- [In] IntPtr hConsoleOutput,
- [Out] out CONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int GetConsoleScreenBufferInfoEx(
- [In] IntPtr hConsoleOutput,
- [Out] IntPtr lpConsoleScreenBufferInfoEx);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int GetConsoleScreenBufferInfoEx(
- [In] IntPtr hConsoleOutput,
- [Out] out CONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int GetConsoleSelectionInfo(
- [Out] IntPtr lpConsoleSelectionInfo);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int GetConsoleSelectionInfo(
- [Out] out CONSOLE_SELECTION_INFO lpConsoleSelectionInfo);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern uint GetConsoleTitleA(
- [Out] IntPtr lpConsoleTitle,
- [In] uint nSize);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern uint GetConsoleTitleA(
- [Out] StringBuilder lpConsoleTitle,
- [In] uint nSize);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern uint GetConsoleTitleW(
- [Out] IntPtr lpConsoleTitle,
- [In] uint nSize);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern uint GetConsoleTitleW(
- [Out] StringBuilder lpConsoleTitle,
- [In] uint nSize);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern IntPtr GetConsoleWindow();
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int GetCurrentConsoleFont(
- [In] IntPtr hConsoleOutput,
- [In] int bMaximumWindow,
- [Out] IntPtr lpConsoleCurrentFont);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int GetCurrentConsoleFont(
- [In] IntPtr hConsoleOutput,
- [In] int bMaximumWindow,
- [Out] out CONSOLE_FONT_INFO lpConsoleCurrentFont);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int GetCurrentConsoleFontEx(
- [In] IntPtr hConsoleOutput,
- [In] int bMaximumWindow,
- [Out] IntPtr lpConsoleCurrentFontEx);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern int GetCurrentConsoleFontEx(
- [In] IntPtr hConsoleOutput,
- [In] int bMaximumWindow,
- [Out] out CONSOLE_FONT_INFOEX lpConsoleCurrentFontEx);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern COORD GetLargestConsoleWindowSize(
- [In] IntPtr hConsoleOutput);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int GetNumberOfConsoleInputEvents(
- [In] IntPtr hConsoleInput,
- [Out] IntPtr lpcNumberOfEvents);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int GetNumberOfConsoleInputEvents(
- [In] IntPtr hConsoleInput,
- [Out] out uint lpcNumberOfEvents);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int GetNumberOfConsoleMouseButtons(
- [In] IntPtr hNumberOfMouseButtons);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int GetNumberOfConsoleMouseButtons(
- [Out] out uint lpNumberOfMouseButtons);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern IntPtr GetStdHandle(
- [In] uint nStdHandle);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern int PeekConsoleInputA(
- [In] IntPtr hConsoleInput,
- [Out] IntPtr lpBuffer,
- [In] uint nLength,
- [Out] IntPtr lpNumberOfEventsRead);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern int PeekConsoleInputA(
- [In] IntPtr hConsoleInput,
- [Out] out INPUT_RECORD lpBuffer,
- [In] uint nLength,
- [Out] out uint lpNumberOfEventsRead);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern int PeekConsoleInputW(
- [In] IntPtr hConsoleInput,
- [Out] IntPtr lpBuffer,
- [In] uint nLength,
- [Out] IntPtr lpNumberOfEventsRead);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern int PeekConsoleInputW(
- [In] IntPtr hConsoleInput,
- [Out] out INPUT_RECORD lpBuffer,
- [In] uint nLength,
- [Out] out uint lpNumberOfEventsRead);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern int ReadConsoleA(
- [In] IntPtr hConsoleInput,
- [Out] IntPtr lpBuffer,
- [In] uint nNumberOfCharsToRead,
- [Out] IntPtr lpNumberOfCharsRead,
- [In] IntPtr lpReserved);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern int ReadConsoleA(
- [In] IntPtr hConsoleInput,
- [Out] IntPtr lpBuffer,
- [In] uint nNumberOfCharsToRead,
- [Out] out uint lpNumberOfCharsRead,
- [In] IntPtr lpReserved);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern int ReadConsoleA(
- [In] IntPtr hConsoleInput,
- [Out] IntPtr lpBuffer,
- [In] uint nNumberOfCharsToRead,
- [Out] IntPtr lpNumberOfCharsRead,
- [In] ref CONSOLE_READCONSOLE_CONTROL lpReserved);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern int ReadConsoleA(
- [In] IntPtr hConsoleInput,
- [Out] IntPtr lpBuffer,
- [In] uint nNumberOfCharsToRead,
- [Out] out uint lpNumberOfCharsRead,
- [In] ref CONSOLE_READCONSOLE_CONTROL lpReserved);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern int ReadConsoleW(
- [In] IntPtr hConsoleInput,
- [Out] IntPtr lpBuffer,
- [In] uint nNumberOfCharsToRead,
- [Out] IntPtr lpNumberOfCharsRead,
- [In] IntPtr lpReserved);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern int ReadConsoleW(
- [In] IntPtr hConsoleInput,
- [Out] IntPtr lpBuffer,
- [In] uint nNumberOfCharsToRead,
- [Out] out uint lpNumberOfCharsRead,
- [In] IntPtr lpReserved);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern int ReadConsoleW(
- [In] IntPtr hConsoleInput,
- [Out] IntPtr lpBuffer,
- [In] uint nNumberOfCharsToRead,
- [Out] IntPtr lpNumberOfCharsRead,
- [In] ref CONSOLE_READCONSOLE_CONTROL lpReserved);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern int ReadConsoleW(
- [In] IntPtr hConsoleInput,
- [Out] IntPtr lpBuffer,
- [In] uint nNumberOfCharsToRead,
- [Out] out uint lpNumberOfCharsRead,
- [In] ref CONSOLE_READCONSOLE_CONTROL lpReserved);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern int ReadConsoleInputA(
- [In] IntPtr hConsoleInput,
- [Out] IntPtr lpBuffer,
- [In] uint nLength,
- [Out] IntPtr lpNumberOfEventsRead);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern int ReadConsoleInputA(
- [In] IntPtr hConsoleInput,
- [Out] out INPUT_RECORD lpBuffer,
- [In] uint nLength,
- [Out] out uint lpNumberOfEventsRead);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern int ReadConsoleInputW(
- [In] IntPtr hConsoleInput,
- [Out] IntPtr lpBuffer,
- [In] uint nLength,
- [Out] IntPtr lpNumberOfEventsRead);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern int ReadConsoleInputW(
- [In] IntPtr hConsoleInput,
- [Out] out INPUT_RECORD lpBuffer,
- [In] uint nLength,
- [Out] out uint lpNumberOfEventsRead);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi)]
- public static extern int ReadConsoleOutputA(
- [In] IntPtr hConsoleOutput,
- [Out] IntPtr lpBuffer,
- [In] COORD dwBufferSize,
- [In] COORD dwBufferCoord,
- [In, Out] IntPtr lpReadRegion);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern int ReadConsoleOutputA(
- [In] IntPtr hConsoleOutput,
- [Out] out CHAR_INFO lpBuffer,
- [In] COORD dwBufferSize,
- [In] COORD dwBufferCoord,
- [In, Out] ref SMALL_RECT lpReadRegion);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode)]
- public static extern int ReadConsoleOutputW(
- [In] IntPtr hConsoleOutput,
- [Out] IntPtr lpBuffer,
- [In] COORD dwBufferSize,
- [In] COORD dwBufferCoord,
- [In, Out] IntPtr lpReadRegion);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern int ReadConsoleOutputW(
- [In] IntPtr hConsoleOutput,
- [Out] out CHAR_INFO lpBuffer,
- [In] COORD dwBufferSize,
- [In] COORD dwBufferCoord,
- [In, Out] ref SMALL_RECT lpReadRegion);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int ReadConsoleOutputAttribute(
- [In] IntPtr hConsoleOutput,
- [Out] IntPtr lpAttribute,
- [In] uint nLength,
- [In] COORD dwReadCoord,
- [Out] IntPtr lpNumberOfAttrsRead);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int ReadConsoleOutputAttribute(
- [In] IntPtr hConsoleOutput,
- [Out] out uint lpAttribute,
- [In] uint nLength,
- [In] COORD dwReadCoord,
- [Out] out uint lpNumberOfAttrsRead);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern int ReadConsoleOutputCharacterA(
- [In] IntPtr hConsoleOutput,
- [Out] IntPtr lpCharacter,
- [In] uint nLength,
- [In] COORD dwReadCoord,
- [Out] IntPtr lpNumberOfCharsRead);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern int ReadConsoleOutputCharacterA(
- [In] IntPtr hConsoleOutput,
- [Out] StringBuilder lpCharacter,
- [In] uint nLength,
- [In] COORD dwReadCoord,
- [Out] out uint lpNumberOfCharsRead);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern int ReadConsoleOutputCharacterW(
- [In] IntPtr hConsoleOutput,
- [Out] IntPtr lpCharacter,
- [In] uint nLength,
- [In] COORD dwReadCoord,
- [Out] IntPtr lpNumberOfCharsRead);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern int ReadConsoleOutputCharacterW(
- [In] IntPtr hConsoleOutput,
- [Out] StringBuilder lpCharacter,
- [In] uint nLength,
- [In] COORD dwReadCoord,
- [Out] out uint lpNumberOfCharsRead);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi)]
- public static extern int ScrollConsoleScreenBufferA(
- [In] IntPtr hConsoleOutput,
- [In] IntPtr lpScrollRectangle,
- [In] IntPtr lpClipRectangle,
- [In] COORD dwDestinationOrigin,
- [In] IntPtr lpFill);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern int ScrollConsoleScreenBufferA(
- [In] IntPtr hConsoleOutput,
- [In] ref SMALL_RECT lpScrollRectangle,
- [In] ref SMALL_RECT lpClipRectangle,
- [In] COORD dwDestinationOrigin,
- [In] ref CHAR_INFO lpFill);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode)]
- public static extern int ScrollConsoleScreenBufferW(
- [In] IntPtr hConsoleOutput,
- [In] IntPtr lpScrollRectangle,
- [In] IntPtr lpClipRectangle,
- [In] COORD dwDestinationOrigin,
- [In] IntPtr lpFill);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern int ScrollConsoleScreenBufferW(
- [In] IntPtr hConsoleOutput,
- [In] ref SMALL_RECT lpScrollRectangle,
- [In] ref SMALL_RECT lpClipRectangle,
- [In] COORD dwDestinationOrigin,
- [In] ref CHAR_INFO lpFill);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int SetConsoleActiveScreenBuffer(
- [In] IntPtr hConsoleOutput);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int SetConsoleCP(
- [In] uint wCodePageID);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int SetConsoleCtrlHandler(
- [In] IntPtr HandlerRoutine,
- [In] int Add);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int SetConsoleCtrlHandler(
- [In] HandlerRoutine HandlerRoutine,
- [In] int Add);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int SetConsoleCursorInfo(
- [In] IntPtr hConsoleOutput,
- [In] IntPtr lpConsoleCursorInfo);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int SetConsoleCursorInfo(
- [In] IntPtr hConsoleOutput,
- [In] ref CONSOLE_CURSOR_INFO lpConsoleCursorInfo);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int SetConsoleCursorPosition(
- [In] IntPtr hConsoleOutput,
- [In] COORD dwCursorPosition);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int SetConsoleDisplayMode(
- [In] IntPtr hConsoleOutput,
- [In] uint dwFlags,
- [In] IntPtr lpNewScreenBufferDimensions);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int SetConsoleDisplayMode(
- [In] IntPtr hConsoleOutput,
- [In] uint dwFlags,
- [In] ref COORD lpNewScreenBufferDimensions);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int SetConsoleHistoryInfo(
- [In] IntPtr lpConsoleHistoryInfo);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int SetConsoleHistoryInfo(
- [In] ref CONSOLE_HISTORY_INFO lpConsoleHistoryInfo);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int SetConsoleMode(
- [In] IntPtr hConsoleHandle,
- [In] uint dwMode);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int SetConsoleOutputCP(
- [In] uint wCodePageId);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int SetConsoleScreenBufferInfoEx(
- [In] IntPtr hConsoleOutput,
- [In] IntPtr lpConsoleScreenBufferInfoEx);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int SetConsoleScreenBufferInfoEx(
- [In] IntPtr hConsoleOutput,
- [In] ref CONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int SetConsoleScreenBufferSize(
- [In] IntPtr hConsoleOutput,
- [In] COORD dwSize);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int SetConsoleTextAttributes(
- [In] IntPtr hConsoleOutput,
- [In] ushort wAttributes);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int SetConsoleTitleA(
- [In] IntPtr lpConsoleTitle);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi)]
- public static extern int SetConsoleTitleA(
- [In] string lpConsoleTitle);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int SetConsoleTitleW(
- [In] IntPtr lpConsoleTitle);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode)]
- public static extern int SetConsoleTitleW(
- [In] string lpConsoleTitle);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int SetConsoleWindowInfo(
- [In] IntPtr hConsoleOutput,
- [In] int bAbsolute,
- [In] IntPtr lpConsoleWindow);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int SetConsoleWindowInfo(
- [In] IntPtr hConsoleOutput,
- [In] int bAbsolute,
- [In] ref SMALL_RECT lpConsoleWindow);
-
- [DllImport(ModuleName, SetLastError = true)]
- public static extern int SetCurrentConsoleFontEx(
- [In] IntPtr hConsoleOutput,
- [In] int bMaximumWindow,
- [In] IntPtr lpConsoleCurrentFontEx);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int SetCurrentConsoleFontEx(
- [In] IntPtr hConsoleOutput,
- [In] int bMaximumWindow,
- [In] ref CONSOLE_FONT_INFOEX lpConsoleCurrentFontEx);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int SetStdHandle(
- [In] uint nStdHandle,
- [In] IntPtr hHandle);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern int WriteConsoleA(
- [In] IntPtr hConsoleOutput,
- [In] IntPtr lpBuffer,
- [In] uint nNumberOfCharsToWrite,
- [Out] IntPtr lpNumberOfCharsWritten,
- IntPtr lpReserved);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern int WriteConsoleA(
- [In] IntPtr hConsoleOutput,
- [In] IntPtr lpBuffer,
- [In] uint nNumberOfCharsToWrite,
- [Out] out uint lpNumberOfCharsWritten,
- IntPtr lpReserved);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern int WriteConsoleW(
- [In] IntPtr hConsoleOutput,
- [In] IntPtr lpBuffer,
- [In] uint nNumberOfCharsToWrite,
- [Out] IntPtr lpNumberOfCharsWritten,
- IntPtr lpReserved);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern int WriteConsoleW(
- [In] IntPtr hConsoleOutput,
- [In] IntPtr lpBuffer,
- [In] uint nNumberOfCharsToWrite,
- [Out] out uint lpNumberOfCharsWritten,
- IntPtr lpReserved);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern int WriteConsoleInputA(
- [In] IntPtr hConsoleInput,
- [In] IntPtr lpBuffer,
- [In] uint nLength,
- [Out] IntPtr lpNumberOfEvnetsWritten);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern int WriteConsoleInputA(
- [In] IntPtr hConsoleInput,
- [In] IntPtr lpBuffer,
- [In] uint nLength,
- [Out] out uint lpNumberOfEvnetsWritten);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern int WriteConsoleInputW(
- [In] IntPtr hConsoleInput,
- [In] IntPtr lpBuffer,
- [In] uint nLength,
- [Out] IntPtr lpNumberOfEvnetsWritten);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern int WriteConsoleInputW(
- [In] IntPtr hConsoleInput,
- [In] IntPtr lpBuffer,
- [In] uint nLength,
- [Out] out uint lpNumberOfEvnetsWritten);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi)]
- public static extern int WriteConsoleOutputA(
- [In] IntPtr hConsoleOutput,
- [In] IntPtr lpBuffer,
- [In] COORD dwBufferSize,
- [In] COORD dwBufferCoord,
- [In, Out] IntPtr lpWriteRegion);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern int WriteConsoleOutputA(
- [In] IntPtr hConsoleOutput,
- [In] ref CHAR_INFO lpBuffer,
- [In] COORD dwBufferSize,
- [In] COORD dwBufferCoord,
- [In, Out] ref SMALL_RECT lpWriteRegion);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode)]
- public static extern int WriteConsoleOutputW(
- [In] IntPtr hConsoleOutput,
- [In] IntPtr lpBuffer,
- [In] COORD dwBufferSize,
- [In] COORD dwBufferCoord,
- [In, Out] IntPtr lpWriteRegion);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern int WriteConsoleOutputW(
- [In] IntPtr hConsoleOutput,
- [In] ref CHAR_INFO lpBuffer,
- [In] COORD dwBufferSize,
- [In] COORD dwBufferCoord,
- [In, Out] ref SMALL_RECT lpWriteRegion);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int WriteConsoleOutputAttribute(
- [In] IntPtr hConsoleOutput,
- [In] IntPtr lpAttribute,
- [In] uint nLength,
- [In] COORD dwWriteCoord,
- [Out] IntPtr lpNumberOfAttrsWritten);
-
- [DllImport(ModuleName, SetLastError = true), CLSCompliant(false)]
- public static extern int WriteConsoleOutputAttribute(
- [In] IntPtr hConsoleOutput,
- [In] ref ushort lpAttribute,
- [In] uint nLength,
- [In] COORD dwWriteCoord,
- [Out] out uint lpNumberOfAttrsWritten);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern int WriteConsoleOutputCharacterA(
- [In] IntPtr hConsoleOutput,
- [In] IntPtr lpCharacter,
- [In] uint nLength,
- [In] COORD dwWriteCoord,
- [Out] IntPtr lpNumberOfCharsWritten);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Ansi), CLSCompliant(false)]
- public static extern int WriteConsoleOutputCharacterA(
- [In] IntPtr hConsoleOutput,
- [In] string lpCharacter,
- [In] uint nLength,
- [In] COORD dwWriteCoord,
- [Out] out uint lpNumberOfCharsWritten);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern int WriteConsoleOutputCharacterW(
- [In] IntPtr hConsoleOutput,
- [In] IntPtr lpCharacter,
- [In] uint nLength,
- [In] COORD dwWriteCoord,
- [Out] IntPtr lpNumberOfCharsWritten);
-
- [DllImport(ModuleName, SetLastError = true, CharSet = CharSet.Unicode), CLSCompliant(false)]
- public static extern int WriteConsoleOutputCharacterW(
- [In] IntPtr hConsoleOutput,
- [In] string lpCharacter,
- [In] uint nLength,
- [In] COORD dwWriteCoord,
- [Out] out uint lpNumberOfCharsWr…