Citrix

How To Troubleshoot TWAIN Redirection Functionality with XenApp

  • CTX107411
  • Created onMar 26, 2014
  • Updated onJul 03, 2014
Article Topic Interoperability

Instructions

TWAIN troubleshooting can be divided into the following two sections:

Section 1 - Acquiring the scanner through an ICA session

  1. Ensure that the server edition is set to Advanced or higher.

  2. Ensure that the server version is set to 4.0 or higher.

  3. Ensure that a version 9.0 or later ICA client is used. Upgrade to the latest ICA client or test downgrading the client to isolate client-side issues.

  4. Test your scanner and application locally by disabling the Windows Image Acquisition (WIA) service. This ensures that only TWAIN is being used for image acquisition.

  5. Perform the same test from step 4 on the server console to verify that you can acquire images successfully on the console.
    Note: A TWAIN-enabled application must be installed on the server to use this feature.

  1. On the ICA client device, ensure the following two files are installed:

  • Program Files\Citrix\ICA Client\VDTWN.dll
  • Program Files\Citrix\ICA Client\CtxTwnPA.exe
  1. When you launch the TWAIN compliant application on the server (through an ICA session), use Filemon or task manager to verify CtxTwnPA.exe is being launched on the client workstation when trying to acquire a scanner from the published application. This helps determine if the TWAIN calls are being redirected to the client.

  2. For TWAIN redirection, some applications are not Terminal Services aware and look for Twain_32.dll in the \WINDOWS directory of the user profile (by default, C:\Documents and Settings\UserName\Windows). Copying Twain_32.dll into the \Windows directory of each user profile resolves this issue.

  3. Use Filemon to verify the application is finding Twain_32.dll and the folder in which it is trying to access.

  4. In some instances, the problem can be corrected by adding the application to the Terminal Services application compatibility list with the following two flags specified (see Microsoft Knowledge Base Article 186499 for more information):

  • Windows 32-bit application: 0x00000008
  • Do not substitute user Windows directory: 0x00000400
  1. To automate the process of enabling these flags on the server, copy the following text to a text editor and save it as a .reg file. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\Applications\Photoshop] “Flags”=dword:00000408
    Note: You might need to combine these flags with other compatibility flags needed for the application.

This feature supports the following modes of TWAIN information transfer:

  • Native

  • Buffered Memory (most scanning software works by default in Buffered Memory mode).

Notes:

  • The Disk File transfer mode is not supported.

  • An ICA session from a Win16 or WinCE device (HPC and WBT) does not currently support TWAIN redirection.  For additional information on TWAIN redirection support with various non-Windows clients, refer to the client feature matrix at http://www.citrix.com/clientfeaturematrix.

Section 2 - Acquiring the image through the scanning process

After ensuring the scanner availability through preceding processes, complete the following steps for proper image acquisition through an ICA session.

  1. Verify if the issue is application specific. Does the issue occur only for a custom application or all the applications on the server? The Microsoft Image Scanning utility is a useful tool for verifying the image acquisition process.

  2. Change different settings of the image, such as color versus grayscale to see if the image acquisition completes successfully.

  3. Known Issue: When using TWAIN redirection, third-party published scanning applications might unexpectedly exit while receiving scan data from the client. This issue is limited to scanning in grayscale mode. 
    Refer to CTX108555 – Hotfix PSE400R01W2k3013 - For Citrix Presentation Server 4.0 for Windows Server 2003 and CTX109090 – Hotfix PSE400R01W2K023 - For Citrix Presentation Server 4.0 for Windows 2000 Server for more information.

  1. If this issue is occurring only with a third-party or custom application, obtain input from the application vendor to determine the process taken to acquire images with TWAIN.

Automatic translation

Important: This article was translated by an automatic translation system (also referred to as Machine Translation, or MT) and has not been translated or reviewed by people. Citrix offers a machine translated version of this article to allow for greater access to the support content. However, automatic translation is not always perfect and may contain errors of vocabulary, syntax or grammar. Citrix is not responsible for inconsistencies, errors or damage incurred as a result of the use of MT articles from our customers.Thank you.
Click here to see the English version of this article.
Languages
Was this helpful?
Thank you for your feedback

Share your comments or find out more about this topic

Citrix Forums