Windows CE设备的唯一机器ID [英] Unique Machine ID for a Windows CE Device

查看:544
本文介绍了Windows CE设备的唯一机器ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为CE 6.0设备生成唯一的机器ID。在Windows操作系统上,我使用WMI获取一些硬件标识符,我从中构造了这个ID。显然,Win CE不支持WMI,所以我正在寻找替代品。

I need to generate unique machine ID for a CE 6.0 device. On Windows OS, I was using the WMI to obtain some hardware identifiers from which I constructed this ID. Apparently, WMI is not supported on Win CE so I am looking for alternatives.

目前我正在使用我在平台生成器中构建的操作系统映像,并测试我的应用程序在模拟器,只有后来我将交付真正的WinCE设备。

At the moment I am playing with OS image that I have constructed in Platform Builder and testing my app in emulator, only later I will be delivered the real WinCE device.

我试过 GetDeviceUniqueID code> KernelIoControl(IOCTL_HAL_GET_DEVICEID,... ,但它们都返回 ERROR_NOT_SUPPORTED (0x80070032)。

I have tried both GetDeviceUniqueID and KernelIoControl(IOCTL_HAL_GET_DEVICEID,... but they both return ERROR_NOT_SUPPORTED ( 0x80070032 ).


  1. 我需要添加wince目录中的一些包才能启用此功能?

  2. 仿真器?(我的意思是,OEM是否可以为真实设备实现这个独特的id特性?

  1. Do I need to include some package from the wince catalog in order to enable this feature?
  2. Is this limitation only on emulators? (i mean, could it be that OEM's are implementing this unique-id-feature for real devices?


推荐答案

p>如果你正在构建操作系统,那么你需要实现IOCTL,以便KernelIoControl返回一些东西。它的派生完全取决于你。我已经看到MAC作为基地,以及板载闪存的序列号。

If you're building the OS, then you need to implement the IOCTL so that KernelIoControl returns something. How its derived is completely up to you. I've seen the MAC as a base, as well as the serial number of on-board flash.

如何做你的特定平台我可以' t说,但作为x86的示例,您可以克隆代码在%WINCEROOT& \PLATFORM\ COMMON \SRC\X86\COMMON\IOCTL\devinfo.c并修改克隆(显然, 不修改公共代码)。

How you'd do that for your particular platform I can't say, but as an example for x86 you might clone the code at %WINCEROOT&\PLATFORM\COMMON\SRC\X86\COMMON\IOCTL\devinfo.c and modify the clone (don't modify the common code, obviously).

这篇关于Windows CE设备的唯一机器ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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