组件注册时生成的CLSID是根据什么算法得来的?

CFree 2001-06-26 07:48:30
换句话的意思是,怎么知道被注册的DLL的CLSID?
多谢!
...全文
104 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
CFree 2001-06-28
  • 打赏
  • 举报
回复
the UUIDs are created using the current date, the current time and the unique number of the network card of the computer.
the time and date part resides in the first eight-digit part of the UUID. The next four-digit part is not known to me so far. The rest of it is unique and, we may say, identifies your PC.

i have the same
Elminster 2001-06-27
  • 打赏
  • 举报
回复
这个值和时间与机器(你的机器上若有网卡就取你的网卡MAC地址)都有关,统计意义上可以保证到3400年不重复。相关算法可以参阅:

CAE Specification X/Open DEC: Remote Procedure Call

VC++ 提供一个 GUIDGEN 程序生成 CLSID。

以上信息你可以在MS Press出版,Dale Rogerson 所著《COM技术内幕》一书中找到(好书哦)。
vcmfc 2001-06-27
  • 打赏
  • 举报
回复
关于GUID
GUID用于标识软件接口,它与COM(部件对象模型)中用于标识COM接口的标识符相同,它还用于OSF(开放软件基金)的DCE(分布式计算环境)中,标识RPC(远程过程调用)目标。如果你想了解GUID如何生成以及为什么能在统计意义上唯一,请参考Kraig Brockschmidt的《Inside OLE, Second Edition (Microsoft Press, 1995)》第66页,原始算法规范由OSF制定,相关部分见http://www.opengroup.org/onlinepubs/9629399/apdxa.htm。

为了在设备驱动程序中使用GUID,首先需要使用UUIDGEN或者GUIDGEN生成GUID,然后把结果放到头文件中。GUIDGEN更易于使用,它允许选择GUID的输出格式,并把结果送到剪贴板。
lwg7603 2001-06-27
  • 打赏
  • 举报
回复
同意Elminster() 
nerk 2001-06-27
  • 打赏
  • 举报
回复
the UUIDs are created using the current date, the current time and the unique number of the network card of the computer.
the time and date part resides in the first eight-digit part of the UUID. The next four-digit part is not known to me so far. The rest of it is unique and, we may say, identifies your PC.
CFree 2001-06-27
  • 打赏
  • 举报
回复
Elminster():多谢,我去找找。3天内给分
m_leaner 2001-06-26
  • 打赏
  • 举报
回复
我只知道是一个128数值,跟时间有关系..关注

3,245

社区成员

发帖
与我相关
我的任务
社区描述
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
社区管理员
  • ATL/ActiveX/COM社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧