Simple Generation of GUID in C

痞子三分冷 提交于 2019-11-29 09:36:04

CoCreateGuid is standard for all forms of Windows. Linux standard is libuuid, which is standard on all Linux versions and should be lightweight. I don't know of any library that will work for both Windows and Unix. I think that an #if branch for Windows and Linux is actually appropriate here.

In fact CoCreateGuid() calls UuidCreate(). The generated Data Types(UUID,GUID) are exactly the same. On Windows you can use both functions to create GUIDs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!