Creates an event receiver (sink).
The event_receiver C++ attribute specifies that the class or structure to which it is applied will be an event receiver, using the Visual C++ unified event model.
event_receiver is used with the event_source attribute and the __hook and __unhook keywords. Use event_source to create event sources. Use __hook within an event receiver's methods to associate ("hook") event receiver methods to the events of an event source. Use __unhook to dissociate them.
layout_dependent is only specified for COM event receivers (type=com). The default for layout_dependent is false.
A templated class or struct cannot contain events.
coclass when layout_dependent=true
For more information, see Attribute Contexts.