What's the C++ version of Guid.NewGuid()?

前端 未结 7 1476
栀梦
栀梦 2021-01-31 14:04

I need to create a GUID in an unmanaged windows C++ project. I\'m used to C#, where I\'d use Guid.NewGuid(). What\'s the (unmanaged windows) C++ vers

相关标签:
7条回答
  • 2021-01-31 15:04

    I think CoCreateGuid is what you're after. Example:

    GUID gidReference;
    HRESULT hCreateGuid = CoCreateGuid( &gidReference );
    
    0 讨论(0)
提交回复
热议问题