Compiler Error C2787

'identifier' : no GUID has been associated with this object

The __uuidof operator can take either a user defined type with a GUID attached or an object of such a user defined type as its argument. This error occurs when the supplied argument is a user defined type, but without a GUID attached.

For example:

struct F {
};

struct __declspec(uuid("00000000-0000-0000-0000-000000000000")) F2 {
};

void bar(void)
{
    __uuidof(F);   // error C2787
    __uuidof(F *);   // error C2787

    __uuidof(F2);   // OK
}