I have a DLL that runs as a terminal services addin. It provides communication between a host computer and an application running on a remote desktop (as a remote app). I need to be able to guarantee that when the user clicks on a control on the host computer, the terminal services application is brought to the foreground.

I have a DLL that runs as a terminal services addin. It provides communication between a host computer and an application running on a remote desktop (as a remote app). I need to be able to guarantee that when the user clicks on a control on the host computer, the terminal services application is brought to the foreground.

Has anyone done this and would they be prepared to share a code sample? I have tried a number of methods, none of which appear to work consistently.

Comments

  1. Since there is a /SUB, I thought I would post an update.

    I seem to have had some joy having made a few modifications. You can find a code snippet at http://pastebin.com/05r1uBny, which I hope may help anyone else facing the same problem. Feel free to contact me if you would like to see how I handle communications over the Rdp Channel as well.

    The code may look a little odd, with some unnecessary begin-end blocks. This is simply because I have removed status tracking calls and could not be bothered to clean up the code any more. I have not tested that it compiles, but it should form a good starting point.

    If you need any assistance, give me a shout.

    ReplyDelete
  2. Thanks. One day this will prove itself to be really useful (:

    ReplyDelete
  3. If anyone happens to review the code and finds a better way to do it, I would really appreciate a cleaner version being posted.

    ReplyDelete

Post a Comment