can only call 'event' in the context of a member function of the receiving class
The event can only be called from the receiving class.
The following sample generates C3718:
[event_source(native)] struct A { __event void func(); }; [event_receiver(native)] struct B { void func2(); void HOOK(A* pa) { __hook(&A::func, pa, &B::func2); // valid call } }; void main() { A a; B b; __hook(&A::func, &a, &B::func2, &b); // C3718, remove this line to resolve the error a.func(); }