C# .NET 利用系统API生成有序GUID

2023-07-31 16:54:49 码农 1152
[DllImport("rpcrt4.dll", SetLastError = true)]
static extern int UuidCreateSequential(out Guid guid);

public static Guid GenerateSequentialGuid()
{
    Guid guid;
    int result = UuidCreateSequential(out guid);
    if (result != 0)
    {
        throw new ApplicationException("Create sequential guid failed: " + result);
    }
    return guid;
}
—— 完 ——
  • 弱电系统都包含什么内容?
  • C# MVC 获取当前网站域名的方法
  • C#中OPC的一些基础知识
  • 从网络安全的角度看,网络安全防护系统的设计与实现必须遵守一些基本原则
  • WinCC:如何在WinCC中读取系统时间?
  • ASP.NET的路由系统:URL与物理文件的分离
  • 一定与系统性红斑狼疮的疾病活动性有关的免疫学检测指标是()
  • 系统规划与管理师章节练习题易错题汇总
  • 信息安全风险评估是指确定在计算机系统和网络中每一种资源缺失
  • C#十六进制颜色与Color对象的互相转换

© CopyRight 2014~2024 薄学网.