154 case 0x30: rv = 0x0b;
break;
155 case 0x31: rv = 0x02;
break;
156 case 0x32: rv = 0x03;
break;
157 case 0x33: rv = 0x04;
break;
158 case 0x34: rv = 0x05;
break;
159 case 0x35: rv = 0x06;
break;
160 case 0x36: rv = 0x07;
break;
161 case 0x37: rv = 0x08;
break;
162 case 0x38: rv = 0x09;
break;
163 case 0x39: rv = 0x0a;
break;
165 case 0xbd: rv = 0x0c;
break;
166 case 0xbb: rv = 0x0d;
break;
167 case 0x08: rv = 0x0e;
break;
168 case 0x09: rv = 0x0f;
break;
169 case 0xdb: rv = 0x1b;
break;
170 case 0xdd: rv = 0x1a;
break;
171 case 0x14: rv = 0x3a;
break;
172 case 0xba: rv = 0x27;
break;
173 case 0xde: rv = 0x28;
break;
174 case 0x10: rv = 0x2a;
break;
175 case 0xbc: rv = 0x33;
break;
176 case 0xbe: rv = 0x34;
break;
177 case 0xbf: rv = 0x35;
break;
178 case 0x0d: rv = 0x1c;
break;
179 case 0x27: rv = 0x4d;
break;
180 case 0x25: rv = 0x4b;
break;
181 case 0x26: rv = 0x48;
break;
182 case 0x28: rv = 0x50;
break;
183 case 0x20: rv = 0x39;
break;
184 case 0xdc: rv = 0x2b;
break;
185 case 0xc0: rv = 0x29;
break;
186 case 0x11: rv = 0x1d;
break;
188 case 0x41: rv = 0x1e;
break;
189 case 0x42: rv = 0x30;
break;
190 case 0x43: rv = 0x2e;
break;
191 case 0x44: rv = 0x20;
break;
192 case 0x45: rv = 0x12;
break;
193 case 0x46: rv = 0x21;
break;
194 case 0x47: rv = 0x22;
break;
195 case 0x48: rv = 0x23;
break;
196 case 0x49: rv = 0x17;
break;
197 case 0x4a: rv = 0x24;
break;
198 case 0x4b: rv = 0x25;
break;
199 case 0x4c: rv = 0x26;
break;
200 case 0x4d: rv = 0x32;
break;
201 case 0x4e: rv = 0x31;
break;
202 case 0x4f: rv = 0x18;
break;
203 case 0x50: rv = 0x19;
break;
204 case 0x51: rv = 0x10;
break;
205 case 0x52: rv = 0x13;
break;
206 case 0x53: rv = 0x1f;
break;
207 case 0x54: rv = 0x14;
break;
208 case 0x55: rv = 0x16;
break;
209 case 0x56: rv = 0x2f;
break;
210 case 0x57: rv = 0x11;
break;
211 case 0x58: rv = 0x2d;
break;
212 case 0x59: rv = 0x15;
break;
213 case 0x5a: rv = 0x2c;
break;
239 if (keydata & 0x0001)
244 if (keydata & 0x0001)
249 if (keydata & 0x0001)
404 if (scancode == 0x0045)
533 style &= ~WS_HSCROLL;
534 style &= ~WS_VSCROLL;
776 str_to_uni(caption,
"ReactOS Remote Desktop");
907 for (
i =
cy - 1;
i >= 0;
i--)
909 for (
j =
cx - 1;
j >= 0;
j--)
911 colour = ((
unsigned char*)
data)[
i *
cx +
j];
916 ((
unsigned int*)
bits)[
i *
cx +
j] = colour;
922 for (
i =
cy - 1;
i >= 0;
i--)
924 for (
j =
cx - 1;
j >= 0;
j--)
926 colour = ((
unsigned short*)
data)[
i *
cx +
j];
929 ((
unsigned int*)
bits)[
i *
cx +
j] = colour;
935 for (
i =
cy - 1;
i >= 0;
i--)
937 for (
j =
cx - 1;
j >= 0;
j--)
939 colour = ((
unsigned short*)
data)[
i *
cx +
j];
942 ((
unsigned int*)
bits)[
i *
cx +
j] = colour;
948 for (
i =
cy - 1;
i >= 0;
i--)
950 for (
j =
cx - 1;
j >= 0;
j--)
957 ((
unsigned int*)
bits)[
i *
cx +
j] = colour;
988 szPort =
strtok(szAddress,
":");
996 iPort =
atoi(szPort);
998 if (iPort <= 0 || iPort > 0xFFFF)
1022 if(pUsername ==
NULL)
1038 LPWSTR lpStr = lpCmdLine;
1045 if (*lpCmdLine !=
L'/')
1056 lpToken =
wcstok(lpStr, szSeps);
1059 if (
wcsncmp(lpToken,
L"edit", 4) == 0)
1067 if (*lpToken ==
L'v')
1072 else if (*lpToken ==
L'w')
1077 else if (*lpToken ==
L'h')
1082 else if (*lpToken ==
L'f')
1220 red = (colour>>16)&0xff;
1221 green = (colour>>8)&0xff;
1265 red = (colour>>16)&0xff;
1266 green = (colour>>8)&0xff;
1289 int ok_to_ScrollWindowEx;
1291 ok_to_ScrollWindowEx = 1;
1293 if (!ok_to_ScrollWindowEx)
1347 unsigned char * andmask,
unsigned char * xormask)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
char * strtok(char *String, const char *Delimiters)
INT GetIntegerFromSettings(PRDPSETTINGS pSettings, LPWSTR lpValue)
BOOL SetStringToSettings(PRDPSETTINGS pRdpSettings, LPWSTR lpKey, LPWSTR lpValue)
BOOL LoadRdpSettingsFromFile(PRDPSETTINGS pRdpSettings, LPWSTR lpFile)
BOOL InitRdpSettings(PRDPSETTINGS pRdpSettings)
BOOL SetIntegerToSettings(PRDPSETTINGS pRdpSettings, LPWSTR lpKey, INT Value)
LPWSTR GetStringFromSettings(PRDPSETTINGS pSettings, LPWSTR lpValue)
char * tcp_get_address(void)
static LRESULT handle_WM_MBUTTONUP(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
static int g_screen_height
static LRESULT handle_WM_VSCROLL(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
static void str_to_uni(TCHAR *sizex, char *size1)
void mi_fill_rect(int x, int y, int cx, int cy, int colour)
static HINSTANCE g_Instance
int mi_create_window(void)
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
static void uni_to_str(char *sizex, TCHAR *size1)
static LRESULT handle_WM_NCHITTEST(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
static LRESULT handle_WM_HSCROLL(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
static INT GetPortNumber(PCHAR szAddress)
static LRESULT handle_WM_SIZE(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
static LRESULT handle_WM_RBUTTONUP(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
static LRESULT handle_WM_MOUSEMOVE(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
static BOOL ParseCommandLine(LPWSTR lpCmdLine, PRDPSETTINGS pRdpSettings, BOOL *bSkipDlg)
static void mi_show_error(char *caption)
void mi_set_clip(int x, int y, int cx, int cy)
static int g_screen_width
static LRESULT handle_WM_SETCURSOR(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
void mi_warning(char *msg)
static void mi_scroll(int dx, int dy)
void mi_set_cursor(void *cursor)
static LRESULT handle_WM_RBUTTONDOWN(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
void mi_screen_copy(int x, int y, int cx, int cy, int srcx, int srcy)
static LRESULT handle_WM_LBUTTONUP(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
void * mi_create_cursor(unsigned int x, unsigned int y, int width, int height, unsigned char *andmask, unsigned char *xormask)
void mi_begin_update(void)
void mi_paint_rect(char *data, int width, int height, int x, int y, int cx, int cy)
static LRESULT handle_WM_SIZING(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
static LRESULT handle_WM_PAINT(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
static VOID SetDomainAndUsername(PCHAR pName)
static LRESULT handle_WM_LBUTTONDOWN(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
static void mi_check_modifier(void)
static LRESULT handle_WM_MOUSEWHEEL(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
void mi_line(int x1, int y1, int x2, int y2, int colour)
static HRGN mi_clip(HDC dc)
void mi_destroy_cursor(void *cursor)
void mi_set_null_cursor(void)
static int get_scan_code_from_ascii(int code)
static int check_sck(void)
static LRESULT handle_WM_MBUTTONDOWN(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
int mi_read_keyboard_state(void)
static LRESULT handle_WM_KEY(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
BOOL OpenRDPConnectDialog(HINSTANCE hInstance, PRDPSETTINGS pRdpSettings)
#define HeapFree(x, y, z)
static const WCHAR *const ext[]
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
INT WSAAPI select(IN INT s, IN OUT LPFD_SET readfds, IN OUT LPFD_SET writefds, IN OUT LPFD_SET exceptfds, IN CONST struct timeval *timeout)
INT WSAAPI WSAAsyncSelect(IN SOCKET s, IN HWND hWnd, IN UINT wMsg, IN LONG lEvent)
INT WINAPI WSAStartup(IN WORD wVersionRequested, OUT LPWSADATA lpWSAData)
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)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
GLubyte GLubyte GLubyte GLubyte w
GLfloat GLfloat GLfloat GLfloat h
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
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
HLOCAL NTAPI LocalFree(HLOCAL hMem)
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
_Check_return_ _CRTIMP int __cdecl _wtoi(_In_z_ const wchar_t *_Str)
#define memcpy(s1, s2, n)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
_Out_opt_ int _Out_opt_ int * cy
_Check_return_ _CRTIMP int __cdecl wcsncmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
_Check_return_ _CRTIMP wchar_t *__cdecl wcstok(_Inout_opt_z_ wchar_t *_Str, _In_z_ const wchar_t *_Delim)
BOOL WINAPI SHIM_OBJ_NAME() GetComputerNameA(LPSTR lpBuffer, LPDWORD lpnSize)
BITMAPINFOHEADER bmiHeader
TW_UINT32 TW_UINT16 TW_UINT16 MSG
void ui_mouse_move(int x, int y)
void ui_key_down(int key, int ext)
void ui_invalidate(int x, int y, int cx, int cy)
void ui_mouse_button(int button, int x, int y, int down)
void ui_key_up(int key, int ext)
void ui_set_modifier_state(int code)
#define SPLIT_COLOUR16(c, r, g, b)
#define SPLIT_COLOUR15(c, r, g, b)
#define MAKE_COLOUR32(c, r, g, b)
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
DWORD WINAPI GetLastError(void)
#define FORMAT_MESSAGE_FROM_SYSTEM
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
int WINAPI IntersectClipRect(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
BOOL WINAPI DeleteDC(_In_ HDC)
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
int WINAPI SelectClipRgn(_In_ HDC, _In_opt_ HRGN)
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)
int PASCAL FAR WSACleanup(void)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetWindowDC(_In_opt_ HWND)
BOOL WINAPI DestroyCursor(_In_ HCURSOR)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
BOOL WINAPI AdjustWindowRectEx(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL, _In_ DWORD)
BOOL WINAPI IsRectEmpty(_In_ LPCRECT)
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
int WINAPI SetScrollPos(_In_ HWND, _In_ int, _In_ int, _In_ BOOL)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
BOOL WINAPI SetScrollRange(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ BOOL)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI IntersectRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
BOOL WINAPI UpdateWindow(_In_ HWND)
BOOL WINAPI InvalidateRgn(_In_ HWND, _In_opt_ HRGN, _In_ BOOL)
#define MB_ICONINFORMATION
HCURSOR WINAPI CreateCursor(_In_opt_ HINSTANCE, _In_ int, _In_ int, _In_ int, _In_ int, _In_ CONST VOID *, _In_ CONST VOID *)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
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)
SHORT WINAPI GetKeyState(_In_ int)
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)