RAD Studio |  |

E2499: Invalid __declspec(uuid(GuidString)) format (C++)

This error happens when you used the wrong format to define your GuidString. GUIDs are defined for structs in the following way:

Copy Code

    class __declspec(uuid("19a76fe0-7494-11d0-8816-00a0c903b83c")) foo{};

You would get the above mentioned error for instance from:

Copy Code

    class __declspec(uuid(19a76fe0-7494-11d0-8816-00a0c903b83c)) foo{}; //Missing quotes

or

Copy Code

    class __declspec(uuid"7494-11d0-8816-00a0c903b83c")) foo{}; // Missing left parentheses

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!