Hello, I am trying to create Remote Desktop application using CMstscax1 object. The USB stick can display in client when I plug it before my instance starts,but can't realize plug and play When my RDP instance starts,the drive redirection is not working when I plug in a USB stick. It works in normal RDP though (by mstsc.exe).
COleDispatchDriver disp; COleException *e = new COleException; if(disp.CreateDispatch(this->m_VSOConnector.GetClsid(), e)) { IMsRdpClientNonScriptable3 * pNonScript = NULL; IUnknown* pUnknown = this->m_VSOConnector.GetControlUnknown(); HRESULT hr=pUnknown->QueryInterface(IID_IMsRdpClientNonScriptable3,(void**)&pNonScript); if(SUCCEEDED(hr)) { VARIANT_BOOL boolean = 0; pNonScript->put_RedirectDynamicDrives( VARIANT_TRUE ); pNonScript->put_RedirectDynamicDevices( VARIANT_TRUE ); pNonScript->get_ShowRedirectionWarningDialog(&boolean); pNonScript->get_RedirectDynamicDrives(&boolean); pNonScript->Release(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)