UPDD SDK – Callback example              Revision 1.2 – 22nd Apr 2010

 

 

 

 

Contact

 

An example UPDD API program, Callbacks, shipped with source code, has been created to demonstrate the UPDD API interface and can be downloaded from here.

 

The application demonstrates some key elements of the UPDD API:

 

  • initialisation of the API
  • connecting to the driver
  • disconnecting from the driver, including automatically at uninstall time
  • termination of the API session
  • dis/enabling the UPDD system interface (mouse port / HID feeds)
  • determining the devices managed by the driver
  • de/registering various callbacks to receive information from the driver
  • processing movement and click events in a basic drawing interface
  • identifying stylus information in a multi touch environment
  • identifying controllers in a multi monitor environment

 

The program should be used with either 1 or 2 active touch controllers. When invoked the same dialog is displayed to show slightly different functionality depending on the number of touch controllers in use as described:

Single touch device mode

In a single touch controller environment this mode is used to show the styluses in use on the single device:

 

Stylus 0 has been used to draw on the screen (hence blue). In most single stylus touch screens only one stylus will be supported – multi-touch touch screens will show input from the first two styluses, drawn in blue and red.

Two touch device mode

In a two touch controller environment this mode is used to show the touch input from each device. All devices supported by UPDD will be listed but only the first two should be used to give intended visual results. USB controllers that are configured in UPDD but unplugged will be listed in red.  Connected USB devices will be listed in black.

In the above example both touch screens are being used at the same time so both lines are being drawn simultaneously. The touch device and Windows desktop association is also shown, in this case one is associated with Windows desktop Monitor 1 and the other device has been associated with Monitor 2.

 

Developers notes

The user interface in the Callback example program is a deliberately simplistic Windows GUI interface so as not to distract from the API functionality.

 

The top area shows all the devices managed by the driver and shows stylus touch status. Drawing on the device is scaled into the lower drawing area. 

 

The program uses native Win32 SDK functions to avoid library dependencies and demonstrates the following features of the UPDD API:

 

You can search the source code for //[tbapi] to find UPDD API specific code and comments

 

If you are using Visual Studio (TM) simply open callbacks.sln and use "build". The sample program requires VisualStudio2005 or later. Later versions might need minor source code tweaks to compile – we are not sure. The API itself is compatible with earlier versions.

 

If you are using an alternate compiler please refer to the vendor's instructions

 

This software is compatible with UPDD version 4.1.6 build 1222 and above.

 

If you are using a different version of UPDD and you experience problems please try the following:

 

1) copy tbapi.dll from your updd install folder to replace the version supplied with this package

2) request an updated tbapi.lib and tbapi.h from Touch-Base for your specific version

 

This program is intended to illustrate the functions of the UPDD API only; the drawing techniques used in this program are non-optimal for use in release software.

 

The package structure is for use in a Visual Studio (TM) environment to use the components in another environment you may need to copy the enclosed DLLs to a location on your search path.

 

Once you have compiled the source code and created the executable program it should be run from the UPDD application folder as it uses some of the DLLs shipped with UPDD driver.  If you are using UPDD 4.1.6 you may need to copy the supplied ACE_UPDD_5.6.2.DLL to your UPDD application directory as this was previously called ACE.DLL under UPDD 4.1.6.

 

For more information see the readme.txt file shipped with the application.

Contact

For further information or technical assistance please email the technical support team at technical@touch-base.com.