通过SNAPI.dll API对Symbol条码扫描器DS4208进行图像捕获 [英] Image capturing via SNAPI.dll API for Symbol barcode scanner DS4208

查看:52
本文介绍了通过SNAPI.dll API对Symbol条码扫描器DS4208进行图像捕获的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过SNAPI API从Symbol(当前为Zebra)条形码扫描仪,型号DS4208(我们也使用Zebra的另一个但兼容的型号)中捕获图像.条形码捕获/识别效果很好,但是看起来 SnapiDLL.SNAPI_SnapShot(hScanner)调用无法正常工作:根本没有收到 WM_XFERSTATUS 消息.这是小&简化的代码段:

I want to capture image via SNAPI API from Symbol (currently Zebra) barcode scanner, model DS4208 (we're also using another but compatible models from Zebra). Barcode capturing/recognition works pretty well, but looks like SnapiDLL.SNAPI_SnapShot(hScanner) call don't work correctly: no WM_XFERSTATUS message received at all. Here is small & simplified code snippet:

// Set image format
short[] parms = new short[2] { (short)SnapiParamIds.ImageFileType, (short)SnapiImageTypes.Jpeg };
var retCode = SnapiDLL.SNAPI_SetParameters(parms, 2, _devHandles[0]);
Debug.WriteLine($"SNAPI_SetParameters retCode={retCode}");
Application.DoEvents();
Thread.Sleep(50);

retCode = SnapiDLL.SNAPI_SnapShot(_devHandles[0]);
Debug.WriteLine($"SNAPI_SnapShot retCode={retCode}");
Application.DoEvents();
Thread.Sleep(50);

retCode = SnapiDLL.SNAPI_PullTrigger(_devHandles[0]);
Debug.WriteLine($"SNAPI_PullTrigger retCode={retCode}");
Application.DoEvents();
Thread.Sleep(50);

返回码始终为0(即无错误),但是我的消息处理程序未收到任何 WM_XFERSTATUS 消息.

Return codes always 0 (i.e. no error), but no WM_XFERSTATUS message received by my message handler.

P.S.使用CoreScanner驱动程序和OCX的Zebra SDK的C#应用​​程序运行良好,并且能够捕获图像和视频.但是出于某些原因,我想避免安装CoreScanner驱动程序;小而简单的条形码扫描器SNAPI.dll可以很好地工作,并且我希望它也可以用于图像捕获-可能是我做错了...

P.S. C# application from Zebra's SDK which is using CoreScanner driver and OCX, is working fine and able to capture images and video. But I'd like to avoid CoreScanner driver installation for some reasons; for barcode scanning small and simple SNAPI.dll works pretty fine, and I expect to get it work for image capturing too - probably, I'm doing something wrong...

P.P.S.伙计们,如果您没有使用符号条形码标尺的经验,请不要发表评论.SNAPI ,并且无法提供有效的代码段!

P.P.S. Guys, please DO NOT COMMENT if you have NO EXPERIENCE WORKING WITH SYMBOL BARCODE SCANNERS & SNAPI, and CAN NOT PROVIDE a working snippet!

推荐答案

联系Zebra技术支持(他们是Symbol/Motorola条形码扫描仪业务的继承者)后,我发现SNAPI.dll中的图像/视频功能已损坏.适用于x64操作系统(但其余大多数API调用均正常运行).不幸的是,Zebra不再支持SNAPI,我应该使用Zebra的CoreScanner API.好消息是:此API可以正常运行.这不是一个好消息:我应该使用Zebra的其他安装软件包.

After contacting Zebra tech support (they are successors of Symbol/Motorola barcode scanner business), I figured out that the imaging/video functionality is broken in SNAPI.dll for the x64 OSes (but most of the rest API calls are working properly). Unfortunately, SNAPI isn't supported by Zebra anymore, and I should use Zebra's CoreScanner API. The good news is: this API is working fine, as it supposed to be. Not a very good news: I should use additional installation package from Zebra.

这篇关于通过SNAPI.dll API对Symbol条码扫描器DS4208进行图像捕获的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆