DELPHI帮助:
CreateClassID generates a new GUID and returns it as a string.UnitComObjCategoryCOM utilitiesfunction CreateClassID: string;DescriptionUse CreateClassID to create a new GUID and access it as a string. A demo of the CreateClassID function is available in the Demos area.
我想得到一个全局唯一标识符,但这个函数在某台电脑上产生了N个相同的标识符,为什么?

解决方案 »

  1.   

    如果你说的情况是真的,那么使用API函数吧:
    uses ActiveX;procedure TForm1.Button1Click(Sender: TObject);
    var g: TGUID;
      s_g: String;
    begin
      CoCreateGuid(g);
      s_g := GUIDToString(g);
      ShowMessage(s_g);
    end;
    —————————————————————————————————
    MaximStr := '宠辱不惊,看庭前花开花落,去留无意;
                 毁誉由人,望天上云卷云舒,聚散任风。';
    if Not Assigned(I) then
      I := TI.Create(Nil);
    I.Maxim := MaximStr;
    I.Explain := '假如上述代码中出现“OA”、“3D”等字样,改为“=”或者去掉';
    I.Desire := '加不加分随你';
    —————————————————————————————————
      

  2.   

    CMOS电池没电了吧
    你的时钟停了?