且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

C ++或C#编程手机条码设备?

更新时间:2023-02-27 08:01:42

我一直在设计和在C,C ++和C#中开发用于Windows Mobile和Windows CE的软件已有相当多年了。此外,我一直在这样做的霍尼韦尔(以前的手持产品,2007年由霍尼韦尔购买),我从几乎所有方面的设备,从驱动程序和服务到业务线GUI和实用程序。

I've been designing and developing software for Windows Mobile and Windows CE in C, C++ and C# for quite a few years now. Moreover, I been doing so for Honeywell (formerly Hand Held Products, purchased by Honeywell in 2007) where I've worked on nearly all aspects of the devices, from drivers and services to Line of Business GUIs and utilities.

首先,我不会告诉你一种语言比另一种语言更好...我可能花费50/50分割我的时间与每个,每个平台在移动开发中肯定有自己的位置。

First of all, I won't tell you one language is better than the other... I probably spend a 50/50 split of my time with each, and each platform definitely has their own place in the mobile development.

然而,我会提出一个建议,你可能会离开任何运行操作系统的设备作为WinCE 4.2,特别是如果你甚至考虑.NET开发。其原因是,4.2最多只有嵌入在ROM(OS ROM映像的一部分)中的.NET CF 1.0,这意味着您将需要一个〜5MB的CAB文件来安装至少.NET CF 2.0是的,你可以用CF 1.0开发,但是,真的,不值得使用这样一个旧框架的痛苦。大多数WinCE 5.0设备这些天来与CF(Compact Framework)2.0安装在ROM中,所以我至少会找那个。

I will however, give a suggestion that you likely stay away from any device that runs an OS as old as WinCE 4.2, especially if you are even considering .NET development. The reasoning for this is that 4.2 only has, at most, .NET CF 1.0 embedded in ROM (part of the OS ROM image), meaning that you would require a ~5MB CAB file to install at least .NET CF 2.0 Yes, you could develop with CF 1.0 but, truly, it's not worth the pain of using such an old framework. Most WinCE 5.0 devices these days come with CF (Compact Framework) 2.0 installed in the ROM so I would at least look for that.

同样的虚荣,你甚至可以考虑使用Windows Mobile 6.0或6.1的设备,因为它们很容易编程,安装。如果你想知道为什么我没有提到CF 3.0或CF 3.5,只是因为第一个移动平台发布与这些版本将是Windows Mobile 6.5,这还没有出来。虽然你可以随时安装框架(〜8MB CAB)。

On that same vain, you may even want to consider using a device with Windows Mobile 6.0 or 6.1 as they are easy to program with and will always have CF 2.0 pre-installed. In case you're wondering why I have not mentioned CF 3.0 or CF 3.5, it's just because the first Mobile platform to be release with those versions will be Windows Mobile 6.5, which is not out yet. Though you can always install the framework if you want (~8MB CAB).

授予,WinCE绝对给你一个更多的Windows外观和感觉到它的GUI Windows Mobile表哥,所以这是所有的编程偏好和您的最终用户想要和需要的问题。

Granted, WinCE definitely gives you a more "Windows" look and feel to its GUI over its Windows Mobile cousin, so that is all a matter of your programming preference and what your end users want and need.

关于 kgiannakakis的评论SDK只是一个东西层,这是不是真的。如果你有一个合适的SDK,你应该拥有所有相同的访问任何设备或驱动程序,你会在C + +,但轻松的C#。例如,霍尼韦尔(中国)为C ++,VB和C#中的所有设备提供了广泛的SDK,而且SDK的C#部分实际上比C ++部分具有更多功能。

Regarding kgiannakakis's comments on SDKs being only a thing layer, this is just not true. If you have a proper SDK you should have all of the same access to any devices or drivers that you would in C++ but with the ease of C#. For example, Honeywell provides an extensive SDK for all of our devices in C++, VB and C# and the C# portion of the SDK actually has more functionality than the C++ portion. You will never have to do a P/Invoke with our code from C#.

如果你想看一下我的代码,我将从

If you want to take a look at the SDK I'm talking about, it's freely available to download here and has some great examples. IMHO I would actually consider the provided SDK as more important than the hardware in many cases since, most of the time, the hardware for the devices is pretty much the same. They all have ARM CPUs, WiFi, Bluetooth, Laser or Image based scanners, etc. Though, I looked at the Intermec link you posted and it doesn't look like that unit actually has a built in scanner...are you using an external scanner hooked to the device? Take a look at the Honeywell offering if you want here. We've got devices with probably the best imager based bar code scanner in the business, built into all of our units. And we have a rock solid SDK (I should know, I wrote a lot of it). And the SDK provides .NET extremely access to all of the hardware on the device. Ok...I'll stop my sales pitch now.

对于一种语言来说,这完全取决于你想做什么。

As for one language over the other...it really all depends on what exactly you want to do.