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

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

book

Article ID: CTX131424

calendar_today

Updated On:

Description

This article describes at a high-level the changes with multi-monitor hooking or implementations between XenDesktop 4.0 and XenDesktop 5.X releases. It also details how to revert the behavior in XenDesktop 5.X 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.X Changes

In XenDesktop 5.X, 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 of mmhook.dll to operate as expected within a XenDesktop session.

You can either add the specific application to the registry similar to a whitelist 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).

The following are the two methods outlined for the preceding scenarios:

Caution! Refer to the Disclaimer at the end of this article before using Registry Editor. 

Adding the application executable to the Multiple Monitor Hook registry key

  1. Open registry editor and navigate to HKEY_LOCAL_MACHINE\Software\Citrix\CtxHook\AppInit_Dlls\Multiple Monitor Hook\.

  2. Right-click Multiple Monitor Hook key and select New > Key.

  3. Name the key the executable name, for example calc.exe.

  4. Click the newly created key and then right-click and select New > DWORD (32-bit) Value.

  5. Name this value HookProcess and set the Data to 1.

  6. Restart the virtual desktop machine.

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

Caution! This alteration has not been officially tested or validated by Citrix with XenDesktop 5.X and might cause unexpected results. Citrix strongly recommends 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 to the default configuration and contact Citrix Support for assistance to review the application issue.

  1. Open registry editor and navigate to HKEY_LOCAL_MACHINE\Software\Citrix\CtxHook\AppInit_Dlls\Multiple Monitor Hook\.

  2. Change the Flag REG_DWORD data from 2 (the default) to 0x80000000 (hex).

  3. Restart the virtual desktop machine.

Additional Resources

This article resolved an issue with the following Windows Presentation Foundation (WPF) applications.

  • A customer reported that, after their Windows XP x86 Virtual Machine had been upgraded to the 5.5.100.19 XenDesktop Virtual Desktop Agent, they were unable to use the Cisco Unified Desktop to Phone application. When the users selected the lync (office communicator) application, the cucimoc.exe process started and the desktop went into a “strobe affect” loop on screen, therefore leaving the Virtual Machine unusable until the process was terminated. A procmon, process monitor, trace indicated an issue with users' access rights to the d3d9caps.dat file. The procmon trace showed the cucimoc process looping against d3d9caps.dat. Changing the ACL, access control list, on d3d9caps.dat for users having “full control” allowed the application to load without any issues. The same application set was working with no issue on XenDesktop Virtual Desktop Agent 4.0.5034.

  • “Advantage Fee” from Fiserv requires the executable PresentationHost.exe to be added to the Multiple Monitor Hook registry key.

    Environment

    Caution! 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. Be sure to back up the registry before you edit it.

    Issue/Introduction

    This article documents the behavior change from XenDesktop 4.0 to 5.0/5.5 for mmhook.dll and details how to enable mmhook.dll for specific applications or all applications.