channel open returns null after upgrade to windows server 2012 R2 RRS feed

  • Question

  • Hi,

    we have an remote application plugin based on WtsApi32.

    after upgrade our server to 2012 R2 from 2012, it does not work anymore.

    I debugged and found out WTSVirtualChannelOpenEx returns null.

    Error Code for Dynamic channel is 31 and for Static channel is 50.

    I have tried the same build on different server old server works and new server (2012 R2) does not.

    is there anything changed in 2012 R2 will affect this function?

    any information is welcome. thanks.



    Thursday, April 3, 2014 11:27 PM

All replies

  • I have observed exactly the same behaviour. I have no idea how to fix it.

    Monday, April 7, 2014 4:57 AM
  • I had the same problem : my dynamic virtual channel plugin worked fine on 2003, 2008, 2008 R2 and 2012 Server but not with 2012 Server R2.

    After a long search, I discovered that the BOOL *pbAccept parameter from IWTSListenerCallback::OnNewConnection method should return the value 0x00000001 exactly.

    As my Delphi module returned a LongBool value, the code pbAccept := True returned 0xFFFFFFFF and not 0x00000001. That was why I received the error code 31 (not supported) after the call to WTSVirtualChannelOpenEx with WTS_CHANNEL_OPTION_DYNAMIC.

    I hope that it will help someone else...

    Thursday, March 30, 2017 4:58 PM