19 #include <freerdp/config.h>
21 #include <winpr/crt.h>
22 #include <winpr/print.h>
23 #include <freerdp/log.h>
48 #include <freerdp/assistance.h>
50 #define TAG SERVER_TAG("shadow.win")
52 DEFINE_GUID(CLSID_RDPSession, 0x9B78F0E6, 0x3E05, 0x4A5B, 0xB2, 0xE8, 0xE7, 0x43, 0xA8, 0x95, 0x6B,
54 DEFINE_GUID(DIID__IRDPSessionEvents, 0x98a97042, 0x6698, 0x40e9, 0x8e, 0xfd, 0xb3, 0x20, 0x09, 0x90,
56 DEFINE_GUID(IID_IRDPSRAPISharingSession, 0xeeb20886, 0xe470, 0x4cf6, 0x84, 0x2b, 0x27, 0x39, 0xc0,
58 DEFINE_GUID(IID_IRDPSRAPIAttendee, 0xec0671b3, 0x1b78, 0x4b80, 0xa4, 0x64, 0x91, 0x32, 0x24, 0x75,
60 DEFINE_GUID(IID_IRDPSRAPIAttendeeManager, 0xba3a37e8, 0x33da, 0x4749, 0x8d, 0xa0, 0x07, 0xfa, 0x34,
62 DEFINE_GUID(IID_IRDPSRAPISessionProperties, 0x339b24f2, 0x9bc0, 0x4f16, 0x9a, 0xac, 0xf1, 0x65,
63 0x43, 0x3d, 0x13, 0xd4);
64 DEFINE_GUID(CLSID_RDPSRAPIApplicationFilter, 0xe35ace89, 0xc7e8, 0x427e, 0xa4, 0xf9, 0xb9, 0xda,
65 0x07, 0x28, 0x26, 0xbd);
66 DEFINE_GUID(CLSID_RDPSRAPIInvitationManager, 0x53d9c9db, 0x75ab, 0x4271, 0x94, 0x8a, 0x4c, 0x4e,
67 0xb3, 0x6a, 0x8f, 0x2b);
69 static ULONG Shadow_IRDPSessionEvents_RefCount = 0;
71 const char* GetRDPSessionEventString(DISPID
id)
75 case DISPID_RDPSRAPI_EVENT_ON_ATTENDEE_CONNECTED:
76 return "OnAttendeeConnected";
79 case DISPID_RDPSRAPI_EVENT_ON_ATTENDEE_DISCONNECTED:
80 return "OnAttendeeDisconnected";
83 case DISPID_RDPSRAPI_EVENT_ON_ATTENDEE_UPDATE:
84 return "OnAttendeeUpdate";
87 case DISPID_RDPSRAPI_EVENT_ON_ERROR:
91 case DISPID_RDPSRAPI_EVENT_ON_VIEWER_CONNECTED:
92 return "OnConnectionEstablished";
95 case DISPID_RDPSRAPI_EVENT_ON_VIEWER_DISCONNECTED:
96 return "OnConnectionTerminated";
99 case DISPID_RDPSRAPI_EVENT_ON_VIEWER_AUTHENTICATED:
100 return "OnConnectionAuthenticated";
103 case DISPID_RDPSRAPI_EVENT_ON_VIEWER_CONNECTFAILED:
104 return "OnConnectionFailed";
107 case DISPID_RDPSRAPI_EVENT_ON_CTRLLEVEL_CHANGE_REQUEST:
108 return "OnControlLevelChangeRequest";
111 case DISPID_RDPSRAPI_EVENT_ON_GRAPHICS_STREAM_PAUSED:
112 return "OnGraphicsStreamPaused";
115 case DISPID_RDPSRAPI_EVENT_ON_GRAPHICS_STREAM_RESUMED:
116 return "OnGraphicsStreamResumed";
119 case DISPID_RDPSRAPI_EVENT_ON_VIRTUAL_CHANNEL_JOIN:
120 return "OnChannelJoin";
123 case DISPID_RDPSRAPI_EVENT_ON_VIRTUAL_CHANNEL_LEAVE:
124 return "OnChannelLeave";
127 case DISPID_RDPSRAPI_EVENT_ON_VIRTUAL_CHANNEL_DATARECEIVED:
128 return "OnChannelDataReceived";
131 case DISPID_RDPSRAPI_EVENT_ON_VIRTUAL_CHANNEL_SENDCOMPLETED:
132 return "OnChannelDataSent";
135 case DISPID_RDPSRAPI_EVENT_ON_APPLICATION_OPEN:
136 return "OnApplicationOpen";
139 case DISPID_RDPSRAPI_EVENT_ON_APPLICATION_CLOSE:
140 return "OnApplicationClose";
143 case DISPID_RDPSRAPI_EVENT_ON_APPLICATION_UPDATE:
144 return "OnApplicationUpdate";
147 case DISPID_RDPSRAPI_EVENT_ON_WINDOW_OPEN:
148 return "OnWindowOpen";
151 case DISPID_RDPSRAPI_EVENT_ON_WINDOW_CLOSE:
152 return "OnWindowClose";
155 case DISPID_RDPSRAPI_EVENT_ON_WINDOW_UPDATE:
156 return "OnWindowUpdate";
159 case DISPID_RDPSRAPI_EVENT_ON_APPFILTER_UPDATE:
160 return "OnAppFilterUpdate";
163 case DISPID_RDPSRAPI_EVENT_ON_SHARED_RECT_CHANGED:
164 return "OnSharedRectChanged";
167 case DISPID_RDPSRAPI_EVENT_ON_FOCUSRELEASED:
168 return "OnFocusReleased";
171 case DISPID_RDPSRAPI_EVENT_ON_SHARED_DESKTOP_SETTINGS_CHANGED:
172 return "OnSharedDesktopSettingsChanged";
175 case DISPID_RDPAPI_EVENT_ON_BOUNDING_RECT_CHANGED:
176 return "OnViewingSizeChanged";
183 static HRESULT STDMETHODCALLTYPE
184 Shadow_IRDPSessionEvents_QueryInterface(__RPC__in _IRDPSessionEvents* This,
185 __RPC__in REFIID riid,
187 _COM_Outptr_
void** ppvObject)
191 if (IsEqualIID(riid, &DIID__IRDPSessionEvents) || IsEqualIID(riid, &IID_IDispatch) ||
192 IsEqualIID(riid, &IID_IUnknown))
198 return E_NOINTERFACE;
200 This->lpVtbl->AddRef(This);
204 static ULONG STDMETHODCALLTYPE Shadow_IRDPSessionEvents_AddRef(__RPC__in _IRDPSessionEvents* This)
206 Shadow_IRDPSessionEvents_RefCount++;
207 return Shadow_IRDPSessionEvents_RefCount;
210 static ULONG STDMETHODCALLTYPE Shadow_IRDPSessionEvents_Release(__RPC__in _IRDPSessionEvents* This)
212 if (!Shadow_IRDPSessionEvents_RefCount)
215 Shadow_IRDPSessionEvents_RefCount--;
216 return Shadow_IRDPSessionEvents_RefCount;
219 static HRESULT STDMETHODCALLTYPE
220 Shadow_IRDPSessionEvents_GetTypeInfoCount(__RPC__in _IRDPSessionEvents* This,
221 __RPC__out UINT* pctinfo)
223 WLog_INFO(TAG,
"Shadow_IRDPSessionEvents_GetTypeInfoCount");
228 static HRESULT STDMETHODCALLTYPE
229 Shadow_IRDPSessionEvents_GetTypeInfo(__RPC__in _IRDPSessionEvents* This,
232 __RPC__deref_out_opt ITypeInfo** ppTInfo)
234 WLog_INFO(TAG,
"Shadow_IRDPSessionEvents_GetTypeInfo");
238 static HRESULT STDMETHODCALLTYPE Shadow_IRDPSessionEvents_GetIDsOfNames(
239 __RPC__in _IRDPSessionEvents* This,
240 __RPC__in REFIID riid,
241 __RPC__in_ecount_full(cNames) LPOLESTR* rgszNames,
242 __RPC__in_range(0, 16384) UINT cNames,
244 __RPC__out_ecount_full(cNames) DISPID* rgDispId)
246 WLog_INFO(TAG,
"Shadow_IRDPSessionEvents_GetIDsOfNames");
250 static HRESULT STDMETHODCALLTYPE Shadow_IRDPSessionEvents_Invoke(_IRDPSessionEvents* This,
252 _In_ DISPID dispIdMember,
260 _In_ DISPPARAMS* pDispParams,
262 _Out_opt_ VARIANT* pVarResult,
264 _Out_opt_ EXCEPINFO* pExcepInfo,
266 _Out_opt_ UINT* puArgErr)
271 WLog_INFO(TAG,
"%s (%ld)", GetRDPSessionEventString(dispIdMember), dispIdMember);
273 switch (dispIdMember)
275 case DISPID_RDPSRAPI_EVENT_ON_ATTENDEE_CONNECTED:
278 IDispatch* pDispatch;
279 IRDPSRAPIAttendee* pAttendee;
282 hr = DispGetParam(pDispParams, 0, VT_DISPATCH, &vr, &uArgErr);
286 WLog_ERR(TAG,
"%s DispGetParam(0, VT_DISPATCH) failure: 0x%08lX",
287 GetRDPSessionEventString(dispIdMember), hr);
291 pDispatch = vr.pdispVal;
292 hr = pDispatch->lpVtbl->QueryInterface(pDispatch, &IID_IRDPSRAPIAttendee,
297 WLog_INFO(TAG,
"%s IDispatch::QueryInterface(IRDPSRAPIAttendee) failure: 0x%08lX",
298 GetRDPSessionEventString(dispIdMember), hr);
302 level = CTRL_LEVEL_VIEW;
304 hr = pAttendee->lpVtbl->put_ControlLevel(pAttendee, level);
308 WLog_INFO(TAG,
"%s IRDPSRAPIAttendee::put_ControlLevel() failure: 0x%08lX",
309 GetRDPSessionEventString(dispIdMember), hr);
313 pAttendee->lpVtbl->Release(pAttendee);
317 case DISPID_RDPSRAPI_EVENT_ON_ATTENDEE_DISCONNECTED:
320 case DISPID_RDPSRAPI_EVENT_ON_ATTENDEE_UPDATE:
323 case DISPID_RDPSRAPI_EVENT_ON_ERROR:
326 case DISPID_RDPSRAPI_EVENT_ON_VIEWER_CONNECTED:
329 case DISPID_RDPSRAPI_EVENT_ON_VIEWER_DISCONNECTED:
332 case DISPID_RDPSRAPI_EVENT_ON_VIEWER_AUTHENTICATED:
335 case DISPID_RDPSRAPI_EVENT_ON_VIEWER_CONNECTFAILED:
338 case DISPID_RDPSRAPI_EVENT_ON_CTRLLEVEL_CHANGE_REQUEST:
341 IDispatch* pDispatch;
342 IRDPSRAPIAttendee* pAttendee;
345 hr = DispGetParam(pDispParams, 1, VT_INT, &vr, &uArgErr);
349 WLog_INFO(TAG,
"%s DispGetParam(1, VT_INT) failure: 0x%08lX",
350 GetRDPSessionEventString(dispIdMember), hr);
357 hr = DispGetParam(pDispParams, 0, VT_DISPATCH, &vr, &uArgErr);
361 WLog_ERR(TAG,
"%s DispGetParam(0, VT_DISPATCH) failure: 0x%08lX",
362 GetRDPSessionEventString(dispIdMember), hr);
366 pDispatch = vr.pdispVal;
367 hr = pDispatch->lpVtbl->QueryInterface(pDispatch, &IID_IRDPSRAPIAttendee,
372 WLog_INFO(TAG,
"%s IDispatch::QueryInterface(IRDPSRAPIAttendee) failure: 0x%08lX",
373 GetRDPSessionEventString(dispIdMember), hr);
377 hr = pAttendee->lpVtbl->put_ControlLevel(pAttendee, level);
381 WLog_INFO(TAG,
"%s IRDPSRAPIAttendee::put_ControlLevel() failure: 0x%08lX",
382 GetRDPSessionEventString(dispIdMember), hr);
386 pAttendee->lpVtbl->Release(pAttendee);
390 case DISPID_RDPSRAPI_EVENT_ON_GRAPHICS_STREAM_PAUSED:
393 case DISPID_RDPSRAPI_EVENT_ON_GRAPHICS_STREAM_RESUMED:
396 case DISPID_RDPSRAPI_EVENT_ON_VIRTUAL_CHANNEL_JOIN:
399 case DISPID_RDPSRAPI_EVENT_ON_VIRTUAL_CHANNEL_LEAVE:
402 case DISPID_RDPSRAPI_EVENT_ON_VIRTUAL_CHANNEL_DATARECEIVED:
405 case DISPID_RDPSRAPI_EVENT_ON_VIRTUAL_CHANNEL_SENDCOMPLETED:
408 case DISPID_RDPSRAPI_EVENT_ON_APPLICATION_OPEN:
411 case DISPID_RDPSRAPI_EVENT_ON_APPLICATION_CLOSE:
414 case DISPID_RDPSRAPI_EVENT_ON_APPLICATION_UPDATE:
417 case DISPID_RDPSRAPI_EVENT_ON_WINDOW_OPEN:
420 case DISPID_RDPSRAPI_EVENT_ON_WINDOW_CLOSE:
423 case DISPID_RDPSRAPI_EVENT_ON_WINDOW_UPDATE:
426 case DISPID_RDPSRAPI_EVENT_ON_APPFILTER_UPDATE:
429 case DISPID_RDPSRAPI_EVENT_ON_SHARED_RECT_CHANGED:
432 case DISPID_RDPSRAPI_EVENT_ON_FOCUSRELEASED:
435 case DISPID_RDPSRAPI_EVENT_ON_SHARED_DESKTOP_SETTINGS_CHANGED:
438 case DISPID_RDPAPI_EVENT_ON_BOUNDING_RECT_CHANGED:
445 static _IRDPSessionEventsVtbl Shadow_IRDPSessionEventsVtbl = {
447 Shadow_IRDPSessionEvents_QueryInterface, Shadow_IRDPSessionEvents_AddRef,
448 Shadow_IRDPSessionEvents_Release,
451 Shadow_IRDPSessionEvents_GetTypeInfoCount, Shadow_IRDPSessionEvents_GetTypeInfo,
452 Shadow_IRDPSessionEvents_GetIDsOfNames, Shadow_IRDPSessionEvents_Invoke
455 static _IRDPSessionEvents Shadow_IRDPSessionEvents = { &Shadow_IRDPSessionEventsVtbl };
457 static LRESULT CALLBACK ShadowWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
470 return DefWindowProc(hwnd, uMsg, wParam, lParam);
477 int win_shadow_wds_wnd_init(winShadowSubsystem* subsystem)
481 WNDCLASSEX wndClassEx = { 0 };
482 hModule = GetModuleHandle(NULL);
484 wndClassEx.cbSize =
sizeof(WNDCLASSEX);
485 wndClassEx.style = 0;
486 wndClassEx.lpfnWndProc = ShadowWndProc;
487 wndClassEx.cbClsExtra = 0;
488 wndClassEx.cbWndExtra = 0;
489 wndClassEx.hInstance = hModule;
490 wndClassEx.hIcon = NULL;
491 wndClassEx.hCursor = NULL;
492 wndClassEx.hbrBackground = NULL;
493 wndClassEx.lpszMenuName = _T(
"ShadowWndMenu");
494 wndClassEx.lpszClassName = _T(
"ShadowWndClass");
495 wndClassEx.hIconSm = NULL;
497 if (!RegisterClassEx(&wndClassEx))
499 WLog_ERR(TAG,
"RegisterClassEx failure");
503 hInstance = wndClassEx.hInstance;
504 subsystem->hWnd = CreateWindowEx(0, wndClassEx.lpszClassName, 0, 0, 0, 0, 0, 0, HWND_MESSAGE, 0,
507 if (!subsystem->hWnd)
509 WLog_INFO(TAG,
"CreateWindowEx failure");
516 int win_shadow_wds_init(winShadowSubsystem* subsystem)
524 BSTR bstrAuthString = NULL;
525 BSTR bstrGroupName = NULL;
526 BSTR bstrPassword = NULL;
527 BSTR bstrPropertyName = NULL;
528 VARIANT varPropertyValue;
529 rdpAssistanceFile* file = NULL;
530 IConnectionPoint* pCP = NULL;
531 IConnectionPointContainer* pCPC = NULL;
533 win_shadow_wds_wnd_init(subsystem);
534 HRESULT hr = OleInitialize(NULL);
538 WLog_ERR(TAG,
"OleInitialize() failure");
542 hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
546 WLog_ERR(TAG,
"CoInitialize() failure");
550 hr = CoCreateInstance(&CLSID_RDPSession, NULL, CLSCTX_ALL, &IID_IRDPSRAPISharingSession,
551 (
void**)&(subsystem->pSharingSession));
555 WLog_ERR(TAG,
"CoCreateInstance(IRDPSRAPISharingSession) failure: 0x%08lX", hr);
559 IUnknown* pUnknown = (IUnknown*)subsystem->pSharingSession;
560 hr = pUnknown->lpVtbl->QueryInterface(pUnknown, &IID_IConnectionPointContainer, (
void**)&pCPC);
564 WLog_ERR(TAG,
"QueryInterface(IID_IConnectionPointContainer) failure: 0x%08lX", hr);
568 pCPC->lpVtbl->FindConnectionPoint(pCPC, &DIID__IRDPSessionEvents, &pCP);
574 "IConnectionPointContainer::FindConnectionPoint(_IRDPSessionEvents) failure: 0x%08lX",
580 subsystem->pSessionEvents = &Shadow_IRDPSessionEvents;
581 subsystem->pSessionEvents->lpVtbl->AddRef(subsystem->pSessionEvents);
582 hr = pCP->lpVtbl->Advise(pCP, (IUnknown*)subsystem->pSessionEvents, &dwCookie);
586 WLog_ERR(TAG,
"IConnectionPoint::Advise(Shadow_IRDPSessionEvents) failure: 0x%08lX", hr);
590 hr = subsystem->pSharingSession->lpVtbl->put_ColorDepth(subsystem->pSharingSession, 32);
594 WLog_ERR(TAG,
"IRDPSRAPISharingSession::put_ColorDepth() failure: 0x%08lX", hr);
598 hr = subsystem->pSharingSession->lpVtbl->GetDesktopSharedRect(subsystem->pSharingSession, &left,
599 &top, &right, &bottom);
603 WLog_ERR(TAG,
"IRDPSRAPISharingSession::GetDesktopSharedRect() failure: 0x%08lX", hr);
607 long width = right - left;
608 long height = bottom - top;
611 "GetDesktopSharedRect(): left: %ld top: %ld right: %ld bottom: %ld width: %ld height: %ld",
612 left, top, right, bottom, width, height);
613 hr = subsystem->pSharingSession->lpVtbl->get_VirtualChannelManager(
614 subsystem->pSharingSession, &(subsystem->pVirtualChannelMgr));
618 WLog_ERR(TAG,
"IRDPSRAPISharingSession::get_VirtualChannelManager() failure: 0x%08lX", hr);
622 hr = subsystem->pSharingSession->lpVtbl->get_ApplicationFilter(
623 subsystem->pSharingSession, &(subsystem->pApplicationFilter));
627 WLog_ERR(TAG,
"IRDPSRAPISharingSession::get_ApplicationFilter() failure: 0x%08lX", hr);
631 hr = subsystem->pSharingSession->lpVtbl->get_Attendees(subsystem->pSharingSession,
632 &(subsystem->pAttendeeMgr));
636 WLog_ERR(TAG,
"IRDPSRAPISharingSession::get_Attendees() failure: 0x%08lX", hr);
640 hr = subsystem->pSharingSession->lpVtbl->get_Properties(subsystem->pSharingSession,
641 &(subsystem->pSessionProperties));
645 WLog_ERR(TAG,
"IRDPSRAPISharingSession::get_Properties() failure: 0x%08lX", hr);
649 bstrPropertyName = SysAllocString(L
"PortId");
650 varPropertyValue.vt = VT_I4;
651 varPropertyValue.intVal = 40000;
652 hr = subsystem->pSessionProperties->lpVtbl->put_Property(subsystem->pSessionProperties,
653 bstrPropertyName, varPropertyValue);
654 SysFreeString(bstrPropertyName);
658 WLog_ERR(TAG,
"IRDPSRAPISessionProperties::put_Property(PortId) failure: 0x%08lX", hr);
662 bstrPropertyName = SysAllocString(L
"DrvConAttach");
663 varPropertyValue.vt = VT_BOOL;
664 varPropertyValue.boolVal = VARIANT_TRUE;
665 hr = subsystem->pSessionProperties->lpVtbl->put_Property(subsystem->pSessionProperties,
666 bstrPropertyName, varPropertyValue);
667 SysFreeString(bstrPropertyName);
671 WLog_ERR(TAG,
"IRDPSRAPISessionProperties::put_Property(DrvConAttach) failure: 0x%08lX",
676 bstrPropertyName = SysAllocString(L
"PortProtocol");
677 varPropertyValue.vt = VT_I4;
679 varPropertyValue.intVal = 2;
681 hr = subsystem->pSessionProperties->lpVtbl->put_Property(subsystem->pSessionProperties,
682 bstrPropertyName, varPropertyValue);
683 SysFreeString(bstrPropertyName);
687 WLog_ERR(TAG,
"IRDPSRAPISessionProperties::put_Property(PortProtocol) failure: 0x%08lX",
692 hr = subsystem->pSharingSession->lpVtbl->Open(subsystem->pSharingSession);
696 WLog_ERR(TAG,
"IRDPSRAPISharingSession::Open() failure: 0x%08lX", hr);
700 hr = subsystem->pSharingSession->lpVtbl->get_Invitations(subsystem->pSharingSession,
701 &(subsystem->pInvitationMgr));
705 WLog_ERR(TAG,
"IRDPSRAPISharingSession::get_Invitations() failure");
709 bstrAuthString = SysAllocString(L
"Shadow");
710 bstrGroupName = SysAllocString(L
"ShadowGroup");
711 bstrPassword = SysAllocString(L
"Shadow123!");
712 hr = subsystem->pInvitationMgr->lpVtbl->CreateInvitation(
713 subsystem->pInvitationMgr, bstrAuthString, bstrGroupName, bstrPassword, 5,
714 &(subsystem->pInvitation));
715 SysFreeString(bstrAuthString);
716 SysFreeString(bstrGroupName);
717 SysFreeString(bstrPassword);
721 WLog_ERR(TAG,
"IRDPSRAPIInvitationManager::CreateInvitation() failure: 0x%08lX", hr);
725 file = subsystem->pAssistanceFile = freerdp_assistance_file_new();
729 WLog_ERR(TAG,
"freerdp_assistance_file_new() failed");
735 char* ConnectionString2;
736 BSTR bstrConnectionString;
737 hr = subsystem->pInvitation->lpVtbl->get_ConnectionString(subsystem->pInvitation,
738 &bstrConnectionString);
742 WLog_ERR(TAG,
"IRDPSRAPIInvitation::get_ConnectionString() failure: 0x%08lX", hr);
746 ConnectionString2 = ConvertWCharToUtf8Alloc(bstrConnectionString, NULL);
747 SysFreeString(bstrConnectionString);
748 status2 = freerdp_assistance_set_connection_string2(file, ConnectionString2,
"Shadow123!");
749 free(ConnectionString2);
751 if ((!ConnectionString2) || (status2 < 1))
753 WLog_ERR(TAG,
"failed to convert connection string");
758 freerdp_assistance_print_file(file, WLog_Get(TAG), WLOG_INFO);
759 status = win_shadow_rdp_init(subsystem);
763 WLog_ERR(TAG,
"win_shadow_rdp_init() failure: %d", status);
767 rdpSetting* settings = subsystem->shw->settings;
768 if (!freerdp_assistance_populate_settings_from_assistance_file(file, settings))
780 status = win_shadow_rdp_start(subsystem);
784 WLog_ERR(TAG,
"win_shadow_rdp_start() failure: %d", status);
791 int win_shadow_wds_uninit(winShadowSubsystem* subsystem)
793 if (subsystem->pSharingSession)
795 subsystem->pSharingSession->lpVtbl->Close(subsystem->pSharingSession);
796 subsystem->pSharingSession->lpVtbl->Release(subsystem->pSharingSession);
797 subsystem->pSharingSession = NULL;
800 if (subsystem->pVirtualChannelMgr)
802 subsystem->pVirtualChannelMgr->lpVtbl->Release(subsystem->pVirtualChannelMgr);
803 subsystem->pVirtualChannelMgr = NULL;
806 if (subsystem->pApplicationFilter)
808 subsystem->pApplicationFilter->lpVtbl->Release(subsystem->pApplicationFilter);
809 subsystem->pApplicationFilter = NULL;
812 if (subsystem->pAttendeeMgr)
814 subsystem->pAttendeeMgr->lpVtbl->Release(subsystem->pAttendeeMgr);
815 subsystem->pAttendeeMgr = NULL;
818 if (subsystem->pSessionProperties)
820 subsystem->pSessionProperties->lpVtbl->Release(subsystem->pSessionProperties);
821 subsystem->pSessionProperties = NULL;
824 if (subsystem->pInvitationMgr)
826 subsystem->pInvitationMgr->lpVtbl->Release(subsystem->pInvitationMgr);
827 subsystem->pInvitationMgr = NULL;
830 if (subsystem->pInvitation)
832 subsystem->pInvitation->lpVtbl->Release(subsystem->pInvitation);
833 subsystem->pInvitation = NULL;
836 if (subsystem->pAssistanceFile)
838 freerdp_assistance_file_free(subsystem->pAssistanceFile);
839 subsystem->pAssistanceFile = NULL;
844 DestroyWindow(subsystem->hWnd);
845 subsystem->hWnd = NULL;
850 win_shadow_rdp_uninit(subsystem);
851 subsystem->shw = NULL;
FREERDP_API BOOL freerdp_settings_set_string(rdpSettings *settings, FreeRDP_Settings_Keys_String id, const char *param)
Sets a string settings value. The param is copied.
FREERDP_API BOOL freerdp_settings_set_uint32(rdpSettings *settings, FreeRDP_Settings_Keys_UInt32 id, UINT32 param)
Sets a UINT32 settings value.
FREERDP_API BOOL freerdp_settings_set_bool(rdpSettings *settings, FreeRDP_Settings_Keys_Bool id, BOOL param)
Sets a BOOL settings value.