如何在Delphi上生成唯一的计算机ID? [英] How to generate an unique computer id on Delphi?

查看:154
本文介绍了如何在Delphi上生成唯一的计算机ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何快速为delphi应用程序生成唯一的计算机ID?
我曾经用c#轻松地做,但这有时失败。我确实希望ID是静态的,但是我不在乎,因为硬件更改或操作系统重新安装,ID是否更改,我打算将其存储在注册表中,并在应用程序启动时检查它,如果更改更新注册表。 (我知道如何编写注册表部分,我只需要帮助唯一的id)。

How can I quickly generate an unique computer id for a delphi app? I used to do it easly with c#, but this failed sometimes. I do want the ID to be "static" but I don't care if the id changes because of a hardware change or OS reinstallation, I was planning to store it in the registry and check it when the app starts, and if it changed update the registry. (I know how to code the registry part, I only need help for the unique id).

谢谢。

推荐答案

使用硬盘序列号或MAC地址:

Use the hard disk serial number or MAC address:

如何从硬盘获取序列号?
生成唯一的机器ID

这篇关于如何在Delphi上生成唯一的计算机ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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