43 if(end_coords->
Y < start_coords->
Y ||
44 (end_coords->
Y == start_coords->
Y && end_coords->
X < start_coords->
X))
46 *first_coords = *end_coords;
47 *last_coords = *start_coords;
49 *first_coords = *start_coords;
50 *last_coords = *end_coords;
67 COORD screen_start = {0, 0};
68 COORD first_coords, last_coords;
74 get_coords(&start_coords, &end_coords, &first_coords, &last_coords);
76 (last_coords.
Y - first_coords.
Y) + (last_coords.
X - first_coords.
X),
82 COORD first_coords, last_coords;
85 get_coords(&start_coords, &end_coords, &first_coords, &last_coords);
89 (last_coords.
Y - first_coords.
Y) + (last_coords.
X - first_coords.
X);
99 for(
int j = first_coords.
Y;
j <= last_coords.
Y;
j++) {
107 if(
j == first_coords.
Y) {
112 *((
char *)mem_ptr + data_size++) =
'\r';
113 *((
char *)mem_ptr + data_size++) =
'\n';
116 if(
j == last_coords.
Y) {
126 if((
j != last_coords.
Y) && (first_coords.
Y != last_coords.
Y))
127 while(*((
char *)mem_ptr + data_size - 1) ==
' ') data_size--;
129 if(first_coords.
Y != last_coords.
Y) {
131 *((
char *)mem_ptr + data_size++) =
'\r';
132 *((
char *)mem_ptr + data_size++) =
'\n';
135 *((
char *)mem_ptr + data_size) = 0;
156 COORD screen_start = {0, 0};
158 COORD end_coords = start_coords;
165 if(normal_bg == -1) normal_bg = 0;
166 if(normal_fg == -1) normal_fg = 7;
167 normal = (normal_bg << 4) | normal_fg;
168 inverse = (normal_fg << 4) | normal_bg;
181 doClip(start_coords, end_coords);
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
BOOL WINAPI FillConsoleOutputAttribute(IN HANDLE hConsoleOutput, IN WORD wAttribute, IN DWORD nLength, IN COORD dwWriteCoord, OUT LPDWORD lpNumberOfAttrsWritten)
BOOL WINAPI GetConsoleScreenBufferInfo(IN HANDLE hConsoleOutput, OUT PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo)
int get_normal_fg() const
int get_normal_bg() const
void get_coords(COORD *start_coords, COORD *end_coords, COORD *first_coords, COORD *last_coords)
TMouse(Tnclip &RefClipboard)
void move_mouse(COORD start_coords, COORD end_coords)
void doClip(COORD start_coords, COORD end_coords)
CONSOLE_SCREEN_BUFFER_INFO ConsoleInfo
void Copy(HGLOBAL clipboard_data)
GLuint GLsizei GLsizei * length
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 GLint GLint j
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
void saveScreen(CHAR_INFO *chiBuffer)
void restoreScreen(CHAR_INFO *chiBuffer)
#define STD_OUTPUT_HANDLE
#define ReadConsoleOutputCharacter
#define FROM_LEFT_1ST_BUTTON_PRESSED
_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