| 1 | /** |
| 2 | * FreeRDP: A Remote Desktop Protocol Implementation |
| 3 | * Display Update Virtual Channel Extension |
| 4 | * |
| 5 | * Copyright 2013 Marc-Andre Moreau <[email protected]> |
| 6 | * Copyright 2015 Thincast Technologies GmbH |
| 7 | * Copyright 2015 DI (FH) Martin Haimberger <[email protected]> |
| 8 | * Copyright 2016 David PHAM-VAN <[email protected]> |
| 9 | * |
| 10 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 11 | * you may not use this file except in compliance with the License. |
| 12 | * You may obtain a copy of the License at |
| 13 | * |
| 14 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 15 | * |
| 16 | * Unless required by applicable law or agreed to in writing, software |
| 17 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 18 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 19 | * See the License for the specific language governing permissions and |
| 20 | * limitations under the License. |
| 21 | */ |
| 22 | |
| 23 | #include <freerdp/config.h>cxx . . $ `<file>/build/include/freerdp/config.h`/ |
| 24 | |
| 25 | #include <stdio.h> |
| 26 | #include <stdlib.h> |
| 27 | #include <string.h> |
| 28 | |
| 29 | #include <winpr/crt.h>cxx . . $ `<file>/winpr/include/winpr/crt.h`/ |
| 30 | #include <winpr/assert.h>cxx . . $ `<file>/winpr/include/winpr/assert.h`/ |
| 31 | #include <winpr/synch.h>cxx . . $ `<file>/winpr/include/winpr/synch.h`/ |
| 32 | #include <winpr/print.h>cxx . . $ `<file>/winpr/include/winpr/print.h`/ |
| 33 | #include <winpr/thread.h>cxx . . $ `<file>/winpr/include/winpr/thread.h`/ |
| 34 | #include <winpr/stream.h>cxx . . $ `<file>/winpr/include/winpr/stream.h`/ |
| 35 | #include <winpr/sysinfo.h>cxx . . $ `<file>/winpr/include/winpr/sysinfo.h`/ |
| 36 | #include <winpr/cmdline.h>cxx . . $ `<file>/winpr/include/winpr/cmdline.h`/ |
| 37 | #include <winpr/collections.h>cxx . . $ `<file>/winpr/include/winpr/collections.h`/ |
| 38 | |
| 39 | #include <freerdp/addin.h>cxx . . $ `<file>/include/freerdp/addin.h`/ |
| 40 | #include <freerdp/utils/string.h>cxx . . $ `<file>/include/freerdp/utils/string.h`/ |
| 41 | #include <freerdp/client/channels.h>cxx . . $ `<file>/include/freerdp/client/channels.h`/ |
| 42 | |
| 43 | #include "disp_main.h"cxx . . $ `<file>/channels/disp/client/disp_main.h`/ |
| 44 | #include "../disp_common.h"cxx . . $ `<file>/channels/disp/disp_common.h`/ |
| 45 | |
| 46 | typedef structcxx . . $ $anonymous_type_20b8de699510d4dc_0# |
| 47 | { |
| 48 | GENERIC_DYNVC_PLUGINcxx . . $ GENERIC_DYNVC_PLUGIN# basecxx . . $ $anonymous_type_20b8de699510d4dc_0#base.; |
| 49 | |
| 50 | DispClientContextcxx . . $ DispClientContext#* contextcxx . . $ $anonymous_type_20b8de699510d4dc_0#context.; |
| 51 | UINT32cxx . . $ UINT32# MaxNumMonitorscxx . . $ $anonymous_type_20b8de699510d4dc_0#MaxNumMonitors.; |
| 52 | UINT32cxx . . $ UINT32# MaxMonitorAreaFactorAcxx . . $ $anonymous_type_20b8de699510d4dc_0#MaxMonitorAreaFactorA.; |
| 53 | UINT32cxx . . $ UINT32# MaxMonitorAreaFactorBcxx . . $ $anonymous_type_20b8de699510d4dc_0#MaxMonitorAreaFactorB.; |
| 54 | } DISP_PLUGINcxx . . $ DISP_PLUGIN#; |
| 55 | |
| 56 | /** |
| 57 | * Function description |
| 58 | * |
| 59 | * @return 0 on success, otherwise a Win32 error code |
| 60 | */ |
| 61 | static UINTcxx . . $ UINT# |
| 62 | disp_send_display_control_monitor_layout_pducxx . . $ disp_send_display_control_monitor_layout_pdu(eaeb48c513a9e245).(GENERIC_CHANNEL_CALLBACKcxx . . $ GENERIC_CHANNEL_CALLBACK#* callback, UINT32cxx . . $ UINT32# NumMonitors, |
| 63 | const DISPLAY_CONTROL_MONITOR_LAYOUTcxx . . $ DISPLAY_CONTROL_MONITOR_LAYOUT#* Monitors) |
| 64 | { |
| 65 | const DWORDcxx . . $ DWORD# level = WLOG_DEBUGcxx . . $ WLOG_DEBUG.; |
| 66 | UINTcxx . . $ UINT# status = 0; |
| 67 | |
| 68 | WINPR_ASSERTcxx . . $ `winpr/include/winpr/assert-api.h:76:9`!(callback); |
| 69 | WINPR_ASSERTcxx . . $ `winpr/include/winpr/assert-api.h:76:9`!(Monitors || (NumMonitors == 0)); |
| 70 | |
| 71 | DISP_PLUGINcxx . . $ DISP_PLUGIN#* disp = (DISP_PLUGINcxx . . $ DISP_PLUGIN#*)callback->plugincxx . . $ $anonymous_type_b3a06c54c4b60133_0#plugin.; |
| 72 | WINPR_ASSERTcxx . . $ `winpr/include/winpr/assert-api.h:76:9`!(disp); |
| 73 | |
| 74 | const UINT32cxx . . $ UINT32# MonitorLayoutSize = DISPLAY_CONTROL_MONITOR_LAYOUT_SIZEcxx . . $ `include/freerdp/channels/disp.h:28:9`!; |
| 75 | const DISPLAY_CONTROL_HEADERcxx . . $ DISPLAY_CONTROL_HEADER# header = { .length = 8 + 8 + (NumMonitors * MonitorLayoutSize), |
| 76 | .type = DISPLAY_CONTROL_PDU_TYPE_MONITOR_LAYOUTcxx . . $ `include/freerdp/channels/disp.h:27:9`! }; |
| 77 | |
| 78 | wStreamcxx . . $ wStream#* s = Stream_Newcxx . . $ Stream_New(af7e1125a927123a).(nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, header.lengthcxx . . $ $anonymous_type_3201b679ce5b593c_0#length.); |
| 79 | |
| 80 | if (!s) |
| 81 | { |
| 82 | WLog_Printcxx . . $ `winpr/include/winpr/wlog.h:256:9`!(disp->base.log, WLOG_ERROR, "Stream_New failed!"); |
| 83 | return CHANNEL_RC_NO_MEMORYcxx . . $ `winpr/include/winpr/wtsapi.h:171:9`!; |
| 84 | } |
| 85 | |
| 86 | if ((status = disp_write_headercxx . . $ disp_write_header(e0a20183d8dd41df).(s, &header))) |
| 87 | { |
| 88 | WLog_Printcxx . . $ `winpr/include/winpr/wlog.h:256:9`!(disp->base.log, WLOG_ERROR, "Failed to write header with error %" PRIu32cxx . . $ `<external>/15933738808807975373/inttypes.h:109:10`! "!", |
| 89 | status); |
| 90 | goto out; |
| 91 | } |
| 92 | |
| 93 | if (NumMonitors > disp->MaxNumMonitorscxx . . $ $anonymous_type_20b8de699510d4dc_0#MaxNumMonitors.) |
| 94 | NumMonitors = disp->MaxNumMonitorscxx . . $ $anonymous_type_20b8de699510d4dc_0#MaxNumMonitors.; |
| 95 | |
| 96 | Stream_Write_UINT32cxx . . $ `winpr/include/winpr/stream.h:1070:9`!(s, MonitorLayoutSize); /* MonitorLayoutSize (4 bytes) */ |
| 97 | Stream_Write_UINT32cxx . . $ `winpr/include/winpr/stream.h:1070:9`!(s, NumMonitors); /* NumMonitors (4 bytes) */ |
| 98 | WLog_Printcxx . . $ `winpr/include/winpr/wlog.h:256:9`!(disp->base.log, level, "NumMonitors=%" PRIu32cxx . . $ `<external>/15933738808807975373/inttypes.h:109:10`! "", NumMonitors); |
| 99 | |
| 100 | for (UINT32cxx . . $ UINT32# index = 0; index < NumMonitors; index++) |
| 101 | { |
| 102 | DISPLAY_CONTROL_MONITOR_LAYOUTcxx . . $ DISPLAY_CONTROL_MONITOR_LAYOUT# current = Monitors[index]; |
| 103 | current.Widthcxx . . $ $anonymous_type_3201b679ce5b593c_1#Width. -= (current.Widthcxx . . $ $anonymous_type_3201b679ce5b593c_1#Width. % 2); |
| 104 | |
| 105 | if (current.Widthcxx . . $ $anonymous_type_3201b679ce5b593c_1#Width. < 200) |
| 106 | current.Widthcxx . . $ $anonymous_type_3201b679ce5b593c_1#Width. = 200; |
| 107 | |
| 108 | if (current.Widthcxx . . $ $anonymous_type_3201b679ce5b593c_1#Width. > 8192) |
| 109 | current.Widthcxx . . $ $anonymous_type_3201b679ce5b593c_1#Width. = 8192; |
| 110 | |
| 111 | if (current.Widthcxx . . $ $anonymous_type_3201b679ce5b593c_1#Width. % 2) |
| 112 | current.Widthcxx . . $ $anonymous_type_3201b679ce5b593c_1#Width.++; |
| 113 | |
| 114 | if (current.Heightcxx . . $ $anonymous_type_3201b679ce5b593c_1#Height. < 200) |
| 115 | current.Heightcxx . . $ $anonymous_type_3201b679ce5b593c_1#Height. = 200; |
| 116 | |
| 117 | if (current.Heightcxx . . $ $anonymous_type_3201b679ce5b593c_1#Height. > 8192) |
| 118 | current.Heightcxx . . $ $anonymous_type_3201b679ce5b593c_1#Height. = 8192; |
| 119 | |
| 120 | Stream_Write_UINT32cxx . . $ `winpr/include/winpr/stream.h:1070:9`!(s, current.Flags); /* Flags (4 bytes) */ |
| 121 | Stream_Write_INT32cxx . . $ `winpr/include/winpr/stream.h:1016:9`!(s, current.Left); /* Left (4 bytes) */ |
| 122 | Stream_Write_INT32cxx . . $ `winpr/include/winpr/stream.h:1016:9`!(s, current.Top); /* Top (4 bytes) */ |
| 123 | Stream_Write_UINT32cxx . . $ `winpr/include/winpr/stream.h:1070:9`!(s, current.Width); /* Width (4 bytes) */ |
| 124 | Stream_Write_UINT32cxx . . $ `winpr/include/winpr/stream.h:1070:9`!(s, current.Height); /* Height (4 bytes) */ |
| 125 | Stream_Write_UINT32cxx . . $ `winpr/include/winpr/stream.h:1070:9`!(s, current.PhysicalWidth); /* PhysicalWidth (4 bytes) */ |
| 126 | Stream_Write_UINT32cxx . . $ `winpr/include/winpr/stream.h:1070:9`!(s, current.PhysicalHeight); /* PhysicalHeight (4 bytes) */ |
| 127 | Stream_Write_UINT32cxx . . $ `winpr/include/winpr/stream.h:1070:9`!(s, current.Orientation); /* Orientation (4 bytes) */ |
| 128 | Stream_Write_UINT32cxx . . $ `winpr/include/winpr/stream.h:1070:9`!(s, current.DesktopScaleFactor); /* DesktopScaleFactor (4 bytes) */ |
| 129 | Stream_Write_UINT32cxx . . $ `winpr/include/winpr/stream.h:1070:9`!(s, current.DeviceScaleFactor); /* DeviceScaleFactor (4 bytes) */ |
| 130 | WLog_Printcxx . . $ `winpr/include/winpr/wlog.h:256:9`!(disp->base.log, level, |
| 131 | "\t%" PRIu32cxx . . $ `<external>/15933738808807975373/inttypes.h:109:10`! " : Flags: 0x%08" PRIX32cxx . . $ `<external>/15933738808807975373/inttypes.h:141:10`! " Left/Top: (%" PRId32cxx . . $ `<external>/15933738808807975373/inttypes.h:61:10`! ",%" PRId32cxx . . $ `<external>/15933738808807975373/inttypes.h:61:10`! |
| 132 | ") W/H=%" PRIu32cxx . . $ `<external>/15933738808807975373/inttypes.h:109:10`! "x%" PRIu32cxx . . $ `<external>/15933738808807975373/inttypes.h:109:10`! ")", |
| 133 | index, current.Flags, current.Left, current.Top, current.Width, current.Height); |
| 134 | WLog_Printcxx . . $ `winpr/include/winpr/wlog.h:256:9`!(disp->base.log, level, |
| 135 | "\t PhysicalWidth: %" PRIu32cxx . . $ `<external>/15933738808807975373/inttypes.h:109:10`! " PhysicalHeight: %" PRIu32cxx . . $ `<external>/15933738808807975373/inttypes.h:109:10`! |
| 136 | " Orientation: %s DesktopScaleFactor=%" PRIu32cxx . . $ `<external>/15933738808807975373/inttypes.h:109:10`! " DeviceScaleFactor=%" PRIu32cxx . . $ `<external>/15933738808807975373/inttypes.h:109:10`! "", |
| 137 | current.PhysicalWidth, current.PhysicalHeight, |
| 138 | freerdp_desktop_rotation_flags_to_string(current.Orientation), |
| 139 | current.DesktopScaleFactor, current.DeviceScaleFactor); |
| 140 | } |
| 141 | |
| 142 | out: |
| 143 | Stream_SealLengthcxx . . $ Stream_SealLength(141d0e356bb21ff3).(s); |
| 144 | status = callback->channelcxx . . $ $anonymous_type_b3a06c54c4b60133_0#channel.->Writecxx . . $ s_IWTSVirtualChannel#Write.(callback->channelcxx . . $ $anonymous_type_b3a06c54c4b60133_0#channel., (UINT32cxx . . $ UINT32#)Stream_Lengthcxx . . $ Stream_Length(ebc7f695a8644dc0).(s), Stream_Buffercxx . . $ Stream_Buffer(38abee8bfc36c01e).(s), |
| 145 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!); |
| 146 | Stream_Freecxx . . $ Stream_Free(31813de2214206e2).(s, TRUEcxx . . $ `winpr/include/winpr/wtypes.h:126:9`!); |
| 147 | return status; |
| 148 | } |
| 149 | |
| 150 | /** |
| 151 | * Function description |
| 152 | * |
| 153 | * @return 0 on success, otherwise a Win32 error code |
| 154 | */ |
| 155 | static UINTcxx . . $ UINT# disp_recv_display_control_caps_pducxx . . $ disp_recv_display_control_caps_pdu(97904834532b458d).(GENERIC_CHANNEL_CALLBACKcxx . . $ GENERIC_CHANNEL_CALLBACK#* callback, wStreamcxx . . $ wStream#* s) |
| 156 | { |
| 157 | DISP_PLUGINcxx . . $ DISP_PLUGIN#* disp = nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!; |
| 158 | DispClientContextcxx . . $ DispClientContext#* context = nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!; |
| 159 | UINTcxx . . $ UINT# ret = CHANNEL_RC_OKcxx . . $ `winpr/include/winpr/wtsapi.h:159:9`!; |
| 160 | |
| 161 | WINPR_ASSERTcxx . . $ `winpr/include/winpr/assert-api.h:76:9`!(callback); |
| 162 | WINPR_ASSERTcxx . . $ `winpr/include/winpr/assert-api.h:76:9`!(s); |
| 163 | |
| 164 | disp = (DISP_PLUGINcxx . . $ DISP_PLUGIN#*)callback->plugincxx . . $ $anonymous_type_b3a06c54c4b60133_0#plugin.; |
| 165 | WINPR_ASSERTcxx . . $ `winpr/include/winpr/assert-api.h:76:9`!(disp); |
| 166 | |
| 167 | context = disp->contextcxx . . $ $anonymous_type_20b8de699510d4dc_0#context.; |
| 168 | WINPR_ASSERTcxx . . $ `winpr/include/winpr/assert-api.h:76:9`!(context); |
| 169 | |
| 170 | if (!Stream_CheckAndLogRequiredLengthcxx . . $ `winpr/include/winpr/stream.h:127:9`!(TAGcxx . . $ `channels/disp/client/disp_main.h:34:9`!, s, 12)) |
| 171 | return ERROR_INVALID_DATAcxx . . $ `winpr/include/winpr/error.h:198:9`!; |
| 172 | |
| 173 | Stream_Read_UINT32cxx . . $ `winpr/include/winpr/stream.h:683:9`!(s, disp->MaxNumMonitors); /* MaxNumMonitors (4 bytes) */ |
| 174 | Stream_Read_UINT32cxx . . $ `winpr/include/winpr/stream.h:683:9`!(s, disp->MaxMonitorAreaFactorA); /* MaxMonitorAreaFactorA (4 bytes) */ |
| 175 | Stream_Read_UINT32cxx . . $ `winpr/include/winpr/stream.h:683:9`!(s, disp->MaxMonitorAreaFactorB); /* MaxMonitorAreaFactorB (4 bytes) */ |
| 176 | |
| 177 | if (context->DisplayControlCapscxx . . $ s_disp_client_context#DisplayControlCaps.) |
| 178 | ret = context->DisplayControlCapscxx . . $ s_disp_client_context#DisplayControlCaps.(context, disp->MaxNumMonitorscxx . . $ $anonymous_type_20b8de699510d4dc_0#MaxNumMonitors., |
| 179 | disp->MaxMonitorAreaFactorAcxx . . $ $anonymous_type_20b8de699510d4dc_0#MaxMonitorAreaFactorA., disp->MaxMonitorAreaFactorBcxx . . $ $anonymous_type_20b8de699510d4dc_0#MaxMonitorAreaFactorB.); |
| 180 | |
| 181 | return ret; |
| 182 | } |
| 183 | |
| 184 | /** |
| 185 | * Function description |
| 186 | * |
| 187 | * @return 0 on success, otherwise a Win32 error code |
| 188 | */ |
| 189 | static UINTcxx . . $ UINT# disp_recv_pducxx . . $ disp_recv_pdu(97904834532b458d).(GENERIC_CHANNEL_CALLBACKcxx . . $ GENERIC_CHANNEL_CALLBACK#* callback, wStreamcxx . . $ wStream#* s) |
| 190 | { |
| 191 | UINT32cxx . . $ UINT32# error = 0; |
| 192 | DISPLAY_CONTROL_HEADERcxx . . $ DISPLAY_CONTROL_HEADER# header = WINPR_C_ARRAY_INITcxx . . $ `winpr/include/winpr/platform.h:87:9`!; |
| 193 | |
| 194 | WINPR_ASSERTcxx . . $ `winpr/include/winpr/assert-api.h:76:9`!(callback); |
| 195 | WINPR_ASSERTcxx . . $ `winpr/include/winpr/assert-api.h:76:9`!(s); |
| 196 | |
| 197 | DISP_PLUGINcxx . . $ DISP_PLUGIN#* disp = (DISP_PLUGINcxx . . $ DISP_PLUGIN#*)callback->plugincxx . . $ $anonymous_type_b3a06c54c4b60133_0#plugin.; |
| 198 | WINPR_ASSERTcxx . . $ `winpr/include/winpr/assert-api.h:76:9`!(disp); |
| 199 | |
| 200 | if ((error = disp_read_headercxx . . $ disp_read_header(d1de70d59e6775c2).(s, &header))) |
| 201 | { |
| 202 | WLog_Printcxx . . $ `winpr/include/winpr/wlog.h:256:9`!(disp->base.log, WLOG_ERROR, "disp_read_header failed with error %" PRIu32cxx . . $ `<external>/15933738808807975373/inttypes.h:109:10`! "!", |
| 203 | error); |
| 204 | return error; |
| 205 | } |
| 206 | |
| 207 | if (!Stream_CheckAndLogRequiredLengthcxx . . $ `winpr/include/winpr/stream.h:127:9`!(TAGcxx . . $ `channels/disp/client/disp_main.h:34:9`!, s, header.length - 8)) |
| 208 | { |
| 209 | WLog_Printcxx . . $ `winpr/include/winpr/wlog.h:256:9`!(disp->base.log, WLOG_ERROR, "not enough remaining data"); |
| 210 | return ERROR_INVALID_DATAcxx . . $ `winpr/include/winpr/error.h:198:9`!; |
| 211 | } |
| 212 | |
| 213 | switch (header.typecxx . . $ $anonymous_type_3201b679ce5b593c_0#type.) |
| 214 | { |
| 215 | case DISPLAY_CONTROL_PDU_TYPE_CAPScxx . . $ `include/freerdp/channels/disp.h:26:9`!: |
| 216 | return disp_recv_display_control_caps_pducxx . . $ disp_recv_display_control_caps_pdu(97904834532b458d).(callback, s); |
| 217 | |
| 218 | default: |
| 219 | WLog_Printcxx . . $ `winpr/include/winpr/wlog.h:256:9`!(disp->base.log, WLOG_ERROR, "Type %" PRIu32cxx . . $ `<external>/15933738808807975373/inttypes.h:109:10`! " not recognized!", header.type); |
| 220 | return ERROR_INTERNAL_ERRORcxx . . $ `winpr/include/winpr/error.h:985:9`!; |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | /** |
| 225 | * Function description |
| 226 | * |
| 227 | * @return 0 on success, otherwise a Win32 error code |
| 228 | */ |
| 229 | static UINTcxx . . $ UINT# disp_on_data_receivedcxx . . $ disp_on_data_received(7d5bfc0113ae0792).(IWTSVirtualChannelCallbackcxx . . $ IWTSVirtualChannelCallback#* pChannelCallback, wStreamcxx . . $ wStream#* data) |
| 230 | { |
| 231 | GENERIC_CHANNEL_CALLBACKcxx . . $ GENERIC_CHANNEL_CALLBACK#* callback = (GENERIC_CHANNEL_CALLBACKcxx . . $ GENERIC_CHANNEL_CALLBACK#*)pChannelCallback; |
| 232 | return disp_recv_pducxx . . $ disp_recv_pdu(97904834532b458d).(callback, data); |
| 233 | } |
| 234 | |
| 235 | /** |
| 236 | * Function description |
| 237 | * |
| 238 | * @return 0 on success, otherwise a Win32 error code |
| 239 | */ |
| 240 | static UINTcxx . . $ UINT# disp_on_closecxx . . $ disp_on_close(291fd05f9f405f8c).(IWTSVirtualChannelCallbackcxx . . $ IWTSVirtualChannelCallback#* pChannelCallback) |
| 241 | { |
| 242 | freecxx . . $ free(5d22bdacc48458e8).(pChannelCallback); |
| 243 | return CHANNEL_RC_OKcxx . . $ `winpr/include/winpr/wtsapi.h:159:9`!; |
| 244 | } |
| 245 | |
| 246 | /** |
| 247 | * Channel Client Interface |
| 248 | */ |
| 249 | |
| 250 | /** |
| 251 | * Function description |
| 252 | * |
| 253 | * @return 0 on success, otherwise a Win32 error code |
| 254 | */ |
| 255 | static UINTcxx . . $ UINT# disp_send_monitor_layoutcxx . . $ disp_send_monitor_layout(e4da80df071c4cde).(DispClientContextcxx . . $ DispClientContext#* context, UINT32cxx . . $ UINT32# NumMonitors, |
| 256 | DISPLAY_CONTROL_MONITOR_LAYOUTcxx . . $ DISPLAY_CONTROL_MONITOR_LAYOUT#* Monitors) |
| 257 | { |
| 258 | DISP_PLUGINcxx . . $ DISP_PLUGIN#* disp = nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!; |
| 259 | GENERIC_CHANNEL_CALLBACKcxx . . $ GENERIC_CHANNEL_CALLBACK#* callback = nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!; |
| 260 | |
| 261 | WINPR_ASSERTcxx . . $ `winpr/include/winpr/assert-api.h:76:9`!(context); |
| 262 | |
| 263 | disp = (DISP_PLUGINcxx . . $ DISP_PLUGIN#*)context->handlecxx . . $ s_disp_client_context#handle.; |
| 264 | WINPR_ASSERTcxx . . $ `winpr/include/winpr/assert-api.h:76:9`!(disp); |
| 265 | |
| 266 | callback = disp->basecxx . . $ $anonymous_type_20b8de699510d4dc_0#base..listener_callbackcxx . . $ GENERIC_DYNVC_PLUGIN#listener_callback.->channel_callbackcxx . . $ $anonymous_type_b3a06c54c4b60133_1#channel_callback.; |
| 267 | |
| 268 | return disp_send_display_control_monitor_layout_pducxx . . $ disp_send_display_control_monitor_layout_pdu(eaeb48c513a9e245).(callback, NumMonitors, Monitors); |
| 269 | } |
| 270 | |
| 271 | /** |
| 272 | * Function description |
| 273 | * |
| 274 | * @return 0 on success, otherwise a Win32 error code |
| 275 | */ |
| 276 | static UINTcxx . . $ UINT# disp_plugin_initializecxx . . $ disp_plugin_initialize(3cab3412d5031a14).(GENERIC_DYNVC_PLUGINcxx . . $ GENERIC_DYNVC_PLUGIN#* base, |
| 277 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! rdpContextcxx . . $ rdpContext#* rcontext, |
| 278 | WINPR_ATTR_UNUSEDcxx . . $ `winpr/include/winpr/platform.h:713:9`! rdpSettingscxx . . $ rdpSettings#* settings) |
| 279 | { |
| 280 | DispClientContextcxx . . $ DispClientContext#* context = nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!; |
| 281 | DISP_PLUGINcxx . . $ DISP_PLUGIN#* disp = (DISP_PLUGINcxx . . $ DISP_PLUGIN#*)base; |
| 282 | |
| 283 | WINPR_ASSERTcxx . . $ `winpr/include/winpr/assert-api.h:76:9`!(disp); |
| 284 | disp->MaxNumMonitorscxx . . $ $anonymous_type_20b8de699510d4dc_0#MaxNumMonitors. = 16; |
| 285 | disp->MaxMonitorAreaFactorAcxx . . $ $anonymous_type_20b8de699510d4dc_0#MaxMonitorAreaFactorA. = 8192; |
| 286 | disp->MaxMonitorAreaFactorBcxx . . $ $anonymous_type_20b8de699510d4dc_0#MaxMonitorAreaFactorB. = 8192; |
| 287 | |
| 288 | context = (DispClientContextcxx . . $ DispClientContext#*)calloccxx . . $ calloc(63a7bf2941bfcd7a).(1, sizeof(DispClientContextcxx . . $ DispClientContext#)); |
| 289 | if (!context) |
| 290 | { |
| 291 | WLog_Printcxx . . $ `winpr/include/winpr/wlog.h:256:9`!(base->log, WLOG_ERROR, "unable to allocate DispClientContext"); |
| 292 | return CHANNEL_RC_NO_MEMORYcxx . . $ `winpr/include/winpr/wtsapi.h:171:9`!; |
| 293 | } |
| 294 | |
| 295 | context->handlecxx . . $ s_disp_client_context#handle. = (void*)disp; |
| 296 | context->SendMonitorLayoutcxx . . $ s_disp_client_context#SendMonitorLayout. = disp_send_monitor_layoutcxx . . $ disp_send_monitor_layout(e4da80df071c4cde).; |
| 297 | |
| 298 | disp->basecxx . . $ $anonymous_type_20b8de699510d4dc_0#base..ifacecxx . . $ GENERIC_DYNVC_PLUGIN#iface..pInterfacecxx . . $ s_IWTSPlugin#pInterface. = disp->contextcxx . . $ $anonymous_type_20b8de699510d4dc_0#context. = context; |
| 299 | |
| 300 | return CHANNEL_RC_OKcxx . . $ `winpr/include/winpr/wtsapi.h:159:9`!; |
| 301 | } |
| 302 | |
| 303 | static void disp_plugin_terminatedcxx . . $ disp_plugin_terminated(86dbf6fc281ca52).(GENERIC_DYNVC_PLUGINcxx . . $ GENERIC_DYNVC_PLUGIN#* base) |
| 304 | { |
| 305 | DISP_PLUGINcxx . . $ DISP_PLUGIN#* disp = (DISP_PLUGINcxx . . $ DISP_PLUGIN#*)base; |
| 306 | |
| 307 | WINPR_ASSERTcxx . . $ `winpr/include/winpr/assert-api.h:76:9`!(disp); |
| 308 | |
| 309 | freecxx . . $ free(5d22bdacc48458e8).(disp->contextcxx . . $ $anonymous_type_20b8de699510d4dc_0#context.); |
| 310 | } |
| 311 | |
| 312 | static const IWTSVirtualChannelCallbackcxx . . $ IWTSVirtualChannelCallback# disp_callbackscxx . . $ disp_callbacks. = { disp_on_data_receivedcxx . . $ disp_on_data_received(7d5bfc0113ae0792)., |
| 313 | nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`!, /* Open */ |
| 314 | disp_on_closecxx . . $ disp_on_close(291fd05f9f405f8c)., nullptrcxx . . $ `winpr/include/winpr/platform.h:88:9`! }; |
| 315 | |
| 316 | /** |
| 317 | * Function description |
| 318 | * |
| 319 | * @return 0 on success, otherwise a Win32 error code |
| 320 | */ |
| 321 | FREERDP_ENTRY_POINTcxx . . $ `include/freerdp/api.h:30:9`!(UINT VCAPITYPEcxx . . $ `winpr/include/winpr/wtsapi.h:120:9`! disp_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)) |
| 322 | { |
| 323 | return freerdp_generic_DVCPluginEntrycxx . . $ freerdp_generic_DVCPluginEntry(ffdc37323ba6388d).(pEntryPoints, TAGcxx . . $ `channels/disp/client/disp_main.h:34:9`!, DISP_DVC_CHANNEL_NAMEcxx . . $ `include/freerdp/channels/disp.h:32:9`!, |
| 324 | sizeof(DISP_PLUGINcxx . . $ DISP_PLUGIN#), sizeof(GENERIC_CHANNEL_CALLBACKcxx . . $ GENERIC_CHANNEL_CALLBACK#), |
| 325 | &disp_callbackscxx . . $ disp_callbacks., disp_plugin_initializecxx . . $ disp_plugin_initialize(3cab3412d5031a14)., |
| 326 | disp_plugin_terminatedcxx . . $ disp_plugin_terminated(86dbf6fc281ca52).); |
| 327 | } |