无法使用适用于 .NET 的 EMDK
我正在开发一个使用条形码扫描仪(Motorola MC75A)的移动应用程序。我安装了适用于 .NET v2.5 的 EMDK。
我使用库 Symbol.dll 和 Symbol.barcode2.dll 来使用条形码扫描仪。但当我在 Windows Mobile 6.5 的模拟器设备上运行代码时,出现错误。
代码:
Barcode2 myBarcode2 = null;
Device MyDevice = SelectDevice.Select(
"Barcode",Symbol.Barcode2.Devices.SupportedDevices);// Exception here
异常:
{"Can't find PInvoke DLL 'SCNAPI32.dll'."}
我需要另一个模拟器还是其他东西?
谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
AFAIK,SCNAPI32.dll 是一个本机 dll,存在于 motorola 设备上(从 ROM 加载)并由 Symbol dll 调用。该模拟器不是 motorola 设备,因此没有安装这些库。如果设备有 USB 电缆,您可以使用 ActiveSync(或 Windows 移动中心)将其连接并在设备本身上进行调试;不知道摩托罗拉有没有模拟器。
如果您确实需要使用默认模拟器测试应用程序,您可以创建一个空的 Symbol.dll 和 Symbol.barcode2.dll,重新创建与 Symbol 相同的接口并使用它们进行调试。您可以使用
Console.WriteLine("Scanneractivated");
等来激活扫描仪,而不是激活扫描仪。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.我在使用 Symbol & 时遇到了类似的问题。符号.音频.我的错误消息是
事实证明,某些符号“设备”有模拟模式。 Motorola 符号库使用设备或模拟器的注册表来检测这些模式。要访问模拟器注册表,您可以使用 Visual Studio Remote Tools\远程注册表编辑器,
然后只需连接到您的模拟器(Windows Mobile 6.5.3 Professional Emulator),并确保没有Simulation< /strong> 值为“从不”
如果没有“模拟字符串”值,默认值可能是“自动” - 在这种情况下,模拟器会询问您要使用哪种模式。您还可以尝试将“模拟”添加为“始终”。
您还可以添加检查以查看设备是否可用,例如:
if (Symbol.Barcode.Device.AvailableDevices == null) return;
I ran into a similar problem with Symbol & Symbol.Audio. My error message was
It turns out there are simulated modes for some Symbol "devices". Motorola Symbol libraries detect those modes using registry of the device or emulator. To access the Emulator registry, you can use Visual Studio Remote Tools \ Remote Registry Editor
Then just connect to your emulator (Windows Mobile 6.5.3 Professional Emulator), and make sure there's no Simulation value as 'Never' in
If there is no Simulation-string value, the default is probably Auto - in which case the emulator asks which mode you want to use. You can also try adding Simulation as 'Always'.
You could also add checks to see if devices are available, for example:
if (Symbol.Barcode.Device.AvailableDevices == null) return;