c++ Attributes ============== Replacing IDL ------------- [coclass] class... Adds base classes (replaces the IDL coclass statement). Class Factory ------------- [coclass, noncreatable] When not using class factory, you need to override the registration of the class by using the "noncreate" statement. Interfaces ---------- [dual] or [dispinterface] or [object] "__interface" keyword enforce the rules of COM interfaces. COM_INTERFACE_ENTRY ------------------- [coclass, com_interface_entry("COM_INTERFACE_ENTRY(IMyInterface)")] class... Use this to add your own entries to the interface map. RGS --- [coclass, registration_script(script="my.rgs")] Component Categories -------------------- [coclass, implements_category("CATID_Insertable")] Code Modules ------------ [module(dll, name="OneFileServer")]; Attributes can be used to generate code module entry points: [module(dll, name="Test"), idl_module(name="TestModule", dllname="test.dll")]; [idl_module(name="TestModule"), entry("MyFunc")] If you change "dll" to "exe" and omit the /LD switch, the code will generate an EXE COM server. Threading Model --------------- [coclass, threading("free")] threading parameters - apartment, single, free, neutral, both, rental A component that does not provide synchronization should run in an STA, and a component that protects its thread-sensitive code can run in the MTA. If a component requires a window message queue (for example it has a user interface) or it has thread affinity (it uses thread local storage), then it must run in an STA. ---------------------------------------------------------------------------------------------------------- MTA - multithreaded apartment STA - singlethreaded apartment