c++ - GUID的唯一性

标签 c++ windows coding-style registry guid

GUID 是 MSFT 生成的 128 位唯一标识符。

我怀疑 GUID 是否是全局唯一的。我的意思是我生成的 GUID,在全世界使用任何应用程序的任何系统中没有其他人可以生成?真的吗?

我很惊讶 Microsoft 如何知道或跟踪这种独特性。

并且生成的唯一 GUID 也可以链接到任何实体?应用程序,变量,系统,?

GUOD 可以链接到哪些实体?任何人都可以澄清 GUID 的概念吗?它是独立于编程语言的吗?

最佳答案

这两篇文章您可能会感兴趣,应该可以帮助您理解这些 ID 背后的概念。


The intent of UUIDs is to enable distributed systems to uniquely identify information without significant central coordination. [...] the word unique should be taken to mean "practically unique" rather than "guaranteed unique". [...] it is possible for two differing items to share the same identifier.

The identifier size and generation process need to be selected so as to make this sufficiently improbable in practice.

Anyone can create a UUID and use it to identify something with reasonable confidence that the same identifier will never be unintentionally created by anyone to identify something else. Information labeled with UUIDs can therefore be later combined into a single database without needing to resolve identifier (ID) conflicts.

非常简单:它基本上是一种创建标识符的方法 (具有特定格式)很可能是唯一的。

关于c++ - GUID的唯一性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10330091/

相关文章:

c++ - 在 C++ 中使用后递增变量未定义行为访问数组元素吗?

c++ - 重载 + 运算符时出现段错误

mysql - 无法在 xampp 上运行 mysql 服务器

.net - 如何在 .NET 中提示 Internet 代理的默认 Windows 凭据对话框表单?

design-patterns - 应用干净的代码和 SOLID 原则花了我很多时间 : normal?

coding-style - 我需要什么才能开始用机器语言写作?

c++ - 静态变量无法解析

c++ - rosserial 从 windows 发布 sensor_msgs/Image

javascript - 我应该使用绑定(bind)还是关闭 'this' 的别名?

c++ - 通过引用返回的变量范围