--- seamlessrdp/ServerExe/main.c 2006-05-30 20:39:11.000000000 +1000 +++ seamlessrdp-modified/seamlessrdp/ServerExe/main.c 2006-12-18 15:40:42.000000000 +1100 @@ -184,6 +184,23 @@ } static void +do_spawn(char *command_line) +{ + BOOL result; + PROCESS_INFORMATION proc_info; + STARTUPINFO startup_info; + + memset(&startup_info, 0, sizeof(STARTUPINFO)); + startup_info.cb = sizeof(STARTUPINFO); + + result = CreateProcess(NULL, command_line, NULL, NULL, FALSE, 0, + NULL, NULL, &startup_info, &proc_info); + // Release handles + CloseHandle(proc_info.hProcess); + CloseHandle(proc_info.hThread); +} + +static void process_cmds(void) { char line[VCHANNEL_MAX_LINE]; @@ -219,6 +236,10 @@ (HWND) strtoul(tok4, NULL, 0)); else if (strcmp(tok1, "FOCUS") == 0) do_focus(strtoul(tok2, NULL, 0), (HWND) strtoul(tok3, NULL, 0)); + else if (strcmp(tok1, "SPAWN") == 0) + { + do_spawn(tok3); + } } }