WTSVirtualChannelOpenEx sometimes failed with err 0x31

Acewind 41 Reputation points
2020-11-15T04:48:14.083+00:00

I have a rdp plugin used in my C# AxMSTSCLib.AxMsRdpClient7NotSafeForScripting rdp client:

rdp.AdvancedSettings8.PluginDlls = "{7d413ce8-a0a1-42d9-a67b-6d4be4af17c5}";

When I open the channel on server side:

        channelHandle = Win32API.WTSVirtualChannelOpenEx(Win32API.WTS_CURRENT_SESSION,
            Marshal.StringToHGlobalAnsi(APP_CHANNEL_NAME),
            Win32API.WTS_CHANNEL_OPTION_DYNAMIC | 4);

Sometimes ok, sometimes failed with error code = 0x31, no more error description. Is there any problem with my code?

Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
1,427 questions
{count} votes

1 answer

Sort by: Most helpful
  1. 向阳 高 1 Reputation point
    2021-04-15T10:36:46.847+00:00

    88187-image.png

    The user disconnects and reconnects, attempting to reopen the channel.

    errCode = 0x31
    ErrMessage = 连接到系统上的设备没有发挥作用

    A few users have this phenomenon.
    Their operating systems are Windows 10 and Windows 7.

    What is the cause of the failure to open the channel?
    Can I get more detailed error information?

    0 comments No comments