function GetGUID: string;
var
  vGUID: TGUID;
  vTemp:string;
begin
  if S_OK = CreateGuid(vGUID) then
  begin
    vTemp := GUIDToString(vGUID);
    //去掉字符串中的{,-字符
    vTemp:=StringReplace(vTemp,'-','',[rfReplaceAll]);
    vTemp:=StringReplace(vTemp,'{','',[rfReplaceAll]);
    vTemp:=StringReplace(vTemp,'}','',[rfReplaceAll]);
  end;
  Result:=vTemp;
end;

05-11 22:18