views:

322

answers:

3

Hi

I have PPC (Windows mobile) that have Scanner, and in my program I use this scanner

with dll. when I try to run this program on emulator it wont work.

Is there any way to solve this problem ?

thank's in advance

+1  A: 

I would recommend implementing a Mock bar code scanner. So create an interface defines all the possible functions for the bar code scanner (eg string PerformScan()). Then implement one version for use with the emulator which could return hard coded values, values from a file or anywhere else that makes sense for you and another which actually calls the scanner for use on the device.

Tetraneutron
A: 

The scanner can be viewed (and should provide an interface as) a standard serial device accessible with open/close/read/write. You can probably easily build a console or file accessor to substitute when you're on the emulator.

le dorfier
A: 

What scanner are you using? (i.e. Intermec, Hand Held, Honeywell, Symbol) Also, is the bar code scanner built into the windows mobile device, or is it connected externally (via serial or USB for example)?

The two previous answers could be right, but it really depends on the hardware you are using. Also, I'm guessing that doing what they've suggested is likely more than you want/can do...and would probably need access to the hardware specs of the scanner to pull off anyways. It would be great if it was just a standard serial interface, but that is not always the case...

I actually run into this problem a lot, since I write software for Honeywell (formerly Hand Held Products) mobile scanning devices. The short of it is, for our scanners at least, that an emulator is NOT an option. The scanning hardware on our windows mobile devices is built into not only the hardware but at a kernel level in the mobile OS. The scanning API is built into a custom DLL as well, but it won't even run without our hardware and our OS modifications (in the form of custom IOCTL calls mostly).

Now, on some devices, what you want to do could be possible, but it depends on the device model and brand. If you could provide some more information I would be happy to respond with any tips I have...and can likely find out from other colleagues in the industry if I don't know.

Just curious, is the also a reason why you have to use an emulator as opposed to an actual device??

Adam Haile