主板序列号的最大长度是多少?在位或字节? [英] What can be the maximum length of motherboard serial number? In bits or bytes?

查看:901
本文介绍了主板序列号的最大长度是多少?在位或字节?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的专家,



我正在开发许可证保护技术,我需要接收/传递PC /笔记本电脑/ MAC的唯一标识符。我选择主板序列号。作为唯一ID是明智的选择吗?



如果没有那么请建议。如果是,那么我需要知道它可以多长时间?



提前致谢。



我尝试了什么:



我尝试使用以下代码来获取主板序列号,我成功了但我不知道多少它可以更长或者它可以是什么类型的字符串?



函数getBoardBaseSerialNo()

Dim baseNo As String

Dim objs As Object



Dim obj As Object

Dim WMI As Object

Dim sAns As字符串



WMI = GetObject(WinMgmts:)

objs = WMI.InstancesOf(Win32_BaseBoard)

For Each obj in objs

sAns = sAns& obj.SerialNumber

如果sAns< objs.Count然后sAns = sAns& ,

下一页

baseNo = sAns



返回baseNo

结束功能



返回:120801136603889

Dear Experts,

I am working on license protection technology, in which i need to take/pass unique identifier of PC/Laptop/MAC. I choose Motherboard serial number. Is it wise option to take as unique id?

If not then please suggest. If yes then i need to know that how much long it can be?

Thanks in advance.

What I have tried:

I tried following code to fetch Motherboard serial number, i successfully got but i don't know how much longer it can be or what type of string it can be?

Function getBoardBaseSerialNo()
Dim baseNo As String
Dim objs As Object

Dim obj As Object
Dim WMI As Object
Dim sAns As String

WMI = GetObject("WinMgmts:")
objs = WMI.InstancesOf("Win32_BaseBoard")
For Each obj In objs
sAns = sAns & obj.SerialNumber
If sAns < objs.Count Then sAns = sAns & ","
Next
baseNo = sAns

Return baseNo
End Function

It Returns: 120801136603889

推荐答案

请看一下这篇文章,它将涵盖所有您的问题:搜索可靠的硬件ID [ ^ ]



短版本:硬件ID唯一可靠的来源是硬盘的序列号。
Please take a look at this article, it will cover all your questions: Searching for a reliable hardware ID[^]

Short version: The only reliable source for a hardware-ID is the serial number of a harddisk.


见这里:< a href =https://msdn.microsoft.com/en-us/library/windows/desktop/aa394072(v=vs.85).aspx> Win32_BaseBoard类(Windows) [ ^ ] buit all it that isstring所以它真的取决于制造商(正如你所期望的那样)而不是定义的长度。



你可能需要也看到了这一点: windows - 主板ID - WMI C ++ - 可靠吗? - 堆栈溢出 [ ^ ]
See here: Win32_BaseBoard class (Windows)[^] buit all it says is "string" so it's really up to the manufacturer (as you'd expect) rather than a defined length.

You probably need to see this as well: windows - Motherboard ID - WMI C++ - Reliable? - Stack Overflow[^]


任何设备的序列号长度都没有标准。也无法保证您所谈论的设备甚至可以使用您的代码访问序列号。
There is no standard for serial number lengths for any device. There is also no guarantee that the device you're talking about even has a serial number accessible to your code.


这篇关于主板序列号的最大长度是多少?在位或字节?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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