// - 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;}