Attributes are designed to provide an efficient and quick method to simplify COM programming in Visual C++. Attributes, like C++ keywords, are used in your source files and interpreted by the compiler. Attributes can modify the behavior of your existing code and even insert additional framework code to accomplish basic tasks, such as implementing an ActiveX control, creating a class factory, or formatting a database command. You can apply attributes to nearly any Visual C++ object, such as classes, data members, and member functions, or you can insert attributes into your source code as stand-alone statements.
Visual C++ Help includes attributes walkthroughs that cover various aspects of attributed programming.