67 |
return head; |
return head; |
68 |
} |
} |
69 |
|
|
70 |
static BOOL CALLBACK enum_cb(HWND hwnd, LPARAM lparam) |
static BOOL CALLBACK |
71 |
|
enum_cb(HWND hwnd, LPARAM lparam) |
72 |
{ |
{ |
73 |
RECT rect; |
RECT rect; |
74 |
char title[150]; |
char title[150]; |
80 |
if (!(styles & WS_VISIBLE)) |
if (!(styles & WS_VISIBLE)) |
81 |
return TRUE; |
return TRUE; |
82 |
|
|
83 |
vchannel_write("CREATE1,0x%p,0x%x", hwnd, 0); |
vchannel_write("CREATE,0x%p,0x%x", hwnd, 0); |
84 |
|
|
85 |
if (!GetWindowRect(hwnd, &rect)) { |
if (!GetWindowRect(hwnd, &rect)) |
86 |
|
{ |
87 |
debug("GetWindowRect failed!"); |
debug("GetWindowRect failed!"); |
88 |
return TRUE; |
return TRUE; |
89 |
} |
} |
90 |
|
|
91 |
vchannel_write("POSITION1,0x%p,%d,%d,%d,%d,0x%x", |
vchannel_write("POSITION,0x%p,%d,%d,%d,%d,0x%x", |
92 |
hwnd, |
hwnd, |
93 |
rect.left, rect.top, |
rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, 0); |
|
rect.right - rect.left, |
|
|
rect.bottom - rect.top, |
|
|
0); |
|
94 |
|
|
95 |
GetWindowText(hwnd, title, sizeof(title)); |
GetWindowText(hwnd, title, sizeof(title)); |
96 |
|
|
103 |
else |
else |
104 |
state = 0; |
state = 0; |
105 |
|
|
106 |
vchannel_write("SETSTATE1,0x%p,%s,0x%x,0x%x", |
vchannel_write("SETSTATE,0x%p,%s,0x%x,0x%x", hwnd, title, state, 0); |
|
hwnd, title, state, 0); |
|
107 |
|
|
108 |
return TRUE; |
return TRUE; |
109 |
} |
} |
130 |
|
|
131 |
char *p, *tok1, *tok2, *tok3, *tok4, *tok5, *tok6, *tok7, *tok8; |
char *p, *tok1, *tok2, *tok3, *tok4, *tok5, *tok6, *tok7, *tok8; |
132 |
|
|
133 |
while ((size = vchannel_read(line, sizeof(line))) >= 0) { |
while ((size = vchannel_read(line, sizeof(line))) >= 0) |
134 |
|
{ |
135 |
debug("Got: %s", line); |
debug("Got: %s", line); |
136 |
|
|
137 |
p = line; |
p = line; |
161 |
|
|
162 |
g_instance = instance; |
g_instance = instance; |
163 |
|
|
164 |
hookdll = LoadLibrary("hookdll.dll"); |
hookdll = LoadLibrary("seamlessrdp.dll"); |
165 |
if (!hookdll) |
if (!hookdll) |
166 |
{ |
{ |
167 |
message("Could not load hook DLL. Unable to continue."); |
message("Could not load hook DLL. Unable to continue."); |
195 |
immediatly. */ |
immediatly. */ |
196 |
SystemParametersInfo(SPI_SETDRAGFULLWINDOWS, TRUE, NULL, 0); |
SystemParametersInfo(SPI_SETDRAGFULLWINDOWS, TRUE, NULL, 0); |
197 |
|
|
198 |
|
/* Disable screen saver since we cannot catch its windows. */ |
199 |
|
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, FALSE, NULL, 0); |
200 |
|
|
201 |
if (strlen(cmdline) == 0) |
if (strlen(cmdline) == 0) |
202 |
{ |
{ |
203 |
message("No command line specified."); |
message("No command line specified."); |