16 unsigned char *
line =
p;
27 for (
i = 0;
i < thisline;
i++)
33 for (
i = 0;
i < thisline;
i++)
91 char bmpcache_dir[256];
106 sprintf(bmpcache_dir,
"%s/%s",
home,
".rdesktop/cache");
396 rcClip.right =
This->width + 1;
397 rcClip.bottom =
This->height + 1;
432 PCHANNEL_DEF pChannel,
434 ULONG versionRequested,
435 PCHANNEL_INIT_EVENT_FN pChannelInitEventProc
438 if(channelCount <= 0)
439 return CHANNEL_RC_BAD_CHANNEL;
441 if(ppInitHandle ==
NULL)
442 return CHANNEL_RC_BAD_INIT_HANDLE;
445 return CHANNEL_RC_BAD_CHANNEL;
447 if(pChannelInitEventProc ==
NULL)
448 return CHANNEL_RC_BAD_PROC;
453 return CHANNEL_RC_NOT_IN_VIRTUALCHANNELENTRY;
455 if(
This->num_channels + channelCount > CHANNEL_MAX_COUNT)
456 return CHANNEL_RC_TOO_MANY_CHANNELS;
458 for(
INT i = 0;
i < channelCount; ++
i)
461 return CHANNEL_RC_BAD_CHANNEL;
464 memcpy(
This->channel_defs +
This->num_channels, pChannel,
sizeof(*pChannel) * channelCount);
467 for(
INT i = 0;
i < channelCount; ++
i)
471 int j =
This->num_channels +
i;
472 This->channel_data[
j].opened = 0;
473 This->channel_data[
j].pChannelInitEventProc = pChannelInitEventProc;
474 This->channel_data[
j].pChannelOpenEventProc =
NULL;
478 This->num_channels += channelCount;
480 *ppInitHandle =
This;
482 return CHANNEL_RC_OK;
492 PCHANNEL_OPEN_EVENT_FN pChannelOpenEventProc
495 if(pInitHandle ==
NULL)
496 return CHANNEL_RC_BAD_INIT_HANDLE;
498 if(pOpenHandle ==
NULL)
499 return CHANNEL_RC_BAD_CHANNEL_HANDLE;
501 if(pChannelName ==
NULL)
502 return CHANNEL_RC_UNKNOWN_CHANNEL_NAME;
504 if(pChannelOpenEventProc ==
NULL)
505 return CHANNEL_RC_BAD_PROC;
510 for(
unsigned i = 0;
i <
This->num_channels; ++
i)
512 if(
strcmp(pChannelName,
This->channel_defs[
i].name) == 0)
514 if(
This->channel_data[
i].opened)
515 return CHANNEL_RC_ALREADY_OPEN;
517 This->channel_data[
i].opened = 1;
518 This->channel_data[
i].pChannelOpenEventProc = pChannelOpenEventProc;
528 return CHANNEL_RC_OK;
537 return CHANNEL_RC_BAD_CHANNEL_HANDLE;
549 return CHANNEL_RC_BAD_CHANNEL_HANDLE;
574 This->keylayout = 0x409;
575 This->keyboard_type = 0x4;
576 This->keyboard_subtype = 0x0;
577 This->keyboard_functionkeys = 0xc;
580 This->server_depth = 24;
584 This->bitmap_cache_persist_enable =
False;
609 This->rdp.current_status = 1;
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
#define MOUSE_FLAG_BUTTON5
#define MOUSE_FLAG_BUTTON1
#define CHANNEL_OPTION_INITIALIZED
#define MOUSE_FLAG_BUTTON2
#define MOUSE_FLAG_BUTTON4
#define MOUSE_FLAG_BUTTON3
void rdp_send_input(uint32 time, uint16 message_type, uint16 device_flags, uint16 param1, uint16 param2)
RD_BOOL rdp_connect(char *server, uint32 flags, char *domain, char *password, char *command, char *directory, RD_BOOL reconnect)
void rdp_main_loop(RD_BOOL *deactivated, uint32 *ext_disc_reason)
BOOL WINAPI GetComputerNameW(LPWSTR lpBuffer, LPDWORD lpnSize)
_Check_return_ _CRTIMP int __cdecl _mkdir(_In_z_ const char *_Path)
LPVOID WINAPI TlsGetValue(IN DWORD Index)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
DWORD WINAPI GetTickCount(VOID)
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 GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLuint GLsizei GLsizei * length
GLboolean GLboolean GLboolean GLboolean a
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
_CRTIMP void __cdecl perror(_In_opt_z_ const char *_ErrMsg)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
_Check_return_opt_ _CRTIMP int __cdecl vfprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
_Check_return_ char *__cdecl getenv(_In_z_ const char *_VarName)
REFIID LPVOID DWORD_PTR dw
#define memcpy(s1, s2, n)
#define RDP5_NO_MENUANIMATIONS
#define RDP_LOGON_COMPRESSION
#define RDP5_NO_FULLWINDOWDRAG
#define RDP5_NO_WALLPAPER
#define RDP_LOGON_COMPRESSION2
#define sprintf(buf, format,...)
static LRESULT CALLBACK mstsc_WndProc(HWND hwnd, UINT uMsg, WPARAM wparam, LPARAM lparam)
BOOL rd_pstcache_mkdir(void)
UINT VCAPITYPE VirtualChannelClose(DWORD openHandle)
int load_licence(RDPCLIENT *This, unsigned char **data)
static void mstsc_mousewheel(RDPCLIENT *This, int value, LPARAM lparam)
int rd_write_file(int fd, void *ptr, int len)
BOOL rd_lock_file(int fd, int start, int len)
static UINT VCAPITYPE VirtualChannelInit(LPVOID *ppInitHandle, PCHANNEL_DEF pChannel, INT channelCount, ULONG versionRequested, PCHANNEL_INIT_EVENT_FN pChannelInitEventProc)
void save_licence(RDPCLIENT *This, unsigned char *data, int length)
UINT VCAPITYPE VirtualChannelOpen(LPVOID pInitHandle, LPDWORD pOpenHandle, PCHAR pChannelName, PCHANNEL_OPEN_EVENT_FN pChannelOpenEventProc)
int rd_read_file(int fd, void *ptr, int len)
void rd_close_file(int fd)
void channel_process(RDPCLIENT *This, STREAM s, uint16 mcs_channel)
void unimpl(char *format,...)
UINT VCAPITYPE VirtualChannelWrite(DWORD openHandle, LPVOID pData, ULONG dataLength, LPVOID pUserData)
struct CHANNEL_HANDLE_ CHANNEL_HANDLE
void hexdump(unsigned char *p, unsigned int len)
static DWORD WINAPI mstsc_ProtocolIOThread(LPVOID lpArgument)
int rd_lseek_file(int fd, int offset)
int rd_open_file(char *filename)
void generate_random(uint8 *random)
_Check_return_opt_ _CRTIMP int __cdecl _close(_In_ int _FileHandle)
_Check_return_opt_ _CRTIMP long __cdecl _lseek(_In_ int _FileHandle, _In_ long _Offset, _In_ int _Origin)
_CRTIMP int __cdecl _write(_In_ int _FileHandle, _In_reads_bytes_(_MaxCharCount) const void *_Buf, _In_ unsigned int _MaxCharCount)
_Check_return_ _CRTIMP int __cdecl _read(_In_ int _FileHandle, _Out_writes_bytes_(_MaxCharCount) void *_DstBuf, _In_ unsigned int _MaxCharCount)
_CRTIMP int __cdecl _open(const char *_Filename, int _OpenFlag,...)
BITMAPINFOHEADER bmiHeader
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
TW_UINT32 TW_UINT16 TW_UINT16 MSG
static GLenum _GLUfuncptr fn
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
#define MAX_COMPUTERNAME_LENGTH
void int int ULONGLONG int va_list * ap
HGDIOBJ WINAPI GetStockObject(_In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define RegisterWindowMessage
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
LONG WINAPI GetMessageTime(void)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI DestroyWindow(_In_ HWND)