Identify how the scan arrives
| Keyboard wedge / USB HID | Input resembles typing; application focus and configured prefix/suffix are critical. |
|---|---|
| Serial / virtual COM | MSComm or another component must buffer bytes until a complete frame. |
| Vendor SDK | Deployment depends on compatible controls, DLLs, drivers and callback behavior. |
A keyboard wedge reduces driver-specific code but can send a scan to the wrong field. A serial interface gives explicit framing but requires lifecycle and timing logic.
Deliver each scan once
- Document enabled symbologies and scanner prefix/suffix configuration.
- Separate human keyboard input from scanner input where the workflow requires it.
- Accumulate serial bytes until a delimiter, length or protocol condition completes the scan.
- Validate allowed length/content and check digits where applicable.
- Debounce application events without discarding legitimate rapid consecutive scans.
- Test focus changes, reconnects, partial frames and duplicate terminators.
Use MSComm troubleshooting for control behavior, VB6 hardware integration for wider device dependencies, virtual COM ports and the VB6 pillar.