'elp! Just cant get that in-hand Socket Scanner working sweetly

M

Murray Foxcroft

I have sourced an in hand socket scan card for my imate (Pocket PC 2003)

I retrieved the OpenNetCF obsolete code for this device and reworked it in
to a class of my own. The scanner works perfectly when I scan a barcode. The
problem comes in if the socketscan program gets activated, or if the device
goes to "sleep" or if the scanner is removed and re-inserted.

Does anyone know (have some snippets) of how to totally reinitialise the
scanner (basically a software disconnect and reconnect) every time a scan
request is made (we scan infrequently). When the scanner fails as described
below, I have to restart my application to get it working again. Reloading
the form does not cut it.

Some of the intermittent error I get include ScanAPI RegisterClass Failed,
(associated with a scanner exception - The hScanner parameter pass to a
scanning library function is not valid) and also a 1400 error - to which I
cant recall the associated text.

Any ideas?

Thanks in advance
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

I'm using it with no problem whatsoever, I do remember that I did a little
change in the InitScanner ( or similar name ) inserting a cycle trying to
init the scanner, other than that nothing :)

The trick I think was that I was able to design the application in such a
way that I init the scanner frequently ( each time a new order is created )
in this way you can is removed or if the PDA goes to sleep.
Also make sure to dispose the scanner object as needed.

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top