如何唯一地识别 USB 设备? [英] How to identify UNIQUELY a USB Device?

查看:53
本文介绍了如何唯一地识别 USB 设备?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过唯一标识符来识别 USB 设备,例如操作系统具有 Mac-ID、硬盘 ID、以太网卡 ID 具有唯一标识符?我知道可以轻松更改USB分区的卷序列号,或者用户格式化时可以更改.

Is it possible to identify a USB device by a unique identifier like an Operating system has Mac-ID, Harddisk ID, Ethernet card ID has unique identifiers? I know one can easily change the volume serial number of USB partition or it could be changed when user Formats it.

但是是否有某种USB 硬盘 ID 或 USB 硬件 ID"可以使用 WMI 服务通过 MFC(Visual C++ 或 C#)检索的 ID?这样的标识符对物理设备来说是唯一的吗?请澄清...

But is there an ID some kind of 'USB Harddisk ID or USB Hardware ID' which could be retrieved via MFC's (Visual C++ or C#) using the WMI Service? Will such an identifier be unique to the physical device? Kindly clarify...

推荐答案

与任何 USB 设备中可用的唯一编号"最接近的等效项是 VID 和 PID、供应商 ID 和产品 ID.它用于识别设备并为其安装正确的驱动程序.但是,它是同一产品的同一组数字,不足以识别您手中的特定设备.因此,实施许可证验证程序毫无用处,大概是您所追求的.

The closest equivalent of a "unique number" available in any USB device is the VID and PID, the vendor and product IDs. It is used to identify the device and install the proper driver for it. However, it is the same set of numbers for the same product, it is not good enough to identify the particular device you have in your hand. And thus useless to implement a license verification procedure, presumably what you are after.

只有某些种类的 USB 设备实现了序列号.由于驱动器格式化程序会生成卷序列号,因此您会意外地从闪存驱动器中获取它.也没有用,它可以很容易地改变.USB wifi 适配器可以工作,制造商必须生成唯一的 MAC 地址.

Only certain kind of USB devices implement a serial number. You get it by accident from a flash drive due to the drive formatter generating a volume serial number. Useless as well, it can easily be changed. A USB wifi adapter could work, the manufacturer must generate a unique MAC address.

有一类 USB 设备完美可以实现这一目标.通用名称是dongle",它们就是为此而生的.当您购买时,您还会获得可以链接到您的程序的软件,该软件提供了一种验证许可证号的防篡改方法,这是许可证验证程序的另一个重要部分,通常是薄弱环节.在这篇维基百科文章中详细了解加密狗.

There's one class of USB devices that are perfect for this goal. The generic name is "dongle", they are made for this. When you buy one you also get software that you can link into your program that provides a tamper-proof way to verify the license number, another important part of a license verification procedure and usually the weak link. More about dongles in this Wikipedia article.

这篇关于如何唯一地识别 USB 设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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