• Join/Login
  • Business Software
  • Open Source Software
  • For Vendors
  • Blog
  • About
  • More
    • Articles
    • Create
    • SourceForge Podcast
    • Site Documentation
    • Subscribe to our Newsletter
    • Support Request
SourceForge logo
For Vendors Help Create Join Login
SourceForge logo
Business Software
Open Source Software
SourceForge Podcast
Resources
  • Articles
  • Case Studies
  • Blog
Menu
  • Help
  • Create
  • Join
  • Login
  • Home
  • Browse
  • rdesktop
  • Feature Requests

update client tswindowclipper.dll for current seamlessrdp

rdesktop has moved to GitHub

Brought to you by: astrand, hean01, matthewc
  • Summary
  • Files
  • Reviews
  • Support
  • Mailing Lists
  • Tickets ▾
    • Feature Requests
    • Patches
    • Support Requests
    • Bugs
  • Code
Menu ▾ ▴
  • Create Ticket
  • View Stats

Group

  • Future
  • NextRelease
  • v1.8.3

Searches

  • Changes
  • Closed Tickets
  • Open Tickets

Help

  • Formatting Help

#139 update client tswindowclipper.dll for current seamlessrdp

open
nobody
None
5
2012-11-29
2009-05-22
Anonymous
No

The seamless rdp components of rdesktop includes source for tswindowclipper.dll, a minimally functional prof of concept client dll originally intended designed to allow the predecessor of seamlessrdp to work with XP/W2K/Vista clients running the MS RDP client. However this client dll has not been maintained in tandem with seamlessrdp, and does not currently work with seamlessrdpshell.exe.

It appears that it is possible to modify the clipper client dll to work with the current seamless rdp server-side code, but really making this work well is somewhat beyond my limited novice programming skill-set.

snippets of (poorly) changed/added code for clipper.cpp follow:

void WINAPI VirtualChannelOpenEvent( DWORD openHandle, UINT event,
LPVOID pdata, UINT32 dataLength,
UINT32 totalLength, UINT32 dataFlags )
{
LPDWORD pdwControlCode = ( LPDWORD ) pdata;
CHAR ourData[ 1600 ];
UINT ui = 0;

UNREFERENCED_PARAMETER( openHandle );
UNREFERENCED_PARAMETER( dataFlags );

ZeroMemory( ourData, sizeof( ourData ) );

//copy the send string (with the same lenth of the data)
strncpy( ourData, ( LPSTR ) pdata, dataLength / sizeof( char ) );

if ( OUTPUT_DEBUG_INFO == 1 ) {
OutputDebugString
( " TS WINDOW CLIPPER :: CLIENT DLL :: Info --> Virtual channel data received " );
OutputDebugString( ourData );
}

if ( dataLength == totalLength ) {
switch ( event ) {
case CHANNEL_EVENT_DATA_RECEIVED: {
char *p;
char *tok1, *tok2, *tok3, *tok4, *tok5, *tok6, *tok7, *tok8;
//unsigned long id, flags, group, parent;
char *endptr;
p = ourData;

tok1 = Get_Token(&p);
tok2 = Get_Token(&p);
tok3 = Get_Token(&p);
tok4 = Get_Token(&p);
tok5 = Get_Token(&p);
tok6 = Get_Token(&p);
tok7 = Get_Token(&p);
tok8 = Get_Token(&p);

CWindowData* wid=new CWindowData("");

if ( strcmp(tok1, "CREATE" ) == 0 ) {
if ( OUTPUT_DEBUG_INFO == 1 ) {
OutputDebugString
( "TS WINDOW CLIPPER :: CLIENT DLL :: Info --> Message was of type CREATE window title is:" );
OutputDebugString( wid->GetTitle() );
}
if (tok6 != NULL ) {
wid->SetId(tok3);
CStdString s = wid->GetId();
char *ptr;
int length = s.GetLength();
ptr = s.GetBufferSetLength( length );
hash_insert( ptr, wid, &m_ht );
CreateAndShowWindow( wid );
DoClipping( 1 );
}
} else if ( strcmp(tok1, "DESTROY" ) == 0 ) {
if ( OUTPUT_DEBUG_INFO == 1 ) {
OutputDebugString
( "TS WINDOW CLIPPER :: CLIENT DLL :: Info --> Message was of type DESTROY window title is:" );
OutputDebugString( wid->GetTitle() );
}
wid->SetId(tok3);
CStdString s = wid->GetId();
char *ptr;
int length = s.GetLength();
ptr = s.GetBufferSetLength( length );

CWindowData *oldWinData =
( CWindowData * ) hash_del( ptr, &m_ht );

DestroyTaskbarWindow( oldWinData );

delete oldWinData;
delete wid;
DoClipping( 1 );
} else if ( strcmp(tok1, "POSITION" ) == 0 ) {
if ( OUTPUT_DEBUG_INFO == 1 ) {
OutputDebugString
( "TS WINDOW CLIPPER :: CLIENT DLL :: Info --> Message was of type POSITION window title is:" );
OutputDebugString( wid->GetTitle() );
}
wid->SetId(tok3);

// check bounds, coords can be negative if window top left point is moved off the screen.
// we don't care about that since the window can't be see so just use zero.

if (strchr(tok4, '-')==NULL) {
wid->SetX1(atoi(tok4));
} else {
wid->SetX1(0);
}
if (strchr(tok5, '-')==NULL) {
wid->SetY1(atoi(tok5));
} else {
wid->SetY1(0);
}
if (strchr(tok6, '-')==NULL) {
wid->SetX2(atoi(tok4)+atoi(tok6));
} else {
wid->SetX2(0);
}
if (strchr(tok7, '-')==NULL) {
wid->SetY2(atoi(tok5)+atoi(tok7));
} else {
wid->SetY2(0);
}
CStdString s = wid->GetId();
char *ptr;
int length = s.GetLength();
ptr = s.GetBufferSetLength( length );

CWindowData *movedWinData =
( CWindowData * ) hash_lookup( ptr, &m_ht );

if ( movedWinData != NULL ) {
movedWinData->SetX1( wid->GetX1() );
movedWinData->SetX2( wid->GetX2() );
movedWinData->SetY1( wid->GetY1() );
movedWinData->SetY2( wid->GetY2() );

DoClipping( 1 );
}

delete wid;
} else if ( strcmp(tok1, "TITLE" ) == 0 ) {
if ( OUTPUT_DEBUG_INFO == 1 ) {
OutputDebugString
( "TS WINDOW CLIPPER :: CLIENT DLL :: Info --> Message was of type TITLE window title is:" );
OutputDebugString( wid->GetTitle() );
}
if (tok5 != NULL ) {

wid->SetId(tok3);
CStdString s = wid->GetId();
char *ptr;
int length = s.GetLength();
ptr = s.GetBufferSetLength( length );

CWindowData *retitledWinData =
( CWindowData * ) hash_lookup( ptr, &m_ht );
wid->SetTitle(tok4);
SetWindowTitle(retitledWinData, tok4);
}

delete wid;
} else if (strcmp(tok1,"HELLO") == 0) {
//DoClipping( 1 );
}
}
break;

case CHANNEL_EVENT_WRITE_COMPLETE: {}
break;

case CHANNEL_EVENT_WRITE_CANCELLED: {}
break;

default: {}
break;
}
} else {}
}

void SetWindowTitle(CWindowData * wd, const char *title)
{
if ( wd->TaskbarWindowHandle != NULL ) {
SetWindowText( wd->TaskbarWindowHandle , title);
}
}

char* Get_Token(char **s)
{
char *comma, *head;
head = *s;

if (!head)
return NULL;

comma = strchr(head, ',');
if (comma)
{
*comma = '\0';
*s = comma + 1;
}
else
{
*s = NULL;
}

return head;
}

Discussion

  • Nobody/Anonymous

    Nobody/Anonymous - 2009-08-10

    It appears that someone has implemented this:

    http://www.rentacoder.com/RentACoder/misc/BidRequests/ShowBidRequest.asp?lngBidRequestId=1166166

     
    If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
SourceForge
  • Create a Project
  • Open Source Software
  • Business Software
  • Top Downloaded Projects
Company
  • About
  • Team
  • SourceForge Headquarters
    1320 Columbia Street Suite 310
    San Diego, CA 92101
    +1 (858) 422-6466
Resources
  • Support
  • Site Documentation
  • Site Status
  • SourceForge Reviews
SourceForge logo
© 2026 Slashdot Media. All Rights Reserved.
Terms Privacy Opt Out Advertise
veeam logo