怎么样使用nRFgo Studio 生成自定义的 UUID?芯片是nRF51822
解决方案:40分
仅供参考:
#pragma comment(lib,"ole32") #include <objbase.h> #include <stdio.h> union U { GUID guid; unsigned char b[16]; } u; int i; char s[33]; void main() { if (S_OK!=CoCreateGuid(&u.guid)) return; for (i=0;i<16;i++) sprintf(s+i*2,"%02x",u.b[i]); printf("GUID=%s\n",s);//每次结果都不一样 } //GUID=f5a44443aa5fb1479bf6741fa213d33c