Developer

Agentry OpenScan API for Windows Mobile

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.

Installing the Sample ScannerTemplate Project

Developers can install the sample ScannerTemplate project, and use it to test their applications that integrate scanners. 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 the supported version of Visual Studio and a scannerTemplate.dll you have 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.

  • Initiate a 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 a 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

These 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, a scan can be initiated by triggering the hardware button on the device.
    • If this registry key is missing, agentryclient 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, a scan can be initiated by triggering the scan button in Agentry Client.
    • 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, Agentry Client 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 during the camera-scanner switch.

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.