Jeff R.
2004-05-19 00:58:19 UTC
Hello,
I am using the Create GUID tool to generate a GUID in either of the
following formats:
// {AB7F780B-D27B-4c8f-A19A-005D8AB7874E}
DEFINE_GUID(myGUID,
0xab7f780b, 0xd27b, 0x4c8f, 0xa1, 0x9a, 0x0, 0x5d, 0x8a, 0xb7, 0x87, 0x4e);
static const GUID myGUID =
{ 0xab7f780b, 0xd27b, 0x4c8f, { 0xa1, 0x9a, 0x0, 0x5d, 0x8a, 0xb7, 0x87,
0x4e } };
I do it this way so that I don't have to store the GUID as a string in my
code (I don't want the actual GUID to be visible as a string if someone
opens my .EXE in Notepad). But I need to convert the GUID to a string so I
can use it with registry functions. Can someone show me how to convert a
GUID in either of the formats above to a CString or TCHAR[] ? thanks!
I am using the Create GUID tool to generate a GUID in either of the
following formats:
// {AB7F780B-D27B-4c8f-A19A-005D8AB7874E}
DEFINE_GUID(myGUID,
0xab7f780b, 0xd27b, 0x4c8f, 0xa1, 0x9a, 0x0, 0x5d, 0x8a, 0xb7, 0x87, 0x4e);
static const GUID myGUID =
{ 0xab7f780b, 0xd27b, 0x4c8f, { 0xa1, 0x9a, 0x0, 0x5d, 0x8a, 0xb7, 0x87,
0x4e } };
I do it this way so that I don't have to store the GUID as a string in my
code (I don't want the actual GUID to be visible as a string if someone
opens my .EXE in Notepad). But I need to convert the GUID to a string so I
can use it with registry functions. Can someone show me how to convert a
GUID in either of the formats above to a CString or TCHAR[] ? thanks!