Compartilhar via


GUID Creator

If you ever need to create a custom GUID, VisualStudio actually comes with one (guidgen.exe): C:\Program Files\Microsoft Visual Studio 8\Common7\Tools

You can create the GUID in several formats, and it has a copy feature so you can paste into your source code.

// {FA502476-DB91-4a16-A6B2-ADC1C1B70F9F}
IMPLEMENT_OLECREATE(<<class>>, <<external_name>>, 0xfa502476, 0xdb91, 0x4a16, 0xa6, 0xb2, 0xad, 0xc1, 0xc1, 0xb7, 0xf, 0x9f);

// {FA502476-DB91-4a16-A6B2-ADC1C1B70F9F}
DEFINE_GUID(<<name>>, 0xfa502476, 0xdb91, 0x4a16, 0xa6, 0xb2, 0xad, 0xc1, 0xc1, 0xb7, 0xf, 0x9f);

// {FA502476-DB91-4a16-A6B2-ADC1C1B70F9F}
static const GUID <<name>> = { 0xfa502476, 0xdb91, 0x4a16, { 0xa6, 0xb2, 0xad, 0xc1, 0xc1, 0xb7, 0xf, 0x9f } };

{FA502476-DB91-4a16-A6B2-ADC1C1B70F9F}