33#define CONGUI_MIN_WIDTH 10
34#define CONGUI_MIN_HEIGHT 10
35#define CONGUI_UPDATE_TIME 0
36#define CONGUI_UPDATE_TIMER 1
38#define CURSOR_BLINK_TIME 500
43#define GWLP_CONWND_ALLOC (2 * sizeof(LONG_PTR))
44#define GWLP_CONSOLE_LEADER_PID 0
45#define GWLP_CONSOLE_LEADER_TID 4
55 DPRINT(
"ProcessData: %p, ProcessData->Process %p.\n", ProcessData, ProcessData->
Process);
169 if (WndClassAtom == 0)
171 DPRINT1(
"Failed to register GUI console class\n");
178 return (WndClassAtom != 0);
192 WCHAR szMenuString[255];
207 if (hSubMenu !=
NULL)
247 WCHAR szMenuStringBack[255];
260 ptrTab =
wcschr(szMenuStringBack,
L'\t');
278 DPRINT(
"Menu item ID: %d\n", CmdId);
318 COORD SelectionAnchor;
326 SelectionAnchor.
X = SelectionAnchor.
Y = 0;
392 DPRINT1(
"Scrolling is not handled yet\n");
396 DPRINT1(
"Finding is not handled yet\n");
441 sInfo.
cbSize =
sizeof(sInfo);
505 if (
GetObjectW(OrgFont,
sizeof(lf), &lf) == 0)
534 UINT OldCharWidth = GuiData->CharWidth;
535 UINT OldCharHeight = GuiData->CharHeight;
536 COORD OldFontSize = GuiData->GuiInfo.FontSize;
541 CodePage = GuiData->Console->OutputCodePage;
564 DPRINT1(
"InitFonts: CreateConsoleFontEx('%S') failed\n", NewFaceName);
570 if (!GetFontCellSize(
hDC,
hFont, &GuiData->CharHeight, &GuiData->CharWidth))
572 DPRINT1(
"InitFonts: GetFontCellSize failed\n");
612 GuiData->GuiInfo.FontWeight = FontData.
Weight;
613 GuiData->GuiInfo.FontFamily = FontData.
Family;
614 GuiData->GuiInfo.FontSize = FontData.
Size;
617 if ((OldCharWidth != GuiData->CharWidth) ||
618 (OldCharHeight != GuiData->CharHeight) ||
619 (OldFontSize.
X != FontData.
Size.
X ||
620 OldFontSize.
Y != FontData.
Size.
Y))
637 DPRINT1(
"GuiConsoleNcCreate: No GUI data\n");
659 if (AltCodePage ==
Console->OutputCodePage)
662 DPRINT1(
"Could not initialize font '%S' for code page %d - Resetting CP to %d\n",
676 DPRINT1(
"Failed to initialize font '%S' for code page %d\n",
679 DPRINT1(
"GuiConsoleNcCreate: InitFonts failed\n");
713 DPRINT(
"OnNcCreate - setting start event\n");
727 DPRINT(
"WM_ACTIVATE - ActivationState = %d\n", ActivationState);
786 DPRINT(
"TODO: Create console caret\n");
788 DPRINT(
"TODO: Destroy console caret\n");
798 *
Begin = *SelectionAnchor;
799 End->
X = (SelectionAnchor->
X == SmallRect->
Left) ? SmallRect->
Right
801 End->
Y = (SelectionAnchor->
Y == SmallRect->
Top ) ? SmallRect->
Bottom
844 SmallRect->
Top != sr.
Top ||
849 "SmallRect = (%d, %d, %d, %d)\n"
850 "sr = (%d, %d, %d, %d)\n"
1014 wcsncpy(WindowTitle, SelTypeStr, SelTypeStrLength);
1066 GuiData, &ps.
rcPaint, &rcPaint);
1071 GuiData, &ps.
rcPaint, &rcPaint);
1114 DPRINT(
"WM_PALETTECHANGED changing palette\n");
1127 switch (VirtualKeyCode)
1169 else if ( VirtualKeyCode ==
VK_ESCAPE ||
1183 switch (VirtualKeyCode)
1340 int OldScrollX = -1, OldScrollY = -1;
1341 int NewScrollX = -1, NewScrollY = -1;
1343 sInfo.
cbSize =
sizeof(sInfo);
1350 if (OldScrollX >= 0)
1363 NewScrollX = OldScrollX;
1367 if (OldScrollY >= 0)
1380 NewScrollY = OldScrollY;
1388 if ((OldScrollX != NewScrollX) || (OldScrollY != NewScrollY))
1393 (OldScrollX - NewScrollX) * GuiData->
CharWidth,
1394 (OldScrollY - NewScrollY) * GuiData->
CharHeight,
1400 if (NewScrollX >= 0)
1402 sInfo.
nPos = NewScrollX;
1405 if (NewScrollY >= 0)
1407 sInfo.
nPos = NewScrollY;
1477 INT oldPos, Maximum;
1498 sInfo.
cbSize =
sizeof(sInfo);
1503 oldPos = sInfo.
nPos;
1547 if (oldPos != sInfo.
nPos)
1551 UINT WidthUnit, HeightUnit;
1554 *pOriginXY = sInfo.
nPos;
1584 UINT WidthUnit, HeightUnit;
1594 else if (Coord.
X >=
Buffer->ScreenBufferSize.X)
1595 Coord.
X =
Buffer->ScreenBufferSize.X - 1;
1599 else if (Coord.
Y >=
Buffer->ScreenBufferSize.Y)
1600 Coord.
Y =
Buffer->ScreenBufferSize.Y - 1;
1635 msg != WM_XBUTTONDOWN)
1715#define IS_WORD_SEP(c) \
1716 ((c) == L'\0' || (c) == L' ' || (c) == L'\t' || (c) == L'\r' || (c) == L'\n')
1733 while ((cR.
X <
TextBuffer->ScreenBufferSize.X - 1) &&
1805 case WM_XBUTTONDOWN:
1814 WORD wKeyState = GET_KEYSTATE_WPARAM(
wParam);
1815 DWORD dwButtonState = 0;
1816 DWORD dwControlKeyState = 0;
1817 DWORD dwEventFlags = 0;
1839 case WM_XBUTTONDOWN:
1845 if (wButton & ~(XBUTTON1 | XBUTTON2))
1847 DPRINT1(
"X-button 0x%04x invalid\n", wButton);
1883 if (wButton & ~(XBUTTON1 | XBUTTON2))
1885 DPRINT1(
"X-button 0x%04x invalid\n", wButton);
1910 case WM_XBUTTONDBLCLK:
1916 if (wButton & ~(XBUTTON1 | XBUTTON2))
1918 DPRINT1(
"X-button 0x%04x invalid\n", wButton);
1935 dwButtonState = GET_WHEEL_DELTA_WPARAM(
wParam) << 16;
1939 case WM_MOUSEHWHEEL:
1940 dwButtonState = GET_WHEEL_DELTA_WPARAM(
wParam) << 16;
1966 case WM_XBUTTONDOWN:
1980 if (wKeyState & MK_XBUTTON1)
1982 if (wKeyState & MK_XBUTTON2)
2105 UINT WidthUnit, HeightUnit;
2145 DWORD windx, windy, charx, chary;
2146 UINT WidthUnit, HeightUnit;
2159 charx = windx / (
int)WidthUnit ;
2160 chary = windy / (
int)HeightUnit;
2163 if ((windx % WidthUnit ) >= (WidthUnit / 2)) ++charx;
2164 if ((windy % HeightUnit) >= (HeightUnit / 2)) ++chary;
2170 charx = windx / (
int)WidthUnit ;
2171 chary = windy / (
int)HeightUnit;
2174 if ((windx % WidthUnit ) >= (WidthUnit / 2)) ++charx;
2175 if ((windy % HeightUnit) >= (HeightUnit / 2)) ++chary;
2325 if (
OnClose(GuiData))
goto Default;
2341 DPRINT(
"WM_PALETTECHANGED called\n");
2358 DPRINT(
"WM_PALETTECHANGED ok\n");
2360 DPRINT(
"WM_PALETTECHANGED quit\n");
2419 if (hWndHit ==
hWnd)
2451 case WM_XBUTTONDOWN:
2459 case WM_XBUTTONDBLCLK:
2462 case WM_MOUSEHWHEEL:
2588 DPRINT1(
"WMSZ_BOTTOMRIGHT\n");
2594 DPRINT1(
"dragRect = {.left = %d ; .top = %d ; .right = %d ; .bottom = %d}\n",
2611 UINT WidthUnit, HeightUnit;
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char const char UINT32 const char BOOLEAN Begin
char TextBuffer[BUFFERLEN]
#define PAUSED_FROM_SELECTION
#define PAUSED_FROM_SCROLLBAR
HINSTANCE ConSrvDllInstance
static BOOL OnNcCreate(HWND hWnd, LPCREATESTRUCTW Create)
static COORD PointToCoord(PGUI_CONSOLE_DATA GuiData, LPARAM lParam)
static VOID OnGetMinMaxInfo(PGUI_CONSOLE_DATA GuiData, PMINMAXINFO minMaxInfo)
VOID CreateSysMenu(HWND hWnd)
static VOID OnFocus(PGUI_CONSOLE_DATA GuiData, BOOL SetFocus)
BOOLEAN UnRegisterConWndClass(HINSTANCE hInstance)
static LRESULT OnNcDestroy(HWND hWnd)
static BOOL IsSystemKey(WORD VirtualKeyCode)
#define GWLP_CONSOLE_LEADER_PID
static VOID SelectAll(PGUI_CONSOLE_DATA GuiData)
static VOID OnMove(PGUI_CONSOLE_DATA GuiData)
static VOID OnPaint(PGUI_CONSOLE_DATA GuiData)
static LRESULT CALLBACK ConWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
#define CONGUI_UPDATE_TIME
HBITMAP CreateFrameBufferBitmap(HDC hDC, int width, int height)
static const GUICONSOLE_MENUITEM GuiConsoleEditMenuItems[]
static VOID OnTimer(PGUI_CONSOLE_DATA GuiData)
VOID InvalidateCell(PGUI_CONSOLE_DATA GuiData, SHORT x, SHORT y)
static HFONT CreateDerivedFont(HFONT OrgFont, ULONG FontWeight, BOOLEAN bUnderline, BOOLEAN bStrikeOut)
static HRGN CreateSelectionRgn(PGUI_CONSOLE_DATA GuiData, BOOL LineSelection, PCOORD SelectionAnchor, PSMALL_RECT SmallRect)
const COLORREF s_Colors[16]
struct _GUICONSOLE_MENUITEM GUICONSOLE_MENUITEM
VOID SetConWndConsoleLeaderCID(IN PGUI_CONSOLE_DATA GuiData)
static VOID Copy(PGUI_CONSOLE_DATA GuiData)
static VOID OnScroll(PGUI_CONSOLE_DATA GuiData, INT nBar, WORD sbCode)
static BOOL OnClose(PGUI_CONSOLE_DATA GuiData)
static VOID Mark(PGUI_CONSOLE_DATA GuiData)
static VOID AppendMenuItems(HMENU hMenu, const GUICONSOLE_MENUITEM *Items)
#define CURSOR_BLINK_TIME
static VOID UpdateSelection(PGUI_CONSOLE_DATA GuiData, PCOORD SelectionAnchor OPTIONAL, PCOORD coord)
static LRESULT OnMouse(PGUI_CONSOLE_DATA GuiData, UINT msg, WPARAM wParam, LPARAM lParam)
static PGUI_CONSOLE_DATA GuiGetGuiData(HWND hWnd)
static VOID SendMenuEvent(PCONSRV_CONSOLE Console, UINT CmdId)
VOID DeleteFonts(PGUI_CONSOLE_DATA GuiData)
static VOID OnPaletteChanged(PGUI_CONSOLE_DATA GuiData)
static VOID OnSize(PGUI_CONSOLE_DATA GuiData, WPARAM wParam, LPARAM lParam)
struct _GUICONSOLE_MENUITEM * PGUICONSOLE_MENUITEM
#define GWLP_CONSOLE_LEADER_TID
#define GWLP_CONWND_ALLOC
static LRESULT OnCommand(PGUI_CONSOLE_DATA GuiData, WPARAM wParam, LPARAM lParam)
static VOID PaintSelectionRect(PGUI_CONSOLE_DATA GuiData, PPAINTSTRUCT pps)
static const GUICONSOLE_MENUITEM GuiConsoleMainMenuItems[]
VOID GetSelectionBeginEnd(PCOORD Begin, PCOORD End, PCOORD SelectionAnchor, PSMALL_RECT SmallRect)
static VOID ResizeConWnd(PGUI_CONSOLE_DATA GuiData, DWORD WidthUnit, DWORD HeightUnit)
static VOID OnKey(PGUI_CONSOLE_DATA GuiData, UINT msg, WPARAM wParam, LPARAM lParam)
static VOID Paste(PGUI_CONSOLE_DATA GuiData)
#define CONGUI_MIN_HEIGHT
static VOID OnActivate(PGUI_CONSOLE_DATA GuiData, WPARAM wParam)
BOOLEAN RegisterConWndClass(IN HINSTANCE hInstance)
static VOID OnDropFiles(PCONSRV_CONSOLE Console, HDROP hDrop)
BOOL InitFonts(_Inout_ PGUI_CONSOLE_DATA GuiData, _In_reads_or_z_(LF_FACESIZE) PCWSTR FaceName, _In_ ULONG FontWeight, _In_ ULONG FontFamily, _In_ COORD FontSize, _In_opt_ UINT CodePage, _In_ BOOL UseDefaultFallback)
#define CONGUI_UPDATE_TIMER
#define PM_RESIZE_TERMINAL
struct _GUI_CONSOLE_DATA * PGUI_CONSOLE_DATA
#define PM_CONSOLE_SET_TITLE
BOOL WINAPI Beep(IN DWORD dwFreq, IN DWORD dwDuration)
UINT WINAPI GetOEMCP(void)
void WINAPI DragFinish(HDROP h)
UINT WINAPI DragQueryFileW(HDROP hDrop, UINT lFile, LPWSTR lpszwFile, UINT lLength)
void WINAPI DragAcceptFiles(HWND hWnd, BOOL b)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static const WCHAR Message[]
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
BOOL EnterFullScreen(PGUI_CONSOLE_DATA GuiData)
VOID LeaveFullScreen(PGUI_CONSOLE_DATA GuiData)
VOID GuiConsoleSwitchFullScreen(PGUI_CONSOLE_DATA GuiData)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLint GLint GLsizei GLsizei height
GLdouble GLdouble GLdouble r
GLint GLint GLsizei width
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
VOID GuiApplyUserSettings(PGUI_CONSOLE_DATA GuiData, HANDLE hClientSection)
VOID GuiConsoleShowConsoleProperties(PGUI_CONSOLE_DATA GuiData, BOOL Defaults)
VOID GuiCopyFromTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData)
FORCEINLINE VOID SmallRectToRect(PGUI_CONSOLE_DATA GuiData, PRECT Rect, PSMALL_RECT SmallRect)
FORCEINLINE VOID GetScreenBufferSizeUnits(IN PCONSOLE_SCREEN_BUFFER Buffer, IN PGUI_CONSOLE_DATA GuiData, OUT PUINT WidthUnit, OUT PUINT HeightUnit)
VOID PasteText(IN PCONSRV_CONSOLE Console, IN PWCHAR Buffer, IN SIZE_T cchSize)
VOID GuiPasteToTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData)
VOID GuiPaintTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData, PRECT rcView, PRECT rcFramebuffer)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
NTSTATUS APIENTRY NtUserConsoleControl(IN CONSOLECONTROL ConsoleCtrl, IN PVOID ConsoleCtrlInfo, IN ULONG ConsoleCtrlInfoLength)
short _InterlockedExchange16(_Interlocked_operand_ short volatile *_Target, short _Value)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
#define _In_reads_or_z_(size)
unsigned __int3264 UINT_PTR
_In_ NDIS_ERROR_CODE ErrorCode
_In_ ULONG _In_ ULONG _In_ ULONG Length
NTSTATUS NTAPI NtSetEvent(IN HANDLE EventHandle, OUT PLONG PreviousState OPTIONAL)
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
PULONG MinorVersion OPTIONAL
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCchCopyNW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc, size_t cchToCopy)
union _CHAR_INFO::@3280 Char
PCONSOLE_SCREEN_BUFFER ActiveBuffer
CONSOLE_SELECTION_INFO Selection
BOOL IsCloseButtonEnabled
BOOL HackCORE8394IgnoreNextMove
BOOL IgnoreNextMouseEvent
WCHAR FaceName[LF_FACESIZE]
BITMAPINFOHEADER bmiHeader
#define TermResizeTerminal(Console)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define RtlZeroMemory(Destination, Length)
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
_In_ HFONT _Out_ PUINT Height
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
HFONT CreateConsoleFontEx(_In_ LONG Height, _In_opt_ LONG Width, _Inout_updates_z_(LF_FACESIZE) PWSTR FaceName, _In_ ULONG FontWeight, _In_ ULONG FontFamily, _In_ UINT CodePage, _In_ BOOL UseDefaultFallback, _Out_ PFONT_DATA FontData)
Validates and creates a suitable console font based on the font characteristics given in input.
#define WM_SETCONSOLEINFO
BOOLEAN NTAPI ConDrvValidateConsoleUnsafe(IN PCONSOLE Console, IN CONSOLE_STATE ExpectedState, IN BOOLEAN LockConsole)
PCHAR_INFO ConioCoordToPointer(PTEXTMODE_SCREEN_BUFFER Buff, ULONG X, ULONG Y)
VOID ConioUnpause(PCONSRV_CONSOLE Console, UCHAR Flags)
NTSTATUS NTAPI ConSrvSetConsoleProcessFocus(IN PCONSRV_CONSOLE Console, IN BOOLEAN SetForeground)
PCONSOLE_PROCESS_DATA NTAPI ConSrvGetConsoleLeaderProcess(IN PCONSRV_CONSOLE Console)
NTSTATUS NTAPI ConSrvConsoleProcessCtrlEvent(IN PCONSRV_CONSOLE Console, IN ULONG ProcessGroupId, IN ULONG CtrlEvent)
VOID ConioPause(PCONSRV_CONSOLE Console, UCHAR Flags)
VOID GuiCopyFromGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData)
VOID GuiPaintGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData, PRECT rcView, PRECT rcFramebuffer)
VOID GuiPasteToGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer, PGUI_CONSOLE_DATA GuiData)
#define ID_SYSTEM_EDIT_COPY
#define ID_SYSTEM_EDIT_PASTE
#define ID_SYSTEM_DEFAULTS
#define ID_SYSTEM_EDIT_SCROLL
#define ID_SYSTEM_EDIT_SELECTALL
#define ID_SYSTEM_EDIT_FIND
#define ID_SYSTEM_EDIT_MARK
#define ID_SYSTEM_PROPERTIES
#define ConsoleAllocHeap(Flags, Size)
#define ConsoleFreeHeap(HeapBase)
#define GetConsoleInputBufferMode(Console)
struct _TEXTMODE_SCREEN_BUFFER * PTEXTMODE_SCREEN_BUFFER
#define CON_SET_OUTPUT_CP(Console, CodePage)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define CONSOLE_NO_SELECTION
#define LEFT_CTRL_PRESSED
#define CONSOLE_MOUSE_DOWN
#define ENABLE_MOUSE_INPUT
#define CONSOLE_MOUSE_SELECTION
#define FROM_LEFT_4TH_BUTTON_PRESSED
#define RIGHT_CTRL_PRESSED
#define RIGHT_ALT_PRESSED
#define FROM_LEFT_2ND_BUTTON_PRESSED
#define FROM_LEFT_3RD_BUTTON_PRESSED
#define CONSOLE_SELECTION_IN_PROGRESS
#define FROM_LEFT_1ST_BUTTON_PRESSED
#define RIGHTMOST_BUTTON_PRESSED
#define CONSOLE_SELECTION_NOT_EMPTY
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
UINT WINAPI RealizePalette(_In_ HDC)
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI InvertRgn(_In_ HDC, _In_ HRGN)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
int WINAPI CombineRgn(_In_opt_ HRGN hrgnDest, _In_opt_ HRGN hrgnSrc1, _In_opt_ HRGN hrgnSrc2, _In_ int fnCombineMode)
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
HRGN WINAPI CreateRectRgnIndirect(_In_ LPCRECT)
BOOL WINAPI DeleteDC(_In_ HDC)
UINT WINAPI SetSystemPaletteUse(_In_ HDC, _In_ UINT)
HWND WINAPI SetCapture(_In_ HWND hWnd)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HMENU WINAPI CreatePopupMenu(void)
#define GetWindowLongPtrW
BOOL WINAPI ReleaseCapture(void)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define WM_PALETTECHANGED
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
BOOL WINAPI CloseClipboard(void)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
BOOL WINAPI SetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _In_ LPCMENUITEMINFOW)
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
BOOL WINAPI OpenClipboard(_In_opt_ HWND)
HMENU WINAPI GetSystemMenu(_In_ HWND, _In_ BOOL)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
BOOL WINAPI TrackPopupMenuEx(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _In_ HWND, _In_opt_ LPTPMPARAMS)
BOOL WINAPI IsIconic(_In_ HWND)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI DrawMenuBar(_In_ HWND)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI UpdateWindow(_In_ HWND)
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI InvalidateRgn(_In_ HWND, _In_opt_ HRGN, _In_ BOOL)
BOOL WINAPI DestroyMenu(_In_ HMENU)
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)
HWND WINAPI WindowFromPoint(_In_ POINT)
struct _WNDCLASSEXW WNDCLASSEXW
int WINAPI SetScrollInfo(_In_ HWND, _In_ int, _In_ LPCSCROLLINFO, _In_ BOOL)
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
BOOL WINAPI ShowScrollBar(_In_ HWND, _In_ int, _In_ BOOL)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define MAKEINTRESOURCEW(i)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define SetWindowLongPtrW
BOOL WINAPI GetScrollInfo(_In_ HWND, _In_ int, _Inout_ LPSCROLLINFO)
#define SendNotifyMessage
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
int WINAPI ScrollWindowEx(_In_ HWND, _In_ int, _In_ int, _In_opt_ LPCRECT, _In_opt_ LPCRECT, _In_opt_ HRGN, _Out_opt_ LPRECT, _In_ UINT)
int WINAPI GetSystemMetrics(_In_ int)
BOOL WINAPI IsClipboardFormatAvailable(_In_ UINT)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
SHORT WINAPI GetKeyState(_In_ int)
BOOL WINAPI AppendMenuW(_In_ HMENU, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCWSTR)
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO