Show TOC

Agentry OpenScan API for Windows MobileLocate this document in the navigation structure

Use the OpenScan API for Windows Mobile to integrate scanners with Agentry applications. The API documentation is available in source code as part of the Agentry Toolkit.

Following is information about installing the ScannerTemplate project and testing in the development environment; and configuring the client device environment to use applications that integrate scanners.

Installing the Sample ScannerTemplate Project
Developers can install the sample ScannerTemplate project, and use it to test. The ScannerTemplate project is included with the Agentry SDK.
  1. In the Agentry SDK installation directory, navigate to Agentry OpenScan Win CE\sample\ ScannerTemplate.
  2. Build the ScannerTemplate project with Visual Studio 2008 and the scannerTemplate.dll created, and add the project to the agentryclient installation directory.
  3. To verify the installation, with a scan field in focus, press the scan button from the Agentry client to see the current time stamp as the scan data.
Testing with the Sample ScannerTemplate Project

Developers can test code using the sample ScannerTemplate project. Guidelines:

  • Initiate software scan by bringing the scan field in focus, and pressing the scan button from the Agentry client. The current time stamp is passed as the scan data.
  • Simulate hardware scan in the sample program using a timer. Every 5000 milliseconds, if an Agentry scanner control is in focus, the time stamp is passed as the scan data.
  • Use the registry key settings to switch functionality on and off.
Registry Keys
Three registry keys support OpenScan functionality to the Windows Mobile Agentry client:
  • HardScanEnabled registry key under HKEY_CURRENT_USER\Software\Syclo\<path_of_agrentyclient.exe>. The user must create a DWORD for this registry key.
    • If this registry key is set to 0, this functionality is disabled.
    • If this registry key is set to 1, scan is possible by triggering the hardware button on the device.
    • If this registry key is missing, agentry client assumes that hard scan is enabled.
  • SoftScanEnabled registry key under HKEY_CURRENT_USER\Software\Syclo\AgentryClient\SoftScanEnabled. The user must create a DWORD for this registry key.
    • If this registry key is set to 0, this functionality is disabled.
    • If this registry key is set to 1, scan is possible by triggering the scan button in agentryclient.
    • If this registry key is missing, agentryclient assumes that soft scan is enabled.
  • ScannerAndCameraCoExists under HKEY_CURRENT_USER\Software\Syclo\<path_of_agrentyclient.exe>. The user must create a DWORD for this registry key. This registry provides the functionality required by some scanner devices to shut down the scanner before opening the camera, and vice versa.
    • If this registry key is set to 0, agentryclient calls the Disconnect function from ScannerTemplate.dll to disconnect the actual scanner head when switching between scanner and camera.
    • If the registry key is set, or if the key does not exist, the Disconnect function is not called when the camera-scanner switch happens.
Using OpenScan on the Client

When application users install the Windows Mobile client, they must select Openscan scanner files to use the feature. This installs an agentryscanner.dll, which loads the ScannerTemplate.dll provided by the user.

The application user must provide a ScannerTemplate.dll for the specific Windows Mobile device to interface with the actual scanner head. Add ScannerTemplate.dll to the same directory where AgentryClient.exe exists.