XenDesktop 5.0/5.5 Virtual Desktop Agent Multi-Monitor Hooking Changes

Summary

This article describes at a high-level the changes with multi-monitor hooking/implementations between XenDesktop 4.0 and XenDesktop 5.0/5.5 releases. It also details how to revert the behaviour in XenDesktop 5.0/5.5 to the XenDesktop 4.0 hooking implementation for all or specific applications.

Background

In XenDesktop 4.0, Citrix introduced enhanced multi-monitor support to provide true multiple monitor support using native Windows multi-monitor support.

This depreciated the need for the Citrix multi-monitor hook mmhook.dll to simulate multi-monitor support to most applications. The Citrix multi-monitor hook was still attached to any process started on the system however to provide some limited hooking functionality to specific API calls.

XenDesktop 5.0/5.5 Changes

In XenDesktop 5.0 and XenDesktop 5.5, a design change was made so that mmhook.dll was no longer attached to every process on the system by default and instead only hooked specific processes (for compatibility/functionality).

In some circumstances however, applications might still require the extra functionality provided by mmhook.dll to operate as expected within a XenDesktop session.

You can either add the specific application to the registry similar to a whitelist fashion so that it is hooked by mmhook.dll when it executes, or you can change the hooking behaviour for mmhook.dll so that it hooks all running processes (the XenDesktop 4.0 behaviour).

These following are the two methods that are outlined for the preceding scenarios:

WARNING! Using Registry Editor incorrectly can cause serious problems that might require you to reinstall your operating system. Citrix cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

Adding the application executable to the Multiple Monitor Hook registry key

  • Open registry editor and navigate to: HKEY_LOCAL_MACHINE\Software\Citrix\CtxHook\AppInit_Dlls\Multiple Monitor Hook\
  • Right-click Multiple Monitor Hook key and select New -> Key
  • Name the key the executable name, for example calc.exe
  • Click on the newly created key and then right-click and select New -> DWORD (32-bit) Value
  • Name this value HookProcess and set the Data to 1
  • Restart the virtual desktop machine

Reverting mmhook.dll back to the XenDesktop 4.0 behaviour to hook all processes by default

Caution! This alteration has not been officially tested or validated by Citrix with XenDesktop 5.0/5.5 and might cause unexpected results. It is strongly recommended that you thoroughly test this change in a non-production environment prior to enabling it in a production environment. Should any issues arise, you should revert back to the default configuration and contact Citrix Support for assistance to review the application issue.

  • Open registry editor and navigate to: HKEY_LOCAL_MACHINE\Software\Citrix\CtxHook\AppInit_Dlls\Multiple Monitor Hook\
  • Change the Flag REG_DWORD data from 2 (the default) to 0x80000000 (hex)
  • Restart the virtual desktop machine
This document applies to:

Leave a Reply

Your email address will not be published. Required fields are marked *

Turn on pictures to see the captcha *