[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 715
  • Last Modified:

ScanAPI is hanging on the MC1000, time sensitive API?

I'm trying to wrap up a simple little barcode application for a Symbol MC1000 scanner.  I thought I had it working, but I've lost the magic in the cleanup sequence where I'm basically hanging the driver.  If I step very slowly through the code, all is fine.  Running at full speed, the application hangs in the SCAN_Disable call.


      dwResult = SCAN_Flush(hScanner);
      dwResult = SCAN_Disable(hScanner);    <---- hangs here, no return.

Part 1 of the question is, does anyone have any knowledge and experience with this API regarding any timing race conditions?  For example, I would expect the device to be ready to _Disable if the flush completes.

Part 2 of the question: the scanning application itself can make use of a messages, events or a simple read/timeout approach.  I elected to use the SCAN_ReadLabelWait approach where I look for a read and if I timeout I just read again.  However, the code samples I have seen in the API make use of the event driven architecture.  Any recommendations as to the more robust solution?  

1 Solution
charles_gilleyAuthor Commented:
To close this out, I appear to have a slightly braindead scanner unit.  Customer reports no problems on his device.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now