Copper Contributor

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)?

5 Replies
Thanks for reporting. This is a known issue, we are working on the fix.

@Soo Kuan Teo do you know, by any chance, when approximately this will be resolved?

Thank you for your patience, the bug is currently in the normal queue to be fixed. If you like, please do open a support case, provide us more details, recommend the support to escalate the case to WVD team, and also put in the case the link to the TEchcommunity conversation.
Is there any update on this please as I'm getting this with msrdc (WVD) 1.2.1954.0? If I kill the msrdc.exe process from the previous session then it works fine but that's not ideal.
Can you please tell us if there are any updates, possible solutions to this problem? In 2023 I'm getting the error still.