uuid (Windows CE 5.0)
The __declspec (uuid )extended storage-class modifier tells the compiler to attach a GUID to the specified class or structure.
__declspec( uuid("ComObjectGUID") ) declarator
The uuid modifier takes a string as its argument. This string names a GUID in normal registry format with or without the { } delimiters. For example:
struct __declspec(uuid("00000000-0000-0000-c000-000000000046")) IUnknown;
struct __declspec(uuid("{00020400-0000-0000-c000-000000000046}")) IDispatch;
This attribute can be applied in a re-declaration. This allows the system headers to supply the definitions of interfaces such as IUnknown, and the re-declaration in some other header such as COMDEF.H to supply the GUID.
The keyword __uuidof can be applied to retrieve the constant GUID attached to a user-defined type.
See Also
Send Feedback on this topic to the authors