'pointer': must be a pointer to 'class'
You specified a pointer in __hook or __unhook that did not point to a valid class. To fix this error, ensure that your __hook and __unhook calls specify pointers to valid classes.
The following sample generates C3715:
[event_source(native)] class CEventSrc { public: __event void event1(); }; [event_receiver(native)] class CEventRec { public: void handler1() { } void HookEvents(CEventSrc* pSrc) { CEventRec* pRec = this; __hook(CEventSrc::event1, pRec, CEventRec::handler1); // C3715 // try the following line instead // __hook(CEventSrc::event1, pSrc, CEventRec::handler1); } void UnhookEvents(CEventSrc* pSrc) { __unhook(CEventSrc::event1, pSrc, CEventRec::handler1); } }; void main() { }