المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : C++ Attributes: Make COM Programming a Breeze with New Feature in Visual Studio .NET



C++ Programming
03-29-2009, 02:42 AM
C++ attributes in Visual Studio .NET are used to generate C++ code through attribute providers. Attribute providers generate code for COM classes, and the code is injected by the C++ compiler at compile time. This has the effect of reducing the amount of code that you need to write. In addition, with C++ attributes you no longer need to maintain separate IDL and RGS files, which makes project management simpler. This article explains C++ attributes, the process used by the attribute provider to generate code, and the code that is automatically generated. It also covers how attributes affect the registration process, how attributes can be used to generate code module entry points, and how connection points can be implemented using C++ attributes. Also explained is how these features contribute to the Unified Event Model for the .NET platform.

Richard Grimes

<a href="http://msdn.microsoft.com/magazine/7f9e31dd-e25a-4163-b211-ca1133ed6695">MSDN Magazine April 2001