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

2023-07-31 16:54:49 码农 1142
[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#防SQL注入帮助类
  • 采购管理系统(PMS-Purchase Management System)
  • 操作系统常见面试题(三)
  • 高项论文范文(十三):论信息系统项目整体管理
  • 【201305-单选03】下面关于计算机系统的叙述中,最完整的是( )。
  • 较常出现杵状指(趾)的呼吸系统疾病是()
  • 依据国家信息安全等级保护相关标准,军用不对外公开的信息系统至少应该属于()
  • C# 未能创建 SSL/TLS 安全通道/未能为 SSL/TLS 安全通道建立信任关系
  • 智慧农业温室大棚环境监测系统

© CopyRight 2014~2024 薄学网.