6.0
S
OFT
T
RIGGERING
Soft triggering differs from local and remote triggering options. It is a means to trigger a scan on a scanner
through software; however, this feature is not applicable to all scanners. It is supported in the CFSC, SDSC,
CHS, CRS and CF RFID Reader Card. Soft-triggering is enabled within your application via a function key or a
button that, when clicked, calls the ScanTrigger() function.
Depending on how your application is designed, some developers may want to assign a hardware button on
the host CE device as the trigger, or a function key on Win32 Desktop systems as the trigger, but find it
necessary to have this mechanism separate from the application that is directly using the ScanAPI. Since only
one executable is allowed to use the ScanAPI at any given time, one way to accomplish this is to write a
custom message handler in your application that will handle a WM_SCAN message that you define. The
message handler for this WM_SCAN message will call ScanTrigger(). You can then write a very small
application that you can assign to one of the hardware buttons on the CE device, or a similar application for
the Win32 Desktop environment that hooks the keyboard to detect function key presses. This application
should do a FindWindow() to find your application’s main window and send that window your WM_SCAN
message.
There is a sample triggering application available in the Utils directory of the SDK. This sample takes the
handle of the scanner as a parameter to the executable and can be used to trigger any scanner. It will also
work with a .NET application since it sends the message directly to ScanAPI.
The SocketTriggerScan and SocketTriggerRFID applications effectively function as the sample Trigger
application with the appropriate preferred handle passed in. Refer to Chapter 13 for more details.
NOTE: SocketTriggerSelect is only used with Socketscan.exe
April 8, 2010
Page 17
Document#: 6410-00147 K
Revision 2.28