Ok, I'm probably the last UEFI programmer to figure this out, but you can use UUIDGEN (which comes with Visual Studio) to generate C-style GUIDs. Just type:
uuidgen -s
and you'll get something like:
INTERFACENAME = { /* 6e43ed89-a0eb-49df-91c6-75e7874b8834 */
0x6e43ed89,
0xa0eb,
0x49df,
{0x91, 0xc6, 0x75, 0xe7, 0x87, 0x4b, 0x88, 0x34}
};
Just replace INTERFACE name with your GUID name, remove the trailing ';' and beautify it a bit and you get:
#define MY_GUID \
{0x6e43ed89, 0xa0eb, 0x49df, \
{0x91, 0xc6, 0x75, 0xe7, 0x87, 0x4b, 0x88, 0x34}}
No magic. And, of course, don't forget uuidgen -n 256 to generate a lot of GUIDs.


