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.
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.
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.
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 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.
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.
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 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.