---------------------------------------------------------------------
Touch screen drivers for Windows NT 4.0
---------------------------------------------------------------------
Copyright (C) Dynapro Technologies Inc. 1999. All rights reserved.

DOCUMENT CONTENTS
-----------------
This document supplements the information in the Near Field Imaging
Touch Screen System Software User's Guide.

This document contains the following sections:

    1. Description of files on the Diskette/CD-ROM
    2. Touch Screen Configuration Import/Export Utility
    3. Developer Touch Error Detection 


1. Description of files on the Diskette/CD-ROM
----------------------------------------------

The installation diskette/CD-ROM contains all the files needed to
install the touch screen software for Windows NT 4.0. Once you have 
installed the software, you may use the full touch screen
capabilities of the NFI touch screen controller. 

The installation diskette/CD-ROM contains the following files:

    INSTALL.EXE - Installation utility
    README.TXT	- This file
    DISK1       - Identifies this CD-ROM for Windows NT setup
    EDTCNT.SYS	- Kernel mode touch screen driver
    EDTCNT.INF	- Installation script used by Windows NT 4.0
 
    TOUCHCFG.EXE- Touch screen Configuration Utility executable
    TOUCHCFG.HLP- Touch screen Configuration Utility help file
    TOUCHCFG.LNK- Start menu shortcut to Configuration Utility
    TOUCHINI.EXE- Touch Screen Configuration Import/Export Utility
    TOUCHERR.DLL- Touch screen developer error detection DLL
    TOUCHOSI.DLL - Touch screen DLL
    MBSWAP.EXE	- Mouse button swap utility executable
    MBSWAP.HLP	- Mouse button swap utility help file
    MBSWAP.LNK	- Start menu shortcut to button swap utility
    NSD.EXE     - NFI Setup and Diagnostic Utility executable
    NSD.LNK     - Start menu shortcut to NFI Setup and Diagnostic Utility
    NFISETUP.EXE - NFI Setup Wizard executable
    NFISETUP.LNK - Start menu shortcut to NFI Setu Wizard

    MSVCRT40.DLL- Touch utilities DLL
    XNMBA458.DLL- Touch utilities DLL
    XNMHN458.DLL- Touch utilities DLL
    XNMTE458.DLL- Touch utilities DLL

    UNINSTAL.EXE- Uninstallation utility
    UNINSTAL.INF- Uninstallation script file


2. Touch Screen Configuration Import/Export Utility
---------------------------------------------------

To generate a configuration file that can be copied and imported on
other computers, use the Touch Screen Configuration Import/Export
Utility (TOUCHINI.EXE). This eliminates the need for configuring each
unit manually. The Touch Screen Configuration Import/Export Utility
is automatically installed when you install the touch screen drivers
and utilities. This utility is copied to the \TOUCH\NT folder on your
computer's hard disk.

Exporting button definitions
----------------------------
To export configuration settings from the registry to a file:

1. In the Start menu, select Programs, then select Command Prompt.
2. At the command prompt, type CD\TOUCH\NT
3. Type TOUCHINI /o where o = output.

This creates a file with the default file name TOUCH.INI. This file
contains an ASCII representation of the touch screen configuration. 

4. To change the file name, specify a new file name after the /o
   parameter. For example, if you type TOUCHINI /oCONFIG.INI, the
   configuration file will be named CONFIG.INI, in the \TOUCH\NT folder.

You can use this file to import the same configuration into other units. 

Importing button definitions
----------------------------

When you import a configuration file, the existing settings are erased.

To import configuration settings into the registry from a file:
1. In the Start menu, select Programs, then select Command Prompt.
2. At the command prompt, type CD\TOUCH\NT

Type TOUCHINI /i<filename>
where <filename> is the file you created in either step 3 or step 4 of
the procedure for exporting button definitions. See Exporting button
definitions above.

The new configuration takes effect the next time you start
Windows NT.

3. Developer Touch Error Detection
----------------------------------

Application developers can use the supplied DLL "toucherr.dll" to
detect touch screen and controller errors during startup.
The DLL provides a single function that reads startup errors from
the registry and returns the error string to the caller. 

Interface Specification:

function - TouchGetErrorLogString

  The TouchGetErrorLogString function retrieves the data for the touch 
  error log value associated with the DYNAPRO registry key. 

  LONG TouchGetErrorLogString
  ( 
    CHAR *pszBuffer,
    LONG *pnBufferSize
  ) 

 
Parameters:

  - pszBuffer

  Pointer to a buffer that receives the value's data. This parameter
  can be NULL if the data is not required. 

  - pnBufferSize

  A pointer to a variable that specifies the size, in bytes, of the
  buffer pointed to by the pszBuffer parameter. When the function
  returns, this variable contains the size of the data copied to
  pszBuffer.

  If the buffer specified by pszBuffer is not large enough to hold the
  data, the function returns the value ERROR_MORE_DATA, and stores the
  required buffer size, in bytes, in the location variable pointed to
  by pnBufferSize. 

  If pszBuffer is NULL, and pnBufferSize is non-NULL, the function
  returns ERROR_SUCCESS, and stores the size of the data, in bytes,
  into the variable pointed to by pnBufferSize.

Return Values

  If the function succeeds, the return value is ERROR_SUCCESS.

  If the function fails, the return value is an error code as defined
  in WINERROR.H.

Sample Application Code:

  The following is a sample of code used to access the DLL and retrieve
  the ErrorLog Value:

/* declarations */
typedef LONG (CALLBACK* LPFNDLLFUNC)(CHAR *,LONG *);
#define nERRORLOG_SIZE_MAX  1024

...

LONG YourErrorCheckFunction()
{
    CHAR         szValueBuffer[nERRORLOG_SIZE_MAX];
    LONG         nValueBufferSize = nERRORLOG_SIZE_MAX;
    LONG         status = ERROR_SUCCESS;
    HINSTANCE    hDLL;                      /* Handle to DLL */
    LPFNDLLFUNC  lpfnDllFunc;               /* function pointer */

    hDLL = LoadLibrary("TOUCHERR.DLL");

    if (hDLL != NULL)
    {
         lpfnDllFunc = (LPFNDLLFUNC) GetProcAddress(hDLL,"TouchGetErrorLogString");

         if (!lpfnDllFunc)
         {
             /* handle error */
             status = ERROR;   
         }
         else
         {   
             /* call the function */
	     status = lpfnDllFunc(szValueBuffer,&nValueBufferSize);
	     /* Buffer now contains error message if any */
         }

    FreeLibrary(hDLL);
    }
    return status;
}

---------------------------------------------------------------------
For more service and technical information in Canada and the USA,
call Dynapro at 1-800-667-0374; for service and technical information
outside Canada and the USA, call Dynapro at 1-604-521-3962.


