Jun 29 2020 08:29 AM
Our application uses Remote Desktop Services virtual channels. The first time user connects to remote machine using Remote Desktop app (msrdcw.exe that starts msrdc.exe process when connection is initiated) everything works as expected. After logging off and then re-connecting to the same target machine VIRTUALCHANNELINIT callback function returns CHANNEL_RC_NOT_IN_VIRTUALCHANNELENTRY (15) error. Everything works fine if the same is done with Remote Desktop Connection (mstsc.exe).
Call to VIRTUALCHANNELINIT is done from within VirtualChannelEntry function in all cases (otherwise it would not work the first time, I guess).
Apparently the difference between Remote Desktop Connection and Remote Desktop apps is that when disconnecting from session the former terminates both Virtual Channel and mstsc.exe process but the latter only terminates Virtual Channel but leaves msrdc.exe process running. So one found workaround is to stop msrdc.exe process by clicking "Disconnect all sessions" in the notification area menu. After that the next connection from Virtual Desktop initialises Virtual Channel successfully.
Additionally if we modify our dll so that VirtualChannelOpen is not called, then every call to VirtualChannelInit succeeds.
So the question is why does VIRTUALCHANNELINIT callback function succeeds the first time but returns CHANNEL_RC_NOT_IN_VIRTUALCHANNELENTRY error on any subsequent re-connection when used with Remote Desktop (msrdcw.exe) but succeeds every time when used with Remote Desktop Connection (mstsc.exe)?
Jun 29 2020 12:38 PM
Jul 15 2020 08:48 AM
@Soo Kuan Teo do you know, by any chance, when approximately this will be resolved?
Jul 20 2020 11:39 AM
May 18 2021 01:55 AM
Aug 16 2023 05:50 AM