'class': syntax is only supported when layout_dependent=true
You tried to hook an entire interface of events but layout_dependent on event_receiver attribute is not true; you must hook a single event at a time.
The following sample generates C3739:
struct A { __event void e(); }; // event_receiver is implied // [ event_receiver(layout_dependent=false)] // use the following line instead // [event_receiver(com, layout_dependent=true), coclass ] struct B { void f(); B(A* a) { __hook(A, a, &B::f); // C3739 // use the following line instead to hook a single event // __hook(&A::e, a, &B::f); } }; void main() { }