2 #include <freerdp/freerdp.h>
3 #include <freerdp/client/rail.h>
7 UINT client_rail_server_start_cmd(RailClientContext* context)
10 char argsAndFile[520] = { 0 };
15 WINPR_ASSERT(context);
18 WINPR_ASSERT(rail->rdpcontext);
20 const rdpSettings* settings = rail->rdpcontext->settings;
21 WINPR_ASSERT(settings);
23 clientStatus.flags = TS_RAIL_CLIENTSTATUS_ALLOWLOCALMOVESIZE;
26 clientStatus.flags |= TS_RAIL_CLIENTSTATUS_AUTORECONNECT;
28 clientStatus.flags |= TS_RAIL_CLIENTSTATUS_ZORDER_SYNC;
29 clientStatus.flags |= TS_RAIL_CLIENTSTATUS_WINDOW_RESIZE_MARGIN_SUPPORTED;
30 clientStatus.flags |= TS_RAIL_CLIENTSTATUS_APPBAR_REMOTING_SUPPORTED;
31 clientStatus.flags |= TS_RAIL_CLIENTSTATUS_POWER_DISPLAY_REQUEST_SUPPORTED;
32 clientStatus.flags |= TS_RAIL_CLIENTSTATUS_BIDIRECTIONAL_CLOAK_SUPPORTED;
33 status = context->ClientInformation(context, &clientStatus);
35 if (status != CHANNEL_RC_OK)
41 langBarInfo.languageBarStatus = 0x00000008;
42 status = context->ClientLanguageBarInfo(context, &langBarInfo);
48 case ERROR_BAD_CONFIGURATION:
56 sysparam.params |= SPI_MASK_SET_HIGH_CONTRAST;
57 sysparam.highContrast.colorScheme.string = NULL;
58 sysparam.highContrast.colorScheme.length = 0;
59 sysparam.highContrast.flags = 0x7E;
60 sysparam.params |= SPI_MASK_SET_MOUSE_BUTTON_SWAP;
61 sysparam.mouseButtonSwap = FALSE;
62 sysparam.params |= SPI_MASK_SET_KEYBOARD_PREF;
63 sysparam.keyboardPref = FALSE;
64 sysparam.params |= SPI_MASK_SET_DRAG_FULL_WINDOWS;
65 sysparam.dragFullWindows = FALSE;
66 sysparam.params |= SPI_MASK_SET_KEYBOARD_CUES;
67 sysparam.keyboardCues = FALSE;
68 sysparam.params |= SPI_MASK_SET_WORK_AREA;
69 sysparam.workArea.left = 0;
70 sysparam.workArea.top = 0;
73 sysparam.dragFullWindows = FALSE;
74 status = context->ClientSystemParam(context, &sysparam);
76 if (status != CHANNEL_RC_OK)
79 const char* RemoteApplicationFile =
81 const char* RemoteApplicationCmdLine =
83 if (RemoteApplicationFile && RemoteApplicationCmdLine)
85 (void)_snprintf(argsAndFile, ARRAYSIZE(argsAndFile),
"%s %s", RemoteApplicationCmdLine,
86 RemoteApplicationFile);
87 exec.RemoteApplicationArguments = argsAndFile;
89 else if (RemoteApplicationFile)
90 exec.RemoteApplicationArguments = RemoteApplicationFile;
92 exec.RemoteApplicationArguments = RemoteApplicationCmdLine;
93 exec.RemoteApplicationProgram =
95 exec.RemoteApplicationWorkingDir =
97 return context->ClientExecute(context, &exec);
FREERDP_API UINT32 freerdp_settings_get_uint32(const rdpSettings *settings, FreeRDP_Settings_Keys_UInt32 id)
Returns a UINT32 settings value.
FREERDP_API BOOL freerdp_settings_get_bool(const rdpSettings *settings, FreeRDP_Settings_Keys_Bool id)
Returns a boolean settings value.
FREERDP_API const char * freerdp_settings_get_string(const rdpSettings *settings, FreeRDP_Settings_Keys_String id)
Returns a immutable string settings value.