Generate the code of the GUID

zhaozj2021-02-17  48

// - Generate the code of GUID / / - Related Programs / Microsoft Guidgen.exe

#include "stdafx.h" #include #include

{Static Char BUF [64] = {0}; Guid Guid; if (S_OK == :: CocreateGuid (& Guid) {_snprintf (BUF, SIZEOF (BUF), "{ % 08X-% 04X-% 04X-% 02X% 02X-% 02x% 02x% 02x% 02x% 02x% 02x} ", guid.data1, guid.data2, guid.data3, guid.data4 [0], guid. Data4 [1], guid.data4 [2], guid.data4 [3], guid.data4 [4], guid.data4 [5], guid.data4 [6], guid.data4 [7]);} return (const char *) buf;}

INT Main (int Argc, char * argv []) {// com Co.itialize (null);

Printf (newguid ()); Printf ("/ r / n");

// - com coundialize ();

Return 0;}

转载请注明原文地址:https://www.9cbs.com/read-28682.html

New Post(0)