Unable to use EMDK for .NET

eicruzado picture eicruzado · Oct 14, 2011 · Viewed 11.4k times · Source

I'm developing a mobile application that uses a barcode scanner (Motorola MC75A). I installed EMDK for .NET v2.5.

I use the libraries Symbol.dll and Symbol.barcode2.dll for use of the barcode scanner. But I get errors when I run the code on the emulator device with Windows Mobile 6.5.

Code:

Barcode2 myBarcode2 = null;
Device MyDevice = SelectDevice.Select(
"Barcode",Symbol.Barcode2.Devices.SupportedDevices);// Exception here

Exception:

{"Can't find PInvoke DLL 'SCNAPI32.dll'."}

do I need another emulator or something else?

Thanks

Answer

C.Evenhuis picture C.Evenhuis · Oct 15, 2011

AFAIK, SCNAPI32.dll is a native dll, which is present on motorola devices (loaded from ROM) and called by the Symbol dll's. The emulator is not a motorola device so it does not have these libraries installed. If the device has an USB cable you could hook it up using ActiveSync (or windows mobility center) and debug on the device itself; I don't know if motorola has any emulators.

If you really need to test the application using the default emulator, you could create an empty Symbol.dll and Symbol.barcode2.dll, recreate the same interface as Symbol's and debug using those. Instead of activating a scanner you could then Console.WriteLine("Scanner activated"); etc.